Skip to content

Sync to CICE-Consortium (2025-11-20)#106

Merged
NickSzapiro-NOAA merged 11 commits into
NOAA-EMC:developfrom
NickSzapiro-NOAA:sync_cice_2025-11
Nov 25, 2025
Merged

Sync to CICE-Consortium (2025-11-20)#106
NickSzapiro-NOAA merged 11 commits into
NOAA-EMC:developfrom
NickSzapiro-NOAA:sync_cice_2025-11

Conversation

@NickSzapiro-NOAA
Copy link
Copy Markdown
Collaborator

@NickSzapiro-NOAA NickSzapiro-NOAA commented Nov 21, 2025

For detailed information about submitting Pull Requests (PRs) to the CICE-Consortium,
please refer to: https://github.com/CICE-Consortium/About-Us/wiki/Resource-Index#information-for-developers

PR checklist

  • Short (1 sentence) summary of your PR:
    Sync CICE-Consortium/main into EMC fork, including datestamps in restart pointer files and sea ice concentration insertion over restart
  • Developer(s):
    See PRs at CICE-Consortium
  • 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.
    UFS regression testing and CICE-Consortium testing
  • How much do the PR code changes differ from the unmodified code?
    • bit for bit
    • 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 document the changes in detail, including why the changes are made. This will become part of the PR commit log.

EMC/CICE sync to authoritative upstream without baseline changes including developments for machine ports, ice history fix, DA option, and regional domains. Closes #107

rgrumbine and others added 11 commits August 8, 2025 11:07
Update the gaea port

Support gaeac5 and gaeac6 as separate machines with the intel icx/ifort compiler.  Remove the "gaea" port in favor of "gaeac5" and "gaeac6".

Required some workaround for the intel/hdf5 compiler issues with the check uninit and fpe0.

---------

Co-authored-by: apcraig <anthony.p.craig@gmail.com>
This PR address CICE-Consortium#1044

Resolve issues with nans / accessing arrays out of range

There are a couple of spots in the code when loading files which fail when building with checks for floating point exceptions (-fpe0 in intel land). This addresses those issues

This change max sure that CICE is not trying to use array indeces which don't have values associated with them, and puts a value in _FillValue when it's not set (to avoid a nan). When creating ULAT, don't create the work_mom array on tasks other than master task because it is not used. When loading _FillValue, reset the value to spval_dbl if _FillValue is a nan.
* Update Copyright

Update version number in preparation for minor release

Clean up trailing blanks

Update Icepack to #f9789c2f325993c0af
- Update Copyright and version number

* Update Copyright in zenodo json file in CICE and Icepack
Co-authored-by: Till Rasmussen <tar@dmi.dk>
Update the qstat job completion checks to use

set qstatus = `${ICE_MACHINE_QSTAT} $job | grep $job | wc -l`

