Calculates thermal comfort index UTCI. Model for UTCI calculation stands as a separate package outside of Deode-Workflow, EDF and OPTI_THRED where it is used. UTCI model is written in two versions:
- as a class in calculate_utci.py
- as a callable function utci_function.py
UTCI it is impotred in Deode-Workflow as a module through pyproject.toml and used in the gribmodify.py that reads GRIB2 files, takes input parameters needed for UTCI calculation, calls the model and modifies existing GRIB2 files with UTCI fields.
Parameters needed for the function call:
The parameters are prescribed in a gribmodify_rules.json file. The json file contains a (single) list of parameter descriptors:
- input_grib_id: a list of key values that uniquely define the GRIB record in strict order
- operator: name of the calculation method
- output_name: name of the output variable
- output_grib_id: key value that uniquely define the GRIB record of the output variable.
{ "input_grib_id" : [ {"shortName":"2t"}, {"shortName":"mrt"}, {"shortName":"2r"},{"shortName":"10u"},{"shortName":"10v"} ],
"operator" : "utci",
"output_name" : "utci",
"output_grib_id" : { "shortName":"utci" }
}
UTCI is imported in EDF and OPTI_THRED as a library and will call UTCI to determine when the thresholds have been crossed, by what fraction, determine severity levels etc.