Skip to content

Conversation

@anton-seaice
Copy link
Collaborator

@anton-seaice anton-seaice commented Oct 29, 2025

This pull request merges the access-esm1.6 branch of CICE5 into the master branch.

The access driver is used for access-esm1.6, whilst the auscom driver is used for access-om2

pbd562 and others added 30 commits August 22, 2016 04:02
git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_GC3_GA7@357 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
…models/cice_GC3_GA7_hxyo/

git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_GC3_GA7@358 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_GC3_GA7@359 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_GC3_GA7@360 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_GC3_GA7@366 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_GC3_GA7@367 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_GC3_GA7@368 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_GC3_GA7@372 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_gsi8.1@393 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_gsi8.1@394 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_gsi8.1@395 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_gsi8.1@396 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
… years.

git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_gsi8.1@402 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_gsi8.1@403 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
…tion errors.

git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_gsi8.1@404 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_gsi8.1@405 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
git-svn-id: file:///g/data/access/access-svn/cice/branches/access/cice_gsi8.1@406 f6bd92a4-46cf-401b-8a38-b7f7993d28bf
* Add build ci for access-esm1.6 branch
* Needed to support oneapi 2025 compiler.
Add license file from CICE-consortium
Ported https://github.com/ACCESS-NRI/cice4/blob/694a9fbd4ac29dc841b38aff002eb36da5b650f1/source/ice_history.F90#L2184-L2198 to cice5.

This avoids post-processing interpreting end of the time interval timestamps as the subsequent time interval.
Implement dump last in ESM1.6 driver
This makes the assumed salinity of sea ice configurable, so we can set it the same as the MOM value

