Name  Meaning 

time.year  The fourdigit year 
time.month  The number of the month (January is month 1) 
time.day  The day of the month 
time.hour  The hour of the day (023) 
time.minute  The minute of the hour (059) 
time.second  The second of the minute (059) 
time.jdate  The Julian date within the year (1366 for a leap year) 
Name  Value 

constants.g_per_kg  1000 
constants.idealGasConstant  8.314 (Pam3/molK) 
constants.kg_per_g  1e3 
constants.kg_per_m3_Water  1000 (kg/m3) 
constants.kg_per_ug  1e9 
constants.L_per_m3  1000 
constants.m3_per_kg_Water  1e3 (m3/kg) 
constants.m3_per_L  1e3 
constants.m3_per_um3  1e18 
constants.pi  3.14159265358979323846 
constants.ug_per_kg  1e9 
constants.um3_per_m3  1e18 
constants.vonKarmensConstant  0.74 
constants.waterMeltingPoint  273.15 (K) 
Function  Notes 

abs(a1)  
advectiveTransport(horizontalWindSpeed, windDirection,
verticalWindSpeed, stabilityClass) 
Returns a factor for advective transport (m/d) which, when multiplied by the interfacial area of the link and divided by the volume of the sending compartment, gives a standard transfer factor (1/d). This requires four arguments. The units for the speed arguments are m/s. The wind direction is expressed in standard meteorological convention. The stability class argument is a number 16 corresponding to the stability classes AF. This function can only be used in properties that belong to algorithms and links. If the value of the stability class is less than 1, the dispersive portions of the calcluation are not performed. See also advectiveAndDispersiveTransport() and dispersiveTransport(). 
advectiveAndDispersiveTransport(horizontalWindSpeed, windDirection,
verticalWindSpeed, stabilityClass) 
Returns a factor for advective and dispersive transport (m/d) which, when multiplied by the interfacial area of the link and divided by the volume of the sending compartment, gives a standard transfer factor (1/d). This requires four arguments. The units for the speed arguments are m/s. The wind direction is expressed in standard meteorological convention. The stability class argument is a number 16 corresponding to the stability classes AF. This function can only be used in properties that belong to algorithms and links. If the value for stability class is less than 1 dispersion is not included in the calculation. See also advectiveTransport() and dispersiveTransport(). 
area()  Horizontal area in square meters of a volume element. Can only be used in formulas attached to volume elements, however, volume elements have an 'area' property that invokes this function. 
boundaryContribution(concentration, speed, direction)  This computes the advective contribution from a boundary. Concentration must be specified in g/m3, speed in m/s, and direction in degrees according to meteorological conventions. This function can only be used in properties attached to compartments. 
dispersiveTransport(horizontalWindSpeed, windDirection,
verticalWindSpeed, stabilityClass) 
Returns a factor for dispersive transport (m/d) which, when multiplied by the interfacial area of the link and divided by the volume of the sending compartment, gives a standard transfer factor (1/d). This requires four arguments. The units for the speed arguments are m/s. The wind direction is expressed in standard meteorological convention. The stability class argument is a number 16 corresponding to the stability classes AF. This function can only be used in properties that belong to algorithms and links. See also advectiveAndDispersiveTransport() and advectiveTransport(). 
exp(a1)  
interfacialArea()  The interfacial area between two volume elements, in square meters. This can only be used in properties for links, but each link has an 'interfacialArea' property that invokes this function. It is an error to invoke this function for an intravolume element link. 
ln(a1)  Natural logarithm 
log10(a1)  Log base 10 
max(a1, a2, a3, ...)  
min(a1, a2, a3, ...)  
mod(a1, a2)  Modulo of a1 relative to a2 
sqrt(a1)  
volume()  Volume in cubic meters of a volume element. Can only be used in formulas attached to volume elements, however, volume elements have a 'volume' property that invokes this function. Note that other objects, such as compartments, can have their own 'volume' properties, but those properties cannot invoke the 'volume()' function. 
Object Specifications
To refer to the object that contains the property, use the appropriate keyword from the following list: compartment, volumeElement, link, algorithm, source, chemical, project, scenario, compositeCompartment.
Some object specifications must be followed by a compartment category in square brackets ("[ ]"). The compartment category is treated as additional information to identify which compartment is requested. A specified category will include all more specific categories. For example, category "air" includes category "air  boundary layer". Only one compartment should satisfy the specified category. The column "Requires Compartment Category" below indicates which object specifications require a compartment category.
Some properties, such as oxidation rate in a compartment, are chemicalspecific. Appending ".chemical" after an object specification references a chemicalspecific property. The circumstances in which this can be used and behavior depends on the type of object that is specified. The chemical specifier cannot be used with the specifications sendingChemical and receivingChemical. For all other object specifications that begin with "sending" or "receiving" the chemical specifier can only be used for properties that are attached to algorithms. For those object specifiers ".chemical" causes the chemical on the sending or receiving side of the algorithm to be used as a qualifier in searching for a property. For example, if an algorithm acts on the chemical "Hg", "sendingCompartment.chemical.oxidationRate" will reference the "oxidationRate" property for Hg in the compartment on the sending side of a link. For object specifiers that do not begin with "sending" or "receiving", ".chemical" can only be used in properties that are chemicalspecific, in which case the chemical is used as the qualifier in finding the property. For example, if a property that is specific to "Hg" contained "containingScenario.chemical.molecularWeight" the "molecularWeight" property for Hg in the scenario.
The following table shows object specifications that refer to objects other than the one that contains the formula.
Keyword  Requires
Compartment Category 
Formula Can
Belong To 
Notes 

containingProject 

algorithm, compartment, composite compartment, link, scenario, source, volume element  The project that contains the formula's owner. 
containingScenario 

algorithm, chemical, compartment, composite compartment, link, source, volume element  The scenario that contains the formula's owner. 
containingVolumeElement 

compartment, composite compartment  The volume element that contains the formula's owner. 
containingVolumeElementSumOf 

compartment, composite compartment  This finds all compartments in the same volume element as the formula's owner that have the specified category and computes the sum of the specified property for each compartment found. If no compartments are found, the result is 0.0. 
currentChemical 

All  The chemical that matches the property's qualifier. 
linkedCompartment 

compartment  The compartment linked to the formula's compartment that belongs to the specified category. 
receivingChemical 

algorithm  The chemical produced or transported by the algorithm. 
receivingCompartment 

algorithm, link  The compartment on the receiving side of the link. 
receivingLinkedCompartment 

algorithm, link  The compartment with the given category that is connected to the link's receiving compartment. 
receivingParcel 

algorithm, link  The compartment with the given category that is within a volume element that has the same parcel as the link's receiving volume element. 
receivingPrimaryAbioticCompartment 

algorithm, link  The primary abiotic compartment of this link's receiving volume element. 
receivingVolumeElement 

algorithm, link  This link's receiving volume element. 
receivingVolumeElementSumOf 

algorithm, link  This finds all compartments in the receiving volume element that have the specified category and computes the sum of the specified property for each compartment found. If no compartments are found, the result is 0.0. 
receivingWithinCompositeCompartment 

algorithm, link  The compartment with the specified category that is within the receiving compartment's parent composite compartment. 
sendingChemical 

algorithm  The chemical consumed or transported by the algorithm. 
sendingCompartment 

algorithm, link  The compartment on the sending side of the link. 
sendingLinkedCompartment 

algorithm, link  The compartment with the given category that is connected to this link's sending compartment. 
sendingParcel 

algorithm, link  The compartment with the given category that is within a volume element that has the same parcel as the link's receiving volume element. 
sendingPrimaryAbioticCompartment 

algorithm, link  The primary abiotic compartment of this link's receiving volume element. 
sendingVolumeElement 

algorithm, link  This link's sending volume element. 
sendingVolumeElementSumOf 

algorithm, link  This finds all compartments in the sending volume element that have the specified category and computes the sum of the specified property for each compartment found. If no compartments are found, the result is 0.0. 
sendingWithinCompositeCompartment 

algorithm, link  The compartment with the specified category that is within the sending compartment's parent composite compartment. 
theLink 

algorithm  The link to which the algorithm is attached. 
thePrimaryAbioticCompartment 

compartment, compositeCompartment  The primary abiotic compartment of the volume element that contains this compartment or composite compartment. 
withinCompositeCompartment 

compartment  The compartment with the specified category that is within this compartment's parent composite compartment. 
withinContainingVolumeElement 

compartment  The compartment with the specified category that is within this compartment's volume element. 
Referring to chemicals can be confusing because there are chemical objects and chemical qualifiers for properties. Some examples might clarify the difference and how each concept should be referenced.
If there is a chemical Hg, formulas in Hg's properties can refer to Hg as "chemical". For instance, in Hg the formula "chemical.p" would refer to the value of property "p" in Hg.
In a compartment Soil the property "r" that was specific to Hg (was qualified by Hg) could refer to the Soil property "q" that was specific to Hg as "compartment.chemical.q". Also in Soil, the property "s" that is specific to Hg could refer to Hg's "t" property with "currentChemical.t".
General Examples: