[ncl-talk] set_dimension [SEC=UNCLASSIFIED]
Dennis Shea
shea at ucar.edu
Wed Mar 22 08:34:34 MDT 2017
As I noted in my original response:
"You may have to rearrange to the correct order."
Well ..... you do have to rearrange. Did you try at all??
--
If you are using any data set, it is your responsibility to read
documentation. Likely, it includes information about the coordinates.
See attached.
On Wed, Mar 22, 2017 at 3:16 AM, Kunal Bali <kunal.bali9 at gmail.com> wrote:
> Dear Dannis
>
> I tried using
>
> var = a->MeanPower(:,:)
> nlat = 360
> nlon = 720
> lat = latGlobeFo(nlat, "lat", "latitude", "degrees_north")
> lon = lonGlobeFo(nlon, "lon", "longitude", "degrees_east")
>
> var!0 = "lat"
> var!1 = "lon"
>
> var&lat = lat
> var&lon = lon
>
>
>
>
> But still, the values are not within the coordinates.
>
>
>
>
> Kunal Bali
> Research Scholar
> Radio & Atmospheric Science Division
> CSIR - National Physical Laboratory
> New Delhi - 110012
> India
>
>
>
>
>
> On Tue, Mar 21, 2017 at 11:13 PM, Dennis Shea <shea at ucar.edu> wrote:
>
>> 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
>>>
>>>
>>
>
> _______________________________________________
> 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/20170322/2eff9ad9/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: April_2016.png
Type: image/png
Size: 273929 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170322/2eff9ad9/attachment-0002.png
-------------- 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/20170322/2eff9ad9/attachment-0001.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kunal_MOD_hdf.ncl
Type: text/x-ncl
Size: 1317 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170322/2eff9ad9/attachment-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kunal.png
Type: image/png
Size: 183633 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170322/2eff9ad9/attachment-0003.png
More information about the ncl-talk
mailing list