[gradsusr] Help on Areal average using Grads

Jennifer Adams jma at cola.iges.org
Thu May 1 11:38:35 EDT 2014


Hi, Anil -- 
You need to create a new descriptor file that describes a grid you would like to be your 'destination grid'; presumably it would have grid points that correspond to every 8th grid point in your original grid. It can be a dummy descriptor -- use 'dset ^foo.dat' and 'options template' so GrADS won't care if foo.dat doesn't exist. Open both descriptors, then use lterp to regrid using the aave method:

   'd lterp(u.1,lat.2,aave); lterp(v.1,lat.2,aave)'

--Jennifer




On May 1, 2014, at 9:58 AM, Anil Kumar wrote:

> Hi Grad Users,
>  
> I have NetCDF file having Ocean Current Data (attached for reference). Am using below command to display u_velocity and v_velocity and generating vector plot using SKIP() function from Grads.
>  
> reinit
> sdfopen D:/rtofs_glo_2ds_f024_daily_prog.nc
> set vpage 0 11 0 8.5
> set parea 0 11 0 8.5
> set lon 74 434
> set lat -70 70
> set mproj latlon
> set display color white
> set datawarn off
> set grads off
> set timelab off
> set xlab off
> set ylab off
> set frame off
> set t 1
> set cint 40
> set display color white
> set background 0 
> set gxout vector
> set cthick 6
> set ccolor 1
> d skip(u_velocity*1.95,8,8);skip(v_velocity*1.95,8,8)
> printim D:\output.png x1061 y587 -t 0
>  
> output is attached and unfortunately this is not what i need exactly. It is just plotting every 8th point. I want to plot areal average of every 8 points and want exactly the same plot.
>  
> <image001.png>
>>  
> NetCDF file has 4320 LON points  and 2160  LAT points. The “display” command is powerful enough to iterate along the longitude and latitude. But aave() function needs fixed X and Y dimensions, no STRIDE option for X and Y.
>  
> How can I achieve this using Grads??? Ultimately I need global vector output.
>  
> Please help me on this. Thanks in advance.
>  
> -Anil Kumar
>  
>  
> <rtofs_glo_2ds_f024_daily_prog.nc><output.png>_______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer M. Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
111 Research Hall, Mail Stop 2B3
George Mason University
4400 University Drive
Fairfax, VA 22030 





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140501/00385f74/attachment.html 


More information about the gradsusr mailing list