Skip to content

Commit

Permalink
fix bug in drivers/mct/cesm1/CICE_RunMod.F90 and update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
apcraig committed May 18, 2020
1 parent 42fcd54 commit abf6199
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,11 @@ subroutine ice_write_hist (ns)
a,'-',a,'-',a,' at ',a,':',a)
status = pio_put_att(File,pio_global,'history',trim(start_time))

status = pio_put_att(File,pio_global,'io_flavor','io_pio')
if (history_format == 'pio_pnetcdf') then
status = pio_put_att(File,pio_global,'io_flavor','io_pio pnetcdf')
else
status = pio_put_att(File,pio_global,'io_flavor','io_pio netcdf')
endif

!-----------------------------------------------------------------
! end define mode
Expand Down
2 changes: 1 addition & 1 deletion cicecore/drivers/mct/cesm1/CICE_RunMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ subroutine coupling_prep (iblk)
fsens, flat, fswabs, flwout, evap, Tref, Qref, &
scale_fluxes, frzmlt_init, frzmlt, Uref, wind
use ice_flux_bgc, only: faero_ocn, fiso_ocn, Qref_iso, fiso_evap, &
fzsal_ai, fzsal_g_ai, flux_bio, flux_bio_ai
fzsal_ai, fzsal_g_ai, flux_bio, flux_bio_aim, &
fnit, fsil, famm, fdmsp, fdms, fhum, fdust, falgalN, &
fdoc, fdic, fdon, ffep, ffed, bgcflux_ice_to_ocn
use ice_grid, only: tmask
Expand Down
3 changes: 3 additions & 0 deletions doc/source/cice_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ either Celsius or Kelvin units).
"a3Dz", "history field accumulations, 3D vertical", ""
"a3Db", "history field accumulations, 3D bio grid", ""
"a3Dc", "history field accumulations, 3D categories", ""
"a3Df", "history field accumulations, 3D fsd", ""
"a4Di", "history field accumulations, 4D categories, vertical ice", ""
"a4Db", "history field accumulations, 4D categories, vertical bio grid", ""
"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", ""
"advection", ":math:`\bullet` type of advection algorithm used (‘remap’ or ‘upwind’)", "remap"
Expand Down Expand Up @@ -274,6 +276,7 @@ either Celsius or Kelvin units).
"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", ""
"hm", "land/boundary mask, thickness (T-cell)", ""
"hmix", "ocean mixed layer depth", "20. m"
"hour", "hour of the year", ""
Expand Down
8 changes: 6 additions & 2 deletions doc/source/user_guide/ug_case_settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ Table of namelist options
"","", "path/file", "restart file name", ""
"","``restart``", "true/false", "initialize using restart file", "``.true.``"
"","``use_restart_time``", "true/false", "set initial date using restart file", "``.true.``"
"","``restart_format``", "nc", "read/write  restart files (use with PIO)", ""
"","", "bin", "read/write binary restart files", ""
"","``restart_format``", "string", "restart file format", "default"
"","", "default", "read/write restart files in default format", ""
"","", "pio_pnetcdf", "read/write restart files with pnetcdf in pio", ""
"","``lcdf64``", "true/false", "if true, use 64-bit  format", ""
"","``numin``", "integer", "minimum internal IO unit number", "11"
"","``numax``", "integer", "maximum internal IO unit number", "99"
Expand Down Expand Up @@ -140,6 +141,9 @@ Table of namelist options
"","", "false", "write snapshots of data", ""
"","``history_dir``", "path/", "path to history output directory", ""
"","``history_file``", "filename prefix", "output file for history", "‘iceh’"
"","``history_format``", "string", "history file format", "default"
"","", "default", "read/write restart files in default format", ""
"","", "pio_pnetcdf", "read/write restart files with pnetcdf in pio", ""
"","``write_ic``", "true/false", "write initial condition", ""
"","``incond_dir``", "path/", "path to initial condition directory", ""
"","``incond_file``", "filename prefix", "output file for initial condition", "‘iceh’"
Expand Down
24 changes: 18 additions & 6 deletions doc/source/user_guide/ug_implementation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,15 @@ Model output
History files
*************

CICE provides restart data in binary unformatted or netCDF formats via
separate implementations of binary, netcdf, and pio source code under the
directory **infrastructure/io**. ``ICE_IOTYPE`` defined in cice.settings
specifies the IO type and defines which source code directory is compiled.
At the present time, binary, netcdf, and PIO are exclusive formats
for history and restart files, and history and restart file must use the same
io package. The namelist variable ``history_format`` further refines the
format approach or style for some io packages.

Model output data is averaged over the period(s) given by ``histfreq`` and
``histfreq_n``, and written to binary or netCDF files prepended by ``history_file``
in **ice_in**. These settings for history files are set in the
Expand All @@ -711,7 +720,7 @@ depending on the output file format chosen in **cice.settings** (set
``ICE_IOTYPE``). The netCDF history files are CF-compliant; header information for
data contained in the netCDF files is displayed with the command ``ncdump -h
filename.nc``. Parallel netCDF output is available using the PIO library; the
attribute ``io_flavor`` distinguishes output files written with PIO from
output file attribute ``io_flavor`` distinguishes output files written with PIO from
those written with standard netCDF. With binary files, a separate header
file is written with equivalent information. Standard fields are output
according to settings in the **icefields\_nml** section of **ice\_in**
Expand Down Expand Up @@ -890,11 +899,14 @@ The timers use *MPI\_WTIME* for parallel runs and the F90 intrinsic
Restart files
*************

CICE provides restart data in binary unformatted or netCDF formats, via
the ``ICE_IOTYPE`` flag in **cice.settings** and namelist variable
``restart_format``. Restart and history files must use the same format. As
with the history output, there is also an option for writing parallel netCDF
restart files using PIO.
CICE provides restart data in binary unformatted or netCDF formats via
separate implementations of binary, netcdf, and pio source code under the
directory **infrastructure/io**. ``ICE_IOTYPE`` defined in cice.settings
specifies the IO type and defines which source code directory is compiled.
At the present time, binary, netcdf, and PIO are exclusive formats
for history and restart files, and history and restart file must use the same
io package. The namelist variable ``restart_format`` further refines the
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
Expand Down

0 comments on commit abf6199

Please sign in to comment.