Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge cgridDEV branch including C grid implementation and other fixes #715

Merged
merged 113 commits into from
May 10, 2022

Conversation

apcraig
Copy link
Contributor

@apcraig apcraig commented May 3, 2022

PR checklist

  • Short (1 sentence) summary of your PR:
    Merge cgridDEV branch using identical branch cgridDEV4merge with easier merge history
  • Developer(s):
    JFLemieux73, dabail10, eclare108213, TillRasmussen, apcraig, and others
  • 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.
    This branch is identical to cgridDEV. It was tested extensively on several machines. It is generally bit-for-bit with main for the B grid configuration, although a few bugs have been fixed, mainly with the box configurations. See
    https://github.com/CICE-Consortium/Test-Results/wiki/cice_by_hash_forks#a3592a7c7d1290da6af3050a78af0a7a77500dce
    https://github.com/CICE-Consortium/Test-Results/wiki/cice_by_hash_forks#6ff1a713a55889713077b5125245756f49e74b85
  • How much do the PR code changes differ from the unmodified code?
    • bit for bit for B-grid configurations except for some box cases
    • different at roundoff level
    • more substantial
  • Does this PR create or have dependencies on Icepack or any other models?
    • 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:

Where to begin......

  • Added C grid option via grid_ice="C". Tested extensively, slower than B-grid option. Only working with evp option.
  • Added CD grid option but not working, validated or available at this point.
  • Updated infrastructure to support data at E and N points (in addition to T and U)
  • Updated history implementation to support more grids
  • Added several box test configurations and box forcing setups, fixed a few box bugs
  • Updated some machine ports
  • Added memory usage diagnostics

apcraig and others added 30 commits October 29, 2021 18:35
…ta on halos and avoid halo updates to improve halo values when neighbor cells are land block eliminated
shift to only support S and F X2Y transforms for clarity
add uveln, vvele if grid_system=CD.  proposed placeholder for extra velocity variables (but this could change)
extend io to start to support different grids for history variables depending on grid_system
Add a bunch of C-grid infrastructure
Add a subroutine mimicking what 'viscous_coeffs_and_rep_pressure' does,
but at a single location.

Name it '*_T' since it's going to be used to compute the viscous
coefficients and replacement pressure at the T point.
* Add stresses on N and E grids to history.

* Add back in JFs changes

* Turn of new history variables
* boxislands land mask

* adjusted landmask

* add kmt_type option to grid namelist
* In process of coding stress_T subroutine

* Almost done with stress_T subroutine...it compiles.

* Done with stress_T...it compiles

* Minor modif to deformations_T subroutine
* Add ice_data_type = uniform to set uniform initial conditions in ice_init.F90 set_state_var

* add uniform atm_data_type options

* add box sym tests, gridsys testsuites

Co-authored-by: daveh150 <david.hebert@nrlssc.navy.mil>
* Add ice_data_type = uniform to set uniform initial conditions in ice_init.F90 set_state_var

* add uniform atm_data_type options

* added uniform_data_ocn options to ice_forcing.F90

* Added options for calm atm/ocn forcing.

* removing set_nml.boxdsym

Co-authored-by: apcraig <anthony.p.craig@gmail.com>
@apcraig apcraig requested a review from TillRasmussen May 3, 2022 19:15
@apcraig apcraig self-assigned this May 3, 2022
@apcraig
Copy link
Contributor Author

apcraig commented May 4, 2022

I have run a full test suite on cheyenne with this branch (identical to cgridDEV) on 3 compilers to make sure all was expected,

https://github.com/CICE-Consortium/Test-Results/wiki/cice_by_hash_forks#ce10b8285300863fbf2fa1f62d07d92a938512ff

All tests pass. Baseline comparisons were made against main when the case existed and against cgridDEV when it didn't. Several tests are NOT bit-for-bit with the main baseline,

  • snw, zsal, bgc - changed some fields land / block elimination values, does not change science but may change log/history output
  • dynpicard - capping was changed to 1
  • box2001 - fixed forcing bug
  • box2001, boxadv, boxnodyn, boxslotcyl, boxrestore subset - fixed bugs in multi-pe runs and multiplications by aice
  • some long prod runs are fixed, was stopping after 4 years
  • some pgi results changed due to compiler sensitivity to code changes, not seen in intel or gnu results.

@apcraig
Copy link
Contributor Author

apcraig commented May 4, 2022

I propose several of us approve this PR and then I'll merge.

