-
Notifications
You must be signed in to change notification settings - Fork 381
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
EAMxx: minor cleanup of diagnostics classes #7053
base: master
Are you sure you want to change the base?
Conversation
Diags don't have the power to determine whether the input fields will be allocated with packing allowed. Hence, just use Real for scalar type for now
@@ -1314,16 +1314,9 @@ void AtmosphereOutput::set_diagnostics() | |||
{ | |||
const auto sim_field_mgr = get_field_manager("sim"); | |||
// Create all diagnostics | |||
for (auto& fname : m_fields_names) { |
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 mod is the main reason for the changes above: in another PR, where I'm reworking the scorpio_output impl, the fact that we need to be aware that entries in m_fields_names may change when diags are created is a bit annoying. It is also confusing...
6f6d271
to
0af792a
Compare
Pls explain somewhere the part about packs or i can ask you about it later |
The non-MMF2 fails for v1 are unexpected, and the cprnc output is odd. I am running manually to see what happens. |
name()
method of the class[BFB]
Regarding packs: when a diagnostic is created, the fields in the FieldManager have already been created/allocated. As such, it is incorrect for diagnostics to request a pack size for their input fields, as the fields allocation is done already. The diagnostics could in theory check if the input fields have a pack size large enough or not, but that makes them more complicated.
In practice, it may be possible to just "assume" inputs are available with a Pack data type, since typical EAMxx process do require packed fields. However, I find this hidden assumption dangerous, so I'd rather avoid that. I'd rather settle for diagnostics that are working without packs (for now), and maybe revisit this if/when we get to reorganize how we provide diagnostics, maybe allowing diag fields to be in the FM (for simplicity). If anyone is interested in the issue, ping me, and we can chat offline.