to display NARCCAP data - repost

Rauscher Sara A srausche at ICTP.IT
Thu Jun 12 05:11:19 EDT 2008


Dear Matías,

You can use a data descriptor file to read in the data file. The dump of
the header tells you most of what you need to know (see the
"Lambert_conformal" variable).
Since it's a lambert conformal project use the LCC or LCCR option for pdef.

*PDEF /isize jsize/ LCCR /latref lonref iref jref Struelat Ntruelat slon
dx dy
/PDEF /isize jsize/ LCC /latref lonref iref jref Struelat Ntruelat slon
dx dy// /*
pdef  134 109 lcc  47.5   -97.   67. 54.  30.00   60.00  -97.  25000.
25000.

/isize/         The size of the native grid in the x direction: 134
/jsize/         The size of the native grid in the y direction: 109
/latref/        reference latitude: 45.7
/lonref/        reference longitude (in degrees, E is positive, W is negative)
-97.
/iref/  i of ref point (I guessed here by cutting the number of points
in half)
/jref/  j of ref point
/Struelat/      S true lat: 30
/Ntruelat/      N true lat: 60
/slon/  standard longitude: -97
/dx/    grid X increment in meters: I guessed 25000 meters, I am not sure
what the NARCAAP grid is, there should be documentation somewhere about
that.
/dy/    grid Y increment in meters: ""



So maybe the finished DDF could look something like this:
DSET ^uas_WRFP_2001010103.nc
dtype netcdf
undef 1.e+20
pdef  134 109 lcc  47.5   -97.   67.  54.   30.00   60.00  -97.  25000.
25000.
xdef  175 linear   -9.61  0.2703
ydef   78 linear   34.70  0.2703
zdef 1 levels 1008.43
tdef  11440 linear  00Z01JAN1961 1dy
vars  1
uas=>uas      0 t,y,x surface wind speed
endvars

I am sure there are some mistakes here,  but you can see now how to get
the information from the header information and then play around with
it. Maybe someone else can refine this further. You will need to change
xdef and xydef, I just grabbed those from another file. There is more
information at
http://grads.iges.org/grads/gadoc/pdef.html

good luck
sara
> This is my netcdf file header:
>
> netcdf uas_WRFP_2001010103 {
> dimensions:
>         time = UNLIMITED ; // (11440 currently)
>         yc = 109 ;
>         xc = 134 ;
> variables:
>         char Lambert_Conformal ;
>                 Lambert_Conformal:grid_mapping_name =
> "lambert_conformal_conic" ;
>                 Lambert_Conformal:standard_parallel = 30.f, 60.f ;
>                 Lambert_Conformal:longitude_of_central_meridian =
> -97.f ;
>                 Lambert_Conformal:latitude_of_projection_origin =
> 47.5f ;
>         double yc(yc) ;
>                 yc:long_name = "y-coordinate in Cartesian system" ;
>                 yc:standard_name = "projection_y_coordinate" ;
>                 yc:axis = "Y" ;
>                 yc:units = "m" ;
>         double xc(xc) ;
>                 xc:long_name = "x-coordinate in Cartesian system" ;
>                 xc:standard_name = "projection_x_coordinate" ;
>                 xc:axis = "X" ;
>                 xc:units = "m" ;
>         double lon(yc, xc) ;
>                 lon:long_name = "longitude" ;
>                 lon:standard_name = "longitude" ;
>                 lon:units = "degrees_east" ;
>                 lon:axis = "X" ;
>         double lat(yc, xc) ;
>                 lat:long_name = "latitude" ;
>                 lat:standard_name = "latitude" ;
>                 lat:units = "degrees_north" ;
>                 lat:axis = "Y" ;
>         double time(time) ;
>                 time:long_name = "time" ;
>                 time:standard_name = "time" ;
>                 time:units = "days since 1979-09-01 00:00:0.0" ;
>                 time:axis = "T" ;
>                 time:calendar = "gregorian" ;
>         float uas(time, yc, xc) ;
>                 uas:long_name = "Zonal Surface Wind Speed" ;
>                 uas:standard_name = "eastward_wind" ;
>                 uas:units = "m s-1" ;
>                 uas:_FillValue = 1.e+20f ;
>                 uas:missing_values = 1.e+20f ;
>                 uas:coordinates = "lon lat" ;
>                 uas:grid_mapping = "Lambert_Conformal" ;
>                 uas:original_name = "U10 (U at 10 M) in wrfout" ;
>                 uas:original_units = "m s-1" ;
>
> // global attributes:
>                 :institution = "PNNL (Pacific Northwest National
> Laboratory, Richland, WA, USA)" ;
>                 :source = "PNNL/NCAR WRF(2006): atmosphere:WRF; sst/sea
> ice:AMIP2; Land:Noah;; Convcetion:KF; WSM5; CAM Radiation" ;
>                 :project_id = "NARCCAP" ;
>                 :table_id = "Table 2" ;
>                 :realization = 1 ;
>                 :experiment_id = "present-day climate using NCEP/DOE
> Reanalysis " ;
>                 :contact = "L. Ruby Leung (Ruby.Leung at pnl.gov)" ;
>                 :history = "Thu Jan 31 09:41:37 2008: ncrcat uas_2001.nc
> uas_2002.nc uas_2003.nc uas_2004.nc uas_WRFP_2000010103.nc\n",
>                         "Wed Jan 30 14:12:36 2008: ncrcat
> uas_WRFP_2001a.nc uas_WRFP_2001b.nc uas_2001.nc\n",
>                         "Wed Jan 30 14:12:34 2008: ncrcat
> uas_WRFP_2001010103.nc uas_WRFP_2001020103.nc uas_WRFP_2001030103.nc
> uas_WRFP_2001040103.nc uas_WRFP_2001050103.nc uas_WRFP_2001060103.nc
> uas_WRFP_2001070103.nc uas_WRFP_2001080103.nc uas_WRFP_2001090103.nc
> uas_WRFP_2001a.nc\n",
>                         "subsetted from raw WRF output using
> pullwrf_rain.f90" ;
>                 :title = "PNNL model output prepared for NARCCAP
> present-day climate using NCEP/DOE Reanalysis" ;
>                 :nco_openmp_thread_number = 2 ;
>                 :Conventions = "CF-1.0" ;
>

--

Dr. Sara A. Rauscher
Earth System Physics Section
The Abdus Salam International Centre for Theoretical Physics
Strada Costiera 11
34014 Trieste ITALY
ph: +39 040 2240 225 fax: +39 040 2240 449
email: srausche at ictp.it



More information about the gradsusr mailing list