Skip to content

Conversation

@matthewhoffman
Copy link
Collaborator

@matthewhoffman matthewhoffman commented Sep 3, 2025

NOTE: IN PROGRESS

This PR introduces the ability for MPAS-Seaice to spread berg fluxes received from the coupler by a data iceberg (DIB) pattern.

This branch is currently based on #133. The new changes are only in the final two commits. Note there are a number of to-do items and design decisions discussed in those two commit messages.

After discussion with @cbegeman , I plan to rework this to use the Schmidt and Mankoff regional spreading functions. In addition to being an updated dataset relative to Merino, by using region masks it will be easy to support AIS and GIS at the same time, while also ensuring scaling does not include rofi from non-ice-sheet regions. The easiest implementation would likely replace the existing DIB code with the new, region-based version. Backwards compatibility, if desired, could be maintained by creating an input file with a single region based on Merino. Note that this approach also means that rofi from the runoff component could be handled in the same way as rofi from MALI with no additional work. (It would also be possible to not apply the data spreading functions for backwards compatibility.)

This moves the calving flux from being passed to the ocean to being
passed to sea ice.
The Fixx_rofi solid runoff flux has existed in the coupler for some
time, but it had not been attached to MPAS-Seaice.  This commit adds the
connection to MPAS-Seaice in the ice_comp_mct import routine.  The
Fixx_rofi flux is passed to bergFreshwaterFlux.  bergLatentHeatFlux is
then calculated using ice temperature specified by
config_iceberg_temperature.

This commit also changes ice_export_mct so that Fioi_bergw/h are always
exported - they will now either come from the coupler or from data.
With Fixx_rofi now being coupled to ice, the berg variables will be used
all the time when running in E3SM, as opposed to just when data icebergs
are active.

Note that this is unlikely to be the most desirable solution; the berg
variables would ideally be disabled for standalone MPAS-Seaice, but with
this change they will always be allocated.  I could not find an obvious
way to make the package conditional on MPAS-Seaice being run within
E3SM, which I think would be the preferred criterion.  Also, if the
solution of having the berg variables be always allocated is acceptable,
then there is no longer a need for the berg package and it could be
fully removed.  So either way, this commit will need to be revisited.
This coupler flag is what tells the coupler to send rofi fluxes from ROF
and GLC to ICE.  This will allow seaice to act as a pass-through for
rofi fluxes to the ocean.  When an iceberg model is eventually added to
MPAS-Seaice, it can redistribute icebergs before they are passed on to
the ocean.
Fixx_rofi had been specified in this list when Fixx_rofi coupling  was
partially implemented (but not tested) years ago.  However, that is the
wrong variable at this point in the coupling chain - Figg_rofi is the
field that needs to be remapped at this stage.

Note that usually a previously defined list of variables is used at
this stage, as opposed to hardcoding a variable name/list, but I am
modifying the existing implementation and not changing that here.
This commit adds mapping file specifications needed to run a LR G-case.
This commit should be followed up with a more complete addition for
other grids.
Replace config_scale_dib_by_removed_ice_runoff option with
config_dib_scale_mode option that can take on 3 values: 'none',
'removed_ice_runoff','coupler_ice_runoff'.  If it's set to
coupler_ice_runoff, the get_data_iceberg_fluxes routine calculates a global
sum of the bergFreshwaterFlux field and uses that to scale the
bergFreshwaterFluxData field (i.e., DIB).

There are some to-do items in this commit:
* need to know how to throw an error in MPAS-Seaice for an invalid
namelist option value
* logic at 3 places where "if (.not. config_use_data_icebergs) then" was
removed in ice_comp_mct.F needs to be added to not do things if the
coupler flux is not actually needed (i.e. if DIB is being used)
This commit does 2 things:
* Most obviously, I moved the code that uses the global sum of the
coupler iceberg flux to ice_comp_mct.  I did this because the spreading
was not occurring and I thought there might be a sequencing problem with
it being called from mpas_seaice_forcing.F.  By putting the scalign
directly after the Fixx_rofi field is imported to bergFreshwaterFlux, it
ensures there is not a lag in the scaling being applied.
* Adds areaIntegAnnMeanDataIcebergFreshwaterFlux to the input stream
reading DIB information.  Without this, the
areaIntegAnnMeanDataIcebergFreshwaterFlux field will default to 0, which
could well be the explanation for why the previous commit didn't work right.
So it is possible the scaling could move back to mpas_seaice_forcing.F,
but I feel it is more appropriate to have it occur immediately after
importing the field.  However, this decision should be informed by input
from other developers.

This commit has some to-do items:
* Currently the global sum of bergFreshwaterFlux is used for DIB
scaling.  This ignores the fact that bergFreshwaterFlux could exist for
both ice sheets, as well as the fact that bergFreshwaterFlux is assigned
value from Fixx_rofi, which as designed will include rofi from both GLC
and ROF components (but ROF is not currently hooked up).  It is unclear
if we want the scaling/spreading to use rofi from ROF.  Handling the
other issue - treating AIS and GIS bergFreshwaterFlux separately - is
likely to require a mask or latitude assumption combined with using
multiple DIB files.  Note that if we adopt the Schmidt and Mankoff
DIB-by-region mappings, we could use the region masks to handle the
separation between ice sheets - by appending the regions from the ice
sheets, nothing about the implementation would need to know that a
specific region applies to one ice sheet or the other.  So it might be
worth adding that to this PR and making region masks a requirement.
* indentation needs cleanup
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