Skip to content

Commit

Permalink
Reverse the order of dynamics and thermodynamics (#665)
Browse files Browse the repository at this point in the history
# Reverse the order of dynamics and thermodynamics

Fixes #654

---
# Change Description

Currently, the thermodynamics runs after the dynamics. Since the
thermodynamics changes the mean, DG0 value of prognostic fields, this
can mean that the higher DG components could be such that the value of
the field exceeds its physical limits. To be fully consistent the final
state of fields with both DG components and geophysical limits should be
immediately after the dynamics, when the limiters have just been
applied.

The solution to this is to swap the order of the dynamics and
thermodynamics within the `PrognosticData::update()`, as done in the PR.

---
# Test Description

Running the updated model through January 2010 doesn't look any *worse*
than before. Arguably it is more realistic.
  • Loading branch information
timspainNERSC authored Aug 29, 2024
2 parents a1761e1 + 732c7ec commit 6eedb7e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions core/src/PrognosticData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,15 @@ void PrognosticData::update(const TimestepTime& tst)
pOcnBdy->updateBefore(tst);
pAtmBdy->update(tst);

// Fill the values of the true ice and snow thicknesses.
iceGrowth.initializeThicknesses();
// Fill the updated ice temperature array
ticeUpd.data().setData(m_tice);
pDynamics->update(tst);
updatePrognosticFields();

// Take the updated values of the true ice and snow thicknesses, and reset hice0 and hsnow0
// IceGrowth updates its own fields during update
iceGrowth.update(tst);
updatePrognosticFields();

pDynamics->update(tst);

updatePrognosticFields();

pOcnBdy->updateAfter(tst);
}

Expand Down

0 comments on commit 6eedb7e

Please sign in to comment.