Re: regridding emissions data

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon, 17 Dec 2007 07:13:05 -0700

[1] THX for the feed-back.
     
      We use and recommend the netCDF operators [NCO] all the time.
       In fact, the NCL Workshops often include a session on NCO use.

       The Climate Data Operators [CDO] look like they provide
       additional capabilities at the command line level.

       I am/was aware of the CDO and tried them when they were
       initially released m( a very long time ago!). I had some problems.
       It looks like they are working well now. I'm going to give them a
try.
      
[2] "since the regridding methods are all based on SCRIP
       (which I've never had any reason to think of as anything other
       than reliable) that all of the CDO remapping functions work fine"

      A member of the NCL team invesigated the SCRIP
      software. He found some minor[?] issues which have been
      acknowledged by Phil Jones [SCRIP creator].

     The 5.0.0 release of NCL has an operator to check the input file:

     http://www.ncl.ucar.edu/Document/Tools/scrip_check_input.shtml

Regards
D
Carlos A. F. Marques wrote:
> Hi Ian and Rob,
>
> I've used CDO to remapping data (T,u,v,omega and Z) from a gaussian
> grid (192 Lon x 96 Lat) to a fixed grid (144 Lon x 73 Lat). The
> commands from the shell are:
>
> 1 - Generating the weights for a conservative (1st order) remapping:
>
> cdo gencon,r144x73, inputfile.nc weightfile.nc
>
> 2 - Performing the conservative remapping:
>
> cdo remap,r144x73,weightfile.nc inputfile.nc outputfile.nc
>
>
> Replacing "gencon" in step 1 by "gendis" the remapping procedure uses
> a distance-weighted average of the four nearest neighbor values.
>
> I compared this remapping with the one performed with NCL using the
> function "g2fsh" (that uses spherical harmonics) and found no
> appreciable differences. It should be noted, however, that the data
> used was for the entire globe.
>
> Good Luck,
>
> Carlos
>
>
>
> Em Mon, 17 Dec 2007 10:09:12 +0000
> Ian Ross <Ian.Ross_at_bristol.ac.uk> escreveu:
>> Hi Rob,
>>
>> Yes. I use CDO all the time, for all sorts of things. It's very
>> handy. I believe, since the regridding methods are all based on SCRIP
>> (which I've never had any reason to think of as anything other than
>> reliable) that all of the CDO remapping functions work fine. I've not
>> used the conservative regridding myself, but I've never had any
>> trouble with any of the other functionality in CDO. It seems to be a
>> very well-constructed package.
>>
>> Cheers,
>>
>> Ian.
>>
>> "Rob Nicholas" <rnicholas_at_atmos.washington.edu> writes:
>>>
>>> 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
>>>
>>>
>>
>> --
>> Ian Ross, Geographical Sciences, University of Bristol, U.K.
>> Ian.Ross_at_bristol.ac.uk
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _____________________________
> Physics Department,
> University of Aveiro.
> Campus Universitário de Santiago,
> 3810-193 Aveiro.
> Portugal
> _____________________________
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Dec 17 2007 - 07:13:05 MST

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