From 85531cf8f8ae93f628344df6ecfa4be12e9629d8 Mon Sep 17 00:00:00 2001 From: Tony Craig Date: Thu, 1 Jul 2021 21:11:26 -0700 Subject: [PATCH] Fix history and restart frequency, new features to scripts (#610) * Fix history/restart frequency bugs and update scripts - Fix bugs in history/restart frequency associated with new calendar (#589) - Update set_nml.histall to include hourly output (#589) - Update test scripts to cleanly abort if run fails where possible (#608) - Update decomp test so it's rerunable, remove restart at start of run (#601) - Add ability to do bfbcomp tests with additional options set on command line (#569) - Update documentation of calendar frequency computation, calendar types, and closed boundaries (#541) - Add optional doabort flag to abort_ice to control whether the method aborts. This is useful for testing and code coverage statistics, although doabort=.false. will not call the actual abort method, but we can test the interfaces and rest of the code. - Add histfreq_base and dumpfreq_base ('init' or 'zero') to specify reference data for history and restart output. Defaults are 'zero' and 'init' respectively for hist and dump. Setting histfreq_base to 'zero' allows for consistent output across multiple runs. Setting dumpfreq_base to 'init' allows the standard testing which requires restarts be written, for example, 5 days after the start of the run. - Remove extra abort calls in bcstchk and sumchk on runs that complete fine but don't pass checks. These aborts should never have been there. - Update documentation. - Clean up some of the unit tests to better support regression testing - modify initial/restart implementation - restart namelist is deprecated, now computed internally - modify initial/continue init checks and set restart and use_restart_time as needed - create compute_relative_elapsed method in ice_calendar to improve code reuse - update documentation with regard to initial/continue modes - Set default use_restart_time to false --- cice.setup | 40 ++- cicecore/cicedynB/general/ice_init.F90 | 97 +++--- .../infrastructure/comm/mpi/ice_exit.F90 | 22 +- .../infrastructure/comm/serial/ice_exit.F90 | 18 +- cicecore/drivers/unittest/bcstchk/bcstchk.F90 | 20 +- cicecore/drivers/unittest/calchk/calchk.F90 | 4 +- .../drivers/unittest/sumchk/CICE_FinalMod.F90 | 70 ---- cicecore/drivers/unittest/sumchk/sumchk.F90 | 8 +- cicecore/shared/ice_calendar.F90 | 92 +++++- configuration/scripts/ice_in | 5 +- configuration/scripts/options/set_nml.alt01 | 1 - configuration/scripts/options/set_nml.alt02 | 1 - configuration/scripts/options/set_nml.alt03 | 1 - configuration/scripts/options/set_nml.alt04 | 1 - configuration/scripts/options/set_nml.alt05 | 1 - configuration/scripts/options/set_nml.alt06 | 2 +- configuration/scripts/options/set_nml.box2001 | 1 - configuration/scripts/options/set_nml.boxadv | 1 - .../scripts/options/set_nml.boxnodyn | 1 - .../scripts/options/set_nml.boxrestore | 1 - .../scripts/options/set_nml.boxslotcyl | 1 - configuration/scripts/options/set_nml.gx1prod | 1 + configuration/scripts/options/set_nml.histall | 11 +- .../scripts/options/set_nml.icdefault | 1 - configuration/scripts/options/set_nml.icnone | 1 - configuration/scripts/options/set_nml.zsal | 1 - .../scripts/options/test_nml.restart1 | 1 + .../scripts/options/test_nml.restart2 | 3 +- .../scripts/tests/test_decomp.script | 3 + .../scripts/tests/test_logbfb.script | 12 +- configuration/scripts/tests/test_smoke.script | 9 +- .../scripts/tests/test_unittest.script | 9 +- doc/source/cice_index.rst | 308 +++++++++--------- doc/source/user_guide/ug_case_settings.rst | 14 +- doc/source/user_guide/ug_implementation.rst | 214 ++++++++---- 35 files changed, 570 insertions(+), 406 deletions(-) delete mode 100644 cicecore/drivers/unittest/sumchk/CICE_FinalMod.F90 diff --git a/cice.setup b/cice.setup index 8dc46005a..3cae17d74 100755 --- a/cice.setup +++ b/cice.setup @@ -644,11 +644,6 @@ EOF set bfbcomp = "$bfbcomp_tmp" endif - set fbfbcomp = ${spval} - if ($bfbcomp != ${spval}) then - set fbfbcomp = ${machcomp}_${bfbcomp} - endif - #------------------------------------------------------------ # Parse pesx with strict checking, limit pes for machine @@ -751,7 +746,14 @@ EOF endif set testname_noid = ${spval} + # create case for test cases + + set fbfbcomp = ${spval} + if ($bfbcomp != ${spval}) then + set fbfbcomp = ${machcomp}_${bfbcomp} + endif + if (${docase} == 0) then set soptions = "" # Create sorted array and remove duplicates and "none" @@ -768,6 +770,31 @@ EOF set testname_base = "${machcomp}_${test}_${grid}_${pesx}${soptions}.${testid}" set testname = "${tsdir}/${testname_base}" set case = ${testname} + + if (${dosuite} == 1) then + # Add -s flags in cice.setup to bfbcomp name + # Parse bfbcomp test_grid_pes and sets + # Add sets_base and sort unique + # Create fbfbcomp string that should be consistent with base casename + set bfbcomp_regex="\(.*_[0-9x]*\)_\(.*\)" + set bfbcomp_test_grid_pes=`echo ${bfbcomp} | sed "s/${bfbcomp_regex}/\1/"` + set bfbcomp_sets=`echo ${bfbcomp} | sed "s/${bfbcomp_regex}/\2/" | sed 's/_/,/g' ` + set bfbcomp_sets="${bfbcomp_sets},${sets_base}" + set bfbcomp_soptions = "" + # Create sorted array and remove duplicates and "none" + set bfbcomp_setsarray = `echo ${bfbcomp_sets} | sed 's/,/ /g' | fmt -1 | sort -u` + if ("${bfbcomp_setsarray}" != "") then + foreach field (${bfbcomp_setsarray}) + if (${field} != "none") then + set bfbcomp_soptions = ${bfbcomp_soptions}"_"${field} + endif + end + endif + set fbfbcomp = ${spval} + if ($bfbcomp != ${spval}) then + set fbfbcomp = ${machcomp}_${bfbcomp_test_grid_pes}${bfbcomp_soptions} + endif + endif endif if (-d ${case}) then @@ -891,6 +918,9 @@ EOF echo "ICE_PES = ${task}x${thrd}" echo "ICE_GRID = ${grid} (${ICE_DECOMP_NXGLOB}x${ICE_DECOMP_NYGLOB}) blocksize=${ICE_DECOMP_BLCKX}x${ICE_DECOMP_BLCKY}x${ICE_DECOMP_MXBLCKS}" echo "ICE_DECOMP = ${ICE_DECOMP_DECOMP} ${ICE_DECOMP_DSHAPE}" + if ($fbfbcomp != ${spval}) then + echo "ICE_BFBCOMP = ${fbfbcomp}" + endif #------------------------------------------------------------ # Copy in and update cice.settings and ice_in files diff --git a/cicecore/cicedynB/general/ice_init.F90 b/cicecore/cicedynB/general/ice_init.F90 index a0b050b63..b896c3bb9 100644 --- a/cicecore/cicedynB/general/ice_init.F90 +++ b/cicecore/cicedynB/general/ice_init.F90 @@ -40,7 +40,7 @@ module ice_init ice_ic ! method of ice cover initialization ! 'default' => latitude and sst dependent ! 'none' => no ice - ! note: restart = .true. overwrites + ! filename => read file public :: input_data, init_state, set_state_var @@ -67,8 +67,8 @@ subroutine input_data n_doc, n_dic, n_don, n_fed, n_fep, & max_nstrm use ice_calendar, only: year_init, month_init, day_init, sec_init, & - istep0, histfreq, histfreq_n, & - dumpfreq, dumpfreq_n, diagfreq, & + istep0, histfreq, histfreq_n, histfreq_base, & + dumpfreq, dumpfreq_n, diagfreq, dumpfreq_base, & npt, dt, ndtd, days_per_year, use_leap_years, & write_ic, dump_last, npt_unit use ice_arrays_column, only: oceanmixed_ice @@ -167,6 +167,7 @@ subroutine input_data print_global, print_points, latpnt, lonpnt, & debug_forcing, histfreq, histfreq_n, hist_avg, & history_dir, history_file, history_precision, cpl_bgc, & + histfreq_base, dumpfreq_base, & conserv_check, debug_model, debug_model_step, & debug_model_i, debug_model_j, debug_model_iblk, debug_model_task, & year_init, month_init, day_init, sec_init, & @@ -285,6 +286,7 @@ subroutine input_data histfreq(4) = 'm' ! output frequency option for different streams histfreq(5) = 'y' ! output frequency option for different streams histfreq_n(:) = 1 ! output frequency + histfreq_base = 'zero' ! output frequency reference date hist_avg = .true. ! if true, write time-averages (not snapshots) history_format = 'default' ! history file format history_dir = './' ! write to executable dir for default @@ -296,6 +298,7 @@ subroutine input_data incond_file = 'iceh_ic'! file prefix dumpfreq='y' ! restart frequency option dumpfreq_n = 1 ! restart frequency + dumpfreq_base = 'init' ! restart frequency reference date dump_last = .false. ! write restart on last time step restart_dir = './' ! write to executable dir for default restart_file = 'iced' ! restart file name prefix @@ -452,8 +455,8 @@ subroutine input_data #ifndef CESMCOUPLED runid = 'unknown' ! run ID used in CESM and for machine 'bering' runtype = 'initial' ! run type: 'initial', 'continue' - restart = .false. ! if true, read restart files for initialization - use_restart_time = .true. ! if true, use time info written in file + restart = .false. ! if true, read ice state from restart file + use_restart_time = .false. ! if true, use time info written in file #endif ! extra tracers @@ -625,6 +628,7 @@ subroutine input_data call broadcast_scalar(histfreq(n), master_task) enddo call broadcast_array(histfreq_n, master_task) + call broadcast_scalar(histfreq_base, master_task) call broadcast_scalar(hist_avg, master_task) call broadcast_scalar(history_dir, master_task) call broadcast_scalar(history_file, master_task) @@ -636,6 +640,7 @@ subroutine input_data call broadcast_scalar(incond_file, master_task) call broadcast_scalar(dumpfreq, master_task) call broadcast_scalar(dumpfreq_n, master_task) + call broadcast_scalar(dumpfreq_base, master_task) call broadcast_scalar(dump_last, master_task) call broadcast_scalar(restart_file, master_task) call broadcast_scalar(restart, master_task) @@ -844,42 +849,46 @@ subroutine input_data write(nu_diag,*) ' ' endif - if (trim(runtype) == 'continue' .and. .not.restart) then - if (my_task == master_task) & - write(nu_diag,*) subname//' WARNING: runtype=continue, setting restart=.true.' + if (trim(runtype) == 'continue') then + if (my_task == master_task) then + write(nu_diag,*) subname//'NOTE: runtype=continue, setting restart=.true.' + if (.not. use_restart_time) & + write(nu_diag,*) subname//'NOTE: runtype=continue, setting use_restart_time=.true.' + write(nu_diag,*) ' ' + endif restart = .true. - endif - - if (trim(runtype) /= 'continue' .and. restart .and. & - (ice_ic == 'none' .or. ice_ic == 'default')) then - if (my_task == master_task) & - write(nu_diag,*) subname//' WARNING: runtype ne continue and ice_ic=none|default, setting restart=.false.' - restart = .false. - endif - - if (trim(runtype) /= 'continue' .and. (ice_ic == 'none' .or. ice_ic == 'default')) then - if (my_task == master_task) & - write(nu_diag,*) subname//' WARNING: ice_ic = none or default, setting restart flags to .false.' - restart = .false. - restart_iso = .false. - restart_aero = .false. - restart_fsd = .false. - restart_age = .false. - restart_fy = .false. - restart_lvl = .false. - restart_pond_cesm = .false. - restart_pond_lvl = .false. - restart_pond_topo = .false. + use_restart_time = .true. + elseif (trim(runtype) == 'initial') then + if (ice_ic == 'none' .or. ice_ic == 'default') then + if (my_task == master_task) then + write(nu_diag,*) subname//'NOTE: ice_ic = none or default, setting restart flags to .false.' + if (.not. use_restart_time) & + write(nu_diag,*) subname//'NOTE: ice_ic = none or default, setting use_restart_time=.false.' + write(nu_diag,*) ' ' + endif + use_restart_time = .false. + restart = .false. + restart_iso = .false. + restart_aero = .false. + restart_fsd = .false. + restart_age = .false. + restart_fy = .false. + restart_lvl = .false. + restart_pond_cesm = .false. + restart_pond_lvl = .false. + restart_pond_topo = .false. ! tcraig, OK to leave as true, needed for boxrestore case -! restart_ext = .false. - endif - - if (trim(runtype) == 'initial' .and. .not.(restart) .and. & - ice_ic /= 'none' .and. ice_ic /= 'default') then +! restart_ext = .false. + else + if (my_task == master_task) then + write(nu_diag,*) subname//'NOTE: ice_ic /= none or default, setting restart=.true.' + write(nu_diag,*) ' ' + endif + restart = .true. + endif + else if (my_task == master_task) then - write(nu_diag,*) subname//' ERROR: runtype, restart, ice_ic are inconsistent:' - write(nu_diag,*) subname//' ERROR: runtype=',trim(runtype), ' restart=',restart, ' ice_ic=',trim(ice_ic) - write(nu_diag,*) subname//' ERROR: Please review user guide' + write(nu_diag,*) subname//' ERROR: runtype unknown = ',trim(runtype) endif abort_list = trim(abort_list)//":1" endif @@ -1120,6 +1129,16 @@ subroutine input_data abort_list = trim(abort_list)//":22" endif + if(histfreq_base /= 'init' .and. histfreq_base /= 'zero') then + write (nu_diag,*) subname//' ERROR: bad value for histfreq_base, allowed values: init, zero' + abort_list = trim(abort_list)//":24" + endif + + if(dumpfreq_base /= 'init' .and. dumpfreq_base /= 'zero') then + write (nu_diag,*) subname//' ERROR: bad value for dumpfreq_base, allowed values: init, zero' + abort_list = trim(abort_list)//":25" + endif + if (.not.(trim(dumpfreq) == 'y' .or. trim(dumpfreq) == 'Y' .or. & trim(dumpfreq) == 'm' .or. trim(dumpfreq) == 'M' .or. & trim(dumpfreq) == 'd' .or. trim(dumpfreq) == 'D' .or. & @@ -1681,6 +1700,7 @@ subroutine input_data write(nu_diag,1021) ' numax = ', numax write(nu_diag,1033) ' histfreq = ', histfreq(:) write(nu_diag,1023) ' histfreq_n = ', histfreq_n(:) + write(nu_diag,1031) ' histfreq_base = ', trim(histfreq_base) write(nu_diag,1011) ' hist_avg = ', hist_avg if (.not. hist_avg) write(nu_diag,1031) ' History data will be snapshots' write(nu_diag,1031) ' history_dir = ', trim(history_dir) @@ -1693,6 +1713,7 @@ subroutine input_data endif write(nu_diag,1031) ' dumpfreq = ', trim(dumpfreq) write(nu_diag,1021) ' dumpfreq_n = ', dumpfreq_n + write(nu_diag,1031) ' dumpfreq_base = ', trim(dumpfreq_base) write(nu_diag,1011) ' dump_last = ', dump_last write(nu_diag,1011) ' restart = ', restart write(nu_diag,1031) ' restart_dir = ', trim(restart_dir) diff --git a/cicecore/cicedynB/infrastructure/comm/mpi/ice_exit.F90 b/cicecore/cicedynB/infrastructure/comm/mpi/ice_exit.F90 index 980bb31d8..061fd63c5 100644 --- a/cicecore/cicedynB/infrastructure/comm/mpi/ice_exit.F90 +++ b/cicecore/cicedynB/infrastructure/comm/mpi/ice_exit.F90 @@ -19,7 +19,7 @@ module ice_exit !======================================================================= - subroutine abort_ice(error_message, file, line) + subroutine abort_ice(error_message, file, line, doabort) ! This routine aborts the ice model and prints an error message. @@ -31,10 +31,10 @@ subroutine abort_ice(error_message, file, line) use mpi ! MPI Fortran module #endif - character (len=*), intent(in),optional :: error_message - character (len=*), intent(in),optional :: file - integer (kind=int_kind), intent(in), optional :: & - line ! line number + character (len=*), intent(in),optional :: error_message ! error message + character (len=*), intent(in),optional :: file ! file + integer (kind=int_kind), intent(in), optional :: line ! line number + logical (kind=log_kind), intent(in), optional :: doabort ! abort flag ! local variables @@ -43,8 +43,12 @@ subroutine abort_ice(error_message, file, line) ierr, & ! MPI error flag error_code ! return code #endif + logical (log_kind) :: ldoabort ! local doabort flag character(len=*), parameter :: subname='(abort_ice)' + ldoabort = .true. + if (present(doabort)) ldoabort = doabort + #if (defined CESMCOUPLED) call flush_fileunit(nu_diag) call icepack_warnings_flush(nu_diag) @@ -54,7 +58,7 @@ subroutine abort_ice(error_message, file, line) if (present(line)) write (nu_diag,*) subname,' line number ',line if (present(error_message)) write (nu_diag,*) subname,' error = ',trim(error_message) call flush_fileunit(nu_diag) - call shr_sys_abort(subname//trim(error_message)) + if (ldoabort) call shr_sys_abort(subname//trim(error_message)) #else call flush_fileunit(nu_diag) call icepack_warnings_flush(nu_diag) @@ -65,8 +69,10 @@ subroutine abort_ice(error_message, file, line) if (present(error_message)) write (ice_stderr,*) subname,' error = ',trim(error_message) call flush_fileunit(ice_stderr) error_code = 128 - call MPI_ABORT(MPI_COMM_WORLD, error_code, ierr) - stop + if (ldoabort) then + call MPI_ABORT(MPI_COMM_WORLD, error_code, ierr) + stop + endif #endif end subroutine abort_ice diff --git a/cicecore/cicedynB/infrastructure/comm/serial/ice_exit.F90 b/cicecore/cicedynB/infrastructure/comm/serial/ice_exit.F90 index eb1b331af..2daadc0e6 100644 --- a/cicecore/cicedynB/infrastructure/comm/serial/ice_exit.F90 +++ b/cicecore/cicedynB/infrastructure/comm/serial/ice_exit.F90 @@ -24,17 +24,21 @@ module ice_exit !======================================================================= - subroutine abort_ice(error_message,file,line) + subroutine abort_ice(error_message,file,line,doabort) ! This routine aborts the ice model and prints an error message. - character (len=*), intent(in),optional :: error_message - character (len=*), intent(in),optional :: file - integer (kind=int_kind), intent(in), optional :: & - line ! line number + character (len=*), intent(in),optional :: error_message ! error message + character (len=*), intent(in),optional :: file ! file + integer (kind=int_kind), intent(in), optional :: line ! line number + logical (kind=log_kind), intent(in), optional :: doabort ! abort flag + logical (kind=log_kind) :: ldoabort ! local doabort character(len=*), parameter :: subname='(abort_ice)' + ldoabort = .true. + if (present(doabort)) ldoabort = doabort + #ifdef CESMCOUPLED call icepack_warnings_flush(nu_diag) write(nu_diag,*) ' ' @@ -42,7 +46,7 @@ subroutine abort_ice(error_message,file,line) if (present(file)) write (nu_diag,*) subname,' called from ',trim(file) if (present(line)) write (nu_diag,*) subname,' line number ',line if (present(error_message)) write (nu_diag,*) subname,' error = ',trim(error_message) - call shr_sys_abort(subname//trim(error_message)) + if (ldoabort) call shr_sys_abort(subname//trim(error_message)) #else call icepack_warnings_flush(nu_diag) write(nu_diag,*) ' ' @@ -51,7 +55,7 @@ subroutine abort_ice(error_message,file,line) if (present(line)) write (nu_diag,*) subname,' line number ',line if (present(error_message)) write (nu_diag,*) subname,' error = ',trim(error_message) call flush_fileunit(nu_diag) - stop + if (ldoabort) stop #endif end subroutine abort_ice diff --git a/cicecore/drivers/unittest/bcstchk/bcstchk.F90 b/cicecore/drivers/unittest/bcstchk/bcstchk.F90 index c0dbb026c..e5cadc805 100644 --- a/cicecore/drivers/unittest/bcstchk/bcstchk.F90 +++ b/cicecore/drivers/unittest/bcstchk/bcstchk.F90 @@ -261,22 +261,32 @@ program bcstchk write(6,*) 'BCSTCHK COMPLETED SUCCESSFULLY' else write(6,*) 'BCSTCHK FAILED' - call abort_ice(subname//' ERROR: BCSTCHK FAILED',file=__FILE__,line=__LINE__) endif + endif + + ! Test abort_ice, regardless of test outcome + ! Set doabort to false to support code coverage stats, aborted runs don't seem to generate + ! gcov statistics + + call flush_fileunit(6) + call ice_barrier() + if (my_task == master_task) then write(6,*) ' ' write(6,*) '==========================================================' write(6,*) ' ' write(6,*) 'NOTE: We are testing the abort now so you should see an abort to follow' write(6,*) 'The BCSTCHK passed, so please ignore the abort' write(6,*) ' ' + call abort_ice(subname//' Test abort ',file=__FILE__,line=__LINE__, doabort=.false.) endif - - ! Test abort_ice, regardless of test outcome call flush_fileunit(6) call ice_barrier() - call abort_ice(subname//' Test abort ',file=__FILE__,line=__LINE__) - if (my_task == master_task) write(6,*) subname,'This line should not be written' + if (my_task == master_task) then + write(6,*) ' ' + write(6,*) 'BCSTCHK done' + write(6,*) ' ' + endif call end_run() diff --git a/cicecore/drivers/unittest/calchk/calchk.F90 b/cicecore/drivers/unittest/calchk/calchk.F90 index c8472faba..09a297f1f 100644 --- a/cicecore/drivers/unittest/calchk/calchk.F90 +++ b/cicecore/drivers/unittest/calchk/calchk.F90 @@ -7,7 +7,7 @@ program calchk use ice_kinds_mod, only: int_kind, dbl_kind use ice_calendar, only: myear, mmonth, mday, msec use ice_calendar, only: year_init, month_init, day_init, sec_init - use ice_calendar, only: dt, ndtd, istep0, diagfreq, npt, npt_unit + use ice_calendar, only: dt, istep0, diagfreq, npt, npt_unit use ice_calendar, only: months_per_year, daymo, timesecs, seconds_per_day use ice_calendar, only: use_leap_years, days_per_year use ice_calendar, only: compute_elapsed_days @@ -55,8 +55,6 @@ program calchk testname(7) = 'special checks' testname(8) = 'calc_timesteps' - ndtd = 1 - ! test yearmax years from year 0 ! yearmax = 1000 yearmax = 100000 diff --git a/cicecore/drivers/unittest/sumchk/CICE_FinalMod.F90 b/cicecore/drivers/unittest/sumchk/CICE_FinalMod.F90 deleted file mode 100644 index a59c210aa..000000000 --- a/cicecore/drivers/unittest/sumchk/CICE_FinalMod.F90 +++ /dev/null @@ -1,70 +0,0 @@ -!======================================================================= -! -! This module contains routines for the final exit of the CICE model, -! including final output and clean exit from any message passing -! environments and frameworks. -! -! authors: Philip W. Jones, LANL -! 2006: Converted to free source form (F90) by Elizabeth Hunke -! 2008: E. Hunke moved ESMF code to its own driver - - module CICE_FinalMod - - use ice_kinds_mod - use ice_communicate, only: my_task, master_task - use ice_exit, only: end_run, abort_ice - use ice_fileunits, only: nu_diag, release_all_fileunits - use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted - - implicit none - private - public :: CICE_Finalize - -!======================================================================= - - contains - -!======================================================================= -! -! This routine shuts down CICE by exiting all relevent environments. - - subroutine CICE_Finalize - - use ice_restart_shared, only: runid - use ice_timers, only: ice_timer_stop, ice_timer_print_all, timer_total - - character(len=*), parameter :: subname = '(CICE_Finalize)' - - !------------------------------------------------------------------- - ! stop timers and print timer info - !------------------------------------------------------------------- - - call ice_timer_stop(timer_total) ! stop timing entire run - call ice_timer_print_all(stats=.false.) ! print timing information - - call icepack_warnings_flush(nu_diag) - if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & - file=__FILE__,line= __LINE__) - - if (my_task == master_task) then - write(nu_diag, *) " " - write(nu_diag, *) "CICE COMPLETED SUCCESSFULLY " - write(nu_diag, *) " " - endif - -!echmod if (nu_diag /= 6) close (nu_diag) ! diagnostic output - call release_all_fileunits - - !------------------------------------------------------------------- - ! quit MPI - !------------------------------------------------------------------- - - call end_run ! quit MPI - - end subroutine CICE_Finalize - -!======================================================================= - - end module CICE_FinalMod - -!======================================================================= diff --git a/cicecore/drivers/unittest/sumchk/sumchk.F90 b/cicecore/drivers/unittest/sumchk/sumchk.F90 index a811f5964..e3b99b59d 100644 --- a/cicecore/drivers/unittest/sumchk/sumchk.F90 +++ b/cicecore/drivers/unittest/sumchk/sumchk.F90 @@ -12,7 +12,6 @@ program sumchk ! infrastructure built-in. use CICE_InitMod - use CICE_FinalMod use ice_kinds_mod, only: int_kind, dbl_kind, real_kind use ice_communicate, only: my_task, master_task, get_num_procs use ice_domain_size, only: nx_global, ny_global @@ -23,7 +22,7 @@ program sumchk use ice_constants, only: field_loc_center, field_loc_Nface use ice_fileunits, only: bfbflag use ice_global_reductions - use ice_exit, only: abort_ice + use ice_exit, only: abort_ice, end_run implicit none @@ -679,7 +678,6 @@ program sumchk write(6,*) 'SUMCHK COMPLETED SUCCESSFULLY' else write(6,*) 'SUMCHK FAILED' - call abort_ice(subname//' ERROR: SUMCHK FAILED',file=__FILE__,line=__LINE__) endif write(6,*) ' ' write(6,*) '==========================================================' @@ -688,10 +686,10 @@ program sumchk !----------------------------------------------------------------- - ! Finalize CICE + ! Gracefully end !----------------------------------------------------------------- - call CICE_Finalize + call end_run() end program sumchk diff --git a/cicecore/shared/ice_calendar.F90 b/cicecore/shared/ice_calendar.F90 index 4d7ae378f..f76b3b30b 100644 --- a/cicecore/shared/ice_calendar.F90 +++ b/cicecore/shared/ice_calendar.F90 @@ -11,6 +11,10 @@ ! 2010 CM : Fixed support for Gregorian calendar: subroutines ! sec2time, time2sec and set_calendar added. ! 2020 TC : Significant refactor to move away from time as prognostic +! Note that the reference date is arbitrarily set to +! 0000-01-01-00000 and dates cannot be less than that. +! The implementation is also limited by some integer +! math to myear_max which is a parameter in this module. module ice_calendar @@ -47,6 +51,7 @@ module ice_calendar ! private functions private :: set_calendar ! sets model calendar type (noleap, etc) + private :: compute_relative_elapsed ! compute relative elapsed years, months, days, hours ! PUBLIC @@ -87,7 +92,7 @@ module ice_calendar dayyr , & ! number of days in the current year npt , & ! total number of time steps (dt) npt0 , & ! original npt value in npt0_unit - ndtd , & ! number of dynamics subcycles: dt_dyn=dt/ndtd + ndtd = 1 , & ! number of dynamics subcycles: dt_dyn=dt/ndtd stop_now , & ! if 1, end program execution write_restart, & ! if 1, write restart now diagfreq , & ! diagnostic output frequency (10 = once per 10 dt) @@ -122,14 +127,18 @@ module ice_calendar dumpfreq ! restart frequency, 'y','m','d' character (len=char_len), public :: & - calendar_type ! differentiates Gregorian from other calendars - ! default = ' ' + dumpfreq_base = 'zero', & ! restart frequency basetime ('zero', 'init') + histfreq_base = 'init', & ! history frequency basetime ('zero', 'init') + calendar_type ! define calendar type ! PRIVATE integer (kind=int_kind) :: & hour ! hour of the day + integer (kind=int_kind), parameter :: & + myear_max = 200000 ! maximum year, limited by integer overflow in elapsed_hours + ! 360-day year data integer (kind=int_kind) :: & daymo360(months_per_year) ! number of days in each month @@ -320,6 +329,22 @@ end subroutine advance_timestep subroutine calendar() +! This sets a bunch of internal calendar stuff including history and +! restart frequencies. These frequencies are relative to the start +! of time which is arbitrarily set to year=0, month=1, day=1, sec=0 +! or to the model init time (year_init, month_init, day_init) depending +! on histfreq_base or dumpfreq_base settings. +! Using 'zero' means that the frequencies are repeatable between runs +! regardless of the initial model date. +! One thing to watch for is the size of elapsed hours. This will +! become a large integer and will overflow if the year is ever +! greater than about 200,000 years. A check has been added just +! to make sure this doesn't happen. +! The largest integer*4 is about 2^31 = 2*2^10^3 =~ 2*1000^3 = 2.e9 +! 2.e9 (hours) / (365*24 hours/year) =~ 228,000 years +! The elapsed hours will overflow integers at some point after that. + + ! real (kind=dbl_kind), intent(in), optional :: & ! ttime ! time variable @@ -328,9 +353,10 @@ subroutine calendar() integer (kind=int_kind) :: & ns , & ! loop index yearp,monthp,dayp,hourp , & ! previous year, month, day, hour - elapsed_days , & ! since beginning this run - elapsed_months , & ! since beginning this run - elapsed_hours ! since beginning this run + elapsed_years , & ! relative elapsed years + elapsed_months , & ! relative elapsed months + elapsed_days , & ! relative elapsed days + elapsed_hours ! relative elapsed hours character(len=*),parameter :: subname='(calendar)' yearp=myear @@ -347,12 +373,15 @@ subroutine calendar() call update_date(myear,mmonth,mday,msec) call set_calendar(myear) + if (myear > myear_max) then + write(nu_diag,*) trim(subname),' ERROR year too large, ',myear,myear_max + call abort_ice(subname//'ERROR: model year too large') + endif + idate = (myear)*10000 + mmonth*100 + mday ! date (yyyymmdd) yday = daycal(mmonth) + mday ! day of the year - hour = (msec+1)/(seconds_per_hour) - elapsed_months = (myear - year_init)*months_per_year + mmonth - month_init - elapsed_days = compute_days_between(year_init,month_init,day_init,myear,mmonth,mday) - elapsed_hours = elapsed_days * hours_per_day + hour = int(msec/seconds_per_hour) + call calendar_date2time(myear,mmonth,mday,msec,timesecs) !--- compute other stuff @@ -368,12 +397,14 @@ subroutine calendar() ! History writing flags + call compute_relative_elapsed(histfreq_base, elapsed_years, elapsed_months, elapsed_days, elapsed_hours) + do ns = 1, nstreams select case (histfreq(ns)) case ("y", "Y") if (new_year .and. histfreq_n(ns)/=0) then - if (mod(myear, histfreq_n(ns))==0) & + if (mod(elapsed_years, histfreq_n(ns))==0) & write_history(ns) = .true. endif case ("m", "M") @@ -402,9 +433,11 @@ subroutine calendar() ! Restart writing flag + call compute_relative_elapsed(dumpfreq_base, elapsed_years, elapsed_months, elapsed_days, elapsed_hours) + select case (dumpfreq) case ("y", "Y") - if (new_year .and. mod(myear, dumpfreq_n)==0) & + if (new_year .and. mod(elapsed_years, dumpfreq_n)==0) & write_restart = 1 case ("m", "M") if (new_month .and. mod(elapsed_months,dumpfreq_n)==0) & @@ -915,6 +948,41 @@ subroutine calendar_time2date(atimesecs,ayear,amon,aday,asec,year_ref,mon_ref,da end subroutine calendar_time2date +!======================================================================= +! Compute relative elapsed years, months, days, hours from base time + + subroutine compute_relative_elapsed(base, ey, em, ed, eh) + + character(len=*), intent(in) :: base + integer(kind=int_kind), intent(out) :: & + ey, em, ed, eh ! relative elapsed year, month, day, hour + + character(len=*),parameter :: subname='(compute_relative_elapsed)' + + if (base == 'zero') then + ey = myear + em = ey * months_per_year + mmonth - 1 + ed = compute_days_between(0,1,1,myear,mmonth,mday) + eh = ed * hours_per_day + hour + elseif (base == 'init') then + ey = myear - year_init + em = ey * months_per_year + (mmonth - month_init) + ed = compute_days_between(year_init,month_init,day_init,myear,mmonth,mday) + eh = ed * hours_per_day + hour + else + write(nu_diag,*) trim(subname),' ERROR base not recognized, ',trim(base) + call abort_ice(subname//'ERROR: base value invalid') + endif + +! if (my_task == master_task) then +! write(nu_diag,*) subname,' ey',ey +! write(nu_diag,*) subname,' em',em +! write(nu_diag,*) subname,' ed',ed +! write(nu_diag,*) subname,' eh',eh +! endif + + end subroutine compute_relative_elapsed + !======================================================================= end module ice_calendar diff --git a/configuration/scripts/ice_in b/configuration/scripts/ice_in index 47c2bf58a..e918a694c 100644 --- a/configuration/scripts/ice_in +++ b/configuration/scripts/ice_in @@ -12,9 +12,8 @@ ndtd = 1 runtype = 'initial' ice_ic = './restart/iced_gx3_v5.nc' - restart = .true. restart_ext = .false. - use_restart_time = .true. + use_restart_time = .false. restart_format = 'default' lcdf64 = .false. numin = 21 @@ -24,6 +23,7 @@ pointer_file = './ice.restart_file' dumpfreq = 'd' dumpfreq_n = 1 + dumpfreq_base = 'init' dump_last = .false. bfbflag = 'off' diagfreq = 24 @@ -45,6 +45,7 @@ lonpnt(2) = -45. histfreq = 'm','x','x','x','x' histfreq_n = 1 , 1 , 1 , 1 , 1 + histfreq_base = 'zero' hist_avg = .true. history_dir = './history/' history_file = 'iceh' diff --git a/configuration/scripts/options/set_nml.alt01 b/configuration/scripts/options/set_nml.alt01 index 705fc8f63..afe67691d 100644 --- a/configuration/scripts/options/set_nml.alt01 +++ b/configuration/scripts/options/set_nml.alt01 @@ -1,7 +1,6 @@ nilyr = 1 use_leap_years = .false. ice_ic = 'default' -restart = .false. distribution_type = 'roundrobin' distribution_wght = 'block' tr_iage = .false. diff --git a/configuration/scripts/options/set_nml.alt02 b/configuration/scripts/options/set_nml.alt02 index 9e1baf388..c4dbb0fea 100644 --- a/configuration/scripts/options/set_nml.alt02 +++ b/configuration/scripts/options/set_nml.alt02 @@ -1,7 +1,6 @@ ncat = 1 kcatbound = -1 ice_ic = 'default' -restart = .false. distribution_type = 'sectrobin' tr_iage = .true. tr_FY = .true. diff --git a/configuration/scripts/options/set_nml.alt03 b/configuration/scripts/options/set_nml.alt03 index a72696777..255d77261 100644 --- a/configuration/scripts/options/set_nml.alt03 +++ b/configuration/scripts/options/set_nml.alt03 @@ -1,7 +1,6 @@ ncat = 6 kcatbound = 2 ice_ic = 'default' -restart = .false. distribution_type = 'sectcart' conserv_check = .true. tr_iage = .false. diff --git a/configuration/scripts/options/set_nml.alt04 b/configuration/scripts/options/set_nml.alt04 index 937704294..53372f124 100644 --- a/configuration/scripts/options/set_nml.alt04 +++ b/configuration/scripts/options/set_nml.alt04 @@ -1,5 +1,4 @@ ice_ic = 'default' -restart = .false. bfbflag = 'reprosum' distribution_type = 'rake' processor_shape = 'slenderX2' diff --git a/configuration/scripts/options/set_nml.alt05 b/configuration/scripts/options/set_nml.alt05 index 5e439d9e0..a281bfa23 100644 --- a/configuration/scripts/options/set_nml.alt05 +++ b/configuration/scripts/options/set_nml.alt05 @@ -1,5 +1,4 @@ ice_ic = 'default' -restart = .false. tr_iage = .false. tr_FY = .false. tr_lvl = .false. diff --git a/configuration/scripts/options/set_nml.alt06 b/configuration/scripts/options/set_nml.alt06 index 197f1f4a7..cd3a2222d 100644 --- a/configuration/scripts/options/set_nml.alt06 +++ b/configuration/scripts/options/set_nml.alt06 @@ -2,4 +2,4 @@ ncat = 7 kcatbound = 3 nslyr = 3 ice_ic = 'default' -restart = .false. + diff --git a/configuration/scripts/options/set_nml.box2001 b/configuration/scripts/options/set_nml.box2001 index 84cac67b2..c166b4217 100644 --- a/configuration/scripts/options/set_nml.box2001 +++ b/configuration/scripts/options/set_nml.box2001 @@ -2,7 +2,6 @@ days_per_year = 360 use_leap_years = .false. npt = 240 ice_ic = 'default' -restart = .false. restart_ext = .true. histfreq = 'd','x','x','x','x' grid_type = 'rectangular' diff --git a/configuration/scripts/options/set_nml.boxadv b/configuration/scripts/options/set_nml.boxadv index 49ab3f13c..7fc70713e 100644 --- a/configuration/scripts/options/set_nml.boxadv +++ b/configuration/scripts/options/set_nml.boxadv @@ -1,6 +1,5 @@ nilyr = 1 ice_ic = 'default' -restart = .false. restart_ext = .false. kcatbound = 2 ew_boundary_type = 'cyclic' diff --git a/configuration/scripts/options/set_nml.boxnodyn b/configuration/scripts/options/set_nml.boxnodyn index e6de6be0d..35a224c92 100644 --- a/configuration/scripts/options/set_nml.boxnodyn +++ b/configuration/scripts/options/set_nml.boxnodyn @@ -1,6 +1,5 @@ nilyr = 1 ice_ic = 'default' -restart = .false. days_per_year = 360 use_leap_years = .false. npt = 72 diff --git a/configuration/scripts/options/set_nml.boxrestore b/configuration/scripts/options/set_nml.boxrestore index 6092a4d23..ac0266aeb 100644 --- a/configuration/scripts/options/set_nml.boxrestore +++ b/configuration/scripts/options/set_nml.boxrestore @@ -1,6 +1,5 @@ nilyr = 1 ice_ic = 'default' -restart = .false. restart_ext = .true. use_leap_years = .false. ndtd = 2 diff --git a/configuration/scripts/options/set_nml.boxslotcyl b/configuration/scripts/options/set_nml.boxslotcyl index 7d9f5e90e..9985cef13 100644 --- a/configuration/scripts/options/set_nml.boxslotcyl +++ b/configuration/scripts/options/set_nml.boxslotcyl @@ -1,6 +1,5 @@ nilyr = 1 ice_ic = 'default' -restart = .false. restart_ext = .false. dt = 3600.0 npt = 288 diff --git a/configuration/scripts/options/set_nml.gx1prod b/configuration/scripts/options/set_nml.gx1prod index f725c4367..eca527a64 100644 --- a/configuration/scripts/options/set_nml.gx1prod +++ b/configuration/scripts/options/set_nml.gx1prod @@ -3,6 +3,7 @@ use_leap_years = .true. npt_unit = 'y' npt = 1 dumpfreq = 'm' +dumpfreq_base = 'zero' fyear_init = 2005 ycycle = 5 ocn_data_dir = 'ICE_MACHINE_INPUTDATA/CICE_data/forcing/gx1/CESM/MONTHLY/' diff --git a/configuration/scripts/options/set_nml.histall b/configuration/scripts/options/set_nml.histall index 5fad1a7e2..758289099 100644 --- a/configuration/scripts/options/set_nml.histall +++ b/configuration/scripts/options/set_nml.histall @@ -1,5 +1,6 @@ - histfreq = 'm','d','1','x','x' - histfreq_n = 1,1,6,1,1 + histfreq = 'm','d','1','h','x' + histfreq_n = 1,2,6,4,1 + histfreq_base = 'zero' write_ic = .true. f_tmask = .true. f_blkmask = .true. @@ -20,10 +21,10 @@ f_VGRDa = .true. f_bounds = .true. f_CMIP = 'm' - f_aice = 'md1' - f_hi = '1dm' + f_aice = 'md1h' + f_hi = 'h1dm' f_hs = 'd1m' - f_Tsfc = 'md' + f_Tsfc = 'mdh' f_sice = 'md' f_uvel = 'md' f_vvel = 'dm' diff --git a/configuration/scripts/options/set_nml.icdefault b/configuration/scripts/options/set_nml.icdefault index 24bf7e244..2f3c092d4 100644 --- a/configuration/scripts/options/set_nml.icdefault +++ b/configuration/scripts/options/set_nml.icdefault @@ -1,2 +1 @@ ice_ic = 'default' -restart = .false. diff --git a/configuration/scripts/options/set_nml.icnone b/configuration/scripts/options/set_nml.icnone index b38c661bf..29883a34d 100644 --- a/configuration/scripts/options/set_nml.icnone +++ b/configuration/scripts/options/set_nml.icnone @@ -1,2 +1 @@ ice_ic = 'none' -restart = .false. diff --git a/configuration/scripts/options/set_nml.zsal b/configuration/scripts/options/set_nml.zsal index c099fed8c..5503e0231 100644 --- a/configuration/scripts/options/set_nml.zsal +++ b/configuration/scripts/options/set_nml.zsal @@ -5,5 +5,4 @@ tfrz_option = 'linear_salt' tr_brine = .true. solve_zsal = .true. ice_ic = 'default' -restart = .false. diff --git a/configuration/scripts/options/test_nml.restart1 b/configuration/scripts/options/test_nml.restart1 index 6ab0bd88b..4ebe3810b 100644 --- a/configuration/scripts/options/test_nml.restart1 +++ b/configuration/scripts/options/test_nml.restart1 @@ -2,5 +2,6 @@ npt = 10 npt_unit = 'd' dumpfreq = 'd' dumpfreq_n = 5 +dumpfreq_base = 'init' runtype = 'initial' use_restart_time = .false. diff --git a/configuration/scripts/options/test_nml.restart2 b/configuration/scripts/options/test_nml.restart2 index c12887eb0..9d1af079e 100644 --- a/configuration/scripts/options/test_nml.restart2 +++ b/configuration/scripts/options/test_nml.restart2 @@ -2,6 +2,5 @@ npt = 5 npt_unit = 'd' dumpfreq = 'd' dumpfreq_n = 5 +dumpfreq_base = 'init' runtype = 'continue' -restart = .true. -use_restart_time = .true. diff --git a/configuration/scripts/tests/test_decomp.script b/configuration/scripts/tests/test_decomp.script index 40b84d08e..bc45e3ca0 100644 --- a/configuration/scripts/tests/test_decomp.script +++ b/configuration/scripts/tests/test_decomp.script @@ -19,6 +19,9 @@ end cp ice_in ice_in.0 set base_dir = "" +# clean up old restart dirs to support rerun +rm -rf ${ICE_RUNDIR}/restart.* + foreach decomp (${decomps}) ${ICE_CASEDIR}/casescripts/parse_namelist.sh ice_in ${ICE_CASEDIR}/casescripts/set_nml.d${decomp} cp ice_in ice_in.${decomp} diff --git a/configuration/scripts/tests/test_logbfb.script b/configuration/scripts/tests/test_logbfb.script index d8e594e81..0ac1ed224 100644 --- a/configuration/scripts/tests/test_logbfb.script +++ b/configuration/scripts/tests/test_logbfb.script @@ -1,7 +1,6 @@ - +# This is identical to a smoke test, but triggers bfbcompare with log files instead of restarts #---------------------------------------------------- # Run the CICE model -# This is identical to a smoke test, but triggers bfbcompare with log files instead of restarts # cice.run returns -1 if run did not complete successfully ./cice.run @@ -21,9 +20,12 @@ mv -f ${ICE_CASEDIR}/test_output ${ICE_CASEDIR}/test_output.prev cat ${ICE_CASEDIR}/test_output.prev | grep -iv "${ICE_TESTNAME} test" >! ${ICE_CASEDIR}/test_output rm -f ${ICE_CASEDIR}/test_output.prev -set grade = FAIL -if ( $res == 0 ) then - set grade = PASS +set grade = PASS +if ( $res != 0 ) then + set grade = FAIL + echo "$grade ${ICE_TESTNAME} run ${ttimeloop} ${tdynamics} ${tcolumn}" >> ${ICE_CASEDIR}/test_output + echo "$grade ${ICE_TESTNAME} test " >> ${ICE_CASEDIR}/test_output + exit 99 endif echo "$grade ${ICE_TESTNAME} run ${ttimeloop} ${tdynamics} ${tcolumn}" >> ${ICE_CASEDIR}/test_output diff --git a/configuration/scripts/tests/test_smoke.script b/configuration/scripts/tests/test_smoke.script index f39f7cb4a..015b0b5ac 100644 --- a/configuration/scripts/tests/test_smoke.script +++ b/configuration/scripts/tests/test_smoke.script @@ -20,9 +20,12 @@ mv -f ${ICE_CASEDIR}/test_output ${ICE_CASEDIR}/test_output.prev cat ${ICE_CASEDIR}/test_output.prev | grep -iv "${ICE_TESTNAME} test" >! ${ICE_CASEDIR}/test_output rm -f ${ICE_CASEDIR}/test_output.prev -set grade = FAIL -if ( $res == 0 ) then - set grade = PASS +set grade = PASS +if ( $res != 0 ) then + set grade = FAIL + echo "$grade ${ICE_TESTNAME} run ${ttimeloop} ${tdynamics} ${tcolumn}" >> ${ICE_CASEDIR}/test_output + echo "$grade ${ICE_TESTNAME} test " >> ${ICE_CASEDIR}/test_output + exit 99 endif echo "$grade ${ICE_TESTNAME} run ${ttimeloop} ${tdynamics} ${tcolumn}" >> ${ICE_CASEDIR}/test_output diff --git a/configuration/scripts/tests/test_unittest.script b/configuration/scripts/tests/test_unittest.script index 0fcd148a6..5f37b15ac 100644 --- a/configuration/scripts/tests/test_unittest.script +++ b/configuration/scripts/tests/test_unittest.script @@ -14,9 +14,12 @@ mv -f ${ICE_CASEDIR}/test_output ${ICE_CASEDIR}/test_output.prev cat ${ICE_CASEDIR}/test_output.prev | grep -iv "${ICE_TESTNAME} test" >! ${ICE_CASEDIR}/test_output rm -f ${ICE_CASEDIR}/test_output.prev -set grade = FAIL -if ( $res == 0 ) then - set grade = PASS +set grade = PASS +if ( $res != 0 ) then + set grade = FAIL + echo "$grade ${ICE_TESTNAME} run " >> ${ICE_CASEDIR}/test_output + echo "$grade ${ICE_TESTNAME} test " >> ${ICE_CASEDIR}/test_output + exit 99 endif echo "$grade ${ICE_TESTNAME} run " >> ${ICE_CASEDIR}/test_output diff --git a/doc/source/cice_index.rst b/doc/source/cice_index.rst index d3291dbd8..2efcd0335 100644 --- a/doc/source/cice_index.rst +++ b/doc/source/cice_index.rst @@ -6,9 +6,8 @@ Index of primary variables and parameters ========================================== This index defines many of the symbols used frequently in the CICE model -code. Values appearing in this list are fixed or recommended; most -namelist parameters are indicated ( :math:`E_\circ`) with their default -values. For other namelist options, see Section :ref:`tabnamelist`. All +code. Namelist variables are partly included here but also documented +elsewhere, see Section :ref:`tabnamelist`. All quantities in the code are expressed in MKS units (temperatures may take either Celsius or Kelvin units). @@ -28,25 +27,25 @@ either Celsius or Kelvin units). "a4Ds", "history field accumulations, 4D categories, vertical snow", "" "a4Df", "history field accumulations, 4D categories, fsd", "" "a_min", "minimum area concentration for computing velocity", "0.001" - "a_rapid_mode", ":math:`{\bullet}` brine channel diameter", "" - "add_mpi_barriers", ":math:`\bullet` turns on MPI barriers for communication throttling", "" - "advection", ":math:`\bullet` type of advection algorithm used (‘remap’ or ‘upwind’)", "remap" + "a_rapid_mode", "brine channel diameter", "" + "add_mpi_barriers", "turns on MPI barriers for communication throttling", "" + "advection", "type of advection algorithm used (‘remap’ or ‘upwind’)", "remap" "afsd(n)", "floe size distribution (in category n)", "" - "ahmax", ":math:`\bullet` thickness above which ice albedo is constant", "0.3m" + "ahmax", "thickness above which ice albedo is constant", "0.3m" "aice_extmin", "minimum value for ice extent diagnostic", "0.15" "aice_init", "concentration of ice at beginning of timestep", "" "aice0", "fractional open water area", "" "aice(n)", "total concentration of ice in grid cell (in category n)", "" - "albedo_type", ":math:`\bullet` type of albedo parameterization (‘ccsm3’ or ‘constant’)", "" + "albedo_type", "type of albedo parameterization (‘ccsm3’ or ‘constant’)", "" "albcnt", "counter for averaging albedo", "" "albice", "bare ice albedo", "" - "albicei", ":math:`\bullet` near infrared ice albedo for thicker ice", "" - "albicev", ":math:`\bullet` visible ice albedo for thicker ice", "" + "albicei", "near infrared ice albedo for thicker ice", "" + "albicev", "visible ice albedo for thicker ice", "" "albocn", "ocean albedo", "0.06" "albpnd", "melt pond albedo", "" "albsno", "snow albedo", "" - "albsnowi", ":math:`\bullet` near infrared, cold snow albedo", "" - "albsnowv", ":math:`\bullet` visible, cold snow albedo", "" + "albsnowi", "near infrared, cold snow albedo", "" + "albsnowv", "visible, cold snow albedo", "" "algalN", "algal nitrogen concentration", mmol/m\ :math:`^3` "alv(n)dr(f)", "albedo: visible (near IR), direct (diffuse)", "" "alv(n)dr(f)_ai", "grid-box-mean value of alv(n)dr(f)", "" @@ -60,23 +59,23 @@ either Celsius or Kelvin units). "araftn", "area fraction of rafted ice", "" "aredistrn", "redistribution function: fraction of new ridge area", "" "ardgn", "fractional area of ridged ice", "" - "aspect_rapid_mode", ":math:`\bullet` brine convection aspect ratio", "1" + "aspect_rapid_mode", "brine convection aspect ratio", "1" "astar", "e-folding scale for participation function", "0.05" - "atmiter_conv", ":math:`\bullet` convergence criteria for ustar", "0.00" - "atm_data_dir", ":math:`\bullet` directory for atmospheric forcing data", "" - "atm_data_format", ":math:`\bullet` format of atmospheric forcing files", "" - "atm_data_type", ":math:`\bullet` type of atmospheric forcing", "" - "atmbndy", ":math:`\bullet` atmo boundary layer parameterization (‘default’ or ‘constant’)", "" + "atmiter_conv", "convergence criteria for ustar", "0.00" + "atm_data_dir", "directory for atmospheric forcing data", "" + "atm_data_format", "format of atmospheric forcing files", "" + "atm_data_type", "type of atmospheric forcing", "" + "atmbndy", "atmo boundary layer parameterization (‘default’ or ‘constant’)", "" "avail_hist_fields", "type for history field data", "" "awtidf", "weighting factor for near-ir, diffuse albedo", "0.36218" "awtidr", "weighting factor for near-ir, direct albedo", "0.00182" "awtvdf", "weighting factor for visible, diffuse albedo", "0.63282" "awtvdr", "weighting factor for visible, direct albedo", "0.00318" "**B**", "", "" - "bfb_flag", ":math:`\bullet` for bit-for-bit reproducible diagnostics", "" - "bgc_data_dir", ":math:`\bullet` data directory for bgc", "" - "bgc_data_type", ":math:`\bullet` source of silicate, nitrate data", "" - "bgc_flux_type", ":math:`\bullet` ice–ocean flux velocity", "" + "bfb_flag", "for bit-for-bit reproducible diagnostics", "" + "bgc_data_dir", "data directory for bgc", "" + "bgc_data_type", "source of silicate, nitrate data", "" + "bgc_flux_type", "ice–ocean flux velocity", "" "bgc_tracer_type", "tracer_type for bgc tracers", "" "bgrid", "nondimensional vertical grid points for bio grid", "" "bignum", "a large number", ":math:`10^{30}`" @@ -92,13 +91,13 @@ either Celsius or Kelvin units). "bTiz", "temperature of ice layers on bio grid", "" "**C**", "", "" "c", "real(\ :math:`n`)", "" - "rotate_wind", ":math:`\bullet` if true, rotate wind/stress components to computational grid", "T" - "calc_dragio", ":math:`\bullet` if true, calculate ``dragio`` from ``iceruf_ocn`` and ``thickness_ocn_layer1``", "F" - "calc_strair", ":math:`\bullet` if true, calculate wind stress", "T" - "calc_Tsfc", ":math:`\bullet` if true, calculate surface temperature", "T" + "rotate_wind", "if true, rotate wind/stress components to computational grid", "T" + "calc_dragio", "if true, calculate ``dragio`` from ``iceruf_ocn`` and ``thickness_ocn_layer1``", "F" + "calc_strair", "if true, calculate wind stress", "T" + "calc_Tsfc", "if true, calculate surface temperature", "T" "Cdn_atm", "atmospheric drag coefficient", "" "Cdn_ocn", "ocean drag coefficient", "" - "Cf", ":math:`\bullet` ratio of ridging work to PE change in ridging", "17." + "Cf", "ratio of ridging work to PE change in ridging", "17." "cgrid", "vertical grid points for ice grid (compare bgrid)", "" "char_len", "length of character variable strings", "80" "char_len_long", "length of longer character variable strings", "256" @@ -108,7 +107,7 @@ either Celsius or Kelvin units). "cm_to_m", "cm to meters conversion", "0.01" "coldice", "value for constant albedo parameterization", "0.70" "coldsnow", "value for constant albedo parameterization", "0.81" - "conduct", ":math:`\bullet` conductivity parameterization", "" + "conduct", "conductivity parameterization", "" "congel", "basal ice growth", "m" "conserv_check", "if true, check conservation", "" "cosw", "cosine of the turning angle in water", "1." @@ -139,11 +138,11 @@ either Celsius or Kelvin units). "dardg2(n)dt", "rate of fractional area gain by new ridges (category n)", "1/s" "daymo", "number of days in one month", "" "daycal", "day number at end of month", "" - "days_per_year", ":math:`\bullet` number of days in one year", "365" - "day_init", ":math:`\bullet` the initial day of the month", "" + "days_per_year", "number of days in one year", "365" + "day_init", "the initial day of the month", "" "dbl_kind", "definition of double precision", "selected_real_kind(13)" - "debug_blocks", ":math:`\bullet` write extra diagnostics for blocks and decomposition", ".false." - "debug_forcing", ":math:`\bullet` write extra diagnostics for forcing inputs", ".false." + "debug_blocks", "write extra diagnostics for blocks and decomposition", ".false." + "debug_forcing", "write extra diagnostics for forcing inputs", ".false." "debug_model", "Logical that controls extended model point debugging.", "" "debug_model_i", "Local i gridpoint that defines debug_model point output.", "" "debug_model_iblk", "Local iblk value that defines debug_model point output.", "" @@ -157,31 +156,32 @@ either Celsius or Kelvin units). "dhbr_bt", "change in brine height at the bottom of the column", "" "dhbr_top", "change in brine height at the top of the column", "" "dhsn", "depth difference for snow on sea ice and pond ice", "" - "diag_file", ":math:`\bullet` diagnostic output file (alternative to standard out)", "" - "diag_type", ":math:`\bullet` where diagnostic output is written", "stdout" - "diagfreq", ":math:`\bullet` how often diagnostic output is written (10 = once per 10 dt)", "" + "diag_file", "diagnostic output file (alternative to standard out)", "" + "diag_type", "where diagnostic output is written", "stdout" + "diagfreq", "how often diagnostic output is written (10 = once per 10 dt)", "" "distrb", "distribution data type", "" "distrb_info", "block distribution information", "" - "distribution_type", ":math:`\bullet` method used to distribute blocks on processors", "" - "distribution_weight", ":math:`\bullet` weighting method used to compute work per block", "" + "distribution_type", "method used to distribute blocks on processors", "" + "distribution_weight", "weighting method used to compute work per block", "" "divu", "strain rate I component, velocity divergence", "1/s" "divu_adv", "divergence associated with advection", "1/s" "dms", "dimethyl sulfide concentration", "mmol/m\ :math:`^3`" "dmsp", "dimethyl sulfoniopropionate concentration", "mmol/m\ :math:`^3`" - "dpscale", ":math:`\bullet` time scale for flushing in permeable ice", ":math:`1\times 10^{-3}`" + "dpscale", "time scale for flushing in permeable ice", ":math:`1\times 10^{-3}`" "dragio", "drag coefficient for water on ice", "0.00536" - "dSdt_slow_mode", ":math:`\bullet` drainage strength parameter", "" + "dSdt_slow_mode", "drainage strength parameter", "" "dsnow", "change in snow thickness", "m" - "dt", ":math:`\bullet` thermodynamics time step", "3600. s" + "dt", "thermodynamics time step", "3600. s" "dt_dyn", "dynamics/ridging/transport time step", "" - "dT_mlt", ":math:`\bullet` :math:`\Delta` temperature per :math:`\Delta` snow grain radius", "1. deg" + "dT_mlt", ":math:`\Delta` temperature per :math:`\Delta` snow grain radius", "1. deg" "dte", "subcycling time step for EVP dynamics (:math:`\Delta t_e`)", "s" "dte2T", "dte / 2(damping time scale)", "" "dtei", "1/dte, where dte is the EVP subcycling time step", "1/s" - "dump_file", ":math:`\bullet` output file for restart dump", "" - "dumpfreq", ":math:`\bullet` dump frequency for restarts, y, m, d, h or 1", "" - "dumpfreq_n", ":math:`\bullet` restart output frequency", "" - "dump_last", ":math:`\bullet` if true, write restart on last time step of simulation", "" + "dump_file", "output file for restart dump", "" + "dumpfreq", "dump frequency for restarts, y, m, d, h or 1", "" + "dumpfreq_base", "reference date for restart output", "" + "dumpfreq_n", "restart output frequency", "" + "dump_last", "if true, write restart on last time step of simulation", "" "dwavefreq", "widths of wave frequency bins", "1/s" "dxhy", "combination of HTE values", "" "dxt", "width of T cell (:math:`\Delta x`) through the middle", "m" @@ -202,12 +202,12 @@ either Celsius or Kelvin units). "eps16", "a small number", "10\ :math:`^{-16}`" "esno(n)", "energy of melting of snow per unit area (in category n)", "J/m\ :math:`^2`" "evap", "evaporative water flux", "kg/m\ :math:`^2`/s" - "ew_boundary_type", ":math:`\bullet` type of east-west boundary condition", "" + "ew_boundary_type", "type of east-west boundary condition", "" "eyc", "coefficient for calculating the parameter E, 0\ :math:`<` eyc :math:`<`\ 1", "0.36" "**F**", "", "" "faero_atm", "aerosol deposition rate", "kg/m\ :math:`^2`/s" "faero_ocn", "aerosol flux to the ocean", "kg/m\ :math:`^2`/s" - "fbot_xfer_type", ":math:`\bullet` type of heat transfer coefficient under ice", "" + "fbot_xfer_type", "type of heat transfer coefficient under ice", "" "fcondtop(n)(_f)", "conductive heat flux", "W/m\ :math:`^2`" "fcor_blk", "Coriolis parameter", "1/s" "ferrmax", "max allowed energy flux error (thermodynamics)", "1x :math:`10^{-3}` W/m\ :math:`^2`" @@ -238,7 +238,7 @@ either Celsius or Kelvin units). "flw", "incoming longwave radiation", "W/m\ :math:`^2`" "flwout", "outgoing longwave radiation", "W/m\ :math:`^2`" "fm", "Coriolis parameter * mass in U cell", "kg/s" - "formdrag", ":math:`\bullet` calculate form drag", "" + "formdrag", "calculate form drag", "" "fpond", "fresh water flux to ponds", "kg/m\ :math:`^2`/s" "fr_resp", "bgc respiration fraction", "0.05" "frain", "rainfall rate", "kg/m\ :math:`^2`/s" @@ -249,7 +249,7 @@ either Celsius or Kelvin units). "frzmlt", "freezing/melting potential", "W/m\ :math:`^2`" "frzmlt_init", "freezing/melting potential at beginning of time step", "W/m\ :math:`^2`" "frzmlt_max", "maximum magnitude of freezing/melting potential", "1000. W/m\ :math:`^2`" - "frzpnd", ":math:`\bullet` Stefan refreezing of melt ponds", "‘hlid’" + "frzpnd", "Stefan refreezing of melt ponds", "‘hlid’" "fsalt", "net salt flux to ocean", "kg/m\ :math:`^2`/s" "fsalt_ai", "grid-box-mean salt flux to ocean (fsalt)", "kg/m\ :math:`^2`/s" "fsens", "sensible heat flux", "W/m\ :math:`^2`" @@ -269,42 +269,43 @@ either Celsius or Kelvin units). "fswthru_ai", "grid-box-mean shortwave penetrating to ocean (fswthru)", "W/m\ :math:`^2`" "fyear", "current forcing data year", "" "fyear_final", "last forcing data year", "" - "fyear_init", ":math:`\bullet` initial forcing data year", "" + "fyear_init", "initial forcing data year", "" "**G**", "", "" "gravit", "gravitational acceleration", "9.80616 m/s\ :math:`^2`" - "grid_file", ":math:`\bullet` input file for grid info", "" - "grid_format", ":math:`\bullet` format of grid files", "" - "grid_type", ":math:`\bullet` ‘rectangular’, ‘displaced_pole’, ‘column’ or ‘regional’", "" - "gridcpl_file", ":math:`\bullet` input file for coupling grid info", "" + "grid_file", "input file for grid info", "" + "grid_format", "format of grid files", "" + "grid_type", "‘rectangular’, ‘displaced_pole’, ‘column’ or ‘regional’", "" + "gridcpl_file", "input file for coupling grid info", "" "grow_net", "specific biogeochemistry growth rate per grid cell", "s :math:`^{-1}`" "Gstar", "piecewise-linear ridging participation function parameter", "0.15" "**H**", "", "" "halo_info", "information for updating ghost cells", "" - "heat_capacity", ":math:`\bullet` if true, use salinity-dependent thermodynamics", "T" + "heat_capacity", "if true, use salinity-dependent thermodynamics", "T" "hfrazilmin", "minimum thickness of new frazil ice", "0.05 m" "hi_min", "minimum ice thickness for thinnest ice category", "0.01 m" "hi_ssl", "ice surface scattering layer thickness", "0.05 m" "hicen", "ice thickness in category n", "m" - "highfreq", ":math:`\bullet` high-frequency atmo coupling", "F" + "highfreq", "high-frequency atmo coupling", "F" "hin_old", "ice thickness prior to growth/melt", "m" "hin_max", "category thickness limits", "m" - "hist_avg", ":math:`\bullet` if true, write averaged data instead of snapshots", "T" - "histfreq", ":math:`\bullet` units of history output frequency: y, m, w, d or 1", "" - "histfreq_n", ":math:`\bullet` integer output frequency in histfreq units", "" - "history_dir", ":math:`\bullet` path to history output files", "" - "history_file", ":math:`\bullet` history output file prefix", "" - "history_format", ":math:`\bullet` history file format", "" - "history_precision", ":math:`\bullet` history output precision: 4 or 8 byte", "4" + "hist_avg", "if true, write averaged data instead of snapshots", "T" + "histfreq", "units of history output frequency: y, m, w, d or 1", "" + "histfreq_base", "reference date for history output", "" + "histfreq_n", "integer output frequency in histfreq units", "" + "history_dir", "path to history output files", "" + "history_file", "history output file prefix", "" + "history_format", "history file format", "" + "history_precision", "history output precision: 4 or 8 byte", "4" "hm", "land/boundary mask, thickness (T-cell)", "" "hmix", "ocean mixed layer depth", "20. m" "hour", "hour of the year", "" "hp0", "pond depth at which shortwave transition to bare ice occurs", "0.2 m" - "hp1", ":math:`\bullet` critical ice lid thickness for topo ponds (dEdd)", "0.01 m" + "hp1", "critical ice lid thickness for topo ponds (dEdd)", "0.01 m" "hpmin", "minimum melt pond depth (shortwave)", "0.005 m" "hpondn", "melt pond depth", "m" "hs_min", "minimum thickness for which :math:`T_s` is computed", "1.\ :math:`\times`\ 10\ :math:`^{-4}` m" - "hs0", ":math:`\bullet` snow depth at which transition to ice occurs (dEdd)", "0.03 m" - "hs1", ":math:`\bullet` snow depth of transition to pond ice", "0.03 m" + "hs0", "snow depth at which transition to ice occurs (dEdd)", "0.03 m" + "hs1", "snow depth of transition to pond ice", "0.03 m" "hs_ssl", "snow surface scattering layer thickness", "0.04 m" "Hstar", "determines mean thickness of ridged ice", "25. m" "HTE", "length of eastern edge (:math:`\Delta y`) of T-cell", "m" @@ -317,13 +318,13 @@ either Celsius or Kelvin units). "iblkp","block on which to write debugging data", "" "i(j)block", "Cartesian i,j position of block", "" "ice_hist_field", "type for history variables", "" - "ice_ic", ":math:`\bullet` choice of initial conditions (see :ref:`tab-ic`)", "" + "ice_ic", "choice of initial conditions (see :ref:`tab-ic`)", "" "ice_stdout", "unit number for standard output", "" "ice_stderr", "unit number for standard error output", "" "ice_ref_salinity", "reference salinity for ice–ocean exchanges", "4. ppt" "icells", "number of grid cells with specified property (for vectorization)", "" - "iceruf", ":math:`\bullet` ice surface roughness at atmosphere interface", "5.\ :math:`\times`\ 10\ :math:`^{-4}` m" - "iceruf_ocn", ":math:`\bullet` under-ice roughness (at ocean interface)", "0.03 m" + "iceruf", "ice surface roughness at atmosphere interface", "5.\ :math:`\times`\ 10\ :math:`^{-4}` m" + "iceruf_ocn", "under-ice roughness (at ocean interface)", "0.03 m" "icetmask", "ice extent mask (T-cell)", "" "iceumask", "ice extent mask (U-cell)", "" "idate", "the date at the end of the current time step (yyyymmdd)", "" @@ -332,45 +333,45 @@ either Celsius or Kelvin units). "igrid", "interface points for vertical bio grid", "" "i(j)hi", "last i(j) index of physical domain (local)", "" "i(j)lo", "first i(j) index of physical domain (local)", "" - "incond_dir", ":math:`\bullet` directory to write snapshot of initial condition", "" - "incond_file", ":math:`\bullet` prefix for initial condition file name", "" + "incond_dir", "directory to write snapshot of initial condition", "" + "incond_file", "prefix for initial condition file name", "" "int_kind", "definition of an integer", "selected_real_kind(6)" "integral_order", "polynomial order of quadrature integrals in remapping", "3" "ip, jp", "local processor coordinates on which to write debugging data", "" "istep", "local step counter for time loop", "" - "istep0", ":math:`\bullet` number of steps taken in previous run", "0" + "istep0", "number of steps taken in previous run", "0" "istep1", "total number of steps at current time step", "" "Iswabs", "shortwave radiation absorbed in ice layers", "W/m\ :math:`^2`" "**J**", "", "" "**K**", "", "" - "kalg", ":math:`\bullet` absorption coefficient for algae", "" + "kalg", "absorption coefficient for algae", "" "kappav", "visible extinction coefficient in ice, wavelength\ :math:`<`\ 700nm", "1.4 m\ :math:`^{-1}`" - "kcatbound", ":math:`\bullet` category boundary formula", "" - "kdyn", ":math:`\bullet` type of dynamics (1 = EVP, 2 = EAP, 3 = VP, 0,-1 = off)", "1" + "kcatbound", "category boundary formula", "" + "kdyn", "type of dynamics (1 = EVP, 2 = EAP, 3 = VP, 0,-1 = off)", "1" "kg_to_g", "kg to g conversion factor", "1000." "kice", "thermal conductivity of fresh ice (:cite:`Bitz99`)", "2.03 W/m/deg" - "kitd", ":math:`\bullet` type of itd conversions (0 = delta function, 1 = linear remap)", "1" - "kmt_file", ":math:`\bullet` input file for land mask info", "" - "krdg_partic", ":math:`\bullet` ridging participation function", "1" - "krdg_redist", ":math:`\bullet` ridging redistribution function", "1" + "kitd", "type of itd conversions (0 = delta function, 1 = linear remap)", "1" + "kmt_file", "input file for land mask info", "" + "krdg_partic", "ridging participation function", "1" + "krdg_redist", "ridging redistribution function", "1" "krgdn", "mean ridge thickness per thickness of ridging ice", "" "kseaice", "thermal conductivity of ice for zero-layer thermodynamics", "2.0 W/m/deg" "ksno", "thermal conductivity of snow", "0.30 W/m/deg" - "kstrength", ":math:`\bullet` ice stength formulation (1= :cite:`Rothrock75`, 0 = :cite:`Hibler79`)", "1" - "ktherm", ":math:`\bullet` thermodynamic formulation (0 = zero-layer, 1 = :cite:`Bitz99`, 2 = mushy)", "" + "kstrength", "ice stength formulation (1= :cite:`Rothrock75`, 0 = :cite:`Hibler79`)", "1" + "ktherm", "thermodynamic formulation (0 = zero-layer, 1 = :cite:`Bitz99`, 2 = mushy)", "" "**L**", "", "" "l_brine", "flag for brine pocket effects", "" "l_fixed_area", "flag for prescribing remapping fluxes", "" - "l_mpond_fresh", ":math:`\bullet` if true, retain (topo) pond water until ponds drain", "" - "latpnt", ":math:`\bullet` desired latitude of diagnostic points", "degrees N" + "l_mpond_fresh", "if true, retain (topo) pond water until ponds drain", "" + "latpnt", "desired latitude of diagnostic points", "degrees N" "latt(u)_bounds", "latitude of T(U) grid cell corners", "degrees N" - "lcdf64", ":math:`\bullet` if true, use 64-bit  format", "" + "lcdf64", "if true, use 64-bit  format", "" "Lfresh", "latent heat of melting of fresh ice = Lsub - Lvap", "J/kg" "lhcoef", "transfer coefficient for latent heat", "" "lmask_n(s)", "northern (southern) hemisphere mask", "" "local_id", "local address of block in current distribution", "" "log_kind", "definition of a logical variable", "kind(.true.)" - "lonpnt", ":math:`\bullet` desired longitude of diagnostic points", "degrees E" + "lonpnt", "desired longitude of diagnostic points", "degrees E" "lont(u)_bounds", "longitude of T(U) grid cell corners", "degrees E" "Lsub", "latent heat of sublimation for fresh water", "2.835\ :math:`\times` 10\ :math:`^6` J/kg" "ltripole_grid", "flag to signal use of tripole grid", "" @@ -381,9 +382,9 @@ either Celsius or Kelvin units). "m1", "constant for lateral melt rate", "1.6\ :math:`\times`\ 10\ :math:`^{-6}` m/s deg\ :math:`^{-m2}`" "m2", "constant for lateral melt rate", "1.36" "m2_to_km2", "m\ :math:`^2` to km\ :math:`^2` conversion", "1\ :math:`\times`\ 10\ :math:`^{-6}`" - "maskhalo_bound", ":math:`\bullet` turns on *bound_state* halo masking", "" - "maskhalo_dyn", ":math:`\bullet` turns on dynamics halo masking", "" - "maskhalo_remap", ":math:`\bullet` turns on transport halo masking", "" + "maskhalo_bound", "turns on *bound_state* halo masking", "" + "maskhalo_dyn", "turns on dynamics halo masking", "" + "maskhalo_remap", "turns on transport halo masking", "" "master_task", "task ID for the controlling processor", "" "max_blocks", "maximum number of blocks per processor", "" "max_ntrcr", "maximum number of tracers available", "5" @@ -397,24 +398,25 @@ either Celsius or Kelvin units). "mlt_onset", "day of year that surface melt begins", "" "mmonth", "model month number", "" "monthp", "previous month number", "" - "month_init", ":math:`\bullet` the initial month", "" + "month_init", "the initial month", "" "mps_to_cmpdy", "m per s to cm per day conversion", "8.64\ :math:`\times`\ 10\ :math:`^6`" "msec", "model seconds elasped into day", "" "mtask", "local processor number that writes debugging data", "" - "mu_rdg", ":math:`\bullet` e-folding scale of ridged ice", "" + "mu_rdg", "e-folding scale of ridged ice", "" "myear", "model year", "" + "myear_max", "maximum allowed model year", "" "my_task", "task ID for the current processor", "" "**N**", "", "" "n_aero", "number of aerosol species", "" - "natmiter", ":math:`\bullet` number of atmo boundary layer iterations", "5" + "natmiter", "number of atmo boundary layer iterations", "5" "nblocks", "number of blocks on current processor", "" "nblocks_tot", "total number of blocks in decomposition", "" "nblocks_x(y)", "total number of blocks in x(y) direction", "" "nbtrcr", "number of biology tracers", "" "ncat", "number of ice categories", "5" "ncat_hist", "number of categories written to history", "" - "ndte", ":math:`\bullet` number of subcycles", "120" - "ndtd", ":math:`\bullet` number of dynamics/advection steps under thermo", "1" + "ndte", "number of subcycles", "120" + "ndtd", "number of dynamics/advection steps under thermo", "1" "new_day", "flag for beginning new day", "" "new_hour", "flag for beginning new hour", "" "new_month", "flag for beginning new month", "" @@ -428,10 +430,10 @@ either Celsius or Kelvin units). "nit", "nitrate concentration", "mmol/m\ :math:`^3`" "nlt_bgc_[chem]", "ocean sources and sinks for biogeochemistry", "" "nml_filename", "namelist file name", "" - "nprocs", ":math:`\bullet` total number of processors", "" - "npt", ":math:`\bullet` total run length values associate with npt_unit", "" + "nprocs", "total number of processors", "" + "npt", "total run length values associate with npt_unit", "" "npt_unit", "units of the run length, number set by npt", "" - "ns_boundary_type", ":math:`\bullet` type of north-south boundary condition", "" + "ns_boundary_type", "type of north-south boundary condition", "" "nslyr", "number of snow layers in each category", "" "nspint", "number of solar spectral intervals", "" "nstreams", "number of history output streams (frequencies)", "" @@ -459,11 +461,11 @@ either Celsius or Kelvin units). "nx(y)_global", "number of physical gridpoints in x(y) direction, global domain", "" "**O**", "", "" "ocean_bio", "concentrations of bgc constituents in the ocean", "" - "oceanmixed_file", ":math:`\bullet` data file containing ocean forcing data", "" - "oceanmixed_ice", ":math:`\bullet` if true, use internal ocean mixed layer", "" - "ocn_data_dir", ":math:`\bullet` directory for ocean forcing data", "" - "ocn_data_format", ":math:`\bullet` format of ocean forcing files", "" - "ocn_data_type", ":math:`\bullet` source of surface temperature, salinity data", "" + "oceanmixed_file", "data file containing ocean forcing data", "" + "oceanmixed_ice", "if true, use internal ocean mixed layer", "" + "ocn_data_dir", "directory for ocean forcing data", "" + "ocn_data_format", "format of ocean forcing files", "" + "ocn_data_type", "source of surface temperature, salinity data", "" "omega", "angular velocity of Earth", "7.292\ :math:`\times`\ 10\ :math:`^{-5}` rad/s" "opening", "rate of ice opening due to divergence and shear", "1/s" "optics_file", "optics filename associated with modal aerosols", "" @@ -490,10 +492,10 @@ either Celsius or Kelvin units). "p6", "3/5", "" "p666", "2/3", "" "p75", "3/4", "" - "phi_c_slow_mode", ":math:`\bullet` critical liquid fraction", "" - "phi_i_mushy", ":math:`\bullet` solid fraction at lower boundary", "" + "phi_c_slow_mode", "critical liquid fraction", "" + "phi_i_mushy", "solid fraction at lower boundary", "" "phi_sk", "skeletal layer porosity", "" - "phi_snow", ":math:`\bullet` snow porosity for brine height tracer", "" + "phi_snow", "snow porosity for brine height tracer", "" "pi", ":math:`\pi`", "" "pi2", ":math:`2\pi`", "" "pih", ":math:`\pi /2`", "" @@ -501,14 +503,14 @@ either Celsius or Kelvin units). "pi(j,b,m)loc", "x (y, block, task) location of diagnostic points", "" "plat", "grid latitude of diagnostic points", "" "plon", "grid longitude of diagnostic points", "" - "pndaspect", ":math:`\bullet` aspect ratio of pond changes (depth:area)", "0.8" - "pointer_file", ":math:`\bullet` input file for restarting", "" + "pndaspect", "aspect ratio of pond changes (depth:area)", "0.8" + "pointer_file", "input file for restarting", "" "potT", "atmospheric potential temperature", "K" "PP_net", "total primary productivity per grid cell", "mg C/m\ :math:`^2`/s" - "precip_units", ":math:`\bullet` liquid precipitation data units", "" - "print_global", ":math:`\bullet` if true, print global data", "F" - "print_points", ":math:`\bullet` if true, print point data", "F" - "processor_shape", ":math:`\bullet` descriptor for processor aspect ratio", "" + "precip_units", "liquid precipitation data units", "" + "print_global", "if true, print global data", "F" + "print_points", "if true, print point data", "F" + "processor_shape", "descriptor for processor aspect ratio", "" "prs_sig", "replacement pressure", "N/m" "Pstar", "ice strength parameter", "2.75\ :math:`\times`\ 10\ :math:`^4`\ N/m\ :math:`^2`" "puny", "a small positive number", "1\ :math:`\times`\ 10\ :math:`^{-11}`" @@ -522,12 +524,12 @@ either Celsius or Kelvin units). "R_C2N", "algal carbon to nitrate factor", "7. mole/mole" "R_gC2molC", "mg/mmol carbon", "12.01 mg/mole" "R_chl2N", "algal chlorophyll to nitrate factor", "3. mg/mmol" - "R_ice", ":math:`\bullet` parameter for Delta-Eddington ice albedo", "" - "R_pnd", ":math:`\bullet` parameter for Delta-Eddington pond albedo", "" + "R_ice", "parameter for Delta-Eddington ice albedo", "" + "R_pnd", "parameter for Delta-Eddington pond albedo", "" "R_S2N", "algal silicate to nitrate factor", "0.03 mole/mole" - "R_snw", ":math:`\bullet` parameter for Delta-Eddington snow albedo", "" + "R_snw", "parameter for Delta-Eddington snow albedo", "" "r16_kind", "definition of quad precision", "selected_real_kind(26)", "" - "Rac_rapid_mode", ":math:`\bullet` critical Rayleigh number", "10" + "Rac_rapid_mode", "critical Rayleigh number", "10" "rad_to_deg", "degree-radian conversion", ":math:`180/\pi`" "radius", "earth radius", "6.37\ :math:`\times`\ 10\ :math:`^6` m" "rdg_conv", "convergence for ridging", "1/s" @@ -535,21 +537,21 @@ either Celsius or Kelvin units). "real_kind", "definition of single precision real", "selected_real_kind(6)" "refindx", "refractive index of sea ice", "1.310" "revp", "real(revised_evp)", "" - "restart", ":math:`\bullet` if true, initialize using restart file instead of defaults", "T" - "restart_age", ":math:`\bullet` if true, read age restart file", "" - "restart_bgc", ":math:`\bullet` if true, read bgc restart file", "" - "restart_dir", ":math:`\bullet` path to restart/dump files", "" - "restart_file", ":math:`\bullet` restart file prefix", "" - "restart_format", ":math:`\bullet` restart file format", "" - "restart_[tracer]", ":math:`\bullet` if true, read tracer restart file", "" - "restart_ext", ":math:`\bullet` if true, read/write halo cells in restart file", "" - "restart_coszen", ":math:`\bullet` if true, read/write coszen in restart file", "" - "restore_bgc", ":math:`\bullet` if true, restore nitrate/silicate to data", "" - "restore_ice", ":math:`\bullet` if true, restore ice state along lateral boundaries", "" - "restore_ocn", ":math:`\bullet` restore sst to data", "" - "revised_evp", ":math:`\bullet` if true, use revised EVP parameters and approach", "" - "rfracmin", ":math:`\bullet` minimum melt water fraction added to ponds", "0.15" - "rfracmax", ":math:`\bullet` maximum melt water fraction added to ponds", "1.0" + "restart", "if true, initialize ice state from file", "T" + "restart_age", "if true, read age restart file", "" + "restart_bgc", "if true, read bgc restart file", "" + "restart_dir", "path to restart/dump files", "" + "restart_file", "restart file prefix", "" + "restart_format", "restart file format", "" + "restart_[tracer]", "if true, read tracer restart file", "" + "restart_ext", "if true, read/write halo cells in restart file", "" + "restart_coszen", "if true, read/write coszen in restart file", "" + "restore_bgc", "if true, restore nitrate/silicate to data", "" + "restore_ice", "if true, restore ice state along lateral boundaries", "" + "restore_ocn", "restore sst to data", "" + "revised_evp", "if true, use revised EVP parameters and approach", "" + "rfracmin", "minimum melt water fraction added to ponds", "0.15" + "rfracmax", "maximum melt water fraction added to ponds", "1.0" "rhoa", "air density", "kg/m\ :math:`^3`" "rhofresh", "density of fresh water", "1000.0 kg/m\ :math:`^3`" "rhoi", "density of ice", "917. kg/m\ :math:`^3`" @@ -559,11 +561,11 @@ either Celsius or Kelvin units). "rnilyr", "real(nlyr)", "" "rside", "fraction of ice that melts laterally", "" "rsnw_fresh", "freshly fallen snow grain radius", "100. :math:`\times` 10\ :math:`^{-6}` m" - "rsnw_melt", ":math:`\bullet` melting snow grain radius", "1000. :math:`\times` 10\ :math:`^{-6}` m" + "rsnw_melt", "melting snow grain radius", "1000. :math:`\times` 10\ :math:`^{-6}` m" "rsnw_nonmelt", "nonmelting snow grain radius", "500. :math:`\times` 10\ :math:`^{-6}` m" "rsnw_sig", "standard deviation of snow grain radius", "250. :math:`\times` 10\ :math:`^{-6}` m" - "runid", ":math:`\bullet` identifier for run", "" - "runtype", ":math:`\bullet` type of initialization used", "" + "runid", "identifier for run", "" + "runtype", "type of initialization used", "" "**S**", "", "" "s11, s12, s22", "stress tensor components", "" "saltmax", "max salinity, at ice base (:cite:`Bitz99`)", "3.2 ppt" @@ -571,11 +573,11 @@ either Celsius or Kelvin units). "seabed_stress", "if true, calculate seabed stress", "F" "seabed_stress_method", "method for calculating seabed stress (‘LKD’ or ‘probabilistic’)", "LKD" "secday", "number of seconds in a day", "86400." - "sec_init", ":math:`\bullet` the initial second", "" + "sec_init", "the initial second", "" "shcoef", "transfer coefficient for sensible heat", "" "shear", "strain rate II component", "1/s" "shlat", "southern latitude of artificial mask edge", "30\ :math:`^\circ`\ N" - "shortwave", ":math:`\bullet` flag for shortwave parameterization (‘ccsm3’ or ‘dEdd’)", "" + "shortwave", "flag for shortwave parameterization (‘ccsm3’ or ‘dEdd’)", "" "sig1(2)", "principal stress components (diagnostic)", "" "sil", "silicate concentration", "mmol/m\ :math:`^3`" "sinw", "sine of the turning angle in water", "0." @@ -583,7 +585,7 @@ either Celsius or Kelvin units). "sk_l", "skeletal layer thickness", "0.03 m" "snoice", "snow–ice formation", "m" "snowpatch", "length scale for parameterizing nonuniform snow coverage", "0.02 m" - "skl_bgc", ":math:`\bullet` biogeochemistry on/off", "" + "skl_bgc", "biogeochemistry on/off", "" "spval", "special value (single precision)", ":math:`10^{30}`", "" "spval_dbl", "special value (double precision)", ":math:`10^{30}`", "" "ss_tltx(y)", "sea surface in the x(y) direction", "m/m" @@ -613,7 +615,7 @@ either Celsius or Kelvin units). "tcstr", "string identifying T grid for history variables", "" "Tf", "freezing temperature", "C" "Tffresh", "freezing temp of fresh ice", "273.15 K" - "tfrz_option", ":math:`\bullet` form of ocean freezing temperature", "" + "tfrz_option", "form of ocean freezing temperature", "" "thinS", "minimum ice thickness for brine tracer", "" "timesecs", "total elapsed time in seconds", "s" "time_beg", "beginning time for history averages", "" @@ -630,19 +632,19 @@ either Celsius or Kelvin units). "Tmin", "minimum allowed internal temperature", "-100. C" "Tmltz", "melting temperature profile of ice", "" "Tocnfrz", "temperature of constant freezing point parameterization", "-1.8 C" - "tr_aero", ":math:`\bullet` if true, use aerosol tracers", "" - "tr_bgc_[tracer]", ":math:`\bullet` if true, use biogeochemistry tracers", "" - "tr_brine", ":math:`\bullet` if true, use brine height tracer", "" - "tr_FY", ":math:`\bullet` if true, use first-year area tracer", "" - "tr_iage", ":math:`\bullet` if true, use ice age tracer", "" - "tr_lvl", ":math:`\bullet` if true, use level ice area and volume tracers", "" - "tr_pond_cesm", ":math:`\bullet` if true, use CESM melt pond scheme", "" - "tr_pond_lvl", ":math:`\bullet` if true, use level-ice melt pond scheme", "" - "tr_pond_topo", ":math:`\bullet` if true, use topo melt pond scheme", "" + "tr_aero", "if true, use aerosol tracers", "" + "tr_bgc_[tracer]", "if true, use biogeochemistry tracers", "" + "tr_brine", "if true, use brine height tracer", "" + "tr_FY", "if true, use first-year area tracer", "" + "tr_iage", "if true, use ice age tracer", "" + "tr_lvl", "if true, use level ice area and volume tracers", "" + "tr_pond_cesm", "if true, use CESM melt pond scheme", "" + "tr_pond_lvl", "if true, use level-ice melt pond scheme", "" + "tr_pond_topo", "if true, use topo melt pond scheme", "" "trcr", "ice tracers", "" "trcr_depend", "tracer dependency on basic state variables", "" "Tref", "2m atmospheric reference temperature", "K" - "trestore", ":math:`\bullet` restoring time scale", "days" + "trestore", "restoring time scale", "days" "tripole", "if true, block lies along tripole boundary", "" "tripoleT", "if true, tripole boundary is T-fold; if false, U-fold", "" "Tsf_errmax", "max allowed :math:`T_{\mathit sf}` error (thermodynamics)", "5.\ :math:`\times`\ 10\ :math:`^{-4}`\ deg" @@ -661,10 +663,10 @@ either Celsius or Kelvin units). "umax_stab", "ice speed threshold (diagnostics)", "1. m/s" "umin", "min wind speed for turbulent fluxes", "1. m/s" "uocn", "ocean current in the x-direction", "m/s" - "update_ocn_f", ":math:`\bullet` if true, include frazil ice fluxes in ocean flux fields", "" - "use_leap_years", ":math:`\bullet` if true, include leap days", "" - "use_restart_time", ":math:`\bullet` if true, use date from restart file", "" - "ustar_min", ":math:`\bullet` minimum friction velocity under ice", "" + "update_ocn_f", "if true, include frazil ice fluxes in ocean flux fields", "" + "use_leap_years", "if true, include leap days", "" + "use_restart_time", "if true, use date from restart file", "" + "ustar_min", "minimum friction velocity under ice", "" "ucstr", "string identifying U grid for history variables", "" "uvel", "x-component of ice velocity", "m/s" "uvel_init", "x-component of ice velocity at beginning of time step", "m/s" @@ -690,15 +692,15 @@ either Celsius or Kelvin units). "wavefreq", "wave frequencies", "1/s" "wind", "wind speed", "m/s" "write_history", "if true, write history now", "" - "write_ic", ":math:`\bullet` if true, write initial conditions", "" + "write_ic", "if true, write initial conditions", "" "write_restart", "if 1, write restart now", "" "**X**", "", "" "**Y**", "", "" - "ycycle", ":math:`\bullet` number of years in forcing data cycle", "" + "ycycle", "number of years in forcing data cycle", "" "yday", "day of the year, computed in the model calendar", "" "yield_curve", "type of yield curve", "ellipse" "yieldstress11(12, 22)", "yield stress tensor components", "" - "year_init", ":math:`\bullet` the initial year", "" + "year_init", "the initial year", "" "**Z**", "", "" "zlvl", "atmospheric level height (momentum)", "m" "zlvs", "atmospheric level height (scalars)", "m" diff --git a/doc/source/user_guide/ug_case_settings.rst b/doc/source/user_guide/ug_case_settings.rst index 225ab91b1..562a5bc81 100644 --- a/doc/source/user_guide/ug_case_settings.rst +++ b/doc/source/user_guide/ug_case_settings.rst @@ -162,6 +162,8 @@ setup_nml "", "``m``", "write restart every ``dumpfreq_n`` months", "" "", "``y``", "write restart every ``dumpfreq_n`` years", "" "", "``1``", "write restart every ``dumpfreq_n`` time step", "" + "``dumpfreq_base``", "init", "restart output frequency relative to year_init, month_init, day_init", "init" + "", "zero", "restart output frequency relative to year-month-day of 0000-01-01", "" "``dumpfreq_n``", "integer", "write restart frequency with ``dumpfreq``", "1" "``dump_last``", "logical", "write restart on last time step of simulation", "``.false.``" "``hist_avg``", "logical", "write time-averaged data", "``.true.``" @@ -171,6 +173,8 @@ setup_nml "", "``x``", "unused frequency stream (not written)", "" "", "``y``", "write history every ``histfreq_n`` years", "" "", "``1``", "write history every ``histfreq_n`` time step", "" + "``histfreq_base``", "init", "history output frequency relative to year_init, month_init, day_init", "zero" + "", "zero", "history output frequency relative to year-month-day of 0000-01-01", "" "``histfreq_n``", "integer array", "frequency history output is written with ``histfreq``", "1,1,1,1,1" "``history_dir``", "string", "path to history output directory", "'./'" "``history_file``", "string", "output file for history", "'iceh'" @@ -200,7 +204,7 @@ setup_nml "``pointer_file``", "string", "restart pointer filename", "'ice.restart_file'" "``print_global``", "logical", "print global sums diagnostic data", "``.true.``" "``print_points``", "logical", "print diagnostic data for two grid points", "``.false.``" - "``restart``", "logical", "initialize using restart file", "``.false.``" + "``restart``", "logical", "exists but deprecated, now set internally based on other inputs", "" "``restart_dir``", "string", "path to restart directory", "'./'" "``restart_ext``", "logical", "read/write halo cells in restart files", "``.false.``" "``restart_file``", "string", "output file prefix for restart dump", "'iced'" @@ -211,7 +215,7 @@ setup_nml "", "``initial``", "start from ``ice_ic``", "" "``sec_init``", "integer", "the initial second if not using restart", "0" "``use_leap_years``", "logical", "include leap days", "``.false.``" - "``use_restart_time``", "logical", "set initial date using restart file", "``.true.``" + "``use_restart_time``", "logical", "set initial date using restart file on initial runtype only", "``.false.``" "``version_name``", "string", "model version", "'unknown_version_name'" "``write_ic``", "logical", "write initial condition", "``.false.``" "``year_init``", "integer", "the initial year if not using restart", "0" @@ -225,10 +229,10 @@ grid_nml :widths: 15, 15, 30, 15 "", "", "", "" - "``bathymetry_file``", "string", "name of bathymetry file to be read", "‘unknown_bathymetry_file’" - "``bathymetry_format``", "``default``", "NetCDF depth field", "‘default’" + "``bathymetry_file``", "string", "name of bathymetry file to be read", "'unknown_bathymetry_file'" + "``bathymetry_format``", "``default``", "NetCDF depth field", "'default'" "", "``pop``", "pop thickness file in cm in ascii format", "" - "``close_boundaries``", "logical", "force two gridcell wide land mask on boundaries", "``.false.`` + "``close_boundaries``", "logical", "force two gridcell wide land mask on boundaries", "``.false.``" "``dxrect``", "real", "x-direction grid spacing for rectangular grid in cm", "0.0" "``dyrect``", "real", "y-direction grid spacing for rectangular grid in cm", "0.0" "``gridcpl_file``", "string", "input file for coupling grid info", "'unknown_gridcpl_file'" diff --git a/doc/source/user_guide/ug_implementation.rst b/doc/source/user_guide/ug_implementation.rst index 8a733f4cc..4ec49022d 100644 --- a/doc/source/user_guide/ug_implementation.rst +++ b/doc/source/user_guide/ug_implementation.rst @@ -269,14 +269,20 @@ routines, is adopted from POP. The boundary routines perform boundary communications among processors when MPI is in use and among blocks whenever there is more than one block per processor. -Open/cyclic boundary conditions are the default in CICE. Closed boundary -conditions are not supported currently. The physical -domain can still be closed using the land mask and this can be done in -namelist with the ``close_boundaries`` namelist which forces the mask -on the boundary to land for a two gridcell depth. In our bipolar, -displaced-pole grids, one row of grid cells along the north and south -boundaries is located on land, and along east/west domain boundaries not -masked by land, periodic conditions wrap the domain around the globe. +Boundary conditions are defined by the ``ns_boundary_type`` and ``ew_boundary_type`` +namelist inputs. Valid values are ``open`` and ``cyclic``. In addition, +``tripole`` and ``tripoleT`` are options for the ``ns_boundary_type``. +Closed boundary conditions are not supported currently. +The domain can be physically closed with the ``close_boundaries`` +namelist which forces a land mask on the boundary with a two gridcell depth. +Where the boundary is land, the boundary_type settings play no role. +For example, in the displaced-pole grids, at least one row of grid cells along the north +and south boundaries is land. Along the east/west domain boundaries not +masked by land, periodic conditions wrap the domain around the globe. In +this example, +the appropriate namelist settings are ``nsboundary_type`` = ``open``, +``ew_boundary_type`` = ``cyclic``, and ``close_boundaries`` = ``.false.``. + CICE can be run on regional grids with open boundary conditions; except for variables describing grid lengths, non-land halo cells along the grid edge must be filled by restoring them to specified values. The @@ -556,7 +562,8 @@ The internal variables ``istep``, ``istep0``, and ``istep1`` keep track of the number of timesteps. ``istep`` is the counter for the current run and is set to 0 at the start of each run. ``istep0`` is the step count at the start of a long multi-restart run, and -``istep1`` is the step count of a long multi-restart run. +``istep1`` is the step count of a long multi-restart run and +is continuous across model restarts. In general, the time manager should be advanced by calling *advance\_timestep*. This subroutine in **ice\_calendar.F90** @@ -568,10 +575,68 @@ The namelist variable ``use_restart_time`` specifies whether to use the time and step numbers saved on a restart file or whether to set the initial model time to the namelist values defined by ``year_init``, ``month_init``, ``day_init``, and ``sec_init``. -Normally, ``use_restart_time`` is set to false on the initial run -and then set to true on subsequent restart runs of the same -case to allow time to advance thereafter. More information about -the restart capability can be found here, :ref:`restartfiles`. +Normally, ``use_restart_time`` is set to false on the initial run. +In continue mode, use_restart_time is ignored and the restart +date is always used to initialize the model run. +More information about the restart capability can be found in :ref:`restartfiles`. + +Several different calendars are supported including noleap (365 days +per year), 360-day (twelve 30 day months per year), and gregorian +(leap days every 4 years except every 100 years except every 400 +years). The gregorian calendar in CICE is formally a proleptic gregorian +calendar without any discontinuties over time. The calendar is set +by specifying ``days_per_year`` and ``use_leap_years`` in the +namelist, and the following combinations are supported, + +.. _tab-cal: + +.. table:: Supported Calendar Options + + +----------------------+----------------------+------------+ + | ``days_per_year`` | ``use_leap_years`` | calendar | + +======================+======================+============+ + | 365 | false | noleap | + +----------------------+----------------------+------------+ + | 365 | true | gregorian | + +----------------------+----------------------+------------+ + | 360 | false | 360-day | + +----------------------+----------------------+------------+ + + +The history (:ref:`history`) and restart (:ref:`restartfiles`) +outputs and frequencies are specified in namelist and +are computed relative to a reference date defined by the namelist +``histfreq_base`` and ``dumpfreq_base``. Valid values for each are +`zero` and `init`. If set to `zero`, all output will be relative +to the absolute reference year-month-day date, 0000-01-01. This is the default +value for ``histfreq_base``, so runs with different initial +dates will have identical output. If the ``histfreq_base`` or +``dumpfreq_base`` are set to `init`, all frequencies +will be relative to the model initial date specified by ``year_init``, +``month_init``, and ``day_init``. ``sec_init`` plays no role +in setting output frequencies. `init` is the default for +``dumpfreq_base`` and makes it easy to generate restarts +5 or 10 model days after startup as we often do in testing. + +In general, output is always +written at the start of the year, month, day, or hour without +any ability to shift the phase. For instance, monthly output +is always written on the first of the month. It is not possible, +for instance, to write monthly data once a month on the 10th of the month. +In the same way, quarterly data for Dec-Jan-Feb vs Jan-Feb-Mar +is not easily controlled. A better approach is to create monthly +data and then to aggregate to quarters as a post-processing step. +The history and restart (``histfreq``, ``dumpfreq``) setting `1` +indicates output at a frequency of timesteps. This is the character +`1` as opposed to the integer 1. This frequency output +is computed using ``istep1``, the model timestep. This +may vary with each run depending on several factors including the +model timestep, initial date, and value of ``istep0``. + +The model year is limited by some integer math. In particular, calculation +of elapsed hours in **ice\_calendar.F90**, and the model year is +limited to the value of ``myear_max`` set in that file. Currently, that's +200,000 years. The time manager was updated in early 2021. The standalone model was modified, and some tests were done in a coupled framework after @@ -622,18 +687,68 @@ layers and the ice thickness distribution defined by ``kcatbound`` = 0. Restart information for some tracers is also included in the netCDF restart files. -Three namelist variables control model initialization, ``ice_ic``, ``runtype``, -and ``restart``, as described in :ref:`tab-ic`. It is possible to do an -initial run from a file **filename** in two ways: (1) set runtype = -‘initial’, restart = true and ice\_ic = **filename**, or (2) runtype = -‘continue’ and pointer\_file = **./restart/ice.restart\_file** where -**./restart/ice.restart\_file** contains the line -“./restart/[filename]". The first option is convenient when repeatedly -starting from a given file when subsequent restart files have been -written. With this arrangement, the tracer restart flags can be set to -true or false, depending on whether the tracer restart data exist. With -the second option, tracer restart flags are set to ‘continue’ for all -active tracers. +Three namelist variables generally control model initialization, ``runtype``, +``ice_ic``, and ``use_restart_time``. The valid values for ``runtype`` +are ``initial`` or ``continue``. When ``runtype`` = `continue`, the +restart filename is stored in a small text (pointer) file, ``use_restart_time`` +is forced to true and ``ice_ic`` plays no role. When ``runtype`` = +`initial`, ``ice_ic`` has three options, ``none``, ``default``, +or *filename*. These initial states are no-ice, latitudinal dependent +ice, and ice defined by a file respectively. In `initial` mode, +``use_restart_time`` should generally be set to false and the initial +time is then defined by ``year_init``, ``month_init``, ``day_init``, +and ``sec_init``. These combinations options are summarized in +:ref:`tab-ic`. + +Restart files and initial condition files are generally the same format and +can be the same files. +They contain the model state from a particular instance in time. In general, +that state includes the physical and dynamical state as well as the +state of optional tracers. Reading of various tracer groups can +be independently controlled by various restart flags. In other +words, a restart file can be used to initialize a new configuration +where new tracers are used (i.e. bgc). In that case, the physical +state of the model will be read, but if bgc tracers don't exist on the +restart file, they can be initialized from scratch. + +In ``continue`` mode, a pointer file is used to restart the model. +In this mode, the CICE model writes out a small text (pointer) file +to the run directory that names the most recent restart file. On +restart, the model reads the pointer file which defines the +name of the restart file. The model then reads that restart file. +By having this feature, the ice namelist does not need to be constantly +updated with the latest +restart filename, and the model can be automatically resubmitted. +Manually editing the pointer file in the middle of a run will reset +the restart filename and allow the run to continue. + +Table :ref:`tab-ic` shows ``runtype``, ``ice_ic``, and ``use_restart_time`` +namelist combinations for initializing +the model. If namelist defines the start date, it's done with +``year_init``, ``month_init``, ``day_init``, and ``sec_init``. + +.. _tab-ic: + +.. table:: Ice Initialization + + +----------------+--------------------------+--------------------------------------+----------------------------------------+ + | ``runtype`` | ``ice_ic`` | ``use_restart_time`` | Note | + +================+==========================+======================================+========================================+ + | `initial` | `none` | not used | no ice, | + | | | | namelist defines start date | + +----------------+--------------------------+--------------------------------------+----------------------------------------+ + | `initial` | `default` | not used | latitude dependent internal ic, | + | | | | namelist defines start date | + +----------------+--------------------------+--------------------------------------+----------------------------------------+ + | `initial` | *filename* | false | read ice state from filename, | + | | | | namelist defines start date | + +----------------+--------------------------+--------------------------------------+----------------------------------------+ + | `initial` | *filename* | true | read ice state from filename, | + | | | | restart file defines start date | + +----------------+--------------------------+--------------------------------------+----------------------------------------+ + | `continue` | not used | not used | pointer file defines restart file, | + | | | | restart file defines start date | + +----------------+--------------------------+--------------------------------------+----------------------------------------+ An additional namelist option, ``restart_ext`` specifies whether halo cells are included in the restart files. This option is useful for tripole and @@ -653,27 +768,6 @@ and are intended merely to provide guidance for the user to write his or her own routines. Whether the code is to be run in stand-alone or coupled mode is determined at compile time, as described below. -Table :ref:`tab-ic` shows ice initial state resulting from combinations of -``ice_ic``, ``runtype`` and ``restart``. :math:`^a`\ If false, restart is reset to -true. :math:`^b`\ restart is reset to false. :math:`^c`\ ice_ic is -reset to ‘none.’ - -.. _tab-ic: - -.. table:: Ice Initial State - - +----------------+--------------------------+--------------------------------------+----------------------------------------+ - | ice\_ic | | | | - +================+==========================+======================================+========================================+ - | | initial/false | initial/true | continue/true (or false\ :math:`^a`) | - +----------------+--------------------------+--------------------------------------+----------------------------------------+ - | none | no ice | no ice\ :math:`^b` | restart using **pointer\_file** | - +----------------+--------------------------+--------------------------------------+----------------------------------------+ - | default | SST/latitude dependent | SST/latitude dependent\ :math:`^b` | restart using **pointer\_file** | - +----------------+--------------------------+--------------------------------------+----------------------------------------+ - | **filename** | no ice\ :math:`^c` | start from **filename** | restart using **pointer\_file** | - +----------------+--------------------------+--------------------------------------+----------------------------------------+ - .. _parameters: ********************************** @@ -788,7 +882,8 @@ format approach or style for some io packages. Model output data can be written as instantaneous or average data as specified by the ``hist_avg`` namelist flag. The data is written at the period(s) given by ``histfreq`` and -``histfreq_n``, and written to binary or netCDF files prepended by ``history_file`` +``histfreq_n`` relative to a reference date specified by ``histfreq_base``. +The files are written to binary or netCDF files prepended by ``history_file`` in **ice_in**. These settings for history files are set in the **setup_nml** section of **ice_in** (see :ref:`tabnamelist`). If ``history_file`` = ‘iceh’ then the @@ -827,7 +922,9 @@ files, no matter what the frequency is.) If there are no namelist flags with a given ``histfreq`` value, or if an element of ``histfreq_n`` is 0, then no file will be written at that frequency. The output period can be discerned from the filenames. All history streams will be either instantaneous -or averaged as specified by the ``hist_avg`` namelist setting. +or averaged as specified by the ``hist_avg`` namelist setting and the frequency +will be relative to a reference date specified by ``histfreq_base``. More +information about how the frequency is computed is found in :ref:`timemanager`. For example, in the namelist: @@ -835,6 +932,7 @@ For example, in the namelist: histfreq = ’1’, ’h’, ’d’, ’m’, ’y’ histfreq_n = 1, 6, 0, 1, 1 + histfreq_base = 'zero' hist_avg = .true. f_hi = ’1’ f_hs = ’h’ @@ -1016,7 +1114,8 @@ format approach or style for some io packages. The restart files created by CICE contain all of the variables needed for a full, exact restart. The filename begins with the character string ‘iced.’, and the restart dump frequency is given by the namelist -variables ``dumpfreq`` and ``dumpfreq_n``. The pointer to the filename from +variables ``dumpfreq`` and ``dumpfreq_n`` relative to a reference date +specified by ``dumpfreq_base``. The pointer to the filename from which the restart data is to be read for a continuation run is set in ``pointer_file``. The code assumes that auxiliary binary tracer restart files will be identified using the same pointer and file name prefix, @@ -1028,9 +1127,9 @@ Additional namelist flags provide further control of restart behavior. ``dump_last`` = true causes a set of restart files to be written at the end of a run when it is otherwise not scheduled to occur. The flag ``use_restart_time`` enables the user to choose to use the model date -provided in the restart files. If ``use_restart_time`` = false then the +provided in the restart files for initial runs. If ``use_restart_time`` = false then the initial model date stamp is determined from the namelist parameters, -``year_init``, ``month_init``, ``day_init``, and ``sec_init``.. +``year_init``, ``month_init``, ``day_init``, and ``sec_init``. lcdf64 = true sets 64-bit netCDF output, allowing larger file sizes. Routines for gathering, scattering and (unformatted) reading and writing @@ -1042,14 +1141,7 @@ restarts on the various tripole grids. They are accessed by setting available when using PIO; in this case extra halo update calls fill ghost cells for tripole grids (do not use PIO for regional grids). -Two netCDF restart files are available for the CICE v5 and v6 code distributions +Restart files are available for the CICE code distributions for the gx3 and gx1 grids (see :ref:`force` for information about obtaining these files). -They were created using the default v5 model -configuration, but -initialized with no ice. The gx3 case was run for 1 year using the 1997 -forcing data provided with the code. The gx1 case was run for 20 years, -so that the date of restart in the file is 1978-01-01. Note that the -restart dates provided in the restart files can be overridden using the -namelist variables ``use_restart_time``, ``year_init``, ``month_init``, -``day_init``, and ``sec_init``. The -forcing time can also be overridden using ``fyear_init``. +They were created using the default model +configuration and run for multiple years using the JRA55 forcing.