lterp with PDEF

Jennifer Adams jma at COLA.IGES.ORG
Wed May 28 13:13:42 EDT 2008


Hi, Sara --
With PDEF, you are already interpolating, so why not map both data
sets to the same lat/lon grid and not worry about lterp? Change the
xdef and ydef in file1 to the ones in file 2 and you're done! Also,
there's no need to keep the same grid size -- your new grid (as
defined by xdef and ydef) can be anything at all.
--Jennifer


On May 28, 2008, at 12:12 PM, Rauscher Sara A wrote:

> Hello,
> I am trying to interpolate two variables from two different files. For
> both files I am using a DDF to read in the netCDF since the data
> are on
> a rotated lat-lon projection (the files contain RCM data). I am using
> the latest release of grads, v 2.0a2 (see the q config info at the
> bottom).
>
> The data look perfectly fine when I display them from each file,  but
> when I try to use lterp, I get the following error:
>
> ga-> d lterp(mrso.1,mrso.2)
> Notice:  Automatic Grid Interpolation Taking Place
> *** glibc detected *** malloc(): memory corruption: 0x084757c8 ***
> Abort (core dumped)
>
> Does anyone have any ideas as to what's wrong?
> thanks
> sara
>
> Here are the DDFs for each file. I wasn't sure how to set xdef and
> ydef
> in the DDFs.
> file 1:
> DSET ^ETHZ-CLM_CTL_ERA40_MM_24H_50km_mrso.nc
> dtype netcdf
> undef -1.e+30
> pdef 97 91 ROTLL -162. 39.25 .44 .44 -23.37 -21.45
> xdef  91 linear   -9.61  0.44
> ydef  97  linear   34.70  0.44
> zdef 1 levels 1008.43
> tdef  1 linear  00Z15AUG2002 1mo
> vars 1
> mrso=>mrso      0 t,y,x soil moisture
> endvars
>
> file 2:
> DSET ^../../25km/MM/ETHZ-CLM_CTL_ERA40_MM_24H_25km_mrso.nc
> dtype netcdf
> undef -1.e+30
> pdef 201 193 ROTLL -162. 39.25 .22 .22 -24.58 -21.78
> xdef 193 linear   -9.61  0.22
> ydef 201  linear   34.70  0.22
> zdef 1 levels 1008.43
> tdef  1 linear  00Z15AUG2002 1mo
> vars 1
> mrso=>mrso      0 t,y,x soil moisture
> endvars
>
>
> ga-> q config
> Config: v2.0.a2 little-endian readline printim grib2 netcdf hdf4-sds
> Grid Analysis and Display System (GrADS) Version 2.0.a2
> Copyright (c) 1988-2008 by Brian Doty and the
> Institute for Global Environment and Society (IGES)
> This program is distributed WITHOUT ANY WARRANTY
> See file COPYRIGHT for more information.
>
> Built Wed May 21 16:34:42 MDT 2008 for i686-pc-linux-gnu
>
> This version of GrADS has been configured with the following options:
>  o Built on a LITTLE ENDIAN machine
>  o Command line editing ENABLED
>  o printim command for image output ENABLED
>  o GRIB2 interface ENABLED
>  o NetCDF interface ENABLED
>  o HDF4 SDS interface ENABLED
>  o Athena Widget GUI DISABLED
>  o OPeNDAP gridded data interface DISABLED
>  o OPeNDAP station data interface DISABLED
>
> For additional information please consult http://iges.org/grads
>
>
>
>
>
> --
>
> Dr. Sara A. Rauscher
> Earth System Physics Section
> The Abdus Salam International Centre for Theoretical Physics
> Strada Costiera 11
> 34014 Trieste ITALY
> ph: +39 040 2240 225 fax: +39 040 2240 449
> email: srausche at ictp.it

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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080528/f9495486/attachment.html 


More information about the gradsusr mailing list