Vertically interpolated curves and cross sections - how to create?

Ben-Jei Tsuang btsuang at YAHOO.COM
Wed Jul 13 09:28:27 EDT 2005


Dear Tero:

I have an enhanced version of GrADS 1.8SL11. There are two functions:
zinterp and pinterp, which can solve your problem. The functions are very
simlar to zinterp.gs and pinterp.gs script files. But they can be used for
interpolation at multiple levels. For example, if you want to draw the cross
section at 0N after interpolation, you can do the commands like:

 'set z 1 23'
 'set lat -90 90'
 'set lon -2.5 360'
 'define cbtzw=pinterp(cbtzw.3,lev.3,lev)'

 'set  lat 0'
 'd cbtzw'

But unfortunately, the binary file is availabe only for Linux RedHat 8. You
can download the following binary execuate file for a try.

http://cs1.aqmc.org.tw/~bjtsuang/grads/bin/xgrads
or
http://140.120.30.2/~bjtsuang/grads/bin/xgrads

The source codes are in
http://cs1.aqmc.org.tw/~bjtsuang/grads/src/

I want to port to GrADS 1.9 beta. But I still can not find time. It will be
very welcome if there is anyone available.

Ben


---------------------------------------------------------------
usage:
d ZINTERP(field,zgrid,zlev,[-l|-s|-p]) or d
PINTERP(field,pgrid,zlev,[-l|-s|-p])

Function returns:  defined grid vinterp holding interpolated values
GrADS function to interpolate within a 3-D grid to a specified
z level.  Can also be used on non-z level data, such
as sigma or eta-coordinate output where z is a function
of time and grid level.

Arguments:
   field = name of 3-D grid to interpolate
   zgrid = name of 3-D grid holding z values at each gridpoint
   zlev  = z level at which to interpolate
   [-l|-s|-p] = an option argument
           -l for piecewise linear interpolation (fast) (default)
           -s for spline interpolation (slow & problematic while dx is
small)
           -p for polynomnial interpolation (fast but problematic with
extrapolation)

----- Original Message -----
From: "Tero Siili" <Tero.Siili at FMI.FI>
To: <GRADSUSR at LIST.CINECA.IT>
Sent: Wednesday, July 13, 2005 7:35 PM
Subject: Vertically interpolated curves and cross sections - how to create?


>A question that has been bothering me for some time: is there a GrADS
> script or function somewhere, which generates vertically interpolated
> cross sections (or vertical profile curves) of a variable/quantity? I
> know there are scripts to produce interpolations (apparently) to a
> single altitude or pressure level, but if I am not mistaken, these
> generate a horizontal cross section, i.e. the quantity at the wanted
> level as a function of latitude and longitude (typically).
>
> What I am looking for and need is for instance a cross-sectional
> field displayed as a function of latitude/longitude and altitude (or
> pressure) derived from data originally given in dimensionless (sigma
> or eta) coordinates. If the underlying topography could be overlayed
> on top of the field, even better. Similarly, it would be nice to have
> a tool displaying a vertical profile of a given quantity
> interpolated to given set of altitude or pressure levels (either some
> absolute or above-the-surface set).
>
> Does anybody out there have something like this written? Or perhaps a
> tool that I could use as a starting point? All pointers are
> appreciated (and I have tried to search the archive of this list, to
> not much avail).
>
> Tero Siili
> --
> Finnish Meteorological Institute
> Space research
> P.O. Box 503
> FIN-00101 Helsinki, Finland
> Tel.    +358 9 19294660          Telefax +358 9 19294603
>
> "Science is like sex: sometimes something useful comes out,
>    but that is not the reason we are doing it" -- (Richard Feynman)



More information about the gradsusr mailing list