[ncl-talk] Issue with plotting Lambert Conformal Projection Datasets (potential metadata issue)

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Mon Aug 25 18:28:21 MDT 2014


Alan,

>From your code sample, it appears that you are trying to make plots from
data with attached 2-D coordinates.  It is important that the attached 2-D
coordinate variables, lat and lon, are correctly preserved through every
processing stage.

It looks like you may have more than one problem.  In particular, the 2-D
coordinate variables need special handling in NCL.  At minimum, you need
the following lines to correctly associate the 2-D coordinates with the
data variable to be plotted:

   SNOWLIQ at lat2d = lat
   SNOWLIQ at lon2d = lon

If that doesn't work, then try a more general debugging approach.  Begin
with a known working plot script for Daymet data with 2-D coordinate
variables, and an original Daymet data file.  Example daymet_1 from this
page is a good starting point:

   http://www.ncl.ucar.edu/Applications/daymet.shtml

Get this example working with one of your original Daymet files.  Then try
the example with the output from each of your CDO and NCO processing stages.

It should never be necessary to flip the lat or lon coordinate variables in
any stage that you described.  Doing so may introduce additional problems.
 I can not explain why ncview displays the original data flipped, but that
is beyond the scope of this forum.

--Dave


On Mon, Aug 25, 2014 at 11:59 AM, Alan Rhoades <alan.m.rhoades at gmail.com>
wrote:

> Hello,
>
> I've been trying to analyze several Lambert Conformal Projection datasets
> including: DayMet 1km and NARR 32km.
>
> Prior to running my DayMet NCL script (see attached), I post-processed the
> data using CDO and NCO to first split the yearly datasets into monthly
> datasets (splitmon in CDO) and then create monthly average datasets (ncra
> in NCO).  I do a similar methodology for the NARR dataset too.
>
> For a while, I would get error messages from my NCL script indicating this:
>
> "check_for_y_lat_coord: Warning: Data either does not contain a valid
> latitude coordinate array or doesn't contain one at all.
> (0)     A valid latitude coordinate array should have a 'units' attribute
> equal to one of the following values:"
>
> So, I added metadata assignments to my script to get around this error and
> now the NCL script finishes (with no errors) and generates the *.eps file.
>  However, the file is only 2.2 KB and is only a blank white box (see
> attached).
>
> Note: In the DayMet NCL script I have to flip the lat and lon indices for
> the SNOWLIQ variable because when I ncview the data it is a mirror image of
> what I actually want (might be a function of the CDO post-processing step).
>  In my NARR dataset NCL script, I don't do this step, but still get a
> similar outcome with a blank page and 2.2 KB *.eps file.
>
> Any ideas as to what is going on?
>
> Here are my environmental specifics too:
> -NCAR Command Language Version 6.1.2
> -Each Daymet file = 282 MB, so unfortunately I won't be able to attach the
> one specified in the NCL script
> -Linux farm 3.11.0-20-generic #35-Ubuntu SMP Fri May 2 21:32:49 UTC 2014
> x86_64 x86_64 x86_64 GNU/Linux
>
> All the best,
>
> AR
> --
>
> *Alan Rhoades*
> *PhD Student, Atmospheric Science Graduate Group*
> *Climate Change Water and Society (CCWAS) NSF IGERT Trainee*
> *University of California, Davis*
> *alan.m.rhoades at gmail.com <alan.m.rhoades at gmail.com> *
> *amrhoades at ucdavis.edu <amrhoades at ucdavis.edu>*
> *(530)-210-8344*
>
> *"It’s all really there. That’s what really gets you. But you gotta stop
> and think about it to really get the pleasure about the complexity, the
> inconceivable nature of nature."*
> *Richard Feynman*
>
> _______________________________________________
> ncl-talk mailing list
> 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/20140825/c2c9f4e6/attachment.html 


More information about the ncl-talk mailing list