@@ -225,8 +225,8 @@ function ice_HaloCreate(dist, nsBoundaryType, ewBoundaryType, &

!*** store some block info to fill haloes properly
call ice_distributionGet(dist, numLocalBlocks=halo%numLocalBlocks)
allocate(halo%blockGlobalID(halo%numLocalBlocks))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remind me why we moved the allocate out of the if here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good question. On some machines with some compilers, an error is thrown at runtime if blockGlobalID is not allocated. The error occurs in ice_haloMask when a new halo is created from an old one. There are lines in ice_haloMask that do

  allocate(               halo%blockGlobalID(numLocalBlocks))
  halo%blockGlobalID  = basehalo%blockGlobalID

if the basehalo%blockGlobalID is not allocated before, then a seg fault can be generated. This only arises if a pe has no blocks (numLocalBlocks=0). Simply allocating the array to size zero in the basehalo allows this to work.

So, this only happens when maskhalo is true and if one of the pes has no blocks assigned to it. A test was added recently in the omp_suite that triggered this problem. Prior to that, we never had a case that had the right condition, so the problem may have been there for a while.

Copy link
Contributor

@dabail10 dabail10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really see anything problematic here. Given that it passes all the tests on cheyenne and B grid answers stay the same, I approve!

Copy link
Contributor

@eclare108213 eclare108213 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a partial review. I still need to look at the important parts: ice_dyn_evp, ice_dyn_shared, ice_dyn_vp, and the documentation.

@@ -354,6 +401,12 @@ module ice_history_shared
f_snowfrac, f_snowfracn, &
f_Tsfc, f_aice , &
f_uvel, f_vvel , &
f_icespd, f_icedir , &
! For now, don't allow the users to modify the CD grid quantities.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A better comment might be "for now, C and CD grid quantities are controlled via the generic (originally B-grid) namelist flag"

rhos, &
Lfresh
rhos , & !
Lfresh !
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could identify these variables (with units): snow density (kg/m^3), latent heat of melting of fresh ice (J/kg)

strairy , & ! stress on ice by air, y-direction
strocnx , & ! ice-ocean stress, x-direction
strocny , & ! ice-ocean stress, y-direction
strairx , & ! stress on ice by air, x-direction at U points, mapped from strairxT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want the "mapped from..." comments, since some couplers might send these quantities directly, unless CICE assumes that they are mapped (?). What's the current status?

@@ -498,6 +539,8 @@ subroutine alloc_flux
fswthru_ai (nx_block,ny_block,max_blocks), & ! shortwave penetrating to ocean (W/m^2)
fresh_da (nx_block,ny_block,max_blocks), & ! fresh water flux to ocean due to data assim (kg/m^2/s)
fsalt_da (nx_block,ny_block,max_blocks), & ! salt flux to ocean due to data assimilation(kg/m^2/s)
uatmT (nx_block,ny_block,max_blocks), & ! uatm mapped to T grid
vatmT (nx_block,ny_block,max_blocks), & ! vatm mapped to T grid
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly here, I suggest changing "mapped to" to simply "on". I think JF pointed out earlier that there is an inconsistency with references to so-and-so grid versus points. Here we would say "on T grid" or alternatively "at T points"

@@ -949,7 +950,8 @@ subroutine write_restart_hbrine()
do j = jlo, jhi
do i = ilo, ihi
do n = 1, ncat
if (first_ice (i,j,n,iblk)) then
! zero out first_ice over land
if (tmask(i,j,iblk) .and. first_ice (i,j,n,iblk)) then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The real mask arrays hm and uvm exist so that masking can be done with multiplication rather than if conditionals, for computational efficiency.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm/uvm don't help here. we still have to check if (first_ice). plus this is part of the restart code so not critical toward timestepping performance.

do i = ilo, ihi
if (tmask(i,j)) then
if (ULON(i,j) < -50./rad_to_deg) then
if (trim(ice_data_type) == 'box2001') then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

box2001 shouldn't just have ice on the left side of the domain (see following line).
We may need to rework the logic in this routine. Probably some things (like ainit=p5) were set initially, to be used more generally, then overwritten for specific test configurations like box2001. Confusing, I agree - the result of a rather organic testing evolution in the code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of all these comments, this is the only one that I'm concerned enough about to want more information. In particular, I'd like to make sure that the box2001 test produces the same results (not necessarily BFB but close) as it would have in the original paper with or without the islands (depending on whether they are included in the land mask). I'd like to understand exactly what the bug fixes were. Can you point me to the specific lines of code?
If the box2001 results are qualitatively the same, then I'm fine with merging this PR now and doing a bunch of cleanup later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main thing that changed in box2001 was a bug fix to the ocean current forcing (old line 5291, new line 5460, note denominator). But that should not impact square grids. The other thing that was changed was that strax/stray have aice in the equation, not aiu (aice mapped to u points), that's line 5883 in ice_forcing. That would change results.

I'm happy to do a clean comparison of the box2001 results on main and on cgridDEV. Our standard test is gbox80 on 1 pe for 10 days. Do we need a longer run? What diagnostics do you want to see?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put some plots on one of the issues, #694 (comment).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @apcraig . Those results are sufficiently similar to satisfy my concern.

@@ -2760,7 +3152,7 @@ subroutine set_state_var (nx_block, ny_block, &

aicen(i,j,n) = ainit(n)

if (trim(ice_data_type) == 'box2001') then
if (trim(ice_data_dist) == 'box2001') then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is where ainit=p5 is overwritten for box2001

! NE corner, N at center of top face, E at center of right face.
! All cells are quadrilaterals with NE, E, and N associated with
! directions relative to logical grid. E is increasing i (x) and
! N is increasing j (y) direction.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove "E is increasing i (x) and
! N is increasing j (y) direction."
Instead, you could refer to the grid section of the documentation (the new figure), but even that isn't necessary here.

ratiodxN , & ! - dxn(i+1,j) / dxn(i,j)
ratiodyE , & ! - dye(i ,j+1) / dye(i,j)
ratiodxNr , & ! 1 / ratiodxN
ratiodyEr ! 1 / ratiodyE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe N, E shouldn't be capitalized in these variables, to be more consistent with other grid variables? (also easier to grep)

NLON (i,j,iblk) = c0
NLAT (i,j,iblk) = c0
ELON (i,j,iblk) = c0
ELAT (i,j,iblk) = c0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

background info: these are capitalized because the original values (ULON, ULAT, ANGLE etc) were read in from POP grid files. Grid variables that were then derived were lower case.

@apcraig
Copy link
Contributor Author

apcraig commented May 6, 2022

We need to think about process. If we are going to continue to update this PR, then I think we either need to merge this and then do a separate PR on main. Or we need to modify cgridDEV and then merge those changes into this PR. How should we proceed?

@eclare108213
Copy link
Contributor

Re process, I'm open to merging this then fixing things. The one caveat might be if any of the things I noted above would change the results back to what they were (some box results are different with this PR?). Let me continue my review this morning, and then see where we are.

Copy link
Contributor

@eclare108213 eclare108213 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments here on the remaining files in my review. I don't think any of them have to be addressed right away.

real (kind=dbl_kind), allocatable :: &
fld2(:,:,:,:) , & ! bundled fields size 2
fld3(:,:,:,:) , & ! bundled fields size 3
fld4(:,:,:,:) ! bundled fields size 4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for clarity, I'd comment these as
! 2 bundled fields
! 3 bundled fields
! 4 bundled fields

call grid_average_X2Y('S', uocn , grid_ocn_dynu, uocnN, 'N')
call grid_average_X2Y('S', vocn , grid_ocn_dynv, vocnN, 'N')
call grid_average_X2Y('S', uocn , grid_ocn_dynu, uocnE, 'E')
call grid_average_X2Y('S', vocn , grid_ocn_dynv, vocnE, 'E')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleanup suggestion: reorder these so they are consistent for each grid location - easier to comprehend at a glance.

.and. (umass(i,j) > m_min)
! else ! ice mask shpuld be applied to cd grid. For now it is not implemented.
! iceumask(i,j) = umask(i,j)
! endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these commented lines need to be removed, or is there still a question about whether to do this?
If they are kept, spell should

!$OMP END PARALLEL DO
call ice_timer_stop(timer_bundbound)

end subroutine unstack_fields5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the 5-field bundles and halo updates actually used?

! / real(ny_global,kind=dbl_kind) + p1
!
! uocn(i,j,iblk) = uocn(i,j,iblk) * uvm(i,j,iblk)
! vocn(i,j,iblk) = vocn(i,j,iblk) * uvm(i,j,iblk)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean this up later

!
subroutine box2001_data_ocn

! wind and current fields as in Hunke, JCP 2001
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this comment here (just currents) and above (just wind)

!
subroutine uniform_data_ocn(dir,spd)

! uniform wind fields in some direction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix comment wind -> currents

"", "``channel``", "ice defined on entire grid in i-direction and 50% in j-direction in center of domain", ""
"", "``default``", "same as latsst", ""
"", "``eastblock``", "ice block covering about 25 percent of domain at the east edge of the domain", ""
"", "``easthalf``", "ice defined on east half of the domain",""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does seem like there are too many ice_data_type options. Which of these could be removed? These seem redundant: block, eastblock, easthalf, smallblock

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have been wanting to clean up the box tests for quite some time. I need input about what we should keep and what we want to test moving forward. I have asked several times and not gotten any clear input. These options were all used during our testing of cgridDEV. They are not all the same. The things that vary are the size and location of the block.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JFLemieux73 @dabail10
Please choose one of these "blocky" ice_data_types as the most useful for debugging:

"", "``bigblock``", "ice mask covering about 90 percent of the area in center of domain", "``default``"
"", "``block``", "ice block covering about 25 percent of the area in center of domain", ""
"", "``eastblock``", "ice block covering about 25 percent of domain at the east edge of the domain", ""
"", "``easthalf``", "ice defined on east half of the domain",""
"", "``smallblock``", "ice defined on 2x2 gridcells in center of domain", ""

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't really used any of these. Maybe eastblock. I'm not sure what I would pick from these. My vote would be to keep block and eastblock.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to fix this for the merge to main, but it will definitely be on the cleanup list.
@JFLemieux73 do you have an opinion?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @dabail10 .

@@ -79,8 +79,8 @@ this tool.
Grid, boundary conditions and masks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The spatial discretization is specialized for a generalized orthogonal
B-grid as in :cite:`Murray96` or
The spatial discretization of the original implementation was specialized
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use 'is' instead of 'was'

@@ -229,7 +229,9 @@ boundary around the entire domain. It includes the following namelist modificat
- ``dyrect``: ``16.e5`` cm
- ``ktherm``: ``-1`` (disables thermodynamics)
- ``coriolis``: ``constant`` (``f=1.46e-4`` s\ :math:`^{-1}`)
- ``ice_data_type`` : ``box2001`` (special ice concentration initialization)
- ``ice_data_type`` : ``box2001`` (special initial ice mask)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly, the 'box2001' land mask in the code does not have the 3 islands that were used in the original paper, which I think means that the land mask now is simply closed around all of the sides. Is that correct?

@dabail10
Copy link
Contributor

I should have mentioned that cheyenne is down this whole week.

@apcraig
Copy link
Contributor Author

apcraig commented May 10, 2022

I will merge now. I will work on changes to address the issues raised here this week, and I should have a PR by early next week. I will probably wait for cheyenne to come up, so we can do a comprehensive suite on the new trunk and then a followup on the changes, just to be sure everything is OK from this merge. Thanks!

@apcraig apcraig merged commit 078aab4 into CICE-Consortium:main May 10, 2022
apcraig added a commit to apcraig/CICE that referenced this pull request May 12, 2022
in CICE-Consortium#715

Refactor capping namelist, added capping_method variable string for namelist,
  options are "hibler" or "kreyscher" equivalent to 1 and 0 in old
  capping namelist.  capping variable still exists and is set
  depending on capping_method setting.  Update ice_in and other set_nml options.
Add box2001 option for ice_data_conc.  Does same things at p5, but makes
  decreases confusion in box2001 usage.  Updated set_nml options.
Remove support for ice_data_type = smallblock, bigblock, easthalf.  Remove
  a couple tests that were using these.
Capitalize last letter in variables dxt, dyt, dxe, dye, dxn, dyn, dxu, dyu ->
  dxT, dyT, dxE, dyE, dxN, dyN, dxU, dyU.  This is the general direction we
  want to go, but this was done to make "dyn" look less like "dynamics".
Modify some comment indentation in ice_init.F90
Reorder grid_average_X2Y calls in ice_dyn_evp.F90 for readability
Remove older code in ice_dyn_shared.F90 referencing dte, dte2T, tdamp2, etc.
Clean up comments in ice_history_shared.F90, ice_dyn_evp.F90, ice_transport_driver.F90,
  ice_flux.F90, ice_forcing.F90, ice_grid.F90
Remove commented out code in ice_dyn_shared.F90 around computation of iceumask
Remove commented out code in ice_forcing.F90 related to box2001_data_ocn
Update documentation.
  capping_method
  namelist table was reviewed and updated for consistency with code
  ice_ic change from default to internal
  dxt -> dxT, etc
apcraig added a commit that referenced this pull request May 17, 2022
* Clean up implementation following cgridDEV merge, based on comments
in #715

Refactor capping namelist, added capping_method variable string for namelist,
  options are "hibler" or "kreyscher" equivalent to 1 and 0 in old
  capping namelist.  capping variable still exists and is set
  depending on capping_method setting.  Update ice_in and other set_nml options.
Add box2001 option for ice_data_conc.  Does same things at p5, but makes
  decreases confusion in box2001 usage.  Updated set_nml options.
Remove support for ice_data_type = smallblock, bigblock, easthalf.  Remove
  a couple tests that were using these.
Capitalize last letter in variables dxt, dyt, dxe, dye, dxn, dyn, dxu, dyu ->
  dxT, dyT, dxE, dyE, dxN, dyN, dxU, dyU.  This is the general direction we
  want to go, but this was done to make "dyn" look less like "dynamics".
Modify some comment indentation in ice_init.F90
Reorder grid_average_X2Y calls in ice_dyn_evp.F90 for readability
Remove older code in ice_dyn_shared.F90 referencing dte, dte2T, tdamp2, etc.
Clean up comments in ice_history_shared.F90, ice_dyn_evp.F90, ice_transport_driver.F90,
  ice_flux.F90, ice_forcing.F90, ice_grid.F90
Remove commented out code in ice_dyn_shared.F90 around computation of iceumask
Remove commented out code in ice_forcing.F90 related to box2001_data_ocn
Update documentation.
  capping_method
  namelist table was reviewed and updated for consistency with code
  ice_ic change from default to internal
  dxt -> dxT, etc

* update andacc namelist options, comment out for now

* switch capping_method options to max and sum

* Add alt07 tests for new dynamics namelist options
@apcraig apcraig deleted the cgridDEV4merge branch August 17, 2022 21:05
dabail10 pushed a commit to ESCOMP/CICE that referenced this pull request Oct 4, 2022
* Clean up implementation following cgridDEV merge, based on comments
in CICE-Consortium#715

Refactor capping namelist, added capping_method variable string for namelist,
  options are "hibler" or "kreyscher" equivalent to 1 and 0 in old
  capping namelist.  capping variable still exists and is set
  depending on capping_method setting.  Update ice_in and other set_nml options.
Add box2001 option for ice_data_conc.  Does same things at p5, but makes
  decreases confusion in box2001 usage.  Updated set_nml options.
Remove support for ice_data_type = smallblock, bigblock, easthalf.  Remove
  a couple tests that were using these.
Capitalize last letter in variables dxt, dyt, dxe, dye, dxn, dyn, dxu, dyu ->
  dxT, dyT, dxE, dyE, dxN, dyN, dxU, dyU.  This is the general direction we
  want to go, but this was done to make "dyn" look less like "dynamics".
Modify some comment indentation in ice_init.F90
Reorder grid_average_X2Y calls in ice_dyn_evp.F90 for readability
Remove older code in ice_dyn_shared.F90 referencing dte, dte2T, tdamp2, etc.
Clean up comments in ice_history_shared.F90, ice_dyn_evp.F90, ice_transport_driver.F90,
  ice_flux.F90, ice_forcing.F90, ice_grid.F90
Remove commented out code in ice_dyn_shared.F90 around computation of iceumask
Remove commented out code in ice_forcing.F90 related to box2001_data_ocn
Update documentation.
  capping_method
  namelist table was reviewed and updated for consistency with code
  ice_ic change from default to internal
  dxt -> dxT, etc

* update andacc namelist options, comment out for now

* switch capping_method options to max and sum

* Add alt07 tests for new dynamics namelist options
phil-blain added a commit to phil-blain/CICE that referenced this pull request Mar 16, 2023
* 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.

(cherry picked from commit 9a55ad9)

Cherry-pick notes:

There were some conflicts in io_{netcdf,pio2}/ice_history_write.F90 due
to 26d917a (Fix QC test, fix bug in history time axis, fix history
output averaging for timestep output (CICE-Consortium#624), 2021-08-19), since that
commit enabled averaging over multiple time steps and thus removed the
assumption that histfreq(ns) = '1' means hist_avg = .false.. I also had
to add additional changes to 'ice_history_write'  in the conditions that
are checked before writing the NetCDF attributes since we do not yet
have the 'ice_write_hist_attrs' subroutine added in 078aab4 (Merge
cgridDEV branch including C grid implementation and other fixes (CICE-Consortium#715),
2022-05-10).

Closes: https://gitlab.science.gc.ca/concepts/CICE/issues/19
phil-blain added a commit to phil-blain/CICE that referenced this pull request Mar 16, 2023
* 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.

(cherry picked from commit 9a55ad9)

Cherry-pick notes:

There were some conflicts in io_{netcdf,pio2}/ice_history_write.F90 due
to 26d917a (Fix QC test, fix bug in history time axis, fix history
output averaging for timestep output (CICE-Consortium#624), 2021-08-19), since that
commit enabled averaging over multiple time steps and thus removed the
assumption that histfreq(ns) = '1' means hist_avg = .false.. I also had
to add additional changes to 'ice_history_write'  in the conditions that
are checked before writing the NetCDF attributes since we do not yet
have the 'ice_write_hist_attrs' subroutine added in 078aab4 (Merge
cgridDEV branch including C grid implementation and other fixes (CICE-Consortium#715),
2022-05-10).
phil-blain added a commit to phil-blain/CICE that referenced this pull request Oct 23, 2023
When the C grid support was added in 078aab4 (Merge cgridDEV branch
including C grid implementation and other fixes (CICE-Consortium#715), 2022-05-10),
subroutine ice_dyn_shared::seabed_stress_factor_LKD gained a
'grid_location' optional argument to indicate where to compute
intermediate quantities and the seabed stress itself (originally added
in 0f9f48b (ice_dyn_shared: add optional 'grid_location' argument to
seabed_stress_factor_LKD, 2021-11-17)). This argument was however
forgotten in ice_dyn_evp::evp when this subroutine was adapted for the C
grid in 48c07c6 (ice_dyn_evp: compute seabed stress factor at CD-grid
locations, 2021-11-17), such that currently the seabed stress is not
computed at the correct grid location for the C and CD grids.

Fix that by correctly passing the 'grid_location' argument. Note that
the dummy argument is incorrectly declared as 'intent(inout)' in the
subroutine, so change that to 'intent(in)' so we can pass in character
constants.

Closes: CICE-Consortium#891
eclare108213 pushed a commit that referenced this pull request Oct 26, 2023
When the C grid support was added in 078aab4 (Merge cgridDEV branch
including C grid implementation and other fixes (#715), 2022-05-10),
subroutine ice_dyn_shared::seabed_stress_factor_LKD gained a
'grid_location' optional argument to indicate where to compute
intermediate quantities and the seabed stress itself (originally added
in 0f9f48b (ice_dyn_shared: add optional 'grid_location' argument to
seabed_stress_factor_LKD, 2021-11-17)). This argument was however
forgotten in ice_dyn_evp::evp when this subroutine was adapted for the C
grid in 48c07c6 (ice_dyn_evp: compute seabed stress factor at CD-grid
locations, 2021-11-17), such that currently the seabed stress is not
computed at the correct grid location for the C and CD grids.

Fix that by correctly passing the 'grid_location' argument. Note that
the dummy argument is incorrectly declared as 'intent(inout)' in the
subroutine, so change that to 'intent(in)' so we can pass in character
constants.

Closes: #891
phil-blain added a commit to phil-blain/CICE that referenced this pull request Feb 2, 2024
* 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.

(cherry picked from commit 9a55ad9)

Cherry-pick notes:

There were some conflicts in io_{netcdf,pio2}/ice_history_write.F90 due
to 26d917a (Fix QC test, fix bug in history time axis, fix history
output averaging for timestep output (CICE-Consortium#624), 2021-08-19), since that
commit enabled averaging over multiple time steps and thus removed the
assumption that histfreq(ns) = '1' means hist_avg = .false.. I also had
to add additional changes to 'ice_history_write'  in the conditions that
are checked before writing the NetCDF attributes since we do not yet
have the 'ice_write_hist_attrs' subroutine added in 078aab4 (Merge
cgridDEV branch including C grid implementation and other fixes (CICE-Consortium#715),
2022-05-10).
phil-blain added a commit to phil-blain/CICE that referenced this pull request Feb 9, 2024
* 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.

(cherry picked from commit 9a55ad9)

Cherry-pick notes:

There were some conflicts in io_{netcdf,pio2}/ice_history_write.F90 due
to 26d917a (Fix QC test, fix bug in history time axis, fix history
output averaging for timestep output (CICE-Consortium#624), 2021-08-19), since that
commit enabled averaging over multiple time steps and thus removed the
assumption that histfreq(ns) = '1' means hist_avg = .false.. I also had
to add additional changes to 'ice_history_write'  in the conditions that
are checked before writing the NetCDF attributes since we do not yet
have the 'ice_write_hist_attrs' subroutine added in 078aab4 (Merge
cgridDEV branch including C grid implementation and other fixes (CICE-Consortium#715),
2022-05-10).

Rebase onto CICE6.4.1 notes:

There were some conflicts in io_{netcdf,pio2}/ice_history_write.F90 due
to the same commits mentioned above. They are both included in
CICE6.4.1, but the original cherry-picked commit (9a55ad9 (cicecore:
correct initial condition metadata (CICE-Consortium#818), 2023-03-13)) is not.
The correct resolution was thus to:
- keep ours version for calls to ice_write_hist_attrs
- cherry-pick from 9a55ad9 the changes to ice_write_hist_attrs
- in io_pio2, change 'if (hist_avg)' to 'if (hist_avg .and. .not.
  write_ic)'
DeniseWorthen added a commit to DeniseWorthen/CICE that referenced this pull request Apr 7, 2024
commit f36559256eb08272cdfe0706c45e0824e00fb37b
Author: Denise Worthen <denise.worthen@noaa.gov>
Date:   Sun Apr 7 09:50:39 2024 -0400

    fix bad merge

    * this fixes a block of code w/in a CESMCOUPLED ifdef block

commit cbac04dad1f79eb51900dab8bf6aaa7cddbe82a1
Merge: 5a56c38 7d4e5de
Author: Denise Worthen <denise.worthen@noaa.gov>
Date:   Wed Apr 3 16:05:31 2024 -0400

    Merge branch 'emc/develop' into feature/pio_options

commit 5a56c38a0d73bf16ddf2024a23f3f3fe4432007a
Author: Denise Worthen <denise.worthen@noaa.gov>
Date:   Wed Apr 3 15:44:33 2024 -0400

    update with last emc/develop change

commit aca835755aa82ead50040ea7e43ec63619667054
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Thu Feb 22 08:55:44 2024 -0800

    Update IO formats and add new IO namelist controls (#928)

    This provides new features for CICE IO both thru netCDF and PIO.  New namelist are added to control history and restart format, hdf5 compression and chunking, the PIO rearranger, and PIO IO task control.  Separate controls are provided for history and restart files.  The namelist changes are for

      _history_format, restart_format
      history_rearranger, restart_rearranger
      history_iotasks, history_root, history_stride, restart_iotasks, restart_root, and restart_stride
      history_chunksize, history_deflate, restart_chunksize, restart_deflate._

    In particular,

    - Update restart_format and history_format options to 'cdf1', 'cdf2', 'cdf5', 'hdf5', 'pnetcdf1', 'pnetcdf2', 'pnetcdf5', 'default'.  The old options, 'default', 'pio_netcdf', and 'pio_pnetcdf' are still supported and backwards compatible with lcdf64, but are deprecated and no longer documented.  The old options and old namelist lcdf64 are covered by the new options.  Support of the old options should be removed in the future.  Note that some problems were discovered when opening files with hdf5 format but reading non-hdf5 files with a spack built PIO/netCDF.  As a result, the format specified for the restart read is always 'cdf1' which provides flexibility and robustness across software installs, although it may result in serial reads of hdf5 files when a parallel read could be done.
    - Deprecate lcdf64 namelist.  This namelist is no longer needed and is covered by the new restart_format and history_format options.  The namelist still exists and is backwards compatible with the old 'default', 'pio_netcdf', and 'pio_pnetcdf' format options, but is no longer documented.  This should be removed in the future.
    - Add new namelist to control PIO pe/task setup (iotasks, root, stride) for history and restart.  These settings control the PIO IO tasks.  The root, stride, and iotasks are consistent with the MPI communicator.  root=0 is the first MPI task.  These control PIO IO performance and are usually a function of things like the IO and node hardware.  See PIO for more information.  CICE computes PIO iotask, root, and stride defaults for cases where -99 is passed in for some or all of these namelist.  Those defaults are somewhat constrained by a bug in PIO, https://github.com/NCAR/ParallelIO/issues/1986.  The current implementation avoids the bug by limiting the iotasks for some MPI task counts.  This is noted in ice_pio.F90.
    - Add new namelist to control PIO rearranger (rearranger) for history and restart.  Supports 'box', 'subset', and 'default'.  These control how PIO rearrangment is carried out.  default is equivalent to box and the box generally performs better.  See PIO for more information.
    - Add new namelist to support hdf5 compression and chunking (deflate, chunksize) for history and restart.  The deflate controls file compression and is an integer between 0 and 9 where 0 means no compression and 9 is maximum compression.   Generally, the higher the number, the slower the IO and the smaller the file, but the optimal setting depends on the contents of the file.  Chunksize provides a performance control for the hdf5 parallel writes.  It is a 2d array and is associated with the size of the piece of the array written by hdf5.  hdf5 can be read and written in parallel, but that depends on how netCDF and PIO are built.  Note that prior version of PIO, including PIO1, do not support the hdf5 compression and chunking thru the PIO interface.
    - Add new namelist settings (set_nml files) and update the io_suite to cover the new IO options.  Remove old namelist settings associated with the deprecated format options and the lcdf64 namelist.  These deprecated feature are no longer tested.
    - Update documentation to add new namelist and IO features.
    - Update the nuopc/cmeps driver code to support the new features.
    - Update the default ice_in to add the new namelist.
    - Update the derecho netcdf module to a version that supports hdf5.
    - Clean up some code formatting (indentation)

    ---------

    Co-authored-by: Anton Steketee <anton.steketee@anu.edu.au>

commit 9e9e5b3fabd88c429c4632baa8235187129e2dd7
Author: Philippe Blain <philippe.blain@canada.ca>
Date:   Mon Feb 19 14:08:37 2024 -0500

    ug_testing.rst: also mention checking the base suite results (#934)

    In the "End-To-End Testing Procedure" section of the user guide, we
    instruct users to run a base suite and a test suite, but only mention
    checking the results of the test suite.

    Also mention checking the results of the base suite first, to make sure
    everything passes before checking the test suite.

    Suggested-by: Jean-Francois Lemieux <jean-francois.lemieux@canada.ca>

commit 095e62a9342df74261b90fcb7a20d2ecdae2c5bc
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Mon Feb 12 14:49:02 2024 -0800

    Update PULL_REQUEST_TEMPLATE to request detailed information (#931)

    Update PULL_REQUEST_TEMPLATE to request detailed information about changes associated with the PR. This will be useful for the commit log when squash merging the PR.
    ---------

    Co-authored-by: Philippe Blain <levraiphilippeblain@gmail.com>

commit 1a00e5e4e967c8429a7753ac3597f9c1476cf6b7
Author: David A. Bailey <dbailey@ucar.edu>
Date:   Mon Feb 5 16:22:11 2024 -0700

    Fix for ice_mesh_mod with grid variables removed (#929)

commit 7a4b95e6deec0ec72c1da35a23ae1eb3ffe3d077
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Mon Jan 22 11:12:13 2024 -0800

    Update pio and netcdf error checks (#927)

    Update pio and netcdf error checks

    ---------

    Co-authored-by: anton-climate <anton.steketee@anu.edu.au>
    Co-authored-by: Anton Steketee <79179784+anton-seaice@users.noreply.github.com>

commit 6449f40c41aa1a5c00096696202d7bd7ebd2a69a
Author: JFLemieux73 <31927797+JFLemieux73@users.noreply.github.com>
Date:   Thu Jan 11 19:17:20 2024 +0000

    Add vorticity as a diagnostic output (#924)

    * Added new variable vort for vorticity output

    * Added calc of diag vorticity for evp, vp and eap for B, C and CD grids

    * updated doc and ice_in file for new vorticity variable

    * Changed output frequency of vorticity from m to x

    * Added f_vort to set_nml.histall and set_nml.histdbg

    * Specified location of divu, shear and vort in ice_history.F90

    ---------

    Co-authored-by: Tony Craig <apcraig@users.noreply.github.com>

commit a20bfddf7a1260dbb61241e0838c678d2eecf972
Author: David A. Bailey <dbailey@ucar.edu>
Date:   Thu Jan 11 11:07:36 2024 -0700

    scamn bugfix for nuopc driver (#926)

    Co-authored-by: John Truesdale <jet@ucar.edu>

commit 1314e17b4213c6ce9424eab80763edf4b2ae867f
Author: TRasmussen <33480590+TillRasmussen@users.noreply.github.com>
Date:   Thu Jan 11 18:25:52 2024 +0100

    First round of housekeeping on ice_grid (#921)

    * removal of unused variables.

    * moved xav to transport. Could remove commented code. Could remove xav and yav as they are zero

    * Move derived parameters and only allocate if needed

    * bugfixes for cxp, cyp...

    * fix index and remove commented code in ice_grid

    * new version of transport_remap. xav, yav array where needed. xxav, yyav parameter

    * Removed comments rom ice_transport_remap and arrays for nonuniform grids

commit 37f9a98b1b6529bc957fb888bd00348ab61c8b32
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Thu Dec 21 07:15:02 2023 -0800

    Fix single channel debug failure, Update github actions testing (#922)

    * update ghactions testing

    * refactor min/max global reductions, code away from huge which was giving MPI some problems.

commit b14cedfaed8b81500fc5422cfc44b6d80e5893ef
Author: David A. Bailey <dbailey@ucar.edu>
Date:   Tue Nov 28 15:10:16 2023 -0700

    ice_history: allow per-stream suffix for history filenames (#912)

    * Add capability for h extension

    * Update documentation for hist_str

    * Change hist_str to hist_suffix

    * Change in default namelist

    * Update doc/source/cice_index.rst

    Co-authored-by: Philippe Blain <levraiphilippeblain@gmail.com>

    * One more hist_str

    ---------

    Co-authored-by: Philippe Blain <levraiphilippeblain@gmail.com>

commit 21fab166fd2b8e903df366dbc1c518dabd08c23f
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Tue Nov 28 10:04:36 2023 -0800

    Update Icepack to #f6ff8f7c4d4cb6f (#913)

    * Update Icepack to #f6ff8f7c4d4cb6f

    Split the developer guide infrastructure section from the dynamics documentation

    Add a coding standard section to the documentation

    Add a couple sentences about the state of the parameter nghost to the documentation

    Update opticep to use the latest main code for the unit test

    * update documentation

commit 509e2c33e95e3a2370dc406fb2fe4d06192420a6
Author: Philippe Blain <philippe.blain@canada.ca>
Date:   Thu Nov 23 13:09:04 2023 -0500

    ice_history: refactor CMIP history variables (#906)

    * ice_flux: zero-initialize divu and shear in init_history_dyn

    'divu' and 'shear' are accessed in 'accum_hist' when writing the initial
    condition before they are initialized at the start of {eap, evp,
    implicit_solver}. This leads to runtime error when compiling with NaN
    initialization.

    Zero-initialize 'divu' and 'shear' in init_history_dyn, where the
    related variable 'strength' is already zero-initialized.

    * ice_history_shared: disallow 'x' in history frequency variables f_*'

    In the current code, nothing prevents users from leaving 'x' along with
    active frequencies in the individual namelist history frequency
    variables, for example:

        f_aice = 'xmd'

    This configuration does not work correctly, however. The corresponding
    history fields are correctly defined in
    ice_history_shared::define_hist_field, but since the calls to
    ice_history_shared::accum_hist_field in ice_history::accum_hist are only
    done after checking that the first element of each frequency variable is
    not 'x', the corresponding variables in the history files are all zero.

    Prevent that behaviour by actually disallowing 'x' in history frequency
    variables if any other frequencies are active. To implement that, add a
    check in the loop in define_hist_field, which loops through vhistfreq,
    (corresponding to f_aice, etc. in ice_history). Since this subroutine
    initializes 'id(:)' to zero and then writes a (non-zero) index in 'id'
    for any active frequency, it suffices to check that all previous indices
    are non-zero.

    * ice_history: remove uneeded conditions around CMIP history variables

    In ice_history::accum_hist, after the calls to accum_hist, we loop on
    the different output streams, and on the history variables in the
    avail_hist_fields array, to mask out land points and convert units for
    each output variable.

    Since 3c99e106 (Update CICE with CMIP changes. (#191), 2018-09-27), we
    also use this loop to do a special treatment for some CMIP variables
    (namely, averaging them only for time steps where ice is present, and
    masking points where ice is absent).

    This adjustment is done if the corresponding output frequency variable
    (f_sithick, etc.) does not have 'x' as its first element, and if the
    corresponding index in avail_hist_field for that variable/frequency
    (n_sithick(ns)) is not zero. Both conditions are in fact uneeded since
    they are always true.

    The first condition is always true because if the variable is found in
    the avail_hist_field array, which is ensured by the condition on line
    3645, then necessarily its corresponding namelist output frequency won't
    have 'x' as its first character (since this is enforced in
    ice_history_shared::define_hist_field).

    The second condition is always true because if the variable is found in
    the avail_hist_field array, then necessarily its index in that array,
    n_<var>(ns), is non-zero (see ice_history_shared::define_hist_field).

    Remove these uneeded conditions. This commit is best viewed with

        git show --color-moved --color-moved-ws=allow-indentation-change

    * ice_history: use loop index directly for CMIP variables

    In ice_history::accum_hist, there is a special treatment for some CMIP
    variables where they are averaged only for time steps where ice is
    present, and points where there is no ice are masked. This is done on
    the loop on output streams (with loop index n).

    This special averaging is done by accessing a2D and a3Dc using the
    variable n_<var>(ns), which corresponds to the index in the
    avail_hist_field array where this history variable/frequency is defined.
    By construction, this index correponds to the loop index 'n', for both
    the 2D and the 3D loops. Simplify the code by using 'n' directly.

    * ice_history_shared: add two logical components to ice_hist_field

    At the end of ice_history::accum_hist, we do a special processing for
    some CMIP variables: we average them only for time steps where ice is
    present, and also mask ice-free points. The code to do that is repeated
    for each variable to which it applies.

    In order to reduce code duplication, let's introduce two new logical
    components to our 'ice_hist_field' type, defaulting them to .false., and make them optional
    arguments in ice_history_shared::define_hist_field. This allows us to
    avoid defining them for each output variable. We'll set them for CMIP
    variables in a following commit.

    * ice_history: set avg_ice_present, mask_ice_free_points for relevant CMIP variables

    In the previous commit, we added two components to type ice_hist_field
    (avg_ice_present and mask_ice_free_points), relating to some special
    treatment for CMIP variables (whether to average only for time steps
    where the ice is present and to mask ice-free points).

    Set these to .true. in the call to 'define_hist_field' for the relevant
    2D variables [1], and set only 'avg_ice_present' to .true. for the 3D
    variables siitdthick and siitdsnthick, corresponding to the code under
    the "Mask out land points and convert units" loop in
    ice_history::accum_hist.

    [1]
    sithick
    siage
    sisnthick
    sitemptop
    sitempsnic
    sitempbot
    siu
    siv
    sidmasstranx
    sistrxdtop
    sistrydtop
    sistrxubot
    sistryubot
    sicompstren
    sispeed
    sidir
    sialb
    sihc
    siflswdtop
    siflswutop
    siflswdbot
    sifllwdtop
    sifllwutop
    siflsenstop
    siflsensupbot
    sifllatstop
    siflcondtop
    siflcondbot
    sipr
    sifb
    siflsaltbot
    siflfwbot
    siflfwdrain
    sidragtop
    sirdgthick
    siforcetiltx
    siforcetilty
    siforcecoriolx
    siforcecorioly
    siforceintstrx
    siforceintstry

    * ice_history: use avg_ice_present, mask_ice_free_points to reduce duplication

    Some CMIP variables are processed differently in
    ice_history::accum_hist: they are averaged only for time steps when ice
    is present, and points where ice is absent are masked. This processing
    is repeated for each of these variables in the 2D and 3Dc loops.

    To reduce code duplication, use the new components avg_ice_present and
    mask_ice_free_points of ice_hist_field to perform this processing only
    for variables that were defined accordingly. The relevant variables
    already have those components defined as of the previous commit.

    Note that we still need a separate loop for the variable 'sialb' (sea
    ice albedo) to mask points below the horizon.

commit 1cf109b7c350f119e8e3cd8bd918fa31e61d829c
Author: David A. Bailey <dbailey@ucar.edu>
Date:   Mon Nov 20 14:03:59 2023 -0700

    Change to dealloc_grid in CICE_InitMod.F90 (#911)

commit d14bb694f2f8df4e74361a9df999e82eaa44fc8b
Author: Mads Hvid Ribergaard <38077893+mhrib@users.noreply.github.com>
Date:   Fri Nov 17 16:39:01 2023 +0100

    Add missing logical "timer_stats" (#910)

    Co-authored-by: Mads Hvid Ribergaard <mhri@3vsrvp2.usr.dmi.dk>

commit 8573ba8ab196c1e357a101462b16bd92128461b1
Author: TRasmussen <33480590+TillRasmussen@users.noreply.github.com>
Date:   Thu Nov 16 22:12:07 2023 +0100

    New 1d evp solver (#895)

    * New 1d evp solver

    * Small changes incl timer names and inclued private/publice in ice_dyn_core1d

    * fixed bug on gnu debug

    * moved halo update to evp1d, added deallocation, fixed bug

    * fixed deallocation dyn_evp1d

    * bugfix deallocate

    * Remove gather strintx and strinty

    * removed 4 test with evp1d and c/cd grid

    * Update of evp1d implementation

    - Rename halo_HTE_HTN to global_ext_halo and move into ice_grid.F90
    - Generalize global_ext_halo to work with any nghost size (was hardcoded for nghost=1)
    - Remove argument from dyn_evp1d_init, change to "use" of global grid variables
    - rename pgl_global_ext to save_ghte_ghtn
    - Update allocation of G_HTE, G_HTN
    - Add dealloc_grid to deallocate G_HTE and G_HTN at end of initialization
    - Add calls to dealloc_grid to all CICE_InitMod.F90 subroutines
    - Make dimension of evp1d arguments implicit size more consistently
    - Clean up indentation and formatting a bit

    * Clean up trailing blanks

    * resolved name conflicts

    * 1d grid var name change

    ---------

    Co-authored-by: apcraig <anthony.p.craig@gmail.com>

commit 5d09123865b5e8b47ba9d3c389b23743d84908c1
Author: Mads Hvid Ribergaard <38077893+mhrib@users.noreply.github.com>
Date:   Fri Nov 10 01:17:24 2023 +0100

    Rename sum to asum, as "sum" is also a generic fortran function (#905)

    Co-authored-by: Mads Hvid Ribergaard <mhri@3vsrvp2.usr.dmi.dk>

commit 4450a3e8c64bc07d1173eb3e341cd8dea91d5068
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Fri Oct 27 22:22:43 2023 -0700

    Update Icepack to latest version, does not affect CICE (#903)

commit ea241fa81a53b614f54cf5c2dad93bda20b72a78
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Fri Oct 27 16:27:15 2023 -0700

    Update version, remove trailing blanks (#901)

commit 32f233d9728b4e453c0f02fb79a188517a8d5ed4
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Fri Oct 27 16:27:01 2023 -0700

    Update Icepack, add snicar and snicartest tests (#902)

commit 0484dcd1410920f26375b7c280500a5bd16173e9
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Fri Oct 27 09:24:52 2023 -0700

    Split N/E grid computation out of Tlonlat, create NElonlat subroutine. (#899)

    * Split N/E grid computation out of Tlonlat, create NElonlat subroutine.

    See https://github.com/CICE-Consortium/CICE/issues/897

    When TLON, TLAT, ANGLET are on the CICE grid, Tlonlat is NOT called.  This
    meant N and E grid info was never computed.  This would fail during history
    writing with invalid values in N and E grid arrays.  And it would also
    cause problem if the C-grid were run with this type of CICE grid.

    There are no test grids that have TLON, TLAT, ANGLET on them, so this
    error was not found in standard test suites.  This was detected by
    users.

    * Add gx3 grid/kmt files with TLON, TLAT, ANGLET netcdf grid test.

    The grid and kmt files were produced from a gx3 history file.  Results
    are not bit-for-bit with the standard gx3 runs, but seem to be roundoff
    different initially (as expected).

commit 0b5ca0911edaf6081ba891f4287af14ceb201c9f
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Thu Oct 26 19:33:19 2023 -0700

    Revert "Add 5-band dEdd shortwave tests (#896)" (#900)

    This reverts commit b4abca479cd548c3e600a6c645447d5ba9464422.

commit 2e13606558f7ce71633274bc38630caa23de3392
Author: Philippe Blain <philippe.blain@canada.ca>
Date:   Thu Oct 26 13:24:37 2023 -0400

    doc: update histfreq_base and hist_avg descriptions (#898)

    * doc: ug_implementation.rst: do not use curly quotes

    The namelist excerpt in section 'History' of the Implementation part of
    the user guide uses curly quotes (’) instead of regular straight quotes
    ('). This is probably a remnant of the LaTeX version of the doc. These
    quotes can't be used in Fortran and so copy pasting from the doc to the
    namelist causes runtime failures. Use straigth quotes instead.

    * doc: ug_implementation.rst: align histfreq_n with histfreq

    Align frequencies with their respective streams, which makes the example
    clearer.

    * doc: ug_implementation.rst: avoid "now" and "still"

    The documentation talks about the current version of the code, so it is
    unnecessary to use words like "now" and "still" to talk about the model
    features. Remove them.

    * doc: ug_implementation.rst: mention histfreq_base and hist_avg are per-stream

    In 35ec167d (Add functionality to change hist_avg for each stream
    (#827), 2023-05-17), hist_avg was made into an array, allowing each
    stream to individually be set to instantaneous or averaged mode. The
    first paragraph of the "History" section of the user guide was updated,
    but another paragraph a little below was not.

    In 933b148c (Extend restart output controls, provide multiple frequency
    options (#850), 2023-08-24), histfreq_base was also made into an array,
    but the "History" section of the user guide was not updated.

    Adjust the wording of the doc to reflect the fact that both hist_avg and
    histfreq_base are per-stream. Also adjust the namelist excerpt to make
    histfreq_base an array, and align hist_avg with it.

    * doc: ug_implementation.rst: refer to 'timemanager' after mentioning histfreq_base

    In 34dc6670 (Namelist option for time axis position. (#839),
    2023-07-06), the namelist option hist_time_axis was added, and the
    "History" section of the user guide updated to mention it.

    The added sentence, however, separates the mention of 'histfreq_base'
    and the reference to the "Time manager" section, which explains the
    different allowed values for that variable. Move the reference up so
    both are next to each other.

commit b4abca479cd548c3e600a6c645447d5ba9464422
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Thu Oct 26 08:54:40 2023 -0700

    Add 5-band dEdd shortwave tests (#896)

commit 624c28b19b443c031ea862e3e5d2c16387777ddc
Author: Philippe Blain <philippe.blain@canada.ca>
Date:   Thu Oct 26 11:52:26 2023 -0400

    ice_dyn_evp: pass 'grid_location' for LKD seabed stress on C grid (#893)

    When the C grid support was added in 078aab48 (Merge cgridDEV branch
    including C grid implementation and other fixes (#715), 2022-05-10),
    subroutine ice_dyn_shared::seabed_stress_factor_LKD gained a
    'grid_location' optional argument to indicate where to compute
    intermediate quantities and the seabed stress itself (originally added
    in 0f9f48b9 (ice_dyn_shared: add optional 'grid_location' argument to
    seabed_stress_factor_LKD, 2021-11-17)). This argument was however
    forgotten in ice_dyn_evp::evp when this subroutine was adapted for the C
    grid in 48c07c66 (ice_dyn_evp: compute seabed stress factor at CD-grid
    locations, 2021-11-17), such that currently the seabed stress is not
    computed at the correct grid location for the C and CD grids.

    Fix that by correctly passing the 'grid_location' argument. Note that
    the dummy argument is incorrectly declared as 'intent(inout)' in the
    subroutine, so change that to 'intent(in)' so we can pass in character
    constants.

    Closes: https://github.com/CICE-Consortium/CICE/issues/891

commit d3698fb46fc23a81b1df8dba676a5a74d7e96a39
Author: daveh150 <david.hebert@nrlssc.navy.mil>
Date:   Wed Oct 25 16:34:35 2023 -0500

    Add atm_data_version to allow JRA55 forcing filenames to have a unique version string (#876)

    * Add jra55date to allow JRA55 forcing to have creation date in file name

    * Changed jra55_date to atm_data_date. Added atm_data_date to docs.

    * Change jra55_date to atm_data_date. Update JRA55_files to include atm_data_date in file. Update case scripts/namelist.

    * change atm_data_date to atm_data_version. Update set_nml.tx1 default to corrected forcing version

    * Update doc to have atm_data_version in proper alphabetical order

    * Re-add set_nml.jra55. Deleted accitentally

    * Fix type-o in atm_data_dir documentation

    * Add atm_data_version to set_nml.jra55

    * fix spacing after changing atm_data_date to atm_data_version

    * Change atm_data_date to atm_data_version

    * Comment out JRA55 file debugging

    * Update dg_forcing docs to describe atm_data_version string

    * Uncomment JRA55 filename check. Added check for debug_forcing before writing output

    * Correct doc format/links in dg_forcing.rst

commit 8916b9ff2c58a3a095235bb5b4ce7e8a68f76e87
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Wed Oct 18 14:08:21 2023 -0700

    Update update_ocn_f implementation, Add cpl_frazil namelist (#889)

    * Update update_ocn_f implementation

    Add cpl_frazil namelist

    Add update_ocn_f and cpl_frazil to icepack_init_parameters call, set these
    values inside Icepack at initialization.

    Remove update_ocn_f argument from icepack_step_therm2 call

    Update runtime_diags and accum_hist to account for new Icepack and
    cpl_frazil implementation.  These may need an addition update later.

    * Update documentation

commit 6ba070f7e7027f9fd2cc32f2dbe10c9854511d93
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Wed Oct 18 12:35:08 2023 -0700

    Update Documentation to clarify Namelist Inputs (#888)

    * Update Documentation to clarify Namelist Inputs

    * Update documentation

commit a9d6dc75f47a2898f1800ad4ddd96c4992e3bed0
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Wed Oct 18 10:47:01 2023 -0700

    Update input data area for Derecho, switch to campaign (#890)

commit 5ddb74dfb8724ff90aa7e806d5bfcfb4a0990762
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Wed Oct 18 10:46:40 2023 -0700

    Remove cicedynB link (#887)

    Update documentation

commit 96b43fb458fe00696d9532e547a3c5bff113f9f9
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Wed Oct 18 10:46:25 2023 -0700

    Update Icepack CPP USE_SNICARHC to NO_SNICARHC and update logic (#886)

    Update Icepack to version #0c548120ce44382 Oct 16, 2023 includes NO_SNICARHC

commit 48a92ef6dd6bf7884ec8a16b2c082345accae385
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Fri Oct 13 14:22:03 2023 -0700

    Remove use of the deprecated "_old" tfrz_options in set_nml files.  This (#883)

    changes answers for some test cases, as expected.

    Update tfrz_option implementation to not allow _old options.

commit 276563041ea6a2b6b4c70cbfa5173fb85db7b47f
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Thu Oct 12 12:41:17 2023 -0700

    Add perlmutter gnu, intel, cray port (#882)

commit deb247bcec381615d01006bfa15dddf3a4f068fd
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Thu Oct 5 12:50:32 2023 -0700

    Update CICE for E3SM Icepack modifications (#879)

    * Update CICE to run with eclare108213/Icepack branch snicar (#100)

    * Update CICE to run with eclare108213/Icepack branch snicar

    - including https://github.com/eclare108213/Icepack/pull/13, Sept 11, 2022
    - Passes full CICE test suite on cheyenne with 3 compilers except alt04 changes
      answers for all compilers and all tests.  CICE #fea412a55f was baseline.
    - Icepack submodule still points to standard version on main, need to be
      swapped manually to appropriate development version.

    * Remove faero_optics

    * update ciceexe string to account for USE_SNICARHC CPP

    * Update documentation

    * Update test suite to add modal testing

    * Point Icepack submodule to cice-consortium/E3SM-icepack-initial-integration

    Update to snicar branch merge, #8aef3f785ce

    * Add E3SM namelists for CICE. (#101)

    * New e3sm and e3smbgc namelist options

    * Update E3SM test options

    * Add a simple e3sm test suite

    * atmbndy is not actually different

    * Additional changes

    * add Tliquidus_max namelist parameter to CICE

    * Add Tf argument to icepack interfaces

    * Add constant option for tfrz_option

    * Fix some diagnostic prints and add to additional drivers

    * Update messages and change option in alt01

    * Update implementation for latest version of Icepack

    - Update tfrz_option, add _old options for backwards bit-for-bit
    - Fix unittests
    - Add hi_min to namelist and tests

    * Update Icepack

    * Update to E3SM-Project/Icepack/cice-consortium/E3SM-icepack-initial-integration including Icepack1.3.3 release, Dec 15, 2022.

    * Update Icepack to E3SM-Project/Icepack #87db73ba6d93747a9, current head of cice-consortium/E3SM-icepack-initial-integration Feb 3, 2023

    * Update boxchan1e and boxchan1n tests to tfrz_option = 'mushy_old' to recover Consortium main results

    Update Icepack to the latest hash on E3SM-Project Icepack cice-consortium/E3SM-icepack-initial-integration, #96f2fc707fc743d7

    Prior commit was a merge from CICE Consortium Main, #d466031001cf447bcd64220c842dcd2707f61e9, Sept 29, 2023

    * remove icepack

    * update icepack

    ---------

    Co-authored-by: David A. Bailey <dbailey@ucar.edu>
    Co-authored-by: Elizabeth Hunke <eclare@lanl.gov>

commit d466031001cf447bcd64220c842dcd2707f61e90
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Fri Sep 29 12:08:53 2023 -0700

    Add single grid channel capability and test for C-grid (#875)

    * Added code for transport in one grid cell wide channels

    * Update remap advection to support transport in single gridcell channels

    Add single grid east and north channel configurations and tests

    * Update documentation

    * Remove temporary code comments

    ---------

    Co-authored-by: Jean-Francois Lemieux <jean-francois.lemieux@canada.ca>

commit 55342ca7cb4a1be511ade6249e349cb8a8095881
Author: Dougie Squire <42455466+dougiesquire@users.noreply.github.com>
Date:   Tue Sep 26 03:49:09 2023 +1000

    Fix mesh mask check in nuopc/cmeps cap (#873)

commit a5bb4f9a0c180e325e2a5480832f588dbfdd25ec
Author: Denise Worthen <denise.worthen@noaa.gov>
Date:   Fri Sep 15 16:01:00 2023 -0400

    switch to cesm-style field names (#869)

commit 01ed4db7c4e5857768a37e8b1fd7472ab5121827
Author: JFLemieux73 <31927797+JFLemieux73@users.noreply.github.com>
Date:   Fri Sep 15 19:59:55 2023 +0000

    More accurate calculation of areafact in remapping (#849)

    * Modified doc to specify that l_fixed_area is T for C-grid

    * Initial modifs to calc areafact based on linear interpolation of left and rigth values

    * put back l_fixed_area = .true. for C-grid

    * added temporary comments for PR review

    * Modified areafac calc for case 1 and case 2

    * Corrected minor compilation issues

    * Corrected conditions for case 1 to make sure areas add up

    * Small modif in l_fixed_area section to ensure only one condition is true

    * Modified conditions in locate triangle to be consistent with previous changes for case 1

    * Use other edge areafac_c for TL, BL, TR and BR triangles

    * Some comments removed

    * Fixed out of bounds areafac_ce and now use earea and narea

    * Replaced ib,ie,jb,je in locate_triangle using ilo,ihi,jlo,jhi

    * Modified areafac for TL1, BL2, TR1 and BR2 for area flux consistency

    * Cosmetic changes

    * Added comment to explain latest change

    * Modification of bugcheck condition for l_fixed_area=T

    * update areafac_c, areafac_ce in halo in dynamics

    ---------

    Co-authored-by: apcraig <anthony.p.craig@gmail.com>

commit 06282a538e03599aed27bc3c5506ccc31a590069
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Fri Sep 8 11:26:45 2023 -0700

    Update version to 6.4.2 (#864)

    Update License and Copyright

    Update Icepack for version/copyright

commit 714bab97540e5b75c0f2b6c11cd061277cdb322d
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Thu Sep 7 14:20:29 2023 -0700

    Update Cheyenne and Derecho ports (#863)

    * Update cheyenne and derecho ports

    cheyenne_intel updated to intel/19/1/1, mpt/2.25
    cheyenne_gnu updated to gnu/8.3.0, mpt/2.25
    cheyenne_pgi updated to pgi/19.9, mpt/2.22
    derecho_intel minor updates
    derecho_intelclassic added
    derecho_inteloneapi added (not working)
    derecho_gnu added
    derecho_cray added
    derecho_nvhpc added

    cheyenne_pgi changed answers

    derecho_inteloneapi is not working, compiler issues

    fixes automated qc testing on cheyenne

    * Update permissions on env.chicoma_intel

commit cbbac74cd9073dce8eb44fa23cabb573913aa44f
Author: David A. Bailey <dbailey@ucar.edu>
Date:   Tue Sep 5 14:22:59 2023 -0600

    Only print messages in CAP on master task (#861)

commit 32dc48eae101749b437bd777c18830e3c397b17a
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Thu Aug 31 13:05:54 2023 -0700

    Update Icepack to #23b6c1272b50d42ca, Aug 30, 2023 (#857)

    Includes thin ice enthalpy fix, not bit-for-bit.

commit e8a69abde90b99fc6528d469b8698506a99f6e2a
Author: Denise Worthen <denise.worthen@noaa.gov>
Date:   Mon Aug 28 16:00:41 2023 -0400

    Add logging features to nuopc/cmeps cap; deprecates zsalinity in cap (#856)

    * merge latest master (#4)

    * Isotopes for CICE (#423)

    Co-authored-by: apcraig <anthony.p.craig@gmail.com>
    Co-authored-by: David Bailey <dbailey@ucar.edu>
    Co-authored-by: Elizabeth Hunke <eclare@lanl.gov>

    * updated orbital calculations needed for cesm

    * fixed problems in updated orbital calculations needed for cesm

    * update CICE6 to support coupling with UFS

    * put in changes so that both ufsatm and cesm requirements for potential temperature and density are satisfied

    * Convergence on ustar for CICE. (#452) (#5)

    * Add atmiter_conv to CICE

    * Add documentation

    * trigger build the docs

    Co-authored-by: David A. Bailey <dbailey@ucar.edu>

    * update icepack submodule

    * Revert "update icepack submodule"

    This reverts commit e70d1abcbeb4351195a2b81c6ce3f623c936426c.

    * update comp_ice.backend with temporary ice_timers fix

    * Fix threading problem in init_bgc

    * Fix additional OMP problems

    * changes for coldstart running

    * Move the forapps directory

    * remove cesmcoupled ifdefs

    * Fix logging issues for NUOPC

    * removal of many cpp-ifdefs

    * fix compile errors

    * fixes to get cesm working

    * fixed white space issue

    * Add restart_coszen namelist option

    * update icepack submodule

    * change Orion to orion in backend

    remove duplicate print lines from ice_transport_driver

    * add -link_mpi=dbg to debug flags (#8)

    * cice6 compile (#6)

    * enable debug build. fix to remove errors

    * fix an error in comp_ice.backend.libcice

    * change Orion to orion for machine identification

    * changes for consistency w/ current emc-cice5 (#13)

    Update to emc/develop fork to current CICE consortium

    Co-authored-by: David A. Bailey <dbailey@ucar.edu>
    Co-authored-by: Tony Craig <apcraig@users.noreply.github.com>
    Co-authored-by: Elizabeth Hunke <eclare@lanl.gov>
    Co-authored-by: Mariana Vertenstein <mvertens@ucar.edu>
    Co-authored-by: apcraig <anthony.p.craig@gmail.com>
    Co-authored-by: Philippe Blain <levraiphilippeblain@gmail.com>

    * Fixcommit (#14)

    Align commit history between emc/develop and cice-consortium/master

    * Update CICE6 for integration to S2S

    * add wcoss_dell_p3 compiler macro

    * update to icepack w/ debug fix

    * replace SITE with MACHINE_ID

    * update compile scripts

    * Support TACC stampede (#19)

    * update icepack

    * add ice_dyn_vp module to CICE_InitMod

    * update gitmodules, update icepack

    * Update CICE to consortium master (#23)

    updates include:

    * deprecate upwind advection (CICE-Consortium#508)
    * add implicit VP solver (CICE-Consortium#491)

    * update icepack

    * switch icepack branches

    * update to icepack master but set abort flag in ITD routine
    to false

    * update icepack

    * Update CICE to latest Consortium master (#26)

    update CICE and Icepack

    * changes the criteria for aborting ice for thermo-conservation errors
    * updates the time manager
    * fixes two bugs in ice_therm_mushy
    * updates Icepack to Consortium master w/ flip of abort flag for troublesome IC cases

    * add cice changes for zlvs (#29)

    * update icepack and pointer

    * update icepack and revert gitmodules

    * Fix history features

    - Fix bug in history time axis when sec_init is not zero.
    - Fix issue with time_beg and time_end uninitialized values.
    - Add support for averaging with histfreq='1' by allowing histfreq_n to be any value
      in that case.  Extend and clean up construct_filename for history files.  More could
      be done, but wanted to preserve backwards compatibility.
    - Add new calendar_sec2hms to converts daily seconds to hh:mm:ss.  Update the
      calchk calendar unit tester to check this method
    - Remove abort test in bcstchk, this was just causing problems in regression testing
    - Remove known problems documentation about problems writing when istep=1.  This issue
      does not exist anymore with the updated time manager.
    - Add new tests with hist_avg = false.  Add set_nml.histinst.

    * revert set_nml.histall

    * fix implementation error

    * update model log output in ice_init

    * Fix QC issues

    - Add netcdf ststus checks and aborts in ice_read_write.F90
    - Check for end of file when reading records in ice_read_write.F90 for
      ice_read_nc methods
    - Update set_nml.qc to better specify the test, turn off leap years since we're cycling
      2005 data
    - Add check in c ice.t-test.py to make sure there is at least 1825 files, 5 years of data
    - Add QC run to base_suite.ts to verify qc runs to completion and possibility to use
      those results directly for QC validation
    - Clean up error messages and some indentation in ice_read_write.F90

    * Update testing

    - Add prod suite including 10 year gx1prod and qc test
    - Update unit test compare scripts

    * update documentation

    * reset calchk to 100000 years

    * update evp1d test

    * update icepack

    * update icepack

    * add memory profiling (#36)

    * add profile_memory calls to CICE cap

    * update icepack

    * fix rhoa when lowest_temp is 0.0

    * provide default value for rhoa when imported temp_height_lowest
    (Tair) is 0.0
    * resolves seg fault when frac_grid=false and do_ca=true

    * update icepack submodule

    * Update CICE for latest Consortium master (#38)

        * Implement advanced snow physics in icepack and CICE
        * Fix time-stamping of CICE history files
        * Fix CICE history file precision

    * Use CICE-Consortium/Icepack master (#40)

    * switch to icepack master at consortium

    * recreate cap update branch (#42)

    * add debug_model feature
    * add required variables and calls for tr_snow

    * remove 2 extraneous lines

    * remove two log print lines that were removed prior to
    merge of driver updates to consortium

    * duplicate gitmodule style for icepack

    * Update CICE to latest Consortium/main (#45)

    * Update CICE to Consortium/main (#48)

    Update OpenMP directives as needed including validation via new omp_suite. Fixed OpenMP in dynamics.
    Refactored eap puny/pi lookups to improve scalar performance
    Update Tsfc implementation to make sure land blocks don't set Tsfc to freezing temp
    Update for sea bed stress calculations

    * fix comment, fix env for orion and hera

    * replace save_init with step_prep in CICE_RunMod

    * fixes for cgrid repro

    * remove added haloupdates

    * baselines pass with these extra halo updates removed

    * change F->S for ocean velocities and tilts

    * fix debug failure when grid_ice=C

    * compiling in debug mode using -init=snan,arrays requires
    initialization of variables

    * respond to review comments

    * remove inserted whitespace for uvelE,N and vvelE,N

    * Add wave-cice coupling; update to Consortium main (#51)

    * add wave-ice fields
    * initialize aicen_init, which turns up as NaN in calc of floediam
    export
    * add call to icepack_init_wave to initialize wavefreq and dwavefreq
    * update to latest consortium main (PR 752)

    * add initializationsin ice_state

    * initialize vsnon/vsnon_init and vicen/vicen_init

    * Update CICE (#54)

    * update to include recent PRs to Consortium/main

    * fix for nudiag_set

    allow nudiag_set to be available outside of cesm; may prefer
    to fix in coupling interface

    * Update CICE for latest Consortium/main (#56)

    * add run time info

    * change real(8) to real(dbl)kind)

    * fix syntax

    * fix write unit

    * use cice_wrapper for ufs timer functionality

    * add elapsed model time for logtime

    * tidy up the wrapper

    * fix case for 'time since' at the first advance

    * add timer and forecast log

    * write timer values to timer log, not nu_diag
    * write log.ice.fXXX

    * only one time is needed

    * modify message written for log.ice.fXXX

    * change info in fXXX log file

    * Update CICE from Consortium/main (#62)

    * Fix CESMCOUPLED compile issue in icepack. (#823)
    * Update global reduction implementation to improve performance, fix VP bug (#824)
    * Update VP global sum to exclude local implementation with tripole grids
    * Add functionality to change hist_avg for each stream (#827)
    * Update Icepack to #6703bc533c968 May 22, 2023 (#829)
    * Fix for mesh check in CESM driver (#830)
    * Namelist option for time axis position. (#839)

    * reset timer after Advance to retrieve "wait time"

    * add logical control for enabling runtime info

    * remove zsal items from cap

    * fix typo

    ---------

    Co-authored-by: apcraig <anthony.p.craig@gmail.com>
    Co-authored-by: David Bailey <dbailey@ucar.edu>
    Co-authored-by: Elizabeth Hunke <eclare@lanl.gov>
    Co-authored-by: Mariana Vertenstein <mvertens@ucar.edu>
    Co-authored-by: Minsuk Ji <57227195+MinsukJi-NOAA@users.noreply.github.com>
    Co-authored-by: Tony Craig <apcraig@users.noreply.github.com>
    Co-authored-by: Philippe Blain <levraiphilippeblain@gmail.com>
    Co-authored-by: Jun.Wang <Jun.Wang@noaa.gov>

commit 933b148cb141a16d74615092af62c3e8d36777a2
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Thu Aug 24 10:23:56 2023 -0700

    Extend restart output controls, provide multiple frequency options (#850)

    * Extend restart output controls, provide multiple streams for possible
    output frequencies.  Convert dumpfreq, dumpfreq_n, dumpfreq_base to
    arrays.

    Modify histfreq_base to make it an array as well.  Now each history stream
    can have it's own base time (init or zero).

    Update documentation.

    * Clean up implementation and documentation

    * Update PR to check github actions

commit 357103a2df0428089d54bdacf9eab621a5e1f710
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Tue Aug 22 11:27:28 2023 -0700

    Deprecate zsalinity (#851)

    * Deprecate zsalinity, mostly with ifdef and comments first for testing

    * Deprecate zsalinity, remove code

    * Add warning message for deprecated zsalinity

    * Update Icepack to #f5e093f5148554674 (deprecate zsalinity)

commit 8322416793ae2b76c2bafa9c7b9b108c289ede9d
Author: Elizabeth Hunke <eclare@lanl.gov>
Date:   Fri Aug 18 17:34:24 2023 -0600

    Updates to advanced snow physics implementation (#852)

    * Replace tr_snow flag with snwredist, snwgrain in some places (tr_snow is still used more generally).  Fix intent(out) compile issue in ice_read_write.F90. Replace badger with chicoma machine files.

    * update icepack to 86cae16d1b7c4c4f8

    ---------

    Co-authored-by: apcraig <anthony.p.craig@gmail.com>

commit 7e8dc5b2aeffe98a6a7fd91dbb8e93ced1e3369c
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Thu Aug 10 13:06:41 2023 -0700

    Update conda_macos to fix problems with Github Actions testing (#853)

    * test ghactions

    * update master to main in github actions

commit 4cb296c4003014fe57d6d00f86868a78a532fc95
Author: JFLemieux73 <31927797+JFLemieux73@users.noreply.github.com>
Date:   Tue Jul 25 16:11:33 2023 +0000

    Modification of edge mask computation when l_fixed_area=T in horizontal remapping (#833)

    * Use same method whether l_fixed_area=T or F to compute masks for edge fluxes

    * Corrected typo in comment

    * Cosmetic (indentation) change in ice_transport_remap.F90

    * Set l_fixed_area value depending of grid type

    * Modifs to the doc for l_fixed_area

    * Use umask for uvel,vvel initialization for boxslotcyl and change grid avg type from S to A in init_state

    * Temporary changes before next PR: l_fixed_area=F for B and C grid

    * Temporary changes before next PR: remove paragraph in the doc

    * Small modifs: l_fixed_area and grid_ice are defined in module ice_transport_remap

commit 9f42a620e9e642c637d8f04441bacb5835ebf0b7
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Thu Jul 20 14:59:42 2023 -0700

    Update Icepack to Consortium main #4728746, July 18 2023 (#846)

    - fix optional arguments issues
    - fix hsn_new(1) bug

    Update optargs unit test, add new test cases

    Add opticep unit test, to test CICE calls to Icepack without optional arguments.
    Add new comparison option to comparelog.csh to compare a unit test with
    a standard CICE test.

    Update unittest_suite

    Update documentation about optional arguments and unit tests

commit f9d3002c86e11ca18b06382fc2d0676c9a945223
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Thu Jul 13 16:01:26 2023 -0700

    Add support for JRA55do (#843)

    * updating paths for local nrlssc builds

    * Add jra55do forcing option

    * Updated env.nrlssc_gnu for new local directory structure

    * Added JRA55do to file names. Added comments for each variable name at top of JRA55do_???_files subroutine

    * Make JRA55 forcing to use common subroutines. Search atm_data_type for specific cases

    * remove extraneous 'i' variable in JRA55_files

    * Changed JRA55 filename JRA55_grid instead of grid at end of filename

    * Add jra55do tests to base_suite and quick_suite. This is done via set_nml options.

    * Update forcing implementation to provide a little more flexibility for
    JRA55, JRA55do, and ncar bulk atm forcing files.

    * Update documentation

    * update Onyx port

    * Update forcing documentation

    Initial port to derecho_intel

    * clean up blank spaces

    ---------

    Co-authored-by: daveh150 <david.hebert@nrlssc.navy.mil>

commit 766ff8d9606ae08bdd34ac2b36b6b068464c7e71
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Tue Jul 11 07:53:22 2023 -0700

    Update Icepack to #d024340f19676b July 6, 2023 (#841)

    Remove deprecated COREII LYq forcing

    Remove deprecated print_points_state

    Update links in rst documentation to point to main, not master

commit 34dc66707f6b691b1689bf36689591af3e8df270
Author: David A. Bailey <dbailey@ucar.edu>
Date:   Thu Jul 6 21:46:58 2023 -0600

    Namelist option for time axis position. (#839)

    * Add option to change location in interval of time axis

    * Only use hist_time_axis when hist_avg is true

    * Add more comments and information in the documentation

    * Add a check on hist_time_axis as well as a global attribute

    * Abort if hist_time_axis is not set correctly.

commit 7eb4dd7e7e2796c5718061d06b86ff602b9d29cc
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Tue Jun 20 09:40:55 2023 -0700

    Update .readthedocs.yaml, add pdf (#837)

    * update readthedocs.yaml, turn on pdf

    * update readthedocs.yaml, turn on pdf

    * update readthedocs.yaml, turn on pdf

    * update readthedocs.yaml, turn on pdf

commit 8e2aab217ece5fae933a1f2ad6e0d6ab81ecad8a
Author: David A. Bailey <dbailey@ucar.edu>
Date:   Tue Jun 20 08:54:25 2023 -0600

    Fix for mesh check in CESM driver (#830)

    * Fix for mesh check in CESM driver

    * Slightly different way to evaluate longitude difference

    * Slightly different way to evaluate longitude difference

    * Put the abs inside the mod

    * Add abort calls back in

commit b98b8ae899fb2a1af816105e05470b829f8b3294
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Wed May 24 09:56:10 2023 -0700

    Update Icepack to #6703bc533c968 May 22, 2023 (#829)

    Remove trailing blanks via automated tool in some Fortran files

commit 35ec167dc6beee685a6e9485b8a1db3604d566bd
Author: David A. Bailey <dbailey@ucar.edu>
Date:   Wed May 17 14:56:26 2023 -0600

    Add functionality to change hist_avg for each stream (#827)

    * Add functionality to change hist_avg for each stream

    * Fix some documentation

    * Try to fix sphinx problem

    * Fix hist_avg documentation

    * Add some metadata changes to time and time_bounds

commit 5b0418a9f6d181d668ddebdc2c540566529e4125
Author: Tony Craig <apcraig@users.noreply.github.com>
Date:   Wed Apr 5 13:29:21 2023 -0700

    Update global reduction implementation to improve performance, fix VP bug (#824)

    * Update global reduction implementation to improve performance, fix VP bug

    This was mainly done for situations like VP that need a fast global sum.
    The VP global sum is still slightly faster than the one computed in the
    infrastructure, so kept that implementation.  Found a bug in the workspace_y
    calculation in VP that was fixed.  Also found that the haloupdate call
    as part of the precondition step generally improves VP performance, so removed
    option to NOT call the haloupdate there.

    Separately, fixed a bug in the tripoleT global sum implementation, added
    a tripoleT global sum unit test, and resynced ice_exit.F90, ice_reprosum.F90,
    and ice_global_reductions.F90 between serial and mpi versions.

    - Refactor global sums to improve performance, move if checks outside do loops
    - Fix bug in tripoleT global sums, tripole seam masking
    - Update VP solver, use local global sum more often
    - Update VP solver, fix bug in workspace_y calculation
    - Update VP solver, always call haloupdate during precondition
    - Refactor ice_exit.F90 and sync serial and mpi versions
    - Sync ice_reprosum.F90 between serial and mpi versions
    - Update sumchk unit test to handle grids better
    - Add tripoleT sumchk test

    * Update VP global sum to exclude local implementation with tripole grids

commit 942449751275ebd884abb5752d03d7ea64b72664
Author: David A. Bailey <dbailey@ucar.edu>
Date:   Thu Mar 23 16:46:05 2023 -0600

    Fix CESMCOUPLED compile issue in icepack. (#823)

    * Fix CESMCOUPLED compile problem in icepack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants