[gradsusr] Problem calculating the difference between two files

Davide Sacchetti davide.sacchetti at arpal.gov.it
Tue Sep 20 06:20:25 EDT 2011


when you regrid from 1.875X1.25 to 2.5X2.5 you get a mesh of 2.5X2.5 but
it may be not coincide with the other 2.5X2.5 you have

I mean that the 2 grids may have the same resolution but different grid
points. In regrid2 udf (so I hope also in re() function) you could also
give the coords of a point you wish your grid belongs to - e.g.:
re(gg,2.5,2.5,ba) -> re(gg,2.5,2.5,ba_p1,-180,-90)

bye bye
Davide

On Tue, 2011-09-20 at 03:02 -0700, Arlindo Meque wrote:
> 
> 
> Dear all,
> 
> 
>         I want to obtain the difference between the precipitation
>         forecast (1.875X1.25 resolution) and the observed rainfall
>         (2.5X2.5 resolution).
>         These are the commands I am using :
> reinit'
> 'set display color white'
> 'c'
> 'sdfopen oo.nc'                     *observed
> 'sdfopen  ff.nc'                    * forecasted
> 'set dfile 1'
> 'set t 1 14'
> 'set z 1'
> 'set lon 10 55'
> 'set lat -35 -10'
> 'define obs=ave(prcp_est,t=1,t=14)'
> 
> 'set dfile 2'
> 'set t 1 14'
> 'set z 1'
> 'set lon 10 55'
> 'set lat -35 -10'
> 'define gg=ave(precip*86400,t=1,t=14)'
> 'define forecast=re(gg,2.5,2.5,ba)'            * regridding  the
> forecast
> 'define difference=forecast-obs'
> 'd difference'
> 
>         But Iam getting the following error message:
>         Data Request Error: Invalid grid coordinates
>           World coordinates convert to non-integer  grid coordinates
>             Variable = obs  Dimension = 3 
>           Error ocurred at column 10
>         DEFINE error:  Invalid expression 
> 
> 4. Help is needed
> 
> 
> Arlindo
> 
> 
> 
> 
> 
>         
>         
> 
> 
> _______________________________________________
> 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