modelutil
:
The InterfaceMeta
Class
InterfaceMeta
objects are used by the method
meta_ok_to_interface
, which is found in
Field
, State
, and StateSet
objects. The InterfaceMeta
object is passed in as
an argument, and all comparisons by the method is to the definitions
given in that InterfaceMeta
instance.
See the
description of the
meta_ok_to_interface
method
for details as to how InterfaceMeta
objects
are used.
The InterfaceMeta
class
(generally defined in module interface_meta
)
gives the metadata
for Field
variables that are consistently defined
among all modules at that level and subpackages
immediately below that level that pass information in and out.
As an example, consider the seaice
package of sea-ice
models. Instances of InterfaceMeta
as defined in
module seaice.interface_meta
apply to modules
in seaice
and any variables that get passed
in or out of the seaice.semtner
model
(as defined in the file seaice/semtner/__init__.py).
Instances of InterfaceMeta
defined in
module seaice.semtner.interface_meta
apply to all modules
in seaice.semtner
only (seaice.semtner
has no subpackages).
Regardless of where the InterfaceMeta
class is
defined, the attributes of objects of that class all have
the following meanings:
Attribute Name & Example Description axis
["lon", "lat"]
A list of the possible values of the Field
id
attribute that are axes. All elements are strings.axis_long_name
{"lat":"Latitude"}
A dictionary where the keys are possible values of the Field
extra_meta.axis
attribute and the values are the correspondingextra_meta.axis_long_name
values. Both parts of the key:value pair are strings.axis_units
{"lat":"degrees_north"}
A dictionary where the keys are possible values of the Field
extra_meta.axis
attribute and the values are the correspondingextra_meta.axis_units
values. Both parts of the key:value pair are strings.id
["F_sens", "Ts"]
A list of the possible values of the Field
id
attribute (that are not axes). All elements are strings.long_name
{"F_sens":"Sensible heat flux (positive upward)"}
A dictionary where the keys are possible values of the Field
id
attribute (that are not axes) and the values are the corresponding long name description (from thelong_name
attribute ofField
). Both parts of the key:value pair are strings.units
{"F_sens":"W/m**2"}
A dictionary where the keys are possible values of the Field
id
attribute (that are not axes) and the values are the corresponding units (from theunits
attribute ofField
). Both parts of the key:value pair are strings.
seaice
:
A package of sea-ice models: