diff --git a/cicecore/cicedynB/general/ice_init.F90 b/cicecore/cicedynB/general/ice_init.F90 index eebed7686..e71d96933 100644 --- a/cicecore/cicedynB/general/ice_init.F90 +++ b/cicecore/cicedynB/general/ice_init.F90 @@ -889,6 +889,18 @@ subroutine input_data if (my_task == master_task) write(nu_diag,*) subname//' ERROR: formdrag=F and fbot_xfer_type=Cdn_ocn' abort_flag = 19 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. & + trim(dumpfreq) == 'h' .or. trim(dumpfreq) == 'H' .or. & + trim(dumpfreq) == '1' )) then + if (my_task == master_task) then + write(nu_diag,*) subname//' WARNING: unrecognized dumpfreq=', trim(dumpfreq) + write(nu_diag,*) subname//' WARNING: No restarts files will be written' + write(nu_diag,*) subname//' WARNING: Allowed values : ''y'', ''m'', ''d'', ''h'', ''1''' + endif + endif ice_IOUnitsMinUnit = numin ice_IOUnitsMaxUnit = numax diff --git a/cicecore/shared/ice_calendar.F90 b/cicecore/shared/ice_calendar.F90 index 85b827038..a767bdfd7 100644 --- a/cicecore/shared/ice_calendar.F90 +++ b/cicecore/shared/ice_calendar.F90 @@ -272,6 +272,11 @@ subroutine calendar(ttime) endif enddo + if (dumpfreq == '1') then + if (mod(istep1, dumpfreq_n)==0) & + write_restart = 1 + endif + if (istep > 1) then do ns = 1, nstreams diff --git a/doc/source/cice_index.rst b/doc/source/cice_index.rst index ef2c7d95d..e48e523ca 100644 --- a/doc/source/cice_index.rst +++ b/doc/source/cice_index.rst @@ -162,7 +162,7 @@ either Celsius or Kelvin units). "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 or d", "" + "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", "" "dxhy", "combination of HTE values", "" diff --git a/doc/source/user_guide/ug_case_settings.rst b/doc/source/user_guide/ug_case_settings.rst index 832550331..8986bc9d8 100755 --- a/doc/source/user_guide/ug_case_settings.rst +++ b/doc/source/user_guide/ug_case_settings.rst @@ -111,6 +111,7 @@ Table of namelist options "","", "``m``", "write restart every ``dumpfreq_n`` months", "" "","", "``d``", "write restart every ``dumpfreq_n`` days", "" "","", "``h``", "write restart every ``dumpfreq_n`` hours", "" + "","", "``1``", "write restart every ``dumpfreq_n`` time step", "" "","``dumpfreq_n``", "integer", "frequency restart data is written", "1" "\*","``dump_last``", "true/false", "if true, write restart on last time step of simulation", "" "","", "", "**Model Output**", "" @@ -130,7 +131,7 @@ Table of namelist options "","", "``m``", "write history every ``histfreq_n`` months", "" "","", "``d``", "write history every ``histfreq_n`` days", "" "","", "``h``", "write history every ``histfreq_n`` hours", "" - "","", "``1``", "write history every time step", "" + "","", "``1``", "write history every ``histfreq_n`` time step", "" "","", "``x``", "unused frequency stream (not written)", "" "","``histfreq_n``", "integer array", "frequency history output is written", "" "","", "0", "do not write to history", ""