Lists the values of an initial-conditions file that Atlantis will read
wrongly, or that are likely mistakes. Only the cells Atlantis uses are
checked: the water layers of each box (numlayers) and the sediment
layers, for the tracers that exist there (attributes inwc and insed;
both cell types when neither is set, as for vertebrates).
Arguments
- path
Path to the initial-conditions netCDF file.
- groups
The functional groups: a data frame with columns
Code,Name,IsTurnedOn,NumCohortsandGroupType(e.g. thegroupproperty of an Atlantis object) or the path to the groups CSV file. IfNULL, the checks that need the groups are skipped.- ratio
Fold difference with the sister groups above which a pool is reported.
Value
An atlantis_check data frame, one row per finding, with columns
file, check, severity ("error", "warning" or "note"), key
(the variable) and message.
Details
The checks (column check of the result) are:
"invalid"(error): NaN or infinite values;"negative"(error): negative values;"unset"(warning): cells left unset (read asNA) in a variable whose_FillValueis not 0, so that Atlantis silently uses the fill value there (e.g. 2000 mg N m-3 of refractory detritus), unless every value set equals the fill value;"missing"(error): a group switched on in the groups file with no variable in the file;"zero": a group switched on but with no biomass or no individual anywhere (warning), or an age class with individuals but aStructNorResNof 0 (error);"sisters"(warning): a biomass pool whose typical value (median of its non-zero cells) is more thanratiotimes larger or smaller than the median of the groups of the same type (GroupType, the detritus types together) and units, or than the other group if there are only two.
The last three need groups. Values unset are taken as Atlantis takes
them, i.e. equal to their fill value.
See also
check_prm() for the parameter files, set_init_values() to
change values.