(configured in MOM [here](https://github.com/ACCESS-NRI/access-esm1.6-configs/blob/88ac5aab5d6d2500209b7d610e68e5c2928222d4/ocean/input.nml#L367))

We use 4ppt in MOM for historical reasons, and did that in [CICE4](https://github.com/ACCESS-NRI/cice4/blob/694a9fbd4ac29dc841b38aff002eb36da5b650f1/source/ice_init.F90#L243) too.
It's hard to set this in the namelist because it is used at compile time to define several parameters

Set per MOM5 value:

https://github.com/ACCESS-NRI/FMS/blob/bf9b80423ea4f66efa389e03d3c19b26c009e8b6/constants/constants.F90#L90
* Expose ksno (thermal conductivity of snow ) to the namelist

Typical default value is 0.3, for CM2, use 0.2
Co-authored-by: Spencer Wong <88933912+blimlim@users.noreply.github.com>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does iceruf also need to be removed from auscom/ice_constants?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@anton-seaice
Copy link
Collaborator Author

@dougiesquire and @blimlim

Here, I present a monster PR for your enjoyment.

This merges the access-esm1.6 branch with the master branch, all repro tests show no change in results, see:

1 and 2

There is a bit of stuffing around to make this happen:

  • refined CMake to work with esm1.6
  • some constants are configured in the namelist (this is consistent now between esm1.6 and om2, no defaults are changed).
  • for esm1.6 specific code, this is marked as #ifdef ACCESS. #ifdef AusCOM is used for bother esm1.6 and om2, so sometimes #if defined(AusCOM) && !defined(ACCESS) is used for OM2 only. This is used a lot for calendar code.

I snuck in changing the history output precision of the time coordinate to double, technically it's unrelated to this change.

the drivers/access folder comes from the esm1.6 branch. There are minor changes to the drivers/auscom folder to support some constants becoming configurable and improvements made in esm1.6.

@anton-seaice anton-seaice marked this pull request as ready for review January 9, 2026 04:15
@anton-seaice
Copy link
Collaborator Author

I ran 12 consecutive single months of ESM1.6, and 2 consecutive single years of OM2 - and restarts are identical at the end of each case :)

@dougiesquire
Copy link

@anton-seaice, taking a look at this now. Could you rebase onto main (or merge main, whatever you prefer) when you get a chance.

@anton-seaice
Copy link
Collaborator Author

Rebase with merge commits with conflicts in them is a pain, so i merged master in

Copy link

@dougiesquire dougiesquire left a comment

Choose a reason for hiding this comment

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

Thanks @anton-seaice. I've had a look across all files and didn't notice anything awry, but for a PR this large and broad I think the testing you have done is about the best we have...

@blimlim were you interested in taking a look?

@blimlim
Copy link
Collaborator

blimlim commented Jan 21, 2026

I'll try to take a quick look this afternoon!

Copy link
Collaborator

@blimlim blimlim left a comment

Choose a reason for hiding this comment

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

Thanks @anton-seaice, I've had a read through and it's reassuring that no answers change! There's a lot I don't understand too well, especially around the mpi differences wrt the ESM branch.

I've just added a couple small comments – probably not crucial as they aren't having any effects on results.

Comment on lines +117 to +121
if (present(arg_calc_Tsfc)) then
calc_Tsfc = arg_calc_Tsfc
else
calc_Tsfc = .false.
endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this doing anything? I don't think calc_Tsfc isn't being used elsewhere in init_itd

Comment on lines +123 to +127
if (present(arg_heat_capacity)) then
heat_capacity = arg_heat_capacity
else
heat_capacity = .false.
endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm getting a bit confused about the setup here especially for OM2. The heat_capacity doesn't seem consistent with the value used everywhere else. E.g. OM2 hasktherm=1and so should haveheat_capacity=.true.` in a lot of other places:

heat_capacity = .true.
if (ktherm == 0) heat_capacity = .false. ! 0-layer thermodynamics

However, init_itd is called without any arguments, meaning that heat_capacity=.false. for this subroutine. If we were to use heat_capacity=.true. though, we'd then end up with wrong values for hs_min and hi_min for OM2:

cice5/source/ice_itd.F90

Lines 249 to 255 in 1086aec

if (heat_capacity) then
! Set higher values to help with stability
hi_min = p2 ! 0.2m
hs_min = p1 ! 0.1m
else
hs_min = 1.e-4_dbl_kind ! min snow thickness for computing zTsn in OM2 (m)
endif

Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it be any clearer to do something like:

#ifdef ACCESS
      subroutine init_itd (arg_calc_Tsfc, arg_heat_capacity)
#else   
      subroutine init_itd 
#endif  

and

#ifdef ACCESS
      if (heat_capacity) then
        ! Set higher values to help with stability
        hi_min   = p2     ! 0.2m
        hs_min   = p1     ! 0.1m
      else
         hs_min = 1.e-4_dbl_kind ! min snow thickness for computing zTsn in OM2 (m)
      endif
#endif

#ifndef AusCOM
real (kind=dbl_kind), parameter, public :: &
!!! dragio = 0.00536_dbl_kind ,&! ice-ocn drag coefficient
dragio = 0.01_dbl_kind ,&!!! 20170922 test new value as per spo
Copy link
Collaborator

Choose a reason for hiding this comment

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

This one's already set in line 39. Which value should it be?

Copy link
Collaborator

Choose a reason for hiding this comment

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

(not that we use either)

real (kind=dbl_kind), parameter, public :: &
!!! dragio = 0.00536_dbl_kind ,&! ice-ocn drag coefficient
dragio = 0.01_dbl_kind ,&!!! 20170922 test new value as per spo
Tocnfrz = -1.8_dbl_kind ,&! freezing temp of seawater (C),
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is also set in line 53

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does iceruf also need to be removed from auscom/ice_constants?

n, & ! number of dimensions for variable
varid ! variable id
varid, & ! variable id
status ! status variable from netCDF routine
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this one's being used

Comment on lines +665 to +678
if (avail_hist_fields(n)%avg_ice_present) then
call check(nf90_put_att(ncid,varid,'cell_methods',&
'area: time: mean where sea_ice (mask=siconc)'), &
'put att cell methods time mean '//avail_hist_fields(n)%vname)
else
if (TRIM(avail_hist_fields(n)%vname(1:2))/='si') then !native diags
call check(nf90_put_att(ncid,varid,'cell_methods','time: mean'), &
'put att cell methods time mean '//avail_hist_fields(n)%vname)
else !cmip diags
call check(nf90_put_att(ncid,varid,'cell_methods', &
'area: mean where sea time: mean'), &
'put att cell methods time mean '//avail_hist_fields(n)%vname)
endif
endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should the cell methods changes be copied over to io_pio/ice_history_write?

use ice_itd, only: hs_min
use ice_state, only: nt_aero
use ice_shortwave, only: hi_ssl, hs_ssl

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do the changes compared to the access-esm1.6 branch have any effect? https://github.com/ACCESS-NRI/cice5/compare/access-esm1.6..ACCESS-NRI:cice5:master-esm1.6-merge#diff-f96fef21927cbb81494c664c5f72d85fc5b7cbe2bda3f322723d3b954dc9b29f

Or are they not too relevant as we ESM1.6 doesn't (can't?) run with tr_aero

call ice_HaloUpdate(strocnxT, halo_info, &
field_loc_center, field_type_vector)
call ice_HaloUpdate(strocnyT, halo_info, &
field_loc_center, field_type_vector)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand enough about the halo updates, but I guess the extra halo updates don't effect answers?

Also compared to the esm1.6 branch,icetmask seems to get replaced by iceumask? I don't understand what effect this would have, but it doesn't seem to affect answers.

-      if (maskhalo_dyn) &
-         call ice_HaloMask(halo_info_mask, halo_info, icetmask)
-      call ice_timer_stop(timer_bound)
+      if (maskhalo_dyn) then
+         call ice_timer_start(timer_bound)
+         halomask = 0
+         where (iceumask) halomask = 1
+         call ice_HaloUpdate (halomask,          halo_info, &
+                              field_loc_center,  field_type_scalar)
+         call ice_timer_stop(timer_bound)
+         call ice_HaloMask(halo_info_mask, halo_info, halomask)
+      endif

fsens, flat, &
fswabs, flwout, &
evap, &
evap_ice, evap_snow,&
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably overly pedantic as it's not being called, but should these arguments be added to the (non) scale-fluxes call in drivers/auscom/CICE_RunMod:

evap (:,:,iblk), &

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants