Next: Special topics, Previous: Subprogram creation, Up: Customized Coding
This section provides a list of the available high-level SPA
subprograms. This section focuses on calculation and
I/O subprograms, the most likely to be modified and accessed
by developers. While this list is as up-to-date as possible,
the spalist utility will provide better information on
the subprograms present in your version of the package. No
interfacing information is provided here since changes are
difficult to document. The spainfo utility should be
used to obtain interfacing information.
func_absVort.f90: compute absolute vorticity (Vorticity).
func_adv.f90: compute advection (Math).
func_anomalyCorrelation.f90: compute the anomaly correlation score
over a given grid area (Math).
func_avg.f90: compute averages in the vertical (Math).
func_areaAverage.f90: compute the mean of a quantity
over a specified horizontal area (Math).
func_balance.f90: compute streamfunction or geopotential
using either geostrophic or gradient balance equations (Dynamics).
func_bvFrequency.f90: compute the Brundt-Vaisala frequency
of the atmosphere (Thermodynamics).
func_colInt.f90: compute column integral of a quantity (Math).
func_coriolisForce.f90: compute the Coriolis force (Vorticity).
func_couplingIndex.f90: compute the coupling index (otherwise
known as the coupling potential) (Thermodynamics).
func_createColourMap.f90: generate a new NCAR Graphics
colour map (available only if NCAR Graphics is installed) (NCAR_Utilities).
func_dateStamp.f90: convert yy/mm/dd/hh times into internal date stamp and vice versa (Math).
func_dateStampString.f90: convert internal date stamp into a set of strings (Math).
func_deformation.f90: compute deformation magnitude and dilitation axis orientation (Dynamics).
func_density.f90: compute density from the ideal gas law (Thermodynamics).
func_der.f90: compute the derivative of a field at a given
point and in a given direction (Math).
func_derSq.f90: compute the second derivative of a field
at a given point and in a given direction (Math).
func_diff.f90: compute the difference between two (possibly)
different fields at two (possibly) different levels (Math).
func_divergence.f90: compute divergence (Dynamics).
func_drawCentered.f90: plot a storm centered field on a
polar stereographic projection with the pole at the point of
interest (available only if NCAR Graphics is installed)
(NCAR_Utilities).
func_drawFill.f90: fill a specified region with a
specified colour (available only if NCAR Graphics
is installed) (NCAR_Utilities).
func_drawLine.f90: plot a line on a horizontal map (available
only if NCAR Graphics is installed) (NCAR_Utilities).
func_drawPinwheel.f90: use a 2D wind field and a center
location to draw a summary chart of hurricane intensity and
symmetry (available only if NCAR Graphics is installed)
(NCAR_Utilities).
func_drawPlot.f90: generate a plot of a two-dimensional
field as an NCAR Graphics metafile (available only if
NCAR Graphics is installed) (NCAR_Utilities).
func_drawSounding.f90: generate a skew-T type sounding
for data provided (temperature, humidity and winds) (available
only if NCAR Graphics is installed) (NCAR_Utilities)
func_drawTracks.f90: generate a plot of storm or hurricane
tracks as an NCAR Graphics metafile (available only if
NCAR Graphics is installed) (NCAR_Utilities).
func_drawTrajectory.f90: generate a plot of a parcel
trajectory as an NCAR Graphics metafile (available only if
NCAR Graphics is installed) (NCAR_Utilities).
func_drawText.f90: plot text on a map (available only if
NCAR Graphics is installed) (NCAR_Utilities).
func_drawVectors.f90: generate a plot of a two-dimensional
vector field as an NCAR Graphics metafile (available only if
NCAR Graphics is installed) (NCAR_Utilities).
func_dynTrop.f90: compute a quantity on the the dynamic
tropopause (Dynamics).
func_ertelPV.f90: compute Ertel potential vorticity (Vorticity).
func_eqtott.f90: convert equivalent potential temperature to
dry bulb temperature while holding either specific humidity or
relative humidity constant (Thermodynamics).
func_estohr.f90: convert dewpoint depression to relative
humidity (Thermodynamics).
func_estohu.f90: convert dewpoint depression to specific
humidity (Thermodynamics).
func_frequencyFilter.f90: run a high/low/band pass filter
over a complete dataset (Math).
func_getPower.f90: get the order of a floating point number (Math).
func_hrtoes.f90: convert relative humidity to dewpoint
depression (Thermodynamics).
func_hrtohu.f90: convert relative humidity to specific
humidity (Thermodynamics).
func_hutoes.f90: convert specific humidity to dewpoint
depression (Thermodynamics).
func_hutohr.f90: convert specific humidity to relative
humidity (Thermodynamics).
func_hydrostatic.f90: compute hydrostatic layers or temperatures
from the other component of the mass field (Thermodynamics).
func_interpolate.f90: interpolate from one grid to another (Math).
func_isentropic.f90: interpolate an user-defined
variable onto a given isentropic surface (Dynamics).
func_isentropicPV.f90: computes isentropic Ertel
potential vorticity on a set of isentropic surfaces (Vorticity).
func_isGlobalGrid.f90: determines whether the active grid is global
or regional (Math).
func_julianDay.f90: compute the Julian Day of the data field (Math).
func_Lap.f90: compute the Laplacian of a field (Math).
func_LapInvert.f90: invert the Laplacian of a field (Math).
func_lc.f90: convert string to lower case (String).
func_lpad.f90: pad the left side of a string with a specific
character (String).
func_ltrim.f90: remove whitespace from the left side of
a string (String).
func_mapScale.f90: compute map scale factor (Math).
func_moistureConvergence.f90: compute moisture convergence (Thermodynamics).
func_ncarEnd.f90: manual shutdown of the NCAR
Graphics plotting system (available only if NCAR Graphics is installed)
(NCAR_Utilities).
func_ncarInit.f90: manual initialization of the NCAR
Graphics plotting system - can be used to generate PostScript files instead
of default metafiles (available only if NCAR Graphics is installed)
(NCAR_Utilities).
func_ncarMap.f90: initialize a standard NCAR Graphics
map (available only if NCAR Graphics is installed) (NCAR_Utilities).
func_obsFileSize.f90: obtain the number of station entries in
an observational file (TopLevel).
func_pathLength.f90: compute the true distance between
two points on the sphere (Math).
func_penetrationDepth.f90: Compute the Rossby penetration depth
of the atmosphere (Dynamics).
func_Performance.f90: timer to clock performance of the SPA -
note that the naming strategy in this subprogram is non-standard (Performance).
func_potentialIntensity.f90: compute the (maximum) potential intensity
of the atmosphere from K. Emanuel's model (Thermodynamics).
func_powerDissipation.f90: compute the power dissipation of a storm
modeled by a Rankine vortex. The computation of the power dissipation folows
Emanuel (2005) [Nature] (Dynamics).
func_pvmc.f90: compute the moist component potential
vorticity (Vorticity).
func_resetColourMap: resets the given (default) NCAR
Graphics colour map (available only if NCAR Graphics is installed)
(NCAR_Utilities).
func_slpReduction.f90: compute the sea level pressure from
the mass field (Thermodynamics).
func_staticStab.f90: compute the static stability
(Thermodynamics).
func_streamFunction.f90: compute the streamfunction (Dynamics).
func_tcCentre.f90: determine the centre of a TC (Dynamics).
func_timeLoop.f90: determine time structure required
by user (TopLevel)
func_track.f90: track a disturbance (Dynamics).
func_tTest.f90: compute the statistical significance
of a field (Math).
func_tttoeq.f90: convert temperature to equivalent
potential temperature (Thermodynamics).
func_tttopt.f90: convert temperature to potential temperature
(Thermodynamics).
func_uc.f90: convert string to upper case (String).
func_velocityPotential.f90: compute the velocity potential (Dynamics).
func_verticalIndex.f90: determine the index of a given level (Math).
func_vertInt.f90: perform cubic vertical interpolation
(Math).
func_windcomp.f90: compute wind x/y components (Dynamics).
func_winddir.f90: compute wind direction (Dynamics).
func_windspd.f90: compute windspeed (Dynamics).
func_wptowz.f90: compute vertical motion from omega (Dynamics).
func_wztowp.f90: compute omega from vertical motion (Dynamics).
sub_apeBudget.f90: compute the right-hand-side terms for the
eddy available potential energy (APE) equation (Dynamics).
sub_cape.f90: compute CAPE and CAPE-based variables (Thermodynamics).
sub_closeObsFiles.f90: close a set of observational files
(TopLevel).
sub_composite.f90: compute the running mean of a variable (Compositing).
sub_EadyAtmosphere.f90: compute a basic-state atmospheric
structure based on the constraints of the Eady model (Dynamics).
sub_ekeBudget.f90: compute the right-hand-side terms for the
eddy kinetic energy (EKE) equation (Dynamics).
sub_fillMissing.f90: fill in missing values on pressure
surfaces below the ground and above the model lid (Math).
sub_filter.f90: apply a 25-point smoothing filter (Math).
sub_frontogenesis.f90: compute Miller frontogenesis and
component terms (Dynamics).
sub_garbageCollection.f90: perform garbage collection
duties for some memory-intensive SPA compontents (TopLevel).
sub_grptLocator.f90: determine the gridpoint closest to
the given lat/long values (Math).
sub_irrotationalWind.f90: compute the irrotational component
of the wind (Dynamics).
sub_moistureTransport.f90: compute the moisture transport
and component terms (Thermodynamics).
sub_ncarCentered.f90: compute a storm centered grid with
the point of interest at the pole (available only if NCAR
Graphics is installed) (NCAR_Utilities).
sub_ncarPanels.f90: compute positional information for a
specified number of panels on a page (available only if
NCAR Graphics is installed) (NCAR_Utilities).
sub_nondivergentWind.f90: compute the nondivergent component
of the wind (Dynamics).
sub_openObsFiles.f90: open a set of observational files
(TopLevel).
sub_pvInvert.f90: apply Chris Davis' piecewise PV inversion
(Vorticity).
sub_qvec.f90: compute Q-vectors and Q-vector divergence
of the flow (Dynamics).
sub_stats.f90: compute the statistics (mean, variance, etc)
of the field (Math).
sub_steeringFlow.f90: compute the steering flow of a vortex
(Dynamics).
sub_tcBogus.f90: implant a synthetic tropical cyclone
vortex in the field (Dynamics).
sub_tcRemove.f90: remove an existing vortex from the flow
(Dynamics).
sub_trajectory.f90: compute the trajectory of a parcel
sub_uvRotate.f90: rotate winds to/from grid/north relative
(Dynamics).
sub_validTimes.f90: return a timer-sized array (dimensionned
[ntimes,3] with the valid times of the date stamps held in the
provided timer (TopLevel).
sub_vorticityComponents.f90: compute shear and curvature
vorticity components (Vorticity).
In addition, modification of the I/O subprograms may be necessary in special circumstances. The high-level I/O interface is contained in the following subprograms.