Re: regridding emissions data

From: Rob Nicholas <rnicholas_at_nyahnyahspammersnyahnyah>
Date: Sun, 16 Dec 2007 13:17:36 -0800

Dennis's mention of SCRIP eventually led me to discover the Climate
Data Operators (http://www.mpimet.mpg.de/fileadmin/software/cdo/),
which appears to have a straightforward way of doing the job. From
the shell, it's simply

    cdo remapcon,t42grid infile.nc outfile.nc

where 'infile.nc' has the data on a fixed 360x180 grid and
'outfile.nc' is generated with the data remapped to a T42 gaussian
grid. The CDO authors claim to use the SCRIP routines (translated
from Fortran to C) for their remapping operators.

This is obviously not an NCL solution (sorry for being off-topic in
that regard), but CDO looks like a tremendously useful package
*assuming* the methods are solid. Is anyone else familiar with this
package?

~Rob

On Dec 14, 2007 8:09 PM, Dennis Shea <shea_at_ucar.edu> wrote:
> AFAIK, there is no standard interpolation function in any language
> that is mass conserving. You could calculate mass before and after,
> then apply some correction factor to the interpolated grid values.
> Of course, this is rather simplistic. It assumes that the correction be
> applied globally.
>
> [1]
> The f2gsh (or, better, f2gsh_Wrap) will perform the interpolations.
>
> x42 = f2gsh_Wrap (x, (/64,128/), twave)
>
> These are not mass-conserving. Because these use spherical harmonics,
> they will have a smoothing effect. Think in terms of an FFT along
> a specific latitude: the fft will return 180 (=360/2) harmonics.
> When the T42 grid (64 latitudes and 128 longitudes) is reconstructed
> with twave=0, only 64 (=128/2) will be used. All the info above harmonic
> (wave) 64 is lost. If you want to truncate at wave number 42 (twave=42)
> even more high wave number info would be lost.
>
> Also, if the data are bounded at (say) zero, then spherical harmonic
> interpolation should be used with caution.
>
>
> [2] I suggest simple bilinear interpolation:
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>
> printVarSummary( x )
> printMinMax(x, True)
> print("======================================")
>
> nlat = 64
> LAT = *latGau*(nlat, "lat", "latitude", "degrees_north")
> mlon = 128
> LON = *lonGlobeF*(mlon, "lon", "longitude", "degrees_east")
>
>
> x42 = linint2_Wrap (lon,lat,x, True, LON,LAT, 0)
>
> printVarSummary( x42 )
> printMinMax(x42, True)
>
> [3] SCRIP[ http://climate.lanl.gov/Software/SCRIP/ ]
> has area conserving interpolation as an option.
> I looked here at NCAR for weight files of the form:
>
> map_1x1d_to_T42_aave_da_yymmdd.nc
>
> but did not find any. :-(
>
> You could use the SCRIP provided fortran software to generate
> a weight file. NCL could be used to create the 64x128 grid.
>
> Good luck
> D
>
>
> Rob Nicholas wrote:
> > I have a large datset that I'd like to regrid from a fixed grid
> > (360x180) to a Gaussian grid (T42). The tricky part is that this is
> > emissions data, so the transformation needs to be mass-conserving. The
> > functions f2gsh() and f2gsh_Wrap() almost look like the right things,
> > but it doesn't look like they'll handle the mass conservation
> > correctly.
> >
> > Can anyone suggest a straightforward way to handle this?
> >
> > Thanks,
> > Rob
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Dec 16 2007 - 14:17:36 MST

This archive was generated by hypermail 2.2.0 : Mon Dec 17 2007 - 08:25:02 MST