[gradsusr] Lterp in Fwrite

Scott Weaver - NOAA Federal scott.weaver at noaa.gov
Tue Jul 16 11:26:45 EDT 2013


Greetings,

I am using the lterp function in GrADS 2.0.2. While attempting to regrid
data from a 360 x 181 to a 144 x 73 grid  and write to a new file I get
incorrect data values. When repeating the steps in interactive mode the
regridding works fine. I have tried specifying the x and y dimensions (both
using lat/lon and x/y), x only dimensions as per the users index, and no
specification, before each fwrite. None works. I am doing the regridding in
a loop for several timesteps and several variables. Please note in the
older regrid2 udf I had no problem. Here is a sample of the code with just
one variable:

'open prsDly$iy$mn$id$ih.$mm.ctl'
'open regrid.dummyfile.to.2.5x2.5.ctl'

 'set gxout fwrite'
    'set fwrite  Dly$iy$mn$id$ih$mm.cfsv2.PRS.data'


    countt=1
    while(countt<=45)
    'set t 'countt

     'set lev 500'
     'set lon 0 360'
     'set lat -90 90
*   'set x 1 144'
*   'set y 1 73'

     'd lterp(hgtprs.1,hgt500mb.2,bilin)'

   countt=countt+1
   endwhile

'disable fwrite'



Thanks for any help.

Scott


-- 
Scott J. Weaver
Research Meteorologist
NOAA Climate Prediction Center
301-683-3434
http://www.cpc.ncep.noaa.gov/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130716/19504e16/attachment-0003.html 


More information about the gradsusr mailing list