Re: check_for_y_lat_coord: Warning: Data either does not contain ...

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu Sep 16 2010 - 12:06:15 MDT

Hi Antti,
(Thanks for sending all the information you did, as that made the
diagnosis much easier..) It looks like you have 2 dimensional
latitudes/longitudes with gridlat_0 and gridlon_0. You will need to
attach the 2D lats/lons as attributes to the arrays that are to be
plotted. Try adding the following to your code after you read in temp/uwnd:
temp@lat2d = a->gridlat_0
temp@lon2d = a->gridlon_0
uwnd@lat2d = a->gridlat_0
uwnd@lon2d = a->gridlon_0

Also, with regards to plotting, see this page:
http://www.ncl.ucar.edu/Applications/lcnative.shtml

Specifically, read the text above the first example and check out the
2nd example.
Good luck,
Adam

On 09/16/2010 11:50 AM, antti.pessi@vaisala.com wrote:
> Hi,
>
> I’m trying to plot regular WRF grib2 output that comes out from WRF
> Post-Processor. I get these warnings about lat/lon coordinate array and
> units. The units should be correct in the file (degrees_north), but the
> lat/lon variable name is gridlat_0 / gridlon_0. How do I make NCL to
> find the correct coordinate array? I have seen this problem before in
> this list, but I couldn’t make it work using those tips.
>
> NCL code simplified:
>
> -----------------------------
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>
> begin
>
> a = addfile("1009141400_f0100-co-d01.grb2","r")
>
> temp = a->TMP_P0_L100_GLC0({50000},:,:)
>
> uwnd = a->UGRD_P0_L100_GLC0({50000},:,:)
>
> wks = gsn_open_wks("x11","overlay")
>
> plot = gsn_csm_contour_map_overlay(wks,temp,uwnd,res,sres)
>
> end
>
> NCL error message:
>
> ----------------------------
>
> (0) 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:
>
> (0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north'
> 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
>
> (0) check_for_lon_coord: Warning: Data either does not contain a valid
> longitude coordinate array or doesn't contain one at all.
>
> (0) A valid longitude coordinate array should have a 'units' attribute
> equal to one of the following values:
>
> (0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east'
> 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
>
> Some output from ncl_filedump grib2file:
>
> --------------------------------------------------------
>
> file global attributes:
>
> dimensions:
>
> ygrid_0 = 156
>
> xgrid_0 = 162
>
> lv_ISBL0 = 39
>
> ……………..
>
> float TMP_P0_L100_GLC0 ( lv_ISBL0, ygrid_0, xgrid_0 )
>
> center : US National Weather Service - NCEP (WMC)
>
> production_status : Operational products
>
> long_name : Temperature
>
> units : K
>
> _FillValue : 1e+20
>
> coordinates : gridlat_0 gridlon_0
>
> grid_type : Lambert Conformal can be secant or tangent, conical or bipolar
>
> parameter_discipline_and_category : Meteorological products, Temperature
>
> parameter_template_discipline_category_number : ( 0, 0, 0, 0 )
>
> level_type : Isobaric surface (Pa)
>
> ……….
>
> float gridlat_0 ( ygrid_0, xgrid_0 )
>
> corners : ( 37.203, 37.20306, 42.77142, 42.77136 )
>
> long_name : latitude
>
> grid_type : Lambert Conformal (secant, tangent, conical or bipolar)
>
> units : degrees_north
>
> ……………
>
> float gridlon_0 ( ygrid_0, xgrid_0 )
>
> corners : ( -108.441, -101.1767, -100.8674, -108.7505 )
>
> long_name : longitude
>
> grid_type : Lambert Conformal (secant, tangent, conical or bipolar)
>
> units : degrees_east
>
> Any help appreciated.
>
> Thanks,
>
> Antti
>
> ----------------------------------------------
>
> Antti T. Pessi, PhD
>
> Meteorologist
>
> Vaisala Inc.
>
> 194 South Taylor Avenue
>
> Louisville, Colorado 80027
>
> Email: antti.pessi@vaisala.com <mailto:antti.pessi@vaisala.com>
>
> Phone: +1 303-402-4758
>
> Fax: +1 303-499-1767
>
> http://www.vaisala.com
>
> ----------------------------------------------
>
>
>
> _______________________________________________
> 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 Thu Sep 16 12:06:23 2010

This archive was generated by hypermail 2.1.8 : Mon Sep 20 2010 - 15:45:07 MDT