[gradsusr] Lterp in Fwrite

Davide Sacchetti davide.sacchetti at arpal.gov.it
Tue Jul 16 11:51:57 EDT 2013


you may experience errors due to lon varying from 0 to 360 because
0 and 360 are the same longitude (in your data file you don't have the
same value repeated 2 times ...)
suppose your increment to be 1 degree: try set lon 0 359
it could resolve
bye bye
Davide

On Tue, 2013-07-16 at 11:26 -0400, Scott Weaver - NOAA Federal wrote:
> 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/
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

-- 
--> Attenzione cambio indirizzo: davide.sacchetti at arpal.gov.it
--
Davide Sacchetti
Centro Funzionale Meteo Idrologico di Protezione Civile della Regione Liguria
ARPAL Unità Tecnica Complessa di livello Regionale
V.le Brigare Partigiane 2 16121 Genova (I)
tel: +39 010 6437535                    fax: +39 010 6437520
mail: davide.sacchetti at arpal.gov.it     web: www.meteoliguria.it





More information about the gradsusr mailing list