[gradsusr] Regrid Help
Lee Byerle
lbyerle at yahoo.com
Fri Dec 9 15:32:52 EST 2011
Emily,
I'm unsure how you are defining things and appears your location of
lat and lon points in re() needs to be reversed.
How about trying something like:
'sdfopen ecmwfsoilw.nc'
'define new=re(swvl1,144,linear,-180.,2.5,73,linear,-90.,2.5,ba)'
'set lon -180 177.5'
'set lat -90 90'
'set gxout fwrite'
'set fwrite newfile.dat
'd new'
'disable fwrite'
Lee
On Dec 9, 2011, at 11:44 AM, Emily Parker Wilson wrote:
> Hello I am trying to regrid in GrADS and i am getting the error
> message...
> No hardcopy metafile open
> All files closed; all defined objects released;
> All GrADS attributes have been reinitialized
> 73 90 -90
> re(swvl1.1,73,LINEAR,-90,2.5,145,LINEAR,-180,2.5,ba)
> Operation Error: Error from re function
> Operation Error: Error from regrid2 function
> Error ocurred at column 1
> DEFINE error: Invalid expression.
> Operation Error: Error from re function
> Error ocurred at column 1
> DEFINE error: Invalid expression.
> ga-> quit
> Hardcopy output file is closed
> GX package terminated
>
> the grad script i am using looks like this...
> * DATA TO BE REGRIDDED
> *
> 'sdfopen ecmwfsoilw.nc'
> *
> 'enable print grads.outfile'
> 'clear'
> *
> * DEFINE OUTPUT FILE
> *
> 'set fwrite ecmwfsoilw.regrid.nc'
> *
> * OUTPUT TO THE FILE
> *
> 'set gxout fwrite'
> *
> * WRITE 228 MONTHS
> *
> * 'set t 1 248'
> *
> * REGRID THE DATA
> *
> * 'd regrid2(swvl1,5.0,5.0,bs_p1,-177.5,-87.5)'
> *
> *
> 'set lat -180 180'
> 'set lon -90 90'
>
> * 'd re(swvl1,144,'linear',-192,2.5,73,'linear',94,2.5,bs)'
>
> * 'd re(swvl1,2.5,2.5,bs)'
>
> 'newgrid=regrid2(swvl1.1,2.5)'
> 'define regrid2=re(swvl1.1,2.5,2.5)'
>
> * 'define newvar=re(swvl1,144,'linear',2.5,192,73,'gaus',1,94)'
> * 'd newvar'
> *
> 'print'
>
> can someone please tell me what i am doing wrong?
> Thanks so much,
> Emily
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
More information about the gradsusr
mailing list