Skip to content

Commit

Permalink
Changes needed for when enthalpy is via coupler
Browse files Browse the repository at this point in the history
* Modify allocate_forcing_by_group so that heat_content_evap is allocated
and heat_content_massin and heat_content_massout *are not* allocated
when enthlapy terms are provided via coupler. This is done via optional
argument (hevap);

* Apply all modifications needed to include a new field in the
flux type (heat_content_evap): rotate_array, deallocate, fluxes_accumulate,
hchksum, and new diagnostics;

* Modify forcing_diagnostics so that diagnostics are properly computed
whether enthalpy terms are provided via coupler or computed by MOM6. This is
done by introducing a logical variable mom_enthalpy (default = true, meaning
dianostics are computed in the default way, using heat_content_massout). When
then optional argument (enthalpy) is present and true, mom_enthalpy = false.
In this case, diagnositcs are computed using heat_content_evap instead of
heat_content_massout.

* Deletes all entries associated with heat_content_icemelt. The enthalpy
associated with the mass from sea ice formation/melting is already accounted
for in field seaice_melt_heat. A note explaining this is also added.

Subroutine extractFluxes1d:

* When enthalpy terms are computed by MOM6, their contribution to the heat budget
is accounted for in subroutine applyBoundaryFluxesInOut. On the other hand, when
enthalpy terms are provided via coupler, they are included in net_heat in
this subroutine;

* By default the heat content from mass entering and leaving the ocean (enthalpy)
is diagnosed in this subroutine. When heat_content_evap is associated,
the enthalpy terms are provided via coupler and, therefore, they do not need
to be computed again. A logical variable (do_enthalpy, deault = true) is
introduced for this purposes. If luxes%heat_content_evap, do_enthalpy = false.
  • Loading branch information
gustavo-marques authored and alperaltuntas committed Apr 21, 2022
1 parent fc05abe commit b9b67a8
Showing 1 changed file with 128 additions and 76 deletions.
Loading

0 comments on commit b9b67a8

Please sign in to comment.