Re: meteo_1.ncl

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Wed May 12 2010 - 11:45:30 MDT

Hi Ed,
Looking at that dataset used in the example:
$NCARG_ROOT/lib/ncarg/data/cdf/meteo_data.nc

there are not any coordinate variables associated with any of the
variables that are read in from the netcdf file. Frankly, this is a
poorly written netCDF file. For instance, the levels (or taus for that
matter) array is not associated with ugrid, vgrid, or rh, in that it is
not assigned as a coordinate variable.

Focusing in on one resource list, the rh_res one, res_rh@sfYArray is set
to levels. By setting the sfXArray and sfYArray resources, the array
passed into the plotting function(s) do not need to have any coordinate
variables associated with them, as the sfXArray and sfYArray resources
contain the necessary coordinate information.

So, while you changed levels to go from 7->0, the rh and t fields won't
change at all, as you are still passing the same data array into
gsn_contour, and telling NCL thru the sfYArray that is to be plotted as
levels 1 through 7.Furthermore, the YLLabels won't change as they are
being set manually to 1000,975, etc...

With regards to the winds, the same issues are involved here. However,
there is a major mistake in the example. If you happen to print out the
u/v wind values, and try to match them up with what is being plotted,
you will see they don't match. A resource is missing from the example
that is needed: uv_res@vcMapDirection = False In effect, setting that
resource to False tells NCL to draw a simple wind barb that is
disassociated from the coordinate plane that it is being drawn on.

I will fix the example shortly.

Thank you for bringing this to our attention!
Adam

On 05/11/2010 08:09 PM, Yang Yang wrote:
> Hello:
>
> For the example on http://www.ncl.ucar.edu/Applications/Scripts/meteo_1.ncl,
>
> The values of levels = (/1000,975,950,925,850,700,500,400/)
>
> If I changed the values of levels to
>
> levels = (/7,6,5,4,3,2,1,0/) ;
>
>
> There is no any changes in the plotted RH and T fields (it should be the case). However, the plotted vectors are completely different from the example figure shown. This is quite odd.
>
> I cannot figure out the reason. Can anyone give me a hint? Thanks!
>
> Ed
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
__________________________________________________
Adam Phillips 
asphilli@ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
Climate and Global Dynamics Division         fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed May 12 11:45:38 2010

This archive was generated by hypermail 2.1.8 : Thu May 13 2010 - 10:03:00 MDT