Re: Do not need to reverse?

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Jun 10 2010 - 22:44:48 MDT

When you use:
   data_unscaled=eos_file->Cloud_Fraction_Liquid_mod08

you get the meta data *including grid coordinates* attached to the
variable. Immediately after the above use
   printVarSummary(data_nscale)

Variable: data_unscaled
Type: short
Total Size: 129600 bytes
             64800 values
Number of Dimensions: 2
Dimensions and sizes: [YDim_mod08 | 180] x [XDim_mod08 | 360]
Coordinates:
             YDim_mod08: [89.5..-89.5]
             XDim_mod08: [-179.5..179.5]
Number Of Attributes: 3
   _FillValue : -9999
   hdfeos_name : Cloud_Fraction_Liquid
   projection : Geographic

You will see coordinate variables
YDim_mod08: [89.5..-89.5]
XDim_mod08: [-179.5..179.5]

================================
When you create a *new* variable (data) via
   data=data_unscaled*1.0E-4
   printVarSummary(data)

You will see no coordinate information.
NCL uses default coordinate whic are south-to-north.
Hence your plot.

By the way:
data@lat1d=eos_file->YDim_mod08
data@lon1d=eos_file->XDim_mod08

has no meaning to NCL.

======================

Attached is working script.

=============================
Good luck

On 6/10/10 5:03 PM, Yi Wang wrote:
> Dear friends,
> I have a question. I used Cloud_Fraction_Liquid.ncl (see attachments) to
> draw the plot for MYD08_D3.A2009001.005.2009048010832.hdf
> (ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/veer/MAP_DATA/files/LAADS/MYD/MYD08_D3/2009/001/MYD08_D3.A2009001.005.2009048010832.hdf).
> I thought I did not need to reverse the plot by using this:
> lat=lat(::-1) ; use north-to-south latitude ordering
> But finally the output
> (MYD08_D3.A2009001.005.2009048010832_Cloud_Fraction_Liquid.pdf in the
> attachments) looks wrong.
> The reason I say the output is wrong is that:
> From the corresponding MYD08_D3.A2009001.005.2009048010832.hdf,
> you can see:
> the data in Cloud_Fraction_Liquid field has the first 30 rows full of
> fill value,
> and the data in YDim field is from 89.5 to -89.5.
> These probably means the output plot will have blank areas in the north
> of the earth. But my current output plot (in
> MYD08_D3.A2009001.005.2009048010832_Cloud_Fraction_Liquid.pdf) has blank
> areas in the south of the earth.
> I think it should not be reversed (using the codes like lat=lat(::-1))
> in the ncl codes, but if not reverse, the plot looks wrong, could you
> please tell me where came the problem? Thanks a lot.
> Best,
> Yi Wang
>
>
>
> _______________________________________________
> 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 Thu Jun 10 22:44:55 2010

This archive was generated by hypermail 2.1.8 : Fri Jun 11 2010 - 09:33:23 MDT