[MITgcm-support] interpolate from model grid to regular grid

Gael Forget gforget at MIT.EDU
Wed Aug 1 09:23:17 EDT 2012


Hi Katy,

I added a more general routine called gcmfaces_interp_2d.m to this end
within the matlab framework ('gcmfaces') that we use to analyze ecco 
solutions on a lat-lon-cap grid. gcmfaces_interp_2d.m and gcmfaces
work as well with other model grids (cube sphere and lat-lon).
Hence it allows you to go back and forth between a model grid and 
a lat-lon grid, as shown in example_faces2latlon2faces.m.

To download the codes from
	http://mitgcm.org/viewvc/MITgcm/MITgcm_contrib/gael/matlab_class/
the suggested method is to use the shell script
	http://mitgcm.org/viewvc/*checkout*/MITgcm/MITgcm_contrib/gael/setup_gcmfaces_and_mitprof.csh?revision=1.6&content-type=text%2Fplain
Indeed, as explained in the summary documentation of gcmfaces
	http://mitgcm.org/viewvc/MITgcm/MITgcm_contrib/gael/matlab_class/gcmfaces.pdf
the shell script will not only download the codes, but also get grid data, and run 
basic tests in matlab. Once it completes you should be all set to use gcmfaces. Note 
that individual functions usually have a help section (e.g. try 'help gcmfaces_interp_2d').

To run example_faces2latlon2faces & gcmfaces_interp_2d, you then start matlab, 
cd to the 'gcmfaces' directory, run 'gcmfaces_global' to add gcmfaces paths, and run 
example_faces2latlon2faces('v4'). With the 'v4' parameter it will use the lat-lon-cap grid 
that I think you are concerned with. You may want to add m_map paths to get nicer plots.

I hope this helps. Cheers,
Gael

On May 24, 2012, at 1:54 PM, Katherine Quinn wrote:

> Hi all,
> In the exf package there is a subroutine to interpolate from a regular lat/lon grid onto the model grid (exf_interp.F).  Does anyone have a subroutine that can efficiently interpolate from the model grid onto a regular grid?
> thanks, Katy
> 
> -- 
> Katherine J. Quinn
> Atmospheric and Environmental Research         voice: 781-761-2234
> 131 Hartwell Avenue                              fax: 781-761-2299
> Lexington, MA  02421-3126                     e-mail: kquinn at aer.com
> 
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list