[gradsusr] GRADS control file for CMAQ output (PDEF)
Irena Ivanova
iivanov at gmu.edu
Wed Jul 26 13:12:18 EDT 2023
Hi Jennifer and Haochen,
Thank you for your responses. I managed to plot the LCC grid on its native projection.
I now struggle with another rotated pole lat-lon grid (see netcdf header at the bottom) for North American on 13km resolution (800x544). I have the geolat and geolon of the grid but not the PDEF parameters.
PDEF 800 544 rotll ???
I started with a PDEF line that I had for another 12km (775x488) rotated pole lat-lon grid (PDEF line below). So I can see my 13km data, the grid if off and I struggle with adjusting 'lonpol', 'latpol', and 'lonll' and 'latll'. I only know isize and jsize (800x544) but I don't even know 'dlon' and 'dlat' in degrees, I know 13km is coarser than 0.1169081 (12km).
PDEF 775 488 rotll 62.0 40.0 0.1169081 0.1169081 -45.25 -28.5
isize The size of the native grid in the x direction
jsize The size of the native grid in the y direction
lonpol Longitude of the rotated pole in degrees
latpol Latitude of the rotated pole in degrees
dlon grid spacing in longitudinal direction of the rotated grid in degrees
dlat grid spacing in latitudinal direction of the rotated grid in degrees
lonll longitude of the lower left corner, given in rotated space in degree
latll latitude of the lower left corner, given in rotated space in degree
Jennifer: My data is netcdf format, Is there a tool similar to grib2ctl or g2ctl (to generate the PDEF) for netcdf, or I need to convert netcdf to GRIB?
-----
netcdf gfs.t12z.geo.08.canopy_regrid {
dimensions:
south_north = 544 ;
west_east = 800 ;
land_cat = 21 ;
variables:
..
float LAI(south_north, west_east) ;
LAI:_FillValue = NaNf ;
LAI:FieldType = 104 ;
LAI:MemoryOrder = "XYZ" ;
LAI:units = "m^2/m^2" ;
LAI:description = "MODIS LAI" ;
LAI:stagger = "M" ;
LAI:sr_x = 1 ;
LAI:sr_y = 1 ;
LAI:remap = "remapped via ESMF_regrid_with_weights: Nearest source to destination" ;
LAI:missing_value = NaNf ;
LAI:cell_methods = "Time, month: mean" ;
...
double latitude(south_north, west_east) ;
latitude:_FillValue = NaN ;
latitude:remap = "remapped via ESMF_regrid_with_weights: Nearest source to destination" ;
latitude:missing_value = NaN ;
double longitude(south_north, west_east) ;
longitude:_FillValue = NaN ;
longitude:remap = "remapped via ESMF_regrid_with_weights: Nearest source to destination" ;
longitude:missing_value = NaN ;
// global attributes:
:history = "Wed Aug 31 14:01:48 2022: ncwa -a Time,month ./793/gfs.t12z.geo.08.canopy_regrid_temp.nc -O ./793/gfs.t12z.geo.08.canopy_regrid.nc" ;
:NCO = "netCDF Operators version 4.9.3 (Homepage = http://nco.sf.net, Code = http://github.com/nco/nco)" ;
Irena
________________________________
From: gradsusr <gradsusr-bounces at gradsusr.org> on behalf of Tan, Haochen <htan at anl.gov>
Sent: May 30, 2023 12:25 PM
To: gradsusr at gradsusr.org <gradsusr at gradsusr.org>
Subject: Re: [gradsusr] GRADS control file for CMAQ output (PDEF)
Hi Irena,
Here's my understanding of latref and lonref based on the CTL for NARR data from this website<https://psl.noaa.gov/data/narr/format.html>.
The latref and lonref in your ctl file can be your first grid point from left bottom so that you can set iref and jref as 1 and 1. In the NARR example, their left bottom grid is 1 in lat and -145 in lon.
Hope this helps!
Haochen
________________________________
From: gradsusr <gradsusr-bounces at gradsusr.org> on behalf of Irena Ivanova <iivanov at gmu.edu>
Sent: Thursday, May 4, 2023 16:44
To: gradsusr at gradsusr.org <gradsusr at gradsusr.org>
Subject: [gradsusr] GRADS control file for CMAQ output (PDEF)
Hi,
I need help with the GRADS control file for Lambert Conformal projection.
I understand I need to define the grid using PDEF:
* PDEF isize jsize LCC latref lonref iref jref Struelat Ntruelat slon dx dy
*Example: PDEF 103 69 lccr 30 -88 51.5 34.5 20 40 -88 90000 90000
*Args:
*isize The size of the native grid in the x direction
*jsize The size of the native grid in the y direction
*latref reference latitude
*lonref reference longitude (in degrees, E is positive, W is negative)
*iref i of ref point
*jref j of ref point
*Struelat S true lat
*Ntruelat N true lat
*slon standard longitude
*dx grid X increment in meters
*dy grid Y increment in meters
Here is my PDEF line but not sure what to specify for latref=? lonref=? and not sure if the other arguments are correct:
pdef 442 265 lcc ??? ??? 1 1 33 45 -97. 12000 12000
Here is an example lat-lon grid that covers CONUS domain (for GRADS to interpolate onto)
xdef 1000 linear 192. 0.1169081
ydef 500 linear 20. 0.1169081
Here are the global attributes of the CMAQ-Offline output. I can provide the data file upon request.
// global attributes:
:IOAPI_VERSION = "ioapi-3.2: $Id: init3.F90 185 2020-08-28 16:49:45Z co" ;
:EXEC_ID = "CMAQ_CCTMv531_sma8_20230412_212323_441724109 " ;
:FTYPE = 1 ;
:CDATE = 2023102 ;
:CTIME = 212328 ;
:WDATE = 2023102 ;
:WTIME = 212328 ;
:SDATE = 2019209 ;
:STIME = 0 ;
:TSTEP = 10000 ;
:NTHIK = 1 ;
:NCOLS = 442 ;
:NROWS = 265 ;
:NLAYS = 35 ;
:NVARS = 226 ;
:GDTYP = 2 ;
:P_ALP = 33. ;
:P_BET = 45. ;
:P_GAM = -97. ;
:XCENT = -97. ;
:YCENT = 40. ;
:XORIG = -2508000. ;
:YORIG = -1716000. ;
:XCELL = 12000. ;
:YCELL = 12000. ;
:VGTYP = -9999 ;
:VGTOP = 0.999f ;
:VGLVLS = 1.f, 0.995253f, 0.990479f, 0.985679f, 0.980781f, 0.975782f, 0.970684f, 0.960187f, 0.954689f, 0.936895f, 0.930397f, 0.908404f, 0.888811f, 0.862914f, 0.829314f, 0.786714f, 0.735314f, 0.645814f, 0.614214f, 0.582114f, 0.549714f, 0.511711f, 0.484394f, 0.451894f, 0.419694f, 0.388094f, 0.356994f, 0.326694f, 0.297694f, 0.270694f, 0.245894f, 0.223694f, 0.203594f, 0.154394f, 0.127094f, 0.f ;
:GDNAM = "AQF5X " ;
:UPNAM = "OPACONC " ;
:VAR-LIST = "NO2 NO O O3 ...
Help much appreciated!
Irena
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20230726/ddd9260c/attachment-0001.html>
More information about the gradsusr
mailing list