Skip to content
Snippets Groups Projects
Commit e7df856f authored by Nils-Arne Dreier's avatar Nils-Arne Dreier
Browse files

doc: improve documentation for frac_masks

parent 3382b5dc
No related branches found
No related tags found
1 merge request!45Frac masks from model
Pipeline #100516 passed
......@@ -79,11 +79,12 @@ All of the above steps can be done using the `hiopy-configure` tool.
Assumptions
~~~~~~~~~~~
hiopy assumes that the variables it should write have the time axis as
the first dimension and the horizontal axis as its last
dimension. The variables are enabled to be written using the boolean value of attribute hiopy::enable.
Variables that are precessed by hiopy need to have set the attribute `hiopy::enable`.
hiopy specific parameters are added in the attributes and are usually prefixed by `hiopy::`:
hiopy examinates the dimensions of the variable. If the first dimension has a coordinate, and the `axis` attribute of the coordinate is `T`, hiopy assumes that this variable is time dependend with the respective time coordinates. If such a coordiante is not found, hiopy considers the field as "one_shot" field which is handled once in the very beginning of the run.
Furthermore hiopy assumes that the last dimension is the spatial dimension. It examinates the attribute `grid_mapping` to determine the corresponding grid.
Further hiopy specific parameters can be added in the attributes and are prefixed with `hiopy::`:
.. csv-table::
:header: "attribute", "entity", "description"
......@@ -93,7 +94,7 @@ hiopy specific parameters are added in the attributes and are usually prefixed b
"hiopy::src_name", "Array", "yac field name of the source field. Default is the name of the array itself."
"hiopy::time_method", "Array", "Time interpolation method (point, mean). Default: point"
"hiopy::nnn", "Array", "Number of nearest neighbors to use. Default is 1."
"hiopy::frac_mask", "Array", "Array name of the fractional mask that is used when forwarding the data. (see `yac_cput_frac`)"
"hiopy::frac_mask", "Array", "Array name of the fractional mask that is used when forwarding the data. (see `yac_cput_frac`). Could also be a field that is processed by hiopy itself in the same run."
"hiopy::enable", "Boolean", "Enable or disable the variable to be handled by the worker"
`hiopy.configure` can also be used as a python
......@@ -105,16 +106,9 @@ from level 6 to 0 and one 3d variable "ta":
import zarr
import hiopy.configure as hc
dates = {"startdate": np.datetime64("2020-01-01"),
"enddate": np.datetime64("2020-01-10")}
z = zarr.open("dataset.zarr")
hc.create_hierachy(z,
order=6,
startdate=np.datetime64("2020-01-01"),
enddate=np.datetime64("2020-01-10"),
dt=3*60*60) # 3 hourly time axis
hc.add_healpix_hierarchy(z, order=6)
hc.add_time(z, "2020-01-01", "2020-01-10", dt=3*60*60) # 3 hourly time axis
hc.add_height(z, "level", 72)
hc.add_variable(z,
name="ta",
......@@ -124,6 +118,8 @@ from level 6 to 0 and one 3d variable "ta":
zaxis="level",
chunk_shape=(8, 16, 2**12)) # 8M (uncompressed)
zarr.consolidate_metadata(z.store) # optional
Setup
-----
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment