Skip to content
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

Option to not cycle met drivers for CO2, plus multiple minor bug fixes #391

Merged
merged 15 commits into from
Jul 24, 2024

Conversation

mpaiao
Copy link
Contributor

@mpaiao mpaiao commented Jun 12, 2023

This PR allows cycling met drivers but using actual year CO2. It also fixes multiple minor bugs in the code.

Description

This change allows increasing CO2 whilst cycling meteorological drivers, which can be useful in factorial experiments. If CO2 is provided in a separate set of met drivers containing only CO2, the code will look for files from the actual simulation year as opposed to cycling the years. This will be activated only for CO2, and only if the files outside the main meteorological cycle are found. Otherwise, the code falls back to the default (i.e., cycling all the meteorological variables and CO2).

I also implemented a series of minor bug fixes / minor improvements:

  1. Replaced a few case-like if statements with select case (safer for case selection).
  2. Added some new output variables.
  3. Fixed metadata units of some output variables.
  4. Renamed a couple of variables and sub-routines that had misleading names (e.g. avg_monthly_pcpg is now avg_monthly_accp so it is clear that is accumulated precipitation, not precipitation rate).
  5. Added some new error reports to make debugging easier.
  6. Fixed seed dispersal error when non-local dispersal occurs across multiple sites (only affects runs with more than 1 site per polygon).

Collaborators

Motivation and Context

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)

Checklist:

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

Testing :

  • All new and existing tests passed.

mpaiao and others added 15 commits January 7, 2023 16:33
… readability.

1. In reproduction, the carbon budget was wrong when REPRO_SCHEME = 2 due to the incorrect
   site pointers when exchanging seeds.
2. Minor changes to reading met drivers to allow CO2 fertilisation drivers to not follow
   the met driver cycle only when CO2 drivers exist outside the meteorological cycle.
3. Added a new set of variables to report the area covered by snow (or temporary surface
   water)
4. Renamed a few variables and subroutines so they reflect more accurately what they are
   representing.
… huge(1.) statement

with huge_num to avoid floating point exception errors.
… CI compiles correctly

(the compiler doesn't like that the same MPI function is used for scalars and vectors).
@mpaiao mpaiao merged commit 842966f into EDmodel:master Jul 24, 2024
2 checks passed
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