[ncl-talk] set_dimension [SEC=UNCLASSIFIED]

Dennis Shea shea at ucar.edu
Tue Mar 21 11:43:07 MDT 2017


As noted by the previous email:

%> ncl_filedump MOD14CMH.201604.005.01.hdf | less

===
Did you look at this?

Variable: f
Type: file
filename:       MOD14CMH.201604.005.01
path:   MOD14CMH.201604.005.01.hdf
   file global attributes:
      Satellite : Terra
      Instrument : MODIS
      StartDate : 2016-04-01T00:00:00
      EndDate : 2016-04-30T23:59:59
      BinSize : 0.5
   dimensions:
      LatRows = 360     <===named dimensions and sizes
      LonCols = 720

They are **not** variables, the are named dimension sizes

The file contains **no variables** which contain latitude and longitude.
Hence, in my view, a poorly written file.

Given the sizes I speculate that

http://www.ncl.ucar.edu/Document/Functions/Contributed/latGlobeFo.shtml
http://www.ncl.ucar.edu/Document/Functions/Contributed/lonGlobeFo.shtml

could be used to generate the lat/lon arrays. You may have to rearrange to
the correct order.

  lat = latGlobeFo(..)
  lon = lonGlobeFo()

   x = f=>X    ; (LatRows,LonCols)
   x!0 = "lat"
   x!1  = "lon"

   x&lat = lat
   x&lon = lon

HTH




On Mon, Mar 20, 2017 at 11:07 PM, Griffith Young <griffith.young at bom.gov.au>
wrote:

> Try a print(a) statement and see if the variables you are looking for
> exist.
>
>
>
> You may have the wrong name for the variable...
>
>
>
> Regards,
>
>                 Griff.
>
>
>
>
>
> *Griffith Young *| SITOC
> [image: cid:409470105 at 28052013-3564]
> *Research and Development Branch*
> Bureau of Meteorology
> GPO Box 1289 Melbourne VIC 3001
> Level 9, 700 Collins Street, Docklands VIC 3008
> Tel: +61 3 9616 8381 <+61%203%209616%208381> | G.Young at bom.gov.au
> www.bom.gov.au - cawcr.gov.au - poama.bom.gov.au
>
>
>
>
>
>
>
> *From:* ncl-talk-bounces at ucar.edu [mailto:ncl-talk-bounces at ucar.edu] *On
> Behalf Of *Kunal Bali
> *Sent:* Tuesday, 21 March 2017 3:39 PM
> *To:* ncl-talk at ucar.edu
> *Subject:* [ncl-talk] set_dimension
>
>
>
> Dear NCL users,
>
> I have data with dimension and size as
>
> Dimensions and sizes:    [LatRows | 360] x [LonCols | 720]
>
> for  that, I am trying to read  my dimensions as
>
>       lat =  a->LatRows
>       lon =  a->LonCols
>
>
>
> so resources are using as
>   res at sfXArray        = lon
>   res at sfYArray        = lat
>
>
> BUT it is still showing an error
> *variable (LatRows) is not in file (a*)
>
> So please let me know how to read the dimensions my the attached file.
>
> Thank You
>
>
> Regards
> Kunal Bali
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170321/fbeb4e49/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 2620 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170321/fbeb4e49/attachment.gif 


More information about the ncl-talk mailing list