Convert Geopotential (GP) to Height (Z)
Apply the function name to each timestep of the data
applyToRangeValues(function, data):
Apply the function name to each value in each timestep of the data
averageOverTime(field, makeTimes):
Average the values in each time step If makeTimes is true (1) then we return a field mapping all of the times to the average. Else we just return the average
combine several fields together
differenceFromBaseTime(field):
set the value of each time step N: D(N)= D(N) - D(0)
exportGridToNetcdf(grid, filename):
Write out the grid data to CF compliant netCDF file
extractLatitudeFromNWPGrid(fieldimpl):
Get the latitude coordinate from a grid. Return a grid of the latitudes at each point.
extractLongitudeFromNWPGrid(fieldimpl):
Get the longitude coordinate from a grid. Return a grid of the longitudes at each point.
extractPressureFromNWPGrid(fieldimpl):
Get the pressure coordinate from a time series grid and return a grid of the pressure at all points. Input grid must have pressure or height (which is converted to pressure in the standard atmosphere). User must be sure input is a suitable FlatField.
Change units from geopotential meters to meters
getNthTimeGrid(fieldimpl, Nth):
Get the Nth grid in time series of grids; User must be sure input is a suitable data field. returns a single time. Nth is an integer, >=0, <= max index of grid time series.
getSliceAtAltitude(fieldimpl, alt, unit):
Extract a 2D horizontal slice from a 3D grid at the given altitude; level is a real number; if unit is supplied, it must be compatible with meters (ft, fathoms, etc) param fieldimpl is a grid which may have one or more time steps.
getSliceAtLevel(fieldimpl, level):
Extract a 2D horizontal slice from a 3D grid at "Level." level is a real number; must be appropriate for the grid. param fieldimpl is a grid which may have one or more time steps.
horizontalAdvection(param, u, v):
horizontal advection
horizontalDivergence(param, u, v):
horizontal flux divergence
layerAverage(grid, top, bottom, unit):
Wrapper for calculating layer average
layerDiff(grid, top, bottom, unit):
Wrapper for calculating layer difference
Flip the longitudes in a grid from -180-180 to 0-360 (or vice-versa). Only works for cyclic rectilinear grids.
Make a 2D slice from a 3D slice at a single level
Make a vector from 3 components
Merge a set of single time grids/images into a time sequence
makeTopographyFromField(grid):
make a topography out of a grid
true wind vectors
Make a vector from 2 components
maskGrid(grid, mask, value, resample):
mask one grid by the values in the other. value is the masking value
maxOverTime(field, makeTimes):
Take the max of the values in each time step If makeTimes is true (1) then we return a field mapping all of the times to the average. Else we just return the max
Merge a set of time sequences of grids/images into a single time sequence. All grids/images must have the same parameter name
minOverTime(field, makeTimes):
Take the min of the values in each time step If makeTimes is true (1) then we return a field mapping all of the times to the average. Else we just return the min
newName(field, varname, copy):
create a new field with a new parameter name
newUnit(field, varname, unitname):
set the name and unit on a grid
remove the units from a grid
oldaverageOverTime(field, makeTimes):
@deprecated Average the values in each time step If makeTimes is true (1) then we return a field mapping all of the times to the average. Else we just return the average
resampleGrid(oldGrid, gridwithNewDomain):
display gridded data on a new domain
generate a running average:
substitute(data, low, high, newValue):
change values in data between low/high to newvalue
set the value of each time step N: D(N)= D(N) + D(0)
sumOverTime(field, makeTimes):
Take the sum of the values in each time step If makeTimes is true (1) then we return a field mapping all of the times to the average. Else we just return the sum
timeStepDifference(field, offset):
set the value of each time step N: D(N)= D(N) - D(N+offset) where offset should be negative
set the value of each time step N: D(N)= D(N) + D(N+offset) where offset should be negative
creating the vector field using the wind direction
wgt_runave(grid, wgts, option):
generate a weighted running average:
windShear(u, v, z, top, bottom, unit):
calculate the wind shear between discrete layers
windShearVector(u, v, top, bottom, unit):
calculate the u and v layer difference and return as vector
writeGridToXls(grid, filename):
Write out the grid data to an excel spreadsheet
In the following operators, scalar operands are named Sn and vector operands are named Vn. Lowercase u and v refer to the grid relative components of a vector.
Gravity constant
Addition
Horizontal Advection, negative by convention
Ageostrophic wind
Wrapper for atan2 built-in
Average of 2 scalars
Absolute Vorticity
Coriolis Parameter for all points in a grid
Vector cross product magnitude
Take the derivative with respect to the domain's X coordinate
Take the derivative with respect to the domain's Y coordinate
Total deformation
North relative direction of a vector
Grid relative direction of a vector
Horizontal Divergence
Vector dot product
Partial x derivative of a vector
Partial x derivative of a vector
Frontogenesis function from theta and the wind
Where: BETA = ASIN ( (-DDX (THTA) * COS (PSI)
- DDY (THTA) * SIN (PSI))/
MAG ( GRAD (THTA) ) )
PSI = 1/2 ATAN2 ( SHR / STR )
geostrophic wind from height
Gradient of a scalar
Inertial advective wind
Jacobian Determinant
Laplacian operator
Latitudue all points in a grid
Layer Average of a multi layer grid
Layer Difference
Magnitude of a vector
Mixing Ratio from Temperature, RH (requires pressure domain)
Multiply
Potetial Vorticity (usually from theta and wind)
Divide
Q-vector ( K / m / s )
Q-vector at a level ( K / m / s )
Create Relative Humidity from Temperature, mixing ratio (requires pressure domain)
Average over whole grid
Average over grid subset
Horizontal Flux Divergence
Shear Deformation
Smooth a scalar grid using a 5-point smoother
Smooth a scalar grid using a 5-point smoother (see sm5s)
Smooth a scalar grid using a 9-point smoother
Smooth a scalar grid using a 9-point smoother (see sm9s)
Stretching Deformation
Subtract
thrm(S, level1, level2, unit):
Thermal wind
Potential Temperature from Temperature (requires pressure domain)
Equivalent Potential Temperature from Temperature and Relative humidity (requires pressure domain)
North relative u component
Grid relative u component
add the components of 2 vectors
Make a true nort vector from two components
Make a vector from two components
vlav(V, level1, level2, unit):
calculate the vector layer average
vldf(V, level1, level2, unit):
calculate the vector layer difference
Multiply the components of 2 vectors
North relative v component
Relative Vorticity
Divide the components of 2 vectors
Grid relative v component
subtract the components of 2 vectors
Magnitude of the vertical wind shear in a layer
Average along a grid row
Sum along a grid row
Average along a grid column
Sum along a grid column
Average across the levels of a grid at all points
Sum across the levels of a grid at all points
mode value
percentile value
basic ensemble average
max value of all member
min value of all member
max - min grid value
basic ensemble average
ens_uprob(grid, logicalOp1, pValue1, and_or, logicalOp2, pValue2, exptdLoBound, exptdUpBound):
ensemble univariate probability calculation
combine 3 images as an RGB image
makeNavigatedImage(d, ulLat, ulLon, lrLat, lrLon):
This takes a image data object and a lat/lon bounding box and adds a lat/lon domain to the data. Use it in conjunction with a formula:
calcDayAnom(daily, ltm, asPercent):
Calculate the daily anomaly from a long term mean.
grid - daily values
ltm - long term mean (climatology)
asPercent - if 1, return percentage of climatology normal (+/-)
calcMonAnom(monthly, ltm, normalize):
Calculate the monthly anomaly from a long term mean. The number of timesteps in ltm must be 12 and the monthly data must start in January.
Create a daily climatology from a grid of daily data over a period of years.
Create a monthly climatology from a grid of monthly data over a period of years. The number of timesteps must be a multiple of 12.
Create monthly standard deviations from a grid of monthly data over a period of years. The number of timesteps must be a multiple of 12.
applyFunctionToValuesInField(function, field, min, max, inside):
applyFunctionToValuesInRange(function, range, timeStep, min, max, inside):
applyToIndices(function, range, timeStep, indices):
averageFromMap(field, mapSets):
averageFromMapAndClip(field, mapSets):
filterMaps(mapSets, propName, operator, value):
Return a new set of maps whose property propName satisfies the given operator/value. The operators can be ==,!=, <,>,<=,>=, match, !match
getMapProperty(polygon, propName):
Get the named property from the given mapData
getMapsWithProperty(mapSets, propName, value):
Return a new set of maps that have the given property value
Make a 3d map. map - map line data - topo - topography dataset
makeFieldFromMapBounds(mapSets, length1, length2, fill, unit):
Make a field whos lat/lon area is the bounds of the given mapSet. It has length1 points in the x and length2 in the y. Fill it with the fill value and the given unit
mapsAbsoluteValue(originalValues, newValues, indexArray):
mapsApplyToField(function, field, mapSets, inside):
mapSets defines a set of polygons. This procedure fills the areas in the field are enclosed by each polygon with the average value within that area
mapsApplyToRange(function, range, timeStep, mapSets, inside):
mapsAverage(originalValues, newValues, indexArray):
mapsMax(originalValues, newValues, indexArray, value):
mapsMin(originalValues, newValues, indexArray, value):
mapsSetValue(originalValues, newValues, indexArray, value):
subsetFromMap(field, mapSets, fillValue, inverse):
mapSets defines a set of polygons. This procedure fills the areas in the field that are not enclosed by the polygons with the fill value. If inverse is 1 then it fills the areas that are enclosed
subsetRangeFromMap(range, timeStep, mapSets, fillValue, inverse):
mapSets defines a set of polygons. This procedure fills the areas in the field that are not enclosed by the polygons with the fill value. If inverse is 1 then it fills the areas that are enclosed
subsetRangeWithProperty(range, mapSets):
test code
subsetWithProperty(field, mapSets):
test code
testIndexToLatLon(field, mapSets):
Test out the GridUtil.getLatLons method. Call this with some grid field and a set of maps
testIndexToLatLon2(field, mapSets):
Test out the GridUtil.getLatLons method. Call this with some grid field and a set of maps
Clear the shell
createDisplay(displayType, data, dataName):
create a display of type displayType. Right click in input field to select particular displayType. The data is can be a data object, a datachoice or a list of data or datachoices The dataName is used to name the data, i.e., its the parameter name
Find the data source object with the given name. If no name is given then this will return the first (non-formula) data source
getData(dataSourceName, dataChoiceName):
Find the data source with the given name and the data choice on that data source with the given name. If no dataSourceName is given then use the first one in the list If no dataChoiceName is given then use the first one held by the data source Return the data for the data choice. If no data source or data choice is found then return null
getDataChoice(dataSourceName, dataChoiceName):
Find the data source with the given name and the data choice on that data source with the given name. If no dataSourceName is given then use the first one in the list If no dataChoiceName is given then use the first one held by the data source Return the data choice If no data source or data choice is found then return null
List all of the variables defined in the shell's interpreter
Create a datasource from the given file name or url. The optional type parameter is used to specify the type of data
Print out the math type of the given data
selectData(name1, name2, name3, name4, name5):
Select up to 5 data fields. This returns a List of the actual Data objects
selectDataChoice(name1, name2, name3, name4, name5):
Select up to 5 data choices. This returns a List of the data choices, not the actual Data To get the data do:
The given dataSource can be an actual data source or the name of a data source. This procedure will define a set of jython variables that correspond to the data choices held by the given data source.
This procedure will define a set of jython variables, 'dataSource0, dataSource1, ...' that correspond to loaded data sources.
Bring up the jython library dialog
A utility to make a 2 dimensional float array filled with the given value
evaluate a formula and return a DerivedDataChoice
makeFloatArray(rows, cols, value):
A utility to make a 2 dimensional float array filled with the given value
Print out the values of the sounding data
Print out the values of the set of sounding data