[gradsusr] help for regridding

Arlindo da Silva dasilva at alum.mit.edu
Wed Oct 6 18:51:22 EDT 2010


On Tue, Oct 5, 2010 at 10:33 PM, jagan TNAU <jagan at tnau.ac.in> wrote:

> Dear users,
>
> I want to regard a netcdf file of 36x32 grids 0.22x0.22 degree resolution
> to that of a file 16x15 grids with 0.5x0.5 degree resolution. What is the
> command I need to use invoking lats4d.sh in
> opengrads/Darwin/Versions/2.0.a7.oga.3/i386/grads. Please help me.
>
> *36x32 grids(0.22x0.22)*
>
> lon = 85.36, 85.58, 85.8, 86.02, 86.24, 86.46, 86.68, 86.9, 87.12, 87.34,
>     87.56, 87.78, 88, 88.22, 88.44, 88.66, 88.88, 89.1, 89.32, 89.54,
> 89.76,
>     89.98, 90.2, 90.42, 90.64, 90.86, 91.08, 91.3, 91.52, 91.74, 91.96,
>     92.18, 92.4, 92.62, 92.84, 93.06 ;
>
>  lat = 20.7, 20.92, 21.14, 21.36, 21.58, 21.8, 22.02, 22.24, 22.46, 22.68,
>     22.9, 23.12, 23.34, 23.56, 23.78, 24, 24.22, 24.44, 24.66, 24.88,
> 25.1,
>     25.32, 25.54, 25.76, 25.98, 26.2, 26.42, 26.64, 26.86, 27.08, 27.3,
> 27.52 ;
>
> *16x15 grids (0.5x0.5)*
>
> lon = 85.75, 86.25, 86.75, 87.25, 87.75, 88.25, 88.75, 89.25, 89.75,
> 90.25,
>     90.75, 91.25, 91.75, 92.25, 92.75, 93.25 ;
>
> lat = 20.75, 21.25, 21.75, 22.25, 22.75, 23.25, 23.75, 24.25, 24.75,
> 25.25,
>     25.75, 26.25, 26.75, 27.25, 27.75 ;
>
>
Let me outline the steps.

1)  First you will need to come up with a ctl for the destination grid; if
you already have one  , great, otherwise create something like:

DSET nofile
title Template GrADS for regridding
options template
undef 1e+20
xdef 72 linear -180 5
ydef 46 linear -90  4
zdef   1 levels  1000
tdef 1 linear 0Z1jan1900 1dy
vars 1
var       0 0        generic sfc variable
endvars

  adjust the XDEF/YDEF to match your destination grid; call this file
dest.ctl. This will define the dimension environment of the destination
grid.

2) Issue the following lats4d command:

% lats4d.sh -i myinputfile -o outputfile -de dest.ctl \
               -func 're(@,72,linear,-180,5,46,linear,-90,4,bl)' -format
netcdf -v

Again, adjust the re() arguments to reflect your destination grid (in this
example the destination is a global 5x4 grid). Check the re() documentation
for details:

         http://opengrads.org/doc/udxt/re/

Also, read the REGRIDDING section of the lats4d manual:

         http://opengrads.org/doc/scripts/lats4d/

  Good Luck,

     Arlindo



> --
> With regards
>
> Dr.R.Jagannathan
> Professor of Agronomy,
> Department of Agronomy
> Tamil Nadu Agricultural University,
> Coimbatore - 641 003 India
>
> PHONE:  Mob: +91 94438 89891
>
> DO NOT PRINT THIS E-MAIL UNLESS NECESSARY. THE ENVIRONMENT CONCERNS US ALL.
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101006/56ac29b7/attachment-0003.html 


More information about the gradsusr mailing list