Skip to content

Conversation

mpaiao
Copy link
Contributor

@mpaiao mpaiao commented Feb 11, 2025

Description

This pull request removes variable NL%IMETAVG from the ED2 namelist (ED2IN), and introduces variable met_avgtype in the meteorological driver header. The rationale for this change is to keep all settings for meteorological drivers in the same file.

This pull request also changes the path for the CI tests. The original links pointed to a specific user. The files are now hosted in EDModel organisation, which makes it easier for tracking and maintaining it.

Collaborators

Motivation and Context

This pull request should significantly reduce the risk of model crashes due to users not setting variable NL%IMETAVG correctly, one of the most common causes of the dreaded IFLAG1 crash error. The new flag informing how to interpret the time stamp in the meteorological drivers will be placed together with the other meteorological driver settings, which indirectly makes the meteorological driver creator responsible for setting this flag correctly, instead of the end user.

Another feature is that it is now possible to mix meteorological drivers with different time stamp settings, because met_avgtype must be defined for each driver source (not that this is necessarily a good idea).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (fix or feature that would cause existing functionality to change)

Important. This code change will require everyone updating their meteorological driver headers. However, this will be a one and done fix that will likely make the code less susceptible to crashes due to inconsistent settings.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

I will update the documentation once this pull request is merged.

Testing :

  • All new and existing tests passed.

…roduces variable

met_avgtype in the meteorological driver header. This change makes the meteorological driver
creator (as opposed to the end user) responsible for setting the time stamp standard that
was used for the meteorological driver. It also allows for mixing meteorological drivers
with different standards (not that this is a good idea).

This pull request also changes the path for the CI tests. The original links pointed to a
specific user. The files are now hosted in EDModel organisation, which makes it easier for
tracking and maintaining it.
@mpaiao mpaiao requested review from mdietze and xiangtaoxu February 11, 2025 17:02
…ces for the test suite.

Somehow the CI tests were crashing due to a "merge" command in the inventory initialisation.
Switching the merge with an equivalent "where" construction seems to fix it. This could be
a compiler issue, but if the problem pops up again, we may want to deprecate merge in the
code and go with where instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant