Overlay different resolution grids using OpenGrADS re()

Mike Johnson mike.w.johnson at NOAA.GOV
Fri Jun 20 21:32:24 EDT 2008


Users, Can anyone help with what I suspect is either a regrid problem
(using re.gex) - or - in the methodology I'm using for output fwrite - or -
an issue with my understanding of how options yrev works. I am attempting
to regrid a subdomain of a large regional netcdf topo file
(US_Rockies_GLOBE_30sec_topo.nc resolution - 30 Sec resolution) and write
that regridded subdomain to a binary file (Idaho.dat) which I then want to
overlay with high resolution surface wind field from CALMET (0.25km
resolution).

My basic procedure is to (1) convert grid spacing for control files and re
() to DeltaX and DeltaY in degrees; (2) select a subdomain of the large
NetCDF TOPO file (US_Rockies_GLOBE_30sec_topo.nc) which has Y dims written
from north-to-south and (3) to regrid this smaller domain using re() in
order to match domain size and dimensions of CALMET surface wind field; and
(4) write a binary file (Idaho.dat) which I'm hoping to overlay with the
CALMET wind data (and future runs of this model over the same domain).

I am able to open large domain TOPO file (US_Rockies_GLOBE_30sec_topo.nc),
regrid to higher resolution and plot subdomain. However...after writing
this re-gridded subdomain file to binary output (Idaho.dat), when I try to
plot it using (Idaho.ctl) the file appears to be garbage with GrADS
echoing "Contouring: 1e+36 to 9e+36" whereas in reality values should be
something like "1000 to 2800".

thanks

Mike Johnson
Senior Forecaster
Medford OR NWS Forecast Office
mike.w.johnson at noaa.gov



1. GrADS Version Details:
Config: v1.9.0-rcl 32-bit little-endian readline sdf/xdf netcdf lats athena
printim
Grid Analysis and Display System (GrADS) Version 1.9.0-rcl
Built Fri Jan 25 17:02:09 EST 2008 for i686-pc-linux-gnu
This version of GrADS has been configured with the following options:

- This is a 32-bit LITTLE ENDIAN machine version.
- Command line editing (readline) ENABLED.
- CIRES/CDC (http:/www.cdc.noaa.gov) SDF/XDF interface ENABLED.
  Use sdfopen/xdfopen to read NetCDF files.
- DTYPE netcdf is ENABLED; DTYPE hdfsds in DISABLED.
- OPeNDAP (a.k.a. DODS) gridded data interface DISABLED.
- OPeNDAP (a.k.a. DODS) station data interface DISABLED.
- PCMDI (http://www-pcmdi.llnl.gov) LATS interface ENABLED.
  This version is configured to write GRIB and NetCDF files.
- DAO (http://dao.gsfc.nasa.gov) Athena Widget GUI ENABLED.
- NRL/DAO/PCMDI XA or ImageMagick Image Output DISABLED.
- printim command for direct png/gif output ENABLED.
  (via the GD Library -- http://www.boutell.com/gd)

2. Script to regrid topo file and output to "Idaho.dat":
*   StripTOPO_toCALMETdomain.gs
*     Open relevant Topo file descriptor
*      eg. US_Rockies_GLOBE_30sec_topo.ddf
*
*  Use $GADDIR/gradsnc to open latest OpenGrADS version on SAC4
*        xdfopen US_Rockies_GLOBE_30sec_topo.ddf
*
'c'
'set lat 45.07150 45.5190'
'set lon -114.917 -114.275'
'define tpo=re(altitude,200,linear,-
114.9150,0.003196,200,linear,45.0726,0.0022487,bs)'
'set gxout fwrite'
'set fwrite Idaho.dat'
'd tpo'
'disable fwrite'
'undefine tpo'

3. US_Rockies_GLOBE_30sec_topo.ddf:
DSET ^US_Rockies_GLOBE_30sec_topo.nc
options yrev
XDEF lon 1560 LINEAR -115 0.00833867864
YDEF lat 2221 LINEAR 31 0.00833333333

4.  Idaho.ctl
dset ^Idaho.dat
options little_endian
options yrev
UNDEF -9999.0
XDEF 81 LINEAR -114.925 0.0309427
YDEF 56 LINEAR 45.0583 0.0223658
ZDEF 1 LEVELS 1 1
TDEF 1 LINEAR 12Z24AUG2007 1HR
VARS 1
  altitude 1 99 height
ENDVARS



More information about the gradsusr mailing list