-
Notifications
You must be signed in to change notification settings - Fork 435
EAMxx: Adds diagnostic output for *_sfgaex1, *_sfgaex2, *_sfnnuc, *_sfcoag #7492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4692b5c
34c45be
9a6fed1
0ceef5b
3c6c66d
681bb23
cad1974
6340b01
6d0cb34
4b3b5f8
de3b565
79eca39
e7c84e9
614e2dc
ca5e94b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,6 +163,17 @@ class MAMMicrophysics final : public MAMGenericInterface { | |
void init_temporary_views(); | ||
int len_temporary_views_{0}; | ||
|
||
void add_io_docstring_to_fields_with_mixed_units(const std::map<std::string, std::string> &flds) { | ||
using str_atts_t = std::map<std::string,std::string>; | ||
for (const auto &pair : flds) { | ||
// Get the field, and add a docstring to its string attributes | ||
// This is used to document that the field contains heterogeneous | ||
// quantities, i.e., species have different units. | ||
auto &f = get_field_out(pair.first); | ||
auto &io_str_atts = f.get_header().get_extra_data<str_atts_t>("io: string attributes"); | ||
io_str_atts["doc"] = pair.second; | ||
} | ||
} | ||
Comment on lines
+166
to
+176
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I still think this is not a good idea. This will be forgotten and having a non-standard "doc" entry in the netcdf files isn't going to be all that illuminating or helpful, frankly. I suggest two things:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, these fields are there only to expose these quantities. Ideally, we should have fields with names that make sense (e.g., There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But up to you if you wanna do this right away, or merge and do later. I am not picky about these doc strings (so I am happy to pretend they are not there ;)) |
||
}; // MAMMicrophysics | ||
|
||
} // namespace scream | ||
|
+9 −5 | src/mam4xx/diagnostic_arrays.hpp | |
+34 −1 | src/mam4xx/mam4_amicphys.hpp | |
+9 −2 | src/mam4xx/mo_gas_phase_chemdr.hpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is basically perfect for a long name (you just need to add "mam4 microphys" or something to the start and it will be 🍑