Skip to content

Update Icepack and CICE, March 17, 2023, from Consortium main#108

Merged
apcraig merged 8 commits into
E3SMIcepackDEVfrom
icep230317
Mar 25, 2023
Merged

Update Icepack and CICE, March 17, 2023, from Consortium main#108
apcraig merged 8 commits into
E3SMIcepackDEVfrom
icep230317

Conversation

@apcraig
Copy link
Copy Markdown
Owner

@apcraig apcraig commented Mar 24, 2023

PR checklist

  • Short (1 sentence) summary of your PR:
    Update Icepack and CICE, March 17, 2023

  • Developer(s):
    apcraig

  • Suggest PR reviewers from list in the column to the right.

  • Please copy the PR test results link or provide a summary of testing completed below.
    all tests bit-for-bit vs main #7df80baa1a

  • How much do the PR code changes differ from the unmodified code?

    • bit for bit with Consortium main, fsd differences on branch
    • different at roundoff level
    • more substantial
  • Does this PR create or have dependencies on Icepack or any other models?

    • Yes
    • No
  • Does this PR update the Icepack submodule? If so, the Icepack submodule must point to a hash on Icepack's main branch.

    • Yes
    • No
  • Does this PR add any new test cases?

    • Yes
    • No
  • Is the documentation being updated? ("Documentation" includes information on the wiki or in the .rst files from doc/source/, which are used to create the online technical docs at https://readthedocs.org/projects/cice-consortium-cice/. A test build of the technical docs will be performed as part of the PR testing.)

    • Yes
    • No, does the documentation need to be updated at a later time?
      • Yes
      • No
  • Please provide any additional information or relevant details below:

  • Merge CICE 7df80ba from CICE-Consortium main to branch, March 24, 2023

  • Update Icepack to #5f4cd195b7

dabail10 and others added 8 commits March 2, 2023 14:15
* Add time_period_freq to history file metadata
… variables (CICE-Consortium#817)

* doc/source/conf.py: adjust for sphinxcontrib.bibtex 2.0

The sphinxcontrib.bibtex Sphinx extension used for the bibliography now
wants the bibliography file to be configured in the Sphinx configuration
file (conf.py) instead of in the source file where the bibliography is
included. This is new in sphinxcontrib.bibtex 2.0 [1], so let's do that.

Keeping the filename also in zreferences.rst does not hurt and lets us
stay compatible with earlier versions of sphinxcontrib.bibtex, so let's
keep it there also.

[1] https://sphinxcontrib-bibtex.readthedocs.io/en/latest/changes.html#id5

* ice_history: correct units for 'sigP'

The intenal ice pressure 'sigP' is is units of N/m, as can be seen in
ice_dyn_shared::principal_stress. However, the corresponding history
variable is wrongly defined in ice_history::init_hist with unit '1'
(dimensionless). This means the wrong unit is written to the NetCDF
history output. This dates back to the introduction of that variable in
6ed2359 (Added pressure, modified norm of principal stresses and made
small modifs to basal stress following Till's comments, 2018-03-02).

Fix the unit. While at it, add an entry for 'sigP' in the index, from
which this variable is missing.

Reported-by: Frederic Dupont <frederic.dupont@canada.ca>
Reported-by: Jean-Francois Lemieux <jean-francois.lemieux@canada.ca>

* doc: clarify stress variables

Try to make the doc a little less confusing by cross-referencing the
code variables used for stress computations with the corresponding
variables in the science guide a little bit more, and vice-versa:

- mention the doc variables sigma_1, sigma_2 in the index entries for
stressp, stressm
- mention the code variables stressp, stressm when the doc variables
sigma_1, sigma_2 are introduced
- introduce new doc variables sigma_n,1 and sigma_n,2 to denote the
normalized principal stresses, and add the equation for those. This
allows mentioning that they are normalized by the ice strength, which
was not mentioned elsewhere.
- mention these new doc variables in the index entry for sig1, sig2
- refer to the normal stress sigma_11, sigma_22 by their variable names
when mentioning them in the sentence that introduces the ice pressure
- mention the code variables sig1, sig2 in the "Implementation" part of
the user guide when mentioning the 'principal_stresses' subroutine.

Helped-by: Jean-Francois Lemieux <jean-francois.lemieux@canada.ca>
* ice_history_write: fix initial condition metadata under 'hist_avg'

When writing averaged history outputs (hist_avg=.true.), this setting
also affects the initial condition. Even if the actual data variables
written to the initial condition are not averaged (they are taken
more or less directly from the restart or the hard-coded defaults,
modulo aggregation over categories), their attributes ('cell_method' and
'time_rep') imply they are averaged, and the 'bound' attribute of the
'time' variable refers to the 'time_bounds' variable.

Make the metadata of the initial condition more correct by:
- not writing the 'time_bounds' variable (and the corresponding 'd2' dimension)
- not writing the 'bounds' attribute of the 'time' variable
- not writing the 'cell_method' attributes of each variable
- writing the 'time_rep' attribute of each variable as 'instantaneous'
instead of 'averaged'.

Do this by checking 'write_ic' at all places where we check for the
value of 'hist_avg' to write the above variables and attributes in each
of the 3 IO backends (binary, netcdf, pio2).

* drivers/{nemo_concepts,standalone}: write initial condition at initial time

In CICE_InitMod::cice_init, we call ice_calendar::advance_timestep
before writing the initial condition, such that the 'time' variable in
the initial condition is not zero; it has a value of 1*dt (the model
time step). The initial condition filename also reflects this, since
'msec' (model seconds) also has a value of 1*dt and is used in
ice_history_shared::construct_filename. This leads to the initial
condition filename not corresponding to the model initialization
date/time but rather 1*dt later.

Since we call 'accum_hist' after initializing the forcing, any forcing
field written to the initial condition has values corresponding to
msec=dt, whereas the ice state corresponds to msec=0, leading to an
inconsistency.

Fix that by calling 'accum_hist' to write the initial condition _before_
calling 'advance_timestep'. Since we now call 'accum_hist' before
initializing the forcing, any forcing field written to the initial
condition have its default, hard-coded value, instead of its value at
time=dt. An improvement would be to read the forcing at time=dt, write
the initial condition, advance the time step, and read the forcing
again, but let's not complicate things too much for now.
* Initial halochk unit test implementation

- Add halochk unit test
- Add "unknown" and "noupdate" checks to ice_boundary
- Remove field_loc_Wface, not used anywhere, not supported
- Update cice_decomp.csh script

To Do: validate tripole and tripoleT, add unit test to test suite

* - Fix bug in serial/ice_boundary.F90 tripoleT halo update
- Reduce redundant tripole buffer copies in serial/ice_boundary.F90
- Generalize iSrc wraparound calculation in ice_boundary.F90
- Add open, cyclic, tripole, and tripoleT set_nml files
- Update unittest suite

* - Add haloUpdate_stress test to halo unit test
- Add tripoleT support to haloUpdate_stress
- Add abort check that nx_global is even for tripole grids
- Update documentation

* update documentation

* update documentation

* update documentation

* update documentation

* update documentation

* update documentation

* Update halochk test to make haloupdate_stress test more robust, less chance for false positive

* update documentation

* update documentation

* update documentation
to fix the latex/pdf errors recently trapped by readthedocs.
* send wlat to and fro for FSD

* Update Icepack to include FSDmods

---------

Co-authored-by: cmbitz <bitz@uw.edu>
Merge CICE 7df80ba from CICE-Consortium main to branch, March 24, 2023
Includes Icepack 5f4cd195b7
Required update to CICE_InitMod.F90 in unittests due to changes in Icepack interface, Tf
@apcraig apcraig merged commit 9990713 into E3SMIcepackDEV Mar 25, 2023
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.

3 participants