Re: about lat and lon

From: Yi Wang <yiwang6_at_nyahnyahspammersnyahnyah>
Date: Wed Jul 28 2010 - 11:02:43 MDT

Hi Adam and Mary,

Thanks you so much. Attached is my new codes. But I still got some error
messages:
warning:ScalarFieldSetValues: coordinate array sfXArray requires 153330195
elements: defaulting
warning:ScalarFieldSetValues: coordinate array sfYArray requires 153330204
elements: defaulting
fatal:ContourPlotDraw: Workspace reallocation would exceed maximum size
32556688
fatal:ContourPlotDraw: draw error
warning:WorkstationDeactivate: workstation not active or not opened
Thanks.

Best,
Yi

On Wed, Jul 28, 2010 at 7:15 AM, Mary Haley <haley@ucar.edu> wrote:

> Hi Yi,
>
> These look like pretty simple ASCII files, so you should be able to read
> them with:
>
> lat = asciiread("lat_MYD02HKM.A2010031.0035.005.2010031183706.output
> ",-1,"float")
> lon =
> asciiread("lon_MYD02HKM.A2010031.0035.005.2010031183706.output",-1,"float")
>
> The second "-1" argument will cause the lat/lon values to be read into
> one-dimensional arrays.
> If your data is one-dimensional, and the same length as these lat/lon
> arrays, then you will further
> need to set the sfXArray and sfYArray resources, so the data is overlaid
> correctly on the map:
>
> res@sfXArray = lon
> res@sfYArray = lat
>
>
> If "data" is two-dimensional, and lat/lon are supposed to be as well, then
> your code might look something like this:
>
> lat = asciiread("lat_MYD02HKM.A2010031.0035.005.2010031183706.output ", \
> (/nlat,nlon/),"float")
> lon = asciiread("lon_MYD02HKM.A2010031.0035.005.2010031183706.output", \
> (/nlat,nlon/),"float")
>
> You will still need to set sfXArray and sfYArray as above. In both cases,
> you might also want to set:
>
> res@gsnAddCyclic = False
>
> --Mary
>
> On Jul 27, 2010, at 12:31 PM, Yi Wang wrote:
>
> Hi Friends,
>
> Could you please tell me how to get lat and lon from
> lat_MYD02HKM.A2010031.0035.005.2010031183706.output (
> ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/NASAHDF/lat_MYD02HKM.A2010031.0035.005.2010031183706.output) and
> lon_MYD02HKM.A2010031.0035.005.2010031183706.output (
> ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/NASAHDF/lon_MYD02HKM.A2010031.0035.005.2010031183706.output)
> ?
>
> My ncl codes is in
> MYD02HKM.A2010031.0035.005.2010031183706_EV_500_RefSB.ncl (see attachment),
> and the corresponding HDF file can be found here:
> ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/NASAHDF/MYD02HKM.A2010031.0035.005.2010031183706.hdf
>
>
> Thanks a lot.
>
> Best,
> Yi Wang
> <MYD02HKM.A2010031.0035.005.2010031183706_EV_500_RefSB.ncl>_______________________________________________
>
>
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Wed Jul 28 11:03:20 2010

This archive was generated by hypermail 2.1.8 : Fri Jul 30 2010 - 13:45:56 MDT