Skip to content

Commit

Permalink
updated namelist settings and documentation. all tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
davidclemenssewall committed Feb 3, 2023
1 parent 434e6d5 commit 9a7b67b
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 23 deletions.
11 changes: 5 additions & 6 deletions configuration/driver/icedrv_restart.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ module icedrv_restart
write_restart_aero, read_restart_aero

character (len=3), private :: nchar !

logical (kind=log_kind), private :: diag ! netCDF diagnostics flag

#ifdef USE_NETCDF
private :: &
Expand All @@ -43,8 +45,6 @@ module icedrv_restart

integer (kind=int_kind), private :: &
ncid ! ID for NetCDF file

logical (kind=log_kind), private :: diag ! netCDF diagnostics flag
#endif

public :: dumpfile, restartfile, final_restart, &
Expand Down Expand Up @@ -285,9 +285,6 @@ subroutine restartfile (ice_ic)
integer (kind=int_kind) :: &
status

! set this to .true. for netcdf diagnostic output
diag = .false.

! Query tracers
call icepack_query_tracer_indices(nt_Tsfc_out=nt_Tsfc, nt_sice_out=nt_sice, &
nt_qice_out=nt_qice, nt_qsno_out=nt_qsno)
Expand Down Expand Up @@ -315,6 +312,8 @@ subroutine restartfile (ice_ic)
read (nu_restart) istep0,time,time_forc
else if (restart_format == 'nc') then
#ifdef USE_NETCDF
! set this to .true. for netcdf diagnostic output
diag = .false.
! Open restart files
status = nf90_open(trim(filename), nf90_nowrite, ncid)
if (status /= nf90_noerr) call icedrv_system_abort(string=subname//'Couldnt open netcdf file', &
Expand Down Expand Up @@ -714,7 +713,7 @@ subroutine read_restart_snow()
call read_restart_field(nu_restart,trcrn(:,nt_smice+k-1,:),ncat,'smice'//trim(nchar))
call read_restart_field(nu_restart,trcrn(:,nt_smliq+k-1,:),ncat,'smliq'//trim(nchar))
call read_restart_field(nu_restart,trcrn(:,nt_rhos +k-1,:),ncat,'rhos'//trim(nchar))
call read_restart_field(nu_restart,trcrn(:,nt_rsnw +k-1,:),ncat,'rsnow'//trim(nchar))
call read_restart_field(nu_restart,trcrn(:,nt_rsnw +k-1,:),ncat,'rsnw'//trim(nchar))
enddo

end subroutine read_restart_snow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
history_format = 'nc'
restart_format = 'nc'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.restcdf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
restart_format = 'nc'
6 changes: 6 additions & 0 deletions configuration/scripts/tests/io_suite.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
restart col 1x1 debug,ionetcdf
smoke col 1x1 run1year,diag1,ionetcdf
restart col 1x1 debug,ionetcdf,histcdf
smoke col 1x1 run1year,diag1,ionetcdf,histcdf
restart col 1x1 debug,ionetcdf,restcdf
smoke col 1x1 run1year,diag1,ionetcdf,restcdf
restart col 1x1 debug,ionetcdf,histcdf,restcdf
smoke col 1x1 run1year,diag1,ionetcdf,histcdf,restcdf
32 changes: 16 additions & 16 deletions configuration/scripts/tests/netcdf_nobgc_suite.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Test Grid PEs Sets BFB-compare
restart col 1x1 debug,ionetcdf
restart col 1x1 diag1,ionetcdf
restart col 1x1 pondlvl,ionetcdf
restart col 1x1 pondtopo,ionetcdf
restart col 1x1 thermo1,ionetcdf
restart col 1x1 swccsm3,ionetcdf
restart col 1x1 isotope,ionetcdf
restart col 1x1 alt01,ionetcdf
restart col 1x1 alt02,ionetcdf
restart col 1x1 alt03,ionetcdf
restart col 1x1 alt04,ionetcdf
restart col 1x1 saltflux,ionetcdf
restart col 1x1 dyn,ionetcdf
restart col 1x1 fsd12,short,ionetcdf
restart col 1x1 snwitdrdg,snwgrain,ionetcdf
restart col 1x1 modal,ionetcdf
restart col 1x1 debug,ionetcdf,restcdf
restart col 1x1 diag1,ionetcdf,restcdf
restart col 1x1 pondlvl,ionetcdf,restcdf
restart col 1x1 pondtopo,ionetcdf,restcdf
restart col 1x1 thermo1,ionetcdf,restcdf
restart col 1x1 swccsm3,ionetcdf,restcdf
restart col 1x1 isotope,ionetcdf,restcdf
restart col 1x1 alt01,ionetcdf,restcdf
restart col 1x1 alt02,ionetcdf,restcdf
restart col 1x1 alt03,ionetcdf,restcdf
restart col 1x1 alt04,ionetcdf,restcdf
restart col 1x1 saltflux,ionetcdf,restcdf
restart col 1x1 dyn,ionetcdf,restcdf
restart col 1x1 fsd12,short,ionetcdf,restcdf
restart col 1x1 snwitdrdg,snwgrain,ionetcdf,restcdf
restart col 1x1 modal,ionetcdf,restcdf

1 change: 1 addition & 0 deletions doc/source/icepack_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ either Celsius or Kelvin units). Deprecated parameters are listed at the end.
"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", "history files are read/written in binary or netcdf format if set to 'bin' or 'nc' respectively", "bin"
"restart_[tracer]", ":math:`\bullet` if true, read tracer 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", ""
Expand Down
1 change: 1 addition & 0 deletions doc/source/user_guide/ug_case_settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ setup_nml
"``restart``", "logical", "initialize using restart file", "``.false.``"
"``restart_dir``", "string", "path to restart directory", "'./'"
"``restart_file``", "string", "output file prefix for restart dump", "'iced'"
"``restart_format``", "string", "history files are read/written in binary or netcdf format if set to 'bin' or 'nc' respectively", "'bin'"
"``use_leap_years``", "logical", "include leap days", "``.false.``"
"``year_init``", "integer", "the initial year if not using restart", "0"
"", "", "", ""
Expand Down

0 comments on commit 9a7b67b

Please sign in to comment.