Some recent changes made the return status of "${ICE_MACHINE_QSTAT} $job"
no longer robust as a way to check if a job was in the queue or not.
…) (CICE-Consortium#1031)

This adds support in NUOPC/CMEPS driver for the addition of datestamps to the pointer filenames to be configurable through the nuopc option restart_pointer_append_date .

This is a companion change to ESCOMP/CESM_share#70, and does not impact any current default behaviour.

* Make datestamps in pointer filenames configurable (#9)

* set across all io options consistently

* use ice_restart_shared consistently across all 3 methods

---------

Co-authored-by: Andrew Kiss <31054815+aekiss@users.noreply.github.com>
Co-authored-by: Dougie Squire <42455466+dougiesquire@users.noreply.github.com>
Fix bug in ice_restoring with respect to indexing of trcrn_rest. This will change answers when ice restoring is turned on.

The CICE restoring feature is not generally used, and we currently have no tests to cover that feature. This bug was discovered as part of an ongoing effort to improve regional grid capability with additional PRs to come in the future. A full test suite run on derecho with the intel compiler confirmed this, no answers changed.
…ilation or retrievals/products) (CICE-Consortium#1060)

Add an option to be able to update ice concentration (from data assimilation or retrievals/products) at restart.

- This feature is being ported from CICE4, that is used in RTOFS:
    - We use the sea ice concentration from data assimilation (DA), performed using RTOFS-DA.
    - In this (CICE6) version usage is turned ON (default: OFF) via restart_mod="adjust_aice".
    - See similar/same implementation in the old (CICE4) version of ice_restart.F90, search for insert_ssmi.
    - @awallcraft ported the code he wrote (and is used in CICE4) to CICE6.
    - This PR was originally sent to the NOAA-EMC/CICE fork and following @NickSzapiro-NOAA's recommendation, being redirected here; that PR is now closed.
    - All the comments and conversations (@NickSzapiro-NOAA and @awallcraft) can be read via NOAA-EMC#104, however, for the sake of self-completeness

A brief text/description follows:
One of the main goals of a data assimilation (DA)/prediction system that strives to provide close to observed sea ice concentrations and ice edge is to be able to reconcile the differences in modeled and observed sea ice concentrations derived from space borne instruments. Posey et al., 2025 implemented such a method with CICE4, it is hereby ported to CICE6. By default this feature is turned OFF. To turn it ON, set restart_mod='adjust_aice' in ice_in (input) namelist file and provide sic.nc to be able to nudge the modeled ice concentration to that from data assimilated (or observed) concentration.  By default, restart_mod='none'.  There is also a test mode, restart_mod='adjust_aice_test' which modifies aice read on restart to the nearest 5/100ths just to test the algorithm.


- With this proposed addition, an ability to insert data assimilated sea ice concentration is provided. Implementation is similar/same as in CICE4; see https://github.com/NOAA-EMC/RTOFS_GLO/blob/develop/sorc/rtofs_hycom.fd/src_2.2.99DHMTi-dist2B_relo_cice_v4.0e/source/ice_restart.F90 ; search for insert_ssmi. @awallcraft ported the code he wrote (and is used in CICE4) to CICE6.
- There is an acknowledgement that the coupler and/or MOM6 will need some modifications, but that is beyond the scope of this (CICE) repository. Such work will be taken up in future.

Co-authored-by: Nicholas Szapiro <149816583+NickSzapiro-NOAA@users.noreply.github.com>
Co-authored-by: Nick Szapiro <Nick.Szapiro@noaa.gov>
Co-authored-by: Till Rasmussen <tar@dmi.dk>
Co-authored-by: apcraig <anthony.p.craig@gmail.com>
…ons (CICE-Consortium#1062)

Refactor CICE to support open boundary conditions where values may be imposed on the outer boundary. Prior to this update, the HaloUpdate was zeroing out the halo before updating the halo. This meant any values set on the halo were lost anytime a HaloUpdate was executed. Several other issues upstream and downstream were found as this was implemented. In particular, the global index set on the outer boundary for open and closed boundary conditions was "special", a zero global index was used internally as a flag, and both the scatter_global and haloUpdate was covering up some issues with uninitialized data.

Update the i_glob and j_glob indexing for open and closed boundary conditions on the outer boundary. For open, closed, and tripole (south) boundaries, now extrapolate index values on the outer boundary. This might mean indices are less than 0 or greater than n[x,y]_global+2*nghost. In the original implementation, these outer boundary indices were either set to some internal values so they would be set with the scatter_global method or to zero which was treated as a special value. The zero special value feature has been removed and the scatter_global implementation has been refactored to fill all gridpoints with valid global indices and leave others unset. The only special case remaining in the global indexing is for tripole grids on the north boundary where the j global index is set to a negative value.

- Refactor HaloUpdate in ice_boundary in serial and mpi to avoid zeroing out the halo. The ew and ns directions are handled separately. The new implementation will always zero the internal halo points. It will also zero the outer halo if cyclic or tripole is specified or if a fillvalue is passed into the haloUpdate. Otherwise, the outer halo is left unchanged.
   - Added ewBoundaryType and nsBoundaryType to halo datatype to keep track of the boundary conditions for each halo datatype.
   - Zero out the outer boundary during HaloUpdate only under certain conditions including cyclic or tripole bcs or if a fillValue is explicitly passed
- Add a few fillvalue=c0 arguments to HaloUpdate calls during initialization to force the outer boundary values to zero, mostly during initialization of grid data and similar cases.
- Add several HaloExtrapolate calls to initialize boundary values for grid fields. This replaces those fields being set by the incorrect global indices and the scatter.
- Explicitly zero out all allocated variables at initialization
- Explicitly zero out restart fields before reading to be extra careful
- Explicitly zero out some arrays in the evp1d before use
- Replace the G_HTN and G_HTE initialization with a call to gather_global_ext on HTN and HTE respectively after HTN and HTE are set and the halos updated.
- Move the closed boundary condition abort to initialization in ice_domain.F90
- Refactor halochk unit test, add explicit fill tests
- Update documentation

Additional Features

- Update ice_HaloExtrapolate to support more than 1 ghost cell
- Add support for kmt_type = none with in subroutine rectgrid for rectangular grids. This allows a user to setup a rectangular grid with no land.
- Update the restart_ext implementation in ice_read_write. There was a bug if restart_ext=.false. was passed, nothing would happen. The update also allows some extra restart_ext logic in io_netcdf/ice_restart.F90 to be cleaned up.
- Carry out some code cleanup in init_domain_distribution and init_grid2
- Rename iglb/jglb to isrc/jsrc consistent in scatter_global_ext to be consistent with other scatter methods.

All tests are bit-for-bit except the halochk unittest which was refactored and passes. There is an issue in the evp1d implementation where on some compilers when the debug flag is on, the code will trap on a floating point error. If the floating point error isn't trapped, the cases run to completion and are bit-for-bit with the current trunk. This suggests there is something like a 0/0 calculation being trapped in the evp1d which has no impact on the solution, is only caught by a subset of compilers, and probably requires an if test to avoid. I spent some time trying to track down the error without any success.
Changes in CICE:

- move conversion to K into the define_hist_field call
- fix the accumulation of sitemptop, sitempsnic, and sitempbot to reflect the "intrinsic" versus "extrinsic" definitions.
- redo the avg_ice_present division by aice, so that conb is added at the end
- also undo the ravgct multiplication and division for the case of avg_ice_present
- add cell_methods as "area: time: mean where sea ice (mask=siconc)"
- Update icepack hash to bug fix version of "Tsnice", CICE-Consortium/Icepack#542
@gspetro-NOAA
Copy link
Copy Markdown

Could we get approvals on this PR so that its parent WM PR 2989 can get scheduled for the commit queue?

@DeniseWorthen
Copy link
Copy Markdown
Collaborator

@NickSzapiro-NOAA Changes at the cap level seem fine. Question--where did all these initialization to c0 statements arise from? Were the variables not previously initialized?

@NickSzapiro-NOAA
Copy link
Copy Markdown
Collaborator Author

There was some uninitialized data in the regional configuration and maybe extra initialization out of extra caution (like https://github.com/CICE-Consortium/CICE/pull/1062/files#r2461641654)

@gspetro-NOAA
Copy link
Copy Markdown

@NickSzapiro-NOAA Just checking--for this PR, icepack should be at hash 4954a6f? It looks like head of icepack main is at eedb519, so I wanted to be sure before I combine 2989 w/Dusan's PR.

@NickSzapiro-NOAA
Copy link
Copy Markdown
Collaborator Author

Yes, the current hash is correct @gspetro-NOAA . Thanks for checking

@gspetro-NOAA
Copy link
Copy Markdown

Testing for WM parent PR #2406 has passed. This PR can be merged.

@NickSzapiro-NOAA NickSzapiro-NOAA merged commit c90ee5a into NOAA-EMC:develop Nov 25, 2025
1 check passed
@NickSzapiro-NOAA
Copy link
Copy Markdown
Collaborator Author

Ok @gspetro-NOAA

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.

Sync with CICE-Consortium (2025-11)

9 participants