DrylandEcology / SOILWAT2

An ecosystem water balance simulation model
GNU General Public License v3.0
5 stars 2 forks source link

Hard-code SOILWAT2 units #408

Closed dschlaep closed 3 months ago

dschlaep commented 4 months ago

Branch devel_v8.0.0 currently uses SOILWAT2 units provided by user via file "SW2_netCDF_output_variables.tsv" for output.

For instance, this will make the code to assume that the value of temp_max is in degC (which is correct) and then converts it to degF for output in nc-mode.

SW2 variable SW2 units ... netCDF units
temp_max degC ... degF

This is risky. Nothing prevents a user from changing degC to degF. Then the code would assume that the value of temp_max is already in units of degF (but that is incorrect).

Solution: --> hard-code units of SOILWAT2 variables --> SW_NC_read_out_vars() issues a warning if units obtained from "SW2_netCDF_output_variables.tsv" as input[SWUnitsInd] disagree with hard-coded units units_sw