Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
1071b67
Import from /short/p66/dhb599/ACCESS-CM2/submodels/cice_GC3_GA7_hxyo/
Aug 22, 2016
51af00a
Updated cpl_forcing_handler.F90 from /short/p66/dhb599/ACCESS-CM2/sub…
Aug 31, 2016
6f30219
I2A coupling bug fix
Nov 10, 2016
8d76453
ice errmax tolorance x 10
Nov 28, 2016
4520c26
dhb599 mod driver files
Aug 28, 2017
2b434c7
ukmo:changeset 145,146,163 & 134
Aug 28, 2017
2b9eba7
Bug fix in ice constants
Aug 31, 2017
823a987
add dhb599 iceberg scheme
Jan 16, 2018
407ade8
New branch for GSI 8.1
Sep 17, 2018
a24447b
Remove symliink before adding back as file
Sep 17, 2018
6e363ca
Add code changes from Arnold's cice512_av853
Sep 17, 2018
9953401
Add iceberg_factor (from Dave)
Sep 19, 2018
8b553d9
Add extra call to set_calendar to fix naming of history files in leap…
Mar 13, 2019
575c1e7
Write messages to stderr and call mpi_abort with correct arguments.
Mar 14, 2019
d1c40ef
Create netCDF files as netcdf4-classic for better detection of trunca…
Sep 8, 2020
d49e6bc
Only write namelist info from master PE
Aug 20, 2021
61ab72a
Add coupling timers for ACCESS
Aug 25, 2021
0a84ab1
Create README.md
anton-seaice Nov 28, 2024
8be14fe
Add build ci (#21)
anton-seaice Jan 28, 2025
2898631
bld/makdep.c: add a return type to main() (#22)
harshula Mar 2, 2025
ec1e2cb
Set netcdf output calendar attributes correctly (#26)
anton-seaice Apr 17, 2025
77baf8a
Add license file (#29)
anton-seaice May 21, 2025
bbf2892
Set netcdf history timestamp in middle of month (#34)
anton-seaice Jun 3, 2025
ed83b97
Modify dump_last for use in esm1.6
blimlim Jun 3, 2025
d87c459
Keep original implementation for non-coupled model
blimlim Jun 4, 2025
5471bbf
Merge pull request #38 from ACCESS-NRI/esm1.6-dump-last
blimlim Jun 4, 2025
8f074fa
expose ice_ref_salinity to the namelist (#36)
anton-seaice Jun 4, 2025
15fa7de
Set cp_ocn to same value as MOM (#40)
anton-seaice Jun 6, 2025
267d4be
Expose ksno (thermal conductivity of snow ) to the namelist (#41)
anton-seaice Jun 16, 2025
58eeccf
ESM1.6 Readme (#44)
anton-seaice Jun 17, 2025
90a7164
Setup coupling for esm1.6 (#33)
anton-seaice Jun 17, 2025
d8804b6
Replace `caltype` with `use_leap_years` (#42)
blimlim Jun 19, 2025
ce970cd
ESM1.6: Write current year to restart (#46)
blimlim Jun 19, 2025
0bd0131
Fail on non midnight restarts (#47)
anton-seaice Jun 20, 2025
381f5b4
Use ifort for preprocessor directives (#52)
anton-seaice Jul 3, 2025
fe901d6
ESM1.6 Read start date and time from restart file (#48)
blimlim Jul 3, 2025
3ce7ce8
Set aicenmin consistent with UM7.3 (#54)
anton-seaice Jul 4, 2025
e8720da
Mask iceberg flux (#55)
blimlim Jul 15, 2025
831e2eb
Merge netcdf code from master branch (#57)
anton-seaice Jul 22, 2025
c3437aa
ESM1.6: Abort on failed namelist open (#62)
blimlim Jul 29, 2025
bce3629
Support multiple history timesteps per file (#59)
anton-seaice Aug 7, 2025
16e26c8
Move aicenmin to namelist (#64)
anton-seaice Sep 25, 2025
681a2c6
Update to CMIP7 diagnostics (#35)
anton-seaice Nov 13, 2025
5828e0c
Fix sndmasssn (#78)
anton-seaice Nov 24, 2025
156780b
Merge 'access-esm1.6' into master (e.g. access-om2) branch
anton-seaice Oct 29, 2025
1d35801
Merge remote-tracking branch 'origin/master' into master-esm1.6-merge
anton-seaice Dec 17, 2025
2bb20e4
Merge remote-tracking branch 'origin/master' into master-esm1.6-merge
anton-seaice Jan 5, 2026
b7e4301
Merge remote-tracking branch 'origin/access-esm1.6' into master-esm1.…
anton-seaice Jan 6, 2026
3f8ba8a
Use ACCESS instead of AusCOM for ESM1.6, some merge tidyup
anton-seaice Jan 9, 2026
7a40ca0
Support CMake Build for esm1.6
anton-seaice Dec 18, 2025
442d45b
Remove unused files
anton-seaice Dec 18, 2025
5586d4d
Sync namelist error handling between ACCESS & AUSCOM
anton-seaice Dec 18, 2025
99ce18a
Use double precision for time diagnostic
anton-seaice Jan 8, 2026
8031135
Fix ordering of setting aicenmin
anton-seaice Jan 9, 2026
f04d945
Turn off per process logging - not used
anton-seaice Jan 12, 2026
eb00a6d
Reinstate elevated limits for thermo errors in esm1.6
anton-seaice Jan 12, 2026
af61594
Send all nu_diag logging to one file
anton-seaice Jan 12, 2026
1086aec
Merge branch 'master' into master-esm1.6-merge
anton-seaice Jan 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/build-ci/data/standard.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"intel_compiler": "intel@2021.10.0",
"oneapi_compiler": "oneapi@2025.2.0",
"om2_1deg": "build_system=cmake model=access-om2 nxglob=360 nyglob=300 blckx=15 blcky=300 mxblcks=1",
"esm1p6": "build_system=cmake model=access-esm1.6 nxglob=360 nyglob=300 blckx=30 blcky=300 mxblcks=1",
"target": "x86_64"
}
16 changes: 16 additions & 0 deletions .github/build-ci/manifests/oneapi-cice5-cmake-esm1p6.spack.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
spack:
specs:
- 'cice5@git.{{ ref }}=stable {{ esm1p6 }} ^openmpi@4'
- 'cice5@git.{{ ref }}=stable {{ esm1p6 }} ^openmpi@5'
- 'cice5@git.{{ ref }}=stable build_type=Debug {{ esm1p6 }}'
packages:
gcc-runtime:
require:
'%gcc'
all:
require:
- '%{{ oneapi_compiler }}'
- 'target={{ target }}'
concretizer:
unify: false
view: false
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ endif()
if(CICE_DRIVER MATCHES "auscom")
add_compile_definitions(AusCOM coupled)
elseif(CICE_DRIVER MATCHES "access")
add_compile_defitions(ACCESS AusCOM coupled)
add_compile_definitions(ACCESS AusCOM coupled)
endif()

#[==============================================================================[
Expand Down Expand Up @@ -169,8 +169,12 @@ set(CICE_DRIVER_SOURCE "${CMAKE_SOURCE_DIR}/drivers/${CICE_DRIVER}")

add_executable(cice ${CICE_DRIVER_SOURCE}/CICE.F90)

if(CICE_DRIVER MATCHES "auscom")
find_package(LIBACCESSOM2)
target_link_libraries(cice PUBLIC libaccessom2::accessom2 )
endif()

target_link_libraries(cice
PUBLIC libaccessom2::accessom2
PRIVATE
MPI::MPI_Fortran
PkgConfig::OASIS3PSMILE PkgConfig::OASIS3MCT PkgConfig::OASIS3MPEU PkgConfig::OASIS3SCRIP
Expand Down Expand Up @@ -260,6 +264,7 @@ if(CICE_DRIVER MATCHES "access")
${CICE_DRIVER_SOURCE}/CICE_FinalMod.F90
${CICE_DRIVER_SOURCE}/cpl_interface.F90
${CICE_DRIVER_SOURCE}/ice_constants.F90
${CICE_DRIVER_SOURCE}/ice_coupling.F90
${CICE_DRIVER_SOURCE}/CICE_InitMod.F90
${CICE_DRIVER_SOURCE}/cpl_arrays_setup.F90
${CICE_DRIVER_SOURCE}/cpl_netcdf_setup.F90
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
## Overview
This repository contains the access/cosima/auscom fork of cice5 used in the ACCESS-OM2/CM2 coupled models. It was forked from https://github.com/CICE-Consortium/CICE-svn-trunk/ which in turn captured the trunk from the subversion (svn) repository of the Los Alamos Sea Ice Model, CICE, including release tags through version 5.1.2.
This repository contains the access/auscom fork of cice5 used in the ACCESS-ESM1.6 and ACCESS-OM2. It was forked from https://github.com/CICE-Consortium/CICE-svn-trunk/ which in turn captured the trunk from the subversion (svn) repository of the Los Alamos Sea Ice Model, CICE, including release tags through version 5.1.2.

ACCESS-ESM1.6 related code came from https://code.metoffice.gov.uk/trac/cice/browser/main/branches/pkg/Config/vn5.1.2_GSI8.1_package_branch/cice?order=name&rev=334#source (MOSRS account required)

More recent versions are found in the [CICE](https://github.com/CICE-Consortium/CICE) and [Icepack](https://github.com/CICE-Consortium/Icepack) repositories, which are maintained by the CICE Consortium.

If you expect to make any changes to the code, we recommend that you work in the CICE and Icepack repositories. Changes made to code in this repository will not be accepted, other than critical bug fixes.

There is [PDF documentation](https://github.com/ACCESS-NRI/cice5/blob/master/doc/cicedoc.pdf) available for CICE 5.1.2, however some changes were made to this fork to support coupling with ACCESS-OM2 and CM2, Parallel IO, ERA5 Forcing, BGC modelling and for other updates. Some of these changes are described in the [ACCESS-OM2 Technical Report](https://github.com/COSIMA/ACCESS-OM2-1-025-010deg-report).
There is [PDF documentation](https://github.com/ACCESS-NRI/cice5/blob/master/doc/cicedoc.pdf) available for CICE 5.1.2, however some changes were made to this fork to support coupling with ACCESS-OM2 and ACCESS-ESM1.6, Parallel IO, ERA5 Forcing, BGC modelling and for other updates. Some of these changes are described in the [ACCESS-OM2 Technical Report](https://github.com/COSIMA/ACCESS-OM2-1-025-010deg-report).

## Useful links
* **Wiki**: https://github.com/CICE-Consortium/CICE-svn-trunk/wiki
Expand All @@ -18,4 +20,4 @@ There is [PDF documentation](https://github.com/ACCESS-NRI/cice5/blob/master/doc

* **Resource Index**: https://github.com/CICE-Consortium/About-Us/wiki/Resource-Index

List of resources for information about the Consortium and its repositories as well as model documentation, testing, and development.
List of resources for information about the Consortium and its repositories as well as model documentation, testing, and development.
2 changes: 1 addition & 1 deletion bld/Macros.Linux.raijin-185
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ FC := mpifort
ifeq ($(DEBUG), yes)
FFLAGS := -r8 -i4 -O0 -g -align all -w -ftz -convert big_endian -assume byterecl -no-vec -mcmodel=medium -xHost -fp-model precise
else
FFLAGS := -r8 -i4 -O2 -align all -w -ftz -convert big_endian -assume byterecl -no-vec -mcmodel=medium -xHost -fp-model precise
FFLAGS := -r8 -i4 -O2 -align all -w -ftz -convert big_endian -assume byterecl -no-vec -mcmodel=medium -xHost -fp-model precise -assume buffered_io -check noarg_temp_created
endif
MOD_SUFFIX := mod
LD := $(FC)
Expand Down
146 changes: 94 additions & 52 deletions drivers/access/CICE_InitMod.F90
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ module CICE_InitMod
use cpl_parameters
use cpl_forcing_handler
use cpl_interface
!ars599: 27032014: defind my_task
use ice_communicate, only: my_task
use ice_communicate, only: my_task, master_task
#endif

implicit none
Expand Down Expand Up @@ -68,9 +67,9 @@ subroutine cice_init
use ice_algae, only: get_forcing_bgc
use ice_calendar, only: dt, dt_dyn, time, istep, istep1, write_ic, &
init_calendar, calendar, idate, month
!ars599: 27032014
use ice_communicate, only: MPI_COMM_ICE
use ice_communicate, only: init_communicate
use ice_coupling, only: top_layer_Tandk_init
use ice_diagnostics, only: init_diags
use ice_domain, only: init_domain_blocks
use ice_dyn_eap, only: init_eap
Expand All @@ -89,6 +88,7 @@ subroutine cice_init
use ice_restoring, only: ice_HaloRestore_init
use ice_shortwave, only: init_shortwave
use ice_state, only: tr_aero
use ice_therm_shared, only: calc_Tsfc, heat_capacity
use ice_therm_vertical, only: init_thermo_vertical
use ice_timers, only: timer_total, init_ice_timers, ice_timer_start
use ice_transport_driver, only: init_transport
Expand All @@ -100,6 +100,7 @@ subroutine cice_init

#ifdef AusCOM
integer(kind=int_kind) :: idate_save
character (char_len_long) :: filename
#endif

call init_communicate ! initial setup for message passing
Expand All @@ -108,13 +109,13 @@ subroutine cice_init
MPI_COMM_ICE = il_commlocal
! call init_cpl ! initialize message passing
call get_cpl_timecontrol
write(il_out,*)' CICE (cice_init) 1 jobnum = ',jobnum
write(il_out,*)' CICE (cice_init) 1 inidate = ',inidate
write(il_out,*)' CICE (cice_init) 1 init_date = ',init_date
write(il_out,*)' CICE (cice_init) 1 runtime0 = ',runtime0
write(il_out,*)' CICE (cice_init) 1 runtime = ',runtime
write(il_out,*)' CICE (cice_init) 1 idate = ',my_task, idate
!write(il_out,*)' CICE (cice_init) 1 runtype = ',runtype
if (my_task == master_task) then
write(il_out,*)' CICE (cice_init) 1 jobnum = ',jobnum
write(il_out,*)' CICE (cice_init) 1 init_date = ',init_date
write(il_out,*)' CICE (cice_init) 1 runtime = ',runtime
write(il_out,*)' CICE (cice_init) 1 idate = ',my_task, idate
!write(il_out,*)' CICE (cice_init) 1 runtype = ',runtype
end if
#endif
call init_fileunits ! unit numbers

Expand Down Expand Up @@ -145,7 +146,7 @@ subroutine cice_init
call sst_sss ! POP data for CICE initialization
#endif
call init_thermo_vertical ! initialize vertical thermodynamics
call init_itd ! initialize ice thickness distribution
call init_itd(calc_Tsfc, heat_capacity)! initialize ice thickness distribution
call calendar(time) ! determine the initial date

!ars599: 11042014: remove most of the lines based on cice4.1_fm
Expand Down Expand Up @@ -175,14 +176,19 @@ subroutine cice_init
call init_restart ! initialize restart variables

#ifdef AusCOM
write(il_out,*) 'CICE (cice_init) 2 time = ', my_task, time
write(il_out,*) 'CICE (cice_init) 2 runtime0 = ', my_task, runtime0
write(il_out,*) 'CICE (cice_init) 2 idate = ', my_task, idate
if (my_task == master_task) then
write(il_out,*) 'CICE (cice_init) 2 time = ', my_task, time
write(il_out,*) 'CICE (cice_init) 2 runtime0 = ', my_task, runtime0
!write(il_out,*) 'CICE (cice_init) 2 idate = ', my_task, idate
end if

if (jobnum == 1 ) then
time = 0.0 !NOTE, the first job must be set back to 0 and
idate = idate_save !idate back to the 'initial' value, in any case
endif
runtime0 = 0.0
else !BX: 20160720
runtime0 = time ! Record initial time read from init_restart
endif
#endif

call init_diags ! initialize diagnostic output points
Expand All @@ -203,10 +209,15 @@ subroutine cice_init
#else
!ars599: 26032014 original code
! call calendar(time) ! at the end of the first timestep
call calendar(time-runtime0)
write(il_out,*) 'CICE (cice_init) 3 time = ', my_task, time
write(il_out,*) 'CICE (cice_init) 3 runtime0 = ', my_task, runtime0
write(il_out,*) 'CICE (cice_init) 3 idate = ', my_task, idate
call calendar(time-runtime0)
if (my_task == master_task) then
write(il_out,*) 'CICE (cice_init) 3 time = ', my_task, time
write(il_out,*) 'CICE (cice_init) 3 runtime0 = ', my_task, runtime0
write(il_out,*) 'CICE (cice_init) 3 iniyear = ', my_task, iniyear
write(il_out,*) 'CICE (cice_init) 3 inimon = ', my_task, inimon
write(il_out,*) 'CICE (cice_init) 3 iniday = ', my_task, iniday
write(il_out,*) 'CICE (cice_init) 3 idate = ', my_task, idate
end if
#endif

!--------------------------------------------------------------------
Expand Down Expand Up @@ -234,6 +245,10 @@ subroutine cice_init
call init_flux_ocn ! initialize ocean fluxes sent to coupler
!#endif

if (.not. calc_Tsfc .and. heat_capacity) &
call top_layer_Tandk_init ! initialise top layer temperature and
! effective conductivity

!ars599: 11042014: ice_write_hist is no longer there now change to accum_hist
! so wrapup this line n use the new code
!dhb599 20111128: this call is moved here from 'downstair', because it *re-initilaise*
Expand All @@ -249,45 +264,67 @@ subroutine cice_init
! for continue runs, need restart o2i forcing fields and time-averaged ice
! variables ('mice')saved at the end of last run from ice models;
! for initial run, pre-processed o2i (and maybe mice) fields are required.
! call get_restart_o2i('o2i.nc')
call get_restart_o2i(trim(restartdir)//'/o2i.nc')

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!if no lag for ice to atm coupling, then cice has to read restart file i2a.nc and
!put the data to atm. the call is not needed if there is lag for ice2atm coupling
!must call after get_restart_o2i(), by which the ocn_sst ect are read in and re-used by put_restart_i2a()
! call put_restart_i2a('i2a.nc', 0)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! if ( file_exist('CICE_restart/mice.nc') ) then
if ( file_exist(trim(restartdir)//'/mice.nc') ) then
!for continue runs, mice data MUST be available.
! call get_restart_mice('CICE_restart/mice.nc')
call get_restart_mice(trim(restartdir)//'/mice.nc')
else
write(6,*)'*** CICE WARNING: No initial mice.nc data available here! **'
write(6,*)'*** CICE WARNING: ALL mice variables will be set to ZERO! **'
write(6,*)'*** CICE WARNING: This is allowed for the init run ONLY ! **'
if ( trim(runtype) == 'continue' ) then
write(il_out,*)' calling get_restart_o2i at time_sec = ',0
filename = trim(restartdir)//'/o2i.nc'
if ( file_exist(filename) ) then
call get_restart_o2i(filename)
else
call abort_ice('file NOT found: '//filename //&
" This is allowed for runtype='initial' ONLY")
endif
!if no lag for ice to atm coupling, then cice has to read restart file i2a.nc and
!put the data to atm. the call is not needed if there is lag for ice2atm coupling
!must call after get_restart_o2i(), by which the ocn_sst ect are read in and re-used by put_restart_i2a()
! call put_restart_i2a('i2a.nc', 0)
filename = trim(restartdir)//'/mice.nc'
if ( file_exist(filename) ) then
!for continue runs, mice data MUST be available.
call get_restart_mice(filename)
else
call abort_ice("file NOT found: "//filename//&
" This is allowed for runtype='initial' ONLY")
endif
endif
if (use_core_runoff) then
! call get_core_runoff('CICE_input/core_runoff_regrid.nc',&
call get_core_runoff(trim(inputdir)//'/core_runoff_regrid.nc',&
'runoff',1)
call get_core_runoff(trim(inputdir)//'/core_runoff_regrid.nc',&
'runoff',1)
endif

write(il_out,*)' calling ave_ocn_fields_4_i2a at time_sec = ',0 !time_sec
call time_average_ocn_fields_4_i2a !accumulate/average ocn fields needed for IA coupling
if (my_task == master_task) then
write(il_out,*)' calling ave_ocn_fields_4_i2a time_sec = ',0 !time_sec
endif
call time_average_ocn_fields_4_i2a
!accumulate/average ocn fields needed for IA coupling

!get a2i fields and then set up initial SBC for ice
!call from_atm(0)
!call get_sbc_ice
!now "most of" the IC of this run are 'proper' for "call ice_write_hist"
#endif

!ars599: 11042014: ice_write_hist is no longer there now change to accum_hist
! so wrapup this line n markout
!dhb599: 20111128: the following call is moved 'upstair'
! if (write_ic) call accum_hist(dt) ! write initial conditions
!20171024: read in mask for land ice discharge into ocean off Antarctica and Greenland.
#ifdef ACCESS
!!! options for land ice discharged as iceberg melting around AA and Gnld
! 0: "even" distribution as for u-ar676;
!================== for ESM1.5/1.6, "0" option is NOT used ===============!
! 1: use AC2 data but GC3.1 iceberg climatological pattern, each month takes
! the total discharge as that diagnosed in u-ar676 (yrs2-101);
! 2: use GC3 iceberg climatological pattern, each month enhanced by ac2/gc3
! annual ratio of land ice discharge to make sure the annual total
! discharge is same as case 1;
! 3: as case 1 but use annual mean
! 4: as case 2 but use annual mean
!!! Note 3 and 4 are similar but NOT the same; 1-4 cases should have identical annual
!!! discharge of land ice (as iceberg) into ocean.

filename = trim(inputdir)//'/lice_discharge_iceberg.nc'
if ( file_exist(filename) ) then
call get_lice_discharge(filename)
else
if (my_task == master_task) then
write(6,*)'* CICE stopped -- iceberg datafile missing.*'
endif
call abort_ice ('ice: land ice discharge iceberg datafile missing: '//&
filename //' *')
endif
#endif

end subroutine cice_init

Expand Down Expand Up @@ -329,7 +366,12 @@ subroutine init_restart
call restartfile() ! given by pointer in ice_in
!ars599: 11042014: markout call calendar
! according to dhb599 initmod at cice4.1_fm
call calendar(time) ! update time parameters
! TODO: 'time' argument in the calendar call below affects frz_onset output.
! Hardcoding time=0.0 gives the same results as the older CM2 based calendar
! initialisation.
! See https://github.com/ACCESS-NRI/cice5/issues/49
! and https://github.com/ACCESS-NRI/cice5/pull/48 for details.
call calendar(0.0) ! update time parameters
if (kdyn == 2) call read_restart_eap ! EAP
else if (restart) then ! ice_ic = core restart file
call restartfile (ice_ic) ! or 'default' or 'none'
Expand Down
Loading