marbl-ecosys / MARBL

Marine Biogeochemistry Library
https://marbl-ecosys.github.io
Other
13 stars 21 forks source link

Improve documentation of how POP (and MOM) generate diagnostics #405

Open mnlevy1981 opened 2 years ago

mnlevy1981 commented 2 years ago

Matt ran into an issue where he was providing POP with a tavg_contents_override_file file, but also putting ecosys_diagnostics in Source Mods -- I think the ecosys_diagnostics file was then used to generate the marbl_diagnostics_operators file, which resulted in an inconsistency between what diagnostics were being defined in POP and what was requested in tavg_contents.

We have documentation on how to add a new diagnostic but going in to more details in the POP implementation section would be helpful.

I want to draw a flow chart where each node is a file used in the process, and each connection is labeled with the name of the script that processes the file. Specifcally, it would start with diagnostics_latest.yaml and the edge connecting to diagnostics_latest.json would be labeled yaml_to_json.py. It would be helpful to highlight which files can be put in Source Mods, thus ignoring all the upstream files.

mnlevy1981 commented 2 years ago

Related to this, I just had a discussion with @klindsay28 and think it would be useful to provide instructions on adding a new diagnostic entirely via SourceMods/, which would allow users to skip the "update the YAML file" step. The POP scripts will need to be updated first, though (see https://github.com/ESCOMP/POP2-CESM/issues/71).