linear interpolation functions in grads-2.0.a5.oga.5
James T. Potemra
jimp at HAWAII.EDU
Wed Jul 15 19:38:49 EDT 2009
Hi Mike:
Thanks for the reply. For some reason this causes my grads to exit.
I open the file, pick a point (lat,lon), then run trend=linreg(y) and
grads just quits (no error or seg fault):
Welcome to the OpenGrADS Bundle Distribution
--------------------------------------------
For additional information enter "opengrads --help".
Starting
"/usr/local/grads-2.0.a5.oga.5/Contents/Linux/Versions/2.0.a5.oga.5/x86_64/grads
-HC 1 -l -g 1000x800 " ...
Grid Analysis and Display System (GrADS) Version 2.0.a5.oga.5
Copyright (c) 1988-2008 by Brian Doty and the
Institute for Global Environment and Society (IGES)
GrADS comes with ABSOLUTELY NO WARRANTY
See file COPYRIGHT for more information
Config: v2.0.a5.oga.5 little-endian readline printim grib2 netcdf
hdf4-sds opendap-grids,stn athena geotiff
Issue 'q config' command for more information.
Loading User Defined Extensions table
</usr/local/grads-2.0.a5.oga.5/Contents/Linux/Versions/2.0.a5.oga.5/x86_64/gex/udxt>
... ok.
GX Package Initialization: Size = 11 8.5
Command line history in /export/lii/jimp/.grads.log
ga-> open c20c_tas
Scanning description file: c20c_tas
Data file c20c_tas.nc is open as file 1
LON set to 0 360
LAT set to -89.4944 89.4944
LEV set to 1 1
Time values set: 1861:7:1:0 1861:7:1:0
E set to 1 1
ga-> set lat 0
LAT set to 1.01124 1.01124
ga-> set lon 180
LON set to 181.25 181.25
ga-> set t 1 140
Time values set: 1861:7:1:0 2000:7:1:0
ga-> d tas
ga-> trend=linreg(tas)
Michael Fiorino wrote:
> jim,
>
> my linreg extension does work... e.g., trend=linreg(y)
>
> in a script the m and b are printed to the 'result' variable.
>
> /r mike
>
> James T. Potemra wrote:
>
>> I'm running grads-2.0.a5.oga.5 on a 64-bit linux machine and want to do
>> a linear
>> fit to a time-series. There appears to be a UDF called "linreg" that is
>> included
>> in Mike Fiorino's UDF library, but the man page at
>> http://opengrads.org/doc/udxt/libmf/
>> does not list this function.
>>
>> Conversely, there is a man page for "tregr2" at
>> http://opengrads.org/doc/udxt/libbjt/
>> as part of Ben-Jei Tsuang's UDF library, but that does not appear in the
>> UDC list
>> (see list below).
>>
>> I would like to plot a linear fit through a time-series of a particular
>> variable. It looks
>> like either of these would do this, but in my case the independent
>> variable is time, and
>> I'm not sure if I need to somehow define that in the Y = m * X + b
>> syntax for either
>> tregr2 or linreg.
>>
>> I'd appreciate any suggestions. Thanks,
>>
>> Jim
>>
>> ------------------------------------------------------------------------------------------------------
>>
>>
>> ga-> q udf
>>
>> User
>> Defined
>> FUNCTION Short Description Function at Library
>> ---------- -----------------------------------
>> --------------------------
>> lt Less than operator f_bjt@^libbjt.gex
>> jd Julian day f_bjt@^libbjt.gex
>> cosz Cosine solar zenith angle f_bjt@^libbjt.gex
>> dayratio Daylight ratio f_bjt@^libbjt.gex
>> if Conditional function f_bjt@^libbjt.gex
>> maxv Maximum value f_bjt@^libbjt.gex
>> minv Minimum value f_bjt@^libbjt.gex
>> which Label gridpoints f_bjt@^libbjt.gex
>> ftest F-test f_bjt@^libbjt.gex
>> ttest T-test f_bjt@^libbjt.gex
>> tfit Point linear regression f_bjt@^libbjt.gex
>> fit Global linear regression f_bjt@^libbjt.gex
>> tcorr2 Time correlation f_bjt@^libbjt.gex
>> tregr2 Point linear regression f_bjt@^libbjt.gex
>> tmave2 Time averaging w/masking f_bjt@^libbjt.gex
>> madvu Calculates -d(u*EXPR)/dx f_bjt@^libbjt.gex
>> madvv Calculates -d(V*EXPR)/dy f_bjt@^libbjt.gex
>> madvw Calculates -d(W*EXPR)/dp f_bjt@^libbjt.gex
>> muadv Zonal advection f_bjt@^libbjt.gex
>> mvadv Meridional advection f_bjt@^libbjt.gex
>> mwadv Vertical advection f_bjt@^libbjt.gex
>> satvap Saturated vapor pressure f_bjt@^libbjt.gex
>> dew Dew point temperature f_bjt@^libbjt.gex
>> lw Thermal infrared fluxes f_bjt@^libbjt.gex
>> lw2 Thermal infrared fluxes v2 f_bjt@^libbjt.gex
>> pinterp Pressure interpolation f_bjt@^libbjt.gex
>> zinterp Height interpolation f_bjt@^libbjt.gex
>> line Draws a line f_bjt@^libbjt.gex
>> vint2 Mass-weighted vertical integral f_bjt@^libbjt.gex
>> fish Poisson solver f_fish@^fish.gex
>> fish_psi Compute streamfunction f_psichi@^fish.gex
>> fish_chi Compute velocity potential f_psichi@^fish.gex
>> fish_vor Compute vorticity f_psichi@^fish.gex
>> fish_div Compute divergence f_psichi@^fish.gex
>> dewpt Dew-point temperature f_gsudf@^gsudf.gex
>> ept Equivalent potential temperature f_gsudf@^gsudf.gex
>> epi Potential Instability f_gsudf@^gsudf.gex
>> plcl Pressure at LCL f_gsudf@^gsudf.gex
>> shear Wind Shear f_gsudf@^gsudf.gex
>> srh1km Storm-relative Helicity 0-1km' f_gsudf@^gsudf.gex
>> srh3km Storm-relative Helicity 0-3km' f_gsudf@^gsudf.gex
>> tlcl Temperature at LCL f_gsudf@^gsudf.gex
>> tsindex Chance of T-storm Initiation f_gsudf@^gsudf.gex
>> ttindex Total Totals Index f_gsudf@^gsudf.gex
>> wchill Wind Chill Index (New) f_gsudf@^gsudf.gex
>> hello Hello, World! sample function f_hello@^libhello.gex
>> ipc_save Save expression to stream f_Save@^libipc.gex
>> ipc_load Load variable from file f_Load@^libipc.gex
>> smth2d Shuman smoother/de-smoother f_smth2d@^libmf.gex
>> uv2trw Find radial/tangential velocity f_uv2trw@^libmf.gex
>> re2 General interpolator (regrid2) f_re2@^libmf.gex
>> esmrf Saturation vapor pressure (old MRF) f_esmrf@^libmf.gex
>> linreg Linear regression: mx + b f_linreg@^libmf.gex
>> re General interpolator ffre@^re.gex
>> re_ General interpolator (verbose) ffre_dbg@^re.gex
>> regrid2 regrid2-like wrapper for re() f_gsudf@^gsudf.gex
>> reimg Interpolation for Image Generation' f_gsudf@^gsudf.gex
>> sh_filt Spherical harmonic filter f_shfilt@^shfilt.gex
>> sh_power Spherical harmonic spectra f_shpowr@^shfilt.gex
>> ---------- -----------------------------------
>> --------------------------
>>
More information about the gradsusr
mailing list