CSN Operation Templates
CSDMS Standard Names — Operation Templates
- Operations can optionally be given as a prefix to the quantity part of an existing standard name. The prefix always ends in the word "_of", which is a reserved word. It can therefore be used as a delimiter to separate the operation from the quantity name it acts on.
- Applying an operation to a quantity results in a new quantity that frequently has different units than the original quantity.
- Operations are applied to the quantity part of the name instead of to the entire name (object + quantity) so that all standard names associated with a given object will group together alphabetically.
- The CSDMS Standard Names currently (Feb. 5, 2013) support the concept of a quantity suffix that can be applied to a base quantity to create a new quantity that usually has the same units, as in "time_step", "elevation_increment", "mass_limit", "pressure_anomaly" and "temperature_correction". However, it appears that every quantity suffix can also be expressed as an operation, so the quantity suffix concept may be discontinued.
- The CSDMS operation templates attempt to express each operation as a prefix to a quantity name. For example, "time_derivative_of_X" is used instead of "derivative_of_X_wrt_time". This allows operations to be chained together (e.g. a time derivative and a space derivative).
Time Derivatives
operation = "time_derivative_of_" (maybe we should allow "d_dt_of" ??)
- Examples
bedrock_surface__time_derivative_of_elevation sea_water__time_derivative_of_north_component_of_velocity soil__time_derivative_of_hydraulic_conductivity
- This pattern was modified on Nov. 19, 2012; "derivative_wrt_time_of" was replaced by "time_derivative_of".
- This pattern adds units of inverse time to the units of the quantity it acts on.
- This pattern is extended to higher-order derivatives by adding a prefix like "2nd_", as in: "2nd_time_derivative_of_".
- Many quantity names built from process names have a sign connotation, such as "erosion_rate", "deposition_rate" and "accumulation_rate". If either sign is possible, the "time_derivative_of_X" pattern is generally less ambiguous and therefore preferable (e.g. time_derivative_of_elevation vs. erosion_rate).
Spatial Derivatives
operation = "alongshore_derivative_of_"
operation = "cross-shore_derivative_of_" (or just "offshore" ??)
operation = "cross-stream_derivative_of_"
operation = "east_derivative_of_"
operation = "normal_derivative_of_"
operation = "north_derivative_of_"
operation = "offshore_derivative_of_"
operation = "streamwise_derivative_of_"
operation = "tangential_derivative_of_"
operation = "x_derivative_of_"
operation = "y_derivative_of_"
operation = "z_derivative_of_"
- This pattern was changed on Feb 5, 2013.
- The adjectives "eastward" and "northward" have been shortened to "east" and "north". (8/6/14)
- Although both "alongshore" and "longshore" are used as synonyms, "alongshore" is used in the CSDMS Standard Names because it is less ambiguous.
General Derivatives
operation_pattern = "Y_derivative_of"
- This is an extension of the pattern used for time and spatial derivatives, where Y can be a one-word base quantity name like "temperature" or "pressure", or can use multiple words to avoid ambiguity, when necessary.
Space and Time Integrals
operation = "time_integral_of_"
operation = "time_integral_from_start_of_"
operation = "area_integral_of_"
operation = "area_integral_over_domain_of_" ## (maybe)
operation = "area_time_integral_of_"
operation = "volume_integral_of_"
operation = "z_integral_of_" (for vertically-integrated quantities)
operation = "line_integral_of_"
- The naming rules for integrals were modified on Nov. 19, 2012. This new pattern (shown above) is more flexible and results in shorter operation names. Single words such as "area", "time", "volume" and "line" are inserted (possibly in combination) as descriptors in front of the word "integral".
- Notice that an integral over both space (e.g. area) and time is expressed compactly as "area_time_integral_of", instead of a long chain like: "area_integral_of_time_integral_of".
- The pattern for time integrals can include some standard limits of integration, as reserved words, such as "from_start" and "to_finish". (8/6/14)
- The pattern for vertical or "z" integrals can include some standard limits of integration, as reserved words, such as "from_bottom" and "to_top". (8/7/14) Bottom and top are used throughout the CSDMS Standard Names to refer to the bottom and top of a layer (e.g. snow, channel water, sea water, atmosphere). This pattern can also include the prefix partial to indicate a "partial sum", as in "partial_z_integral_of". (8/6/14)
- It is sometimes necessary to indicate that a spatial integral is over a particular domain, such as a model domain or a watershed. It seems that this should be indicated by using "watershed" or "model" as the first word in the object name part and then the operation "area_integral_of" applied to a quantity.
- Perhaps we should allow the time interval to be given in the operation name, at least for intervals like "day" and "year". e.g.
atmosphere_top__one_day_time_integral_of_incoming_shortwave_radiation_flux Note that "air" is sometimes used as a synonym for "earth_atmosphere". See the template for Air in the CSDMS Object Templates.
Applied Functions of One Variable
operation = [ function_name ] + "_of_"
- Examples
abs_of_X cos_of_X exp_of_X half_of_X inverse_of_X (used to specify the inverse of a function, when needed) log_of_X (instead of "ln_X" in CF) log10_of_X (instead of "log10_X" in CF) minus_of_X fourth_of_X sin_of_X (not in CF) sgn_of_X sqrt_of_X (not in CF) square_of_X (also a CF Standard Names transformation) tan_of_X tanh_of_X third_of_X 0.2_power_of_X (???, or one_fifth_power_of ??)
- Multiplication by a floating-point number could be supported by allowing operation names like "2_of", "0.5_of" and "2_times_of".
- Addition and subtraction could be supported with function names like: 2_more_of and 2_less_of.
- The ones listed above are just examples; any function name used in mathematics would be used in the same way.
Applied Functions of Two Variables
operation = [ function_name ] + "_of_X_and_Y"
- Examples
difference_of_X_and_Y product_of_X_and_Y quotient_of_X_and_Y sum_of_X_and_Y
- A general power would instead be expressed with the pattern "Y_power_of_X", similar to a general derivative.
- The word "and" is a reserved word that acts as a delimiter between X and Y.
- It may be better to allow "times", "over", "minus" and "plus" to be used between X and Y, e.g. X_plus_Y.
Statistical Operators
operation = [ operator_name ] + "_of_"
- Examples
cdf_of_X (cumulative distribution function) max_of_X mean_of_X median_of_X mid-range_of_X (= (min + max)/2 min_of_X mode_of_X pdf_of_X (probability density function) range_of_X (= max - min) standard_deviation_of_X variance_of_X
- However, many quantities vary in both space and time, so an operation like "max_of" could be ambiguous. In order to address such cases, the following operation names can be used:
domain_max_of_X domain_min_of_X time_average_of_X time_max_of_X (e.g. for a "peak discharge") time_min_of_X And perhaps also: one-day_time_max_of_X one-day_time_min_of_X
- When there is interest in a "peak" value (i.e. a maximum with respect to time), there is generally also interest in the time at which that peak value occurs. We could use "time" as a quantity suffix in such cases, but it might be better to introduce a "time_of" operation like:
time_of_time_max_of_discharge OR time_of_max_of_discharge (since "time_max" is implied by "time_of") or maybe: peak_time_of_discharge and peak_value_of_discharge (or just "peak_of_discharge")
- Similarly, it may not always be clear how "mean_of_" should be interpreted unless extra adjectives/modifiers are used. For example, does "mean_of_channel_water_depth" mean the mean over a cross section or over an entire channel reach or over a grid of such values? This case also needs a more prescriptive rule and/or the details of the operation could be provided in metadata along with units, etc.
- Note that min, max or "peak" could also be used as adjectives/modifiers in the construction of a full quantity name if the meaning is clear.
- The operations, "cdf_of" and "pdf_of" were introduced on 8/28/14, for use in models that employ a random number generator. They can be used constructions like:
integral_from_0_to_1_of_pdf_of_X mean_of_pdf_of_X
Mathematical Operators that Return Scalars
operation = [ operator_name ] + "_of_"
- Examples
alongshore_component_of_X anomaly_of_X (e.g. anomaly_of_pressure; see drop and increment) azimuth_angle_of_X (X must be a 2D or 3D vector field; returns an angle) complement_of_X (90 - X, where X is an angle; see supplement_of below) cross-shore_component_of_X cross-stream_component_of_X depression_of_X (e.g. depression_of_melting_point_temperature) drop_of_X (e.g. drop_of_elevation, drop_of_pressure, drop_of_voltage) divergence_of_X (X must be a vector field; returns a scalar.) downstream_component_of_X down_component_of_X east_component_of_X increment_of_X (e.g. positive or negative change after one model time step) laplacian_of_X (X must be a scalar field; returns a scalar.) limit_of_X (asymptotic limiting value) loss_of_X (e.g. loss_of_energy; maybe use "drop_of_energy" instead ?) magnitude_of_X (X must be a vector or tensor) north_component_of_X offset_of_X offshore_component_of_X reciprocal_of_X (also called the "multiplicative inverse". "inverse" is a more general concept.) reduction_of_X (e.g. atmosphere_aerosol_dust + reduction_of_transmittance) shift_of_X supplement_of_X (180 - X, where X is an angle; see complement_of above) up_component_of_X (### should we only use "z_component_of" ??) u_component_of_X (orthogonal curvilinear coordinates) v_component_of_X (orthogonal curvilinear coordinates) x_component_of_X (Cartesian coordinates) x_y_component_of_X (for tensors, like stress) y_component_of_X (Cartesian coordinates) z_component_of_X (Cartesian coordinates) zenith_angle_of_X (X must be a 3D vector field; returns an angle) land_surface__laplacian_of_elevation
- Note that the "magnitude_of" operation turns a vector or tensor quantity into a scalar quantity. Some magnitudes have shorter synonyms, such as speed = magnitude_of_velocity and slope = magnitude_of_gradient_of_elevation. The word "magnitude" can also work as a "quantity suffix", but should only be used as an operation.
- For a 2D vector field, the azimuth angle is just the official name for the angle in the xy-plane that is used in polar coordinates. (Depending on the context, it may be measured counter-clockwise from the x-axis, or clockwise from the y-axis. A model should specify which angle convention it uses with an <assume> tag in its Model Metadata File.) For a 3D vector field, it is the polar coordinates angle of the projection of the vector onto the xy plane. See Azimuth and Spherical coordinate system.
- For a 3D vector field, the zenith angle (sometimes called the "polar angle") is the angle between the z-axis (zenith) and the vector at a given spatial location. (It can be computed using the dot product formula.)
- Note that nadir (straight downward) is in the opposite direction of zenith (straight upward). Sometimes (e.g. when talking about the "looking angle" of a satellite) the term "off-nadir angle" is used, which is very descriptive. We could similarly use "off-zenith_angle" which seems to be more clear than "zenith_angle". The complement of the zenith angle is sometimes called the elevation angle, or the altitude angle in astronomy.
- The word "flow" can be used in the object part of the name as a shorthand for "flow_field". This is an example of the Object Name + Model Name Pattern, since vector components are really attributes of a mathematical model or construct, the flow field.
- The adjective "local" could be used for vector fields to emphasize that the angle or magnitude varies over the spatial domain.
- Some of these can be combined, as in "x_component_of_gradient_of_elevation" or "azimuth_angle_of_gradient_of_elevation". It differs from the "aspect_angle", which is associated with the downhill vs. uphill/gradient direction, and therefore differs by 180 degrees. The aspect angle is therefore equivalent to the "azimuth_angle_of_opposite_of_gradient_of_elevation". Note that "laplacian_of" should be used as a short synonym for "divergence_of_gradient_of".
- There are also operations that act on two vector quantities and return a scalar, such as "cross_product_of_X_and_Y", "dot_product_of_X_and_Y" and "dot_product_angle_of_X_and_Y".
- Although both "alongshore" and "longshore" are used as synonyms, "alongshore" is used in the CSDMS Standard Names because it is less ambiguous.
- The term "inverse flattening ratio" is used for Earth ellipsoids, where "inverse" means "reciprocal" or "multiplicative inverse". The term "inverse" is really a more general mathematical concept -- the operation that "undoes" a given operation.
Mathematical Operators that Return Vectors
operation = [ operator_name ] + "_of_"
- Examples
curl_of_X (X must be a vector field; returns a vector.) gradient_of_X (X must be a scalar field; returns a vector.) opposite_of_X (X must be a vector field; returns a vector.) atmosphere_air_flow__curl_of_velocity atmosphere_air_flow__gradient_of_pressure bedrock_surface__opposite_of_gradient_of_elevation
- These all return vectors, so if we require base quantities to be scalars they would not qualify unless combined with a scalar-producing operator like "magnitude_of_". So we could have derived quantities like: "magnitude_of_gradient_of_X".
- Note that the "laplacian_of" operation is equivalent to (but shorter than) the compound operation: "divergence_of_gradient_of_".
- We could potentially use "reverse_of" instead of "opposite_of".
Comparison to the CF Standard Names
- The CF Standard Names were developed by Lawrence Livermore National Lab (LLNL) as standardized labels for variables stored in NetCDF files. In the CF Standard Names, the word "transformation" is used in the same sense as "operation" is used in the CSDMS Standard Names. Some of the "transformations" in the CF Standard Names are:
change_in_X_due_to_change_in_Y correlation_of_X_with_Y curl_of_X derivative_of_X_wrt_Y direction_of_X divergence_of_X gradient_of_X integral_of_X_wrt_Y magnitude_of_X tendency_of_X (time_derivative)
- Unlike the CF transformations, the CSDMS operation templates attempt to express each operation as a prefix to a quantity name. For example, "time_derivative_of_X" is used instead of "derivative_of_X_wrt_time". This allows operations to be chained together (e.g. a time derivative and a space derivative).
- In CF Standard Names, there is also the transformation pattern: "integral_of_X_wrt_Y" and "time" is a CF Standard Name. ("wrt" = "with respect to"). Bounds for the integral are given in metadata. There are currently 18 CF Standard Names that contain "integral" and 12 of these end with "_wrt_time".
- In CF Standard Names, a "transformation" called "tendency_of" is used to indicate a time derivative. There are 435 names that use this pattern. But it is a domain-specific term (i.e. not standard across the sciences) and therefore is not allowed in CSDMS Standard Names.
- In CF Standard Names, there is also the transformation pattern: "derivative_of_X_wrt_Y" and "time" is a CF Standard Name. ("wrt" = "with respect to" )
- In CF Standard Names, the transformation pattern for the derivative of a vector component is: "[component]_derivative_of_X". In the CSDMS Standard Names, the "component_of" and "derivative_of" operations can be combined as in "time_derivative_of_x_component_of_velocity".
- CF Standard Names also has the transformation pattern: "change_over_time_in_X", with bounds given in metadata.
- There are only 10 CF Standard Names that contain "derivative" and they do not follow a consistent pattern. Note, however, that in CF Standard Names, time derivatives start with "tendency_of" and don't contain the word "derivative".
- There are only 4 CF Standard Names that use the "x_derivative_of_" or "y_derivative_of_" pattern.
- Instead of the "change_in_X" transformation in the CF Standard Names, the CSDMS Standard Names have an "increment_of_X" operation. There is also "quantity suffix" called "increment" that can be applied to any base quantity to create a new base quantity, but this may become obsolete. See the discussion at the top of CSDMS Quantity Templates.
- There are currently no CF Standard Names that use "correlation_of_X_with_Y", "curl_of_X" or "gradient_of_X". There are only 2 that use "divergence_of_X" and 4 that use "direction_of_X".