Re: [newbie] 3D LCC: Cartesian, rectilinear, other?

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Nov 29 2012 - 16:25:17 MST

[1} An existing script was modified to generate a weight file.
     This file contains the weights used for lat x lon regridding.
     The script also creates graphics: the original variable
     on the original grid and the regridded variable.

     The weight file can be reused for subsequent regridding.

[2] Another existing script was modified to interpolate one or
     more variables to the new grid using the weight file
     generated in [1]. A netCDF file is created.

     This is 2d lat x lon interpolation.

[3] The script used in [2] can have another vertical
     interpolation added in the variable loop to make it 3D.
     The needed information is on the other file you mention at the
     end of your post.

     Note: You can take the netCDF file generated in [2] and
     import it into R and perform the vertical interpolation
     if this is more comfortable for you.

It is in your ball park now.

Good Luck

ftp ftp.cgd.ucar.ed
anonymous
email
cd pub/shea/ESMF/EPA
prompt
mget *
quit

  126263988 Nov 29 16:16 EPA_ESMF.source_for_3D_regrid.nc
       7968 Nov 29 16:18 rl2epa_esmf.genwgt.ncl
       6139 Nov 29 16:16 rl2epa_esmf.regrid2file.ncl
     151996 Nov 29 16:18 RL_96x144_to_EPA.conserve.png
     100758 Nov 29 16:18 RL_96x144_to_EPA.conserve.region.png
    6310180 Nov 29 16:20 source_for_3D_regrid.nc
   31316440 Nov 29 16:20 target_for_3D_regrid_horiz.nc
   17600040 Nov 29 16:16 wgt.RL_96x144_to_EPA.conserve.nc

On 11/28/2012 01:33 PM, Tom Roche wrote:
>
> apologies for delay in responding ... preparing for a conference ...
>
> Dennis Shea Mon, 26 Nov 2012 11:32:17 -0700 (rearranged)
>> Please ftp your global source file (netCDF or grib or hdf)
>
> they're netCDF
>
> Source is @ ftp.cgd.ucar.edu:.../incoming/source_for_3D_regrid.nc
> Locally the filesize is
> ... 20 ... source_for_3D_regrid.nc -> ./2008N2O_restart.nc
> ... 6310180 ... 2008N2O_restart.nc
> The datavar I want to 3D-regrid is double N2O(lev, lat, lon)
>
>> and, if you have it, a file containing the 2d latitude and longitude
>> arrays of the target grid.
>
> Target is @ ftp.cgd.ucar.edu:.../incoming/target_for_3D_regrid_horiz.nc
> Locally the filesize is
> ... 18 ... target_for_3D_regrid_horiz.nc -> ./GRIDCRO2D_080101
> ... 31316440 ... GRIDCRO2D_080101
> and the relevant datavars are
> float LAT(TSTEP, LAY, ROW, COL)
> float LON(TSTEP, LAY, ROW, COL)
>
> Regarding the coordinate variables:
>
> - TSTEP is irrelevant here: it's metadata for IOAPI.
>
> - LAY, ROW, and COL are very Cartesian integers which index the grid
> cells. The model (via IOAPI) uses them for all subsequent
> calculations. LAY is vertical layer index, ROW is north-south
> (usually) horizontal index, and COL is east-west horizontal index.
>
> - This file has only LAY=1 (i.e., one vertical layer), but LAY=34 in the
> particular run I'm augmenting. The vertical layer heights are defined
> at each timestep, but in separate files, since, once the model starts
> running, the meteorology makes the vertical layer heights change (but
> you probably knew that).
>
> I can send vertical heights too if desired. Note I need to regrid from
> the 56 source levels to the 34 target levels, as well as regrid
> horizontally.
>
> Your assistance is appreciated, Tom Roche <Tom_Roche@pobox.com> <Roche.Tom@epa.gov>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Nov 29 16:25:26 2012

This archive was generated by hypermail 2.1.8 : Fri Dec 07 2012 - 13:30:06 MST