From fa89d3dddd3d5942861e385340aa1e3473b99c6d Mon Sep 17 00:00:00 2001 From: Philippe Blain Date: Fri, 3 May 2019 13:38:39 -0400 Subject: [PATCH 1/3] Add verification for dumpfreq namelist value in ice_init.F90 --- cicecore/cicedynB/general/ice_init.F90 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cicecore/cicedynB/general/ice_init.F90 b/cicecore/cicedynB/general/ice_init.F90 index eebed7686..e1ecc8eab 100644 --- a/cicecore/cicedynB/general/ice_init.F90 +++ b/cicecore/cicedynB/general/ice_init.F90 @@ -889,6 +889,15 @@ 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) == 'm' .or. & + trim(dumpfreq) == 'd' .or. trim(dumpfreq) == 'h' )) 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''' + endif + endif ice_IOUnitsMinUnit = numin ice_IOUnitsMaxUnit = numax From 6510356ab6d8f6617314756114c6ba9bd0fc7a8a Mon Sep 17 00:00:00 2001 From: Philippe Blain Date: Fri, 3 May 2019 15:00:18 -0400 Subject: [PATCH 2/3] Add option to write restarts at each time step --- cicecore/cicedynB/general/ice_init.F90 | 9 ++++++--- cicecore/shared/ice_calendar.F90 | 5 +++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cicecore/cicedynB/general/ice_init.F90 b/cicecore/cicedynB/general/ice_init.F90 index e1ecc8eab..e71d96933 100644 --- a/cicecore/cicedynB/general/ice_init.F90 +++ b/cicecore/cicedynB/general/ice_init.F90 @@ -890,12 +890,15 @@ subroutine input_data abort_flag = 19 endif - if (.not.(trim(dumpfreq) == 'y' .or. trim(dumpfreq) == 'm' .or. & - trim(dumpfreq) == 'd' .or. trim(dumpfreq) == 'h' )) then + 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''' + write(nu_diag,*) subname//' WARNING: Allowed values : ''y'', ''m'', ''d'', ''h'', ''1''' endif endif 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 From 7e0319448b870198fdca22475c9dacfaf5b30981 Mon Sep 17 00:00:00 2001 From: Philippe Blain Date: Fri, 3 May 2019 15:05:08 -0400 Subject: [PATCH 3/3] Update documentation --- doc/source/cice_index.rst | 2 +- doc/source/user_guide/ug_case_settings.rst | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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", ""