[gradsusr] Enc: regriding problem

Arlindo Meque mequitomz at yahoo.com.br
Tue Nov 8 16:57:07 EST 2011


The lats4d.sh script worked properly. The only problem is that
the output from the lats4d.sh is a file with 144 points in x-direction and 73
points in y-direction while my observation file (gpcp) has 144 points in
x-direction and 72 points in y-direction, i.e, the number of points in y-direction
from the forecast and observation differ by 1.
 
I’ve tried again the re()  command but the but GrADS fail  to discern the coordinates:
ga-> sdfopen  forecast.nc                                      
Scanning self-describing file:  forecast.nc
SDF file forecast.nc is open as file 1
LON set to 0 360 
LAT set to -90 90 
LEV set to 0 0 
Time values set: 2009:9:16:0 2009:9:16:0 
E set to 1 1 
ga-> define
gg=re(precip,144,linear,0,2.5,72,linear,-90,2.5,bl)
Define memory allocation size = 82944 bytes
ga-> set sdfwrite test.nc
SDFWrite file name = test.nc
SDFWrite will replace an existing file
SDFwrite file will have same number of dimensions as defined
variable
ga-> sdfwrite gg         
Wrote variable gg to test.nc
ga-> reinit
No hardcopy metafile open
All files closed; all defined objects released;
All GrADS attributes have been reinitialized
ga-> sdfopen test.nc 
Scanning self-describing file:  test.nc
SDF file has no discernable time coordinate -- using default
values.
SDF file test.nc is open as file 1
LON set to 0 360 
LAT set to -90 87.5 LEV set to 0 0  
 






________________________________
De: Jennifer Adams <jma at cola.iges.org>
Para: GrADS Users Forum <gradsusr at gradsusr.org>
Enviadas: Terça-feira, 8 de Novembro de 2011 12:13
Assunto: Re: [gradsusr] Enc: regriding problem




On Nov 7, 2011, at 2:46 PM, Arlindo da Silva wrote:

On Mon, Nov 7, 2011 at 10:11 AM, Arlindo Meque <mequitomz at yahoo.com.br> wrote:
>
> Dear  all,
>>
>>
>>1. I have a forecast file (1.875X1.25)  with 192 points in x-direction and 145 points in y-direction. I am trying to regrid the file to match the observation (2.5X2.5) with 144 points in x-direction and 72 points on y-direction
>>
>>
>>2. I am able to create the  regridded file, the problem is  that the dimensions of the regridded file do not much those of the observation file, so I am not able to make the diffidence between the forecast and the observation.
>>
>>3. Please find attached the forecast and observed file along with the regriding script.
>>
>>
>
>
>This more of a question for Jeniffer as I am not sure how sdfwrite figures out the coordinate variables of the output file (does it use the coordinates of the default file?).
The sdfwrite copies the coordinate information from the default file at the time the 'define' command was invoked. 
I have no idea what the re() function does when it returns the new grid. If you used lterp instead, you would have the right coordinate info because it's attached to the destination grid expression. 

Since you are using opengrads, Arlindo's suggestion to use lats4d may also do what you need. 
--Jennifer


Now, a simple way to produce a file interpolated to this particular grid is to use lats4d:
>
>
>% lats4d.sh -i forecast.nc -o fcstregridded -ncep2.5 -v
>
>
>This is going to the standard NCEP 2.5x2.5 grid (which is not exactly what you had on your re() line). Are you sure your re() line is correct? It is kind of an unusual grid. In any event, if you would like to modify the output from ncep2.5 there is a simple way, but let me hear from you first.
>
>
>      (the other) Arlindo
>
>-- 
>Arlindo da Silva
>dasilva at alum.mit.edu
>_______________________________________________
>gradsusr mailing list
>gradsusr at gradsusr.org
>http://gradsusr.org/mailman/listinfo/gradsusr
>

--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org

 

_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20111108/743edc7a/attachment-0003.html 


More information about the gradsusr mailing list