Skip to content

Commit

Permalink
Add NUOPC cap and rearrange driver directory (CICE-Consortium#376)
Browse files Browse the repository at this point in the history
* NUOPC branch

* initial CICE6 port to CESM+NUOPC

* clean up nu_diag initialization due to complexity added by nuopc cap

* add nu_diag_set flag to work around the nu_diag setting in the nuopc cap

* update cice driver directories

* update documentation

* update documentation

* update documentation

* update documentation

* fix minor bug in cice.setup that affects settings parsing without final carriage return

* update documentation

* rename drivers/subroutine to drivers/direct and update documentation
  • Loading branch information
apcraig authored Nov 2, 2019
1 parent 2a2b107 commit 85f7dac
Show file tree
Hide file tree
Showing 40 changed files with 8,388 additions and 36 deletions.
2 changes: 1 addition & 1 deletion cice.setup
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ EOF2
cat ${ICE_SCRIPTS}/options/set_env.${name} >> ${fsmods}
cat >> ${fimods} << EOF2
cat >> ${fsmods} << EOF2
EOF2
Expand Down
18 changes: 12 additions & 6 deletions cicecore/cicedynB/general/ice_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module ice_init
use ice_communicate, only: my_task, master_task, ice_barrier
use ice_constants, only: c0, c1, c2, c3, p2, p5
use ice_exit, only: abort_ice
use ice_fileunits, only: nu_nml, nu_diag, nml_filename, diag_type, &
use ice_fileunits, only: nu_nml, nu_diag, nu_diag_set, nml_filename, diag_type, &
ice_stdout, get_fileunit, release_fileunit, bfbflag, flush_fileunit, &
ice_IOUnitsMinUnit, ice_IOUnitsMaxUnit
#ifdef CESMCOUPLED
Expand Down Expand Up @@ -466,11 +466,17 @@ subroutine input_data
history_file = trim(runid) // ".cice" // trim(inst_suffix) //".h"
restart_file = trim(runid) // ".cice" // trim(inst_suffix) //".r"
incond_file = trim(runid) // ".cice" // trim(inst_suffix) //".i"
inquire(file='ice_modelio.nml'//trim(inst_suffix),exist=exists)
if (exists) then
call get_fileUnit(nu_diag)
call shr_file_setIO('ice_modelio.nml'//trim(inst_suffix),nu_diag)
end if
! Note by tcraig - this if test is needed because the nuopc cap sets
! nu_diag before this routine is called. This creates a conflict.
! In addition, in the nuopc cap, shr_file_setIO will fail if the
! needed namelist is missing (which it is in the CIME nuopc implementation)
if (.not. nu_diag_set) then
inquire(file='ice_modelio.nml'//trim(inst_suffix),exist=exists)
if (exists) then
call get_fileUnit(nu_diag)
call shr_file_setIO('ice_modelio.nml'//trim(inst_suffix),nu_diag)
end if
endif
else
! each task gets unique ice log filename when if test is true, for debugging
if (1 == 0) then
Expand Down
Loading

0 comments on commit 85f7dac

Please sign in to comment.