Skip to content

Commit

Permalink
Merge pull request #262 from nusbaume/nuopc_update
Browse files Browse the repository at this point in the history
Update NUOPC cap and externals to match CAM
  • Loading branch information
nusbaume authored Jun 6, 2024
2 parents 56db6e6 + 3665a4a commit b7d9dbb
Show file tree
Hide file tree
Showing 17 changed files with 2,788 additions and 4,335 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ buildnmlc
test/include/*.mod
test/include/*.o
test/unit/tmp
test/system/*.log
test/system/cime-tests.o*

# Ignore editor temporaries and backups
*.swp
Expand Down
25 changes: 12 additions & 13 deletions Externals.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[ccs_config]
tag = ccs_config_cesm0.0.78
tag = ccs_config_cesm0.0.106
protocol = git
repo_url = https://github.com/ESMCI/ccs_config_cesm
local_path = ccs_config
Expand All @@ -13,37 +13,37 @@ local_path = components/cice5
required = True

[cice6]
tag = cesm_cice6_4_1_10
tag = cesm_cice6_5_0_7
protocol = git
repo_url = https://github.com/ESCOMP/CESM_CICE
local_path = components/cice
externals = Externals.cfg
required = True

[cmeps]
tag = cmeps0.14.39
tag = cmeps0.14.60
protocol = git
repo_url = https://github.com/ESCOMP/CMEPS.git
local_path = components/cmeps
required = True

[cdeps]
tag = cdeps1.0.21
tag = cdeps1.0.33
protocol = git
repo_url = https://github.com/ESCOMP/CDEPS.git
local_path = components/cdeps
externals = Externals_CDEPS.cfg
required = True

[cpl7]
tag = cpl77.0.6
tag = cpl77.0.8
protocol = git
repo_url = https://github.com/ESCOMP/CESM_CPL7andDataComps
local_path = components/cpl7
required = True

[share]
tag = share1.0.17
tag = share1.0.18
protocol = git
repo_url = https://github.com/ESCOMP/CESM_share
local_path = share
Expand All @@ -64,46 +64,45 @@ local_path = libraries/parallelio
required = True

[cime]
tag = cime6.0.175
tag = cime6.0.236_httpsbranch01
protocol = git
repo_url = https://github.com/ESMCI/cime
local_path = cime
required = True

[cism]
tag = cismwrap_2_1_96
tag = cismwrap_2_1_100
protocol = git
repo_url = https://github.com/ESCOMP/CISM-wrapper
local_path = components/cism
externals = Externals_CISM.cfg
required = True

[clm]
tag = ctsm5.1.dev139
tag = ctsm5.2.005
protocol = git
repo_url = https://github.com/ESCOMP/CTSM
local_path = components/clm
externals = Externals_CLM.cfg
required = True

[fms]
# Older tag than CESM as there is a compilation error mismatch
tag = fi_20211011
tag = fi_230818
protocol = git
repo_url = https://github.com/ESCOMP/FMS_interface
local_path = libraries/FMS
externals = Externals_FMS.cfg
required = True

[mosart]
tag = mosart1_0_48
tag = mosart1_0_49
protocol = git
repo_url = https://github.com/ESCOMP/MOSART
local_path = components/mosart
required = True

[rtm]
tag = rtm1_0_78
tag = rtm1_0_79
protocol = git
repo_url = https://github.com/ESCOMP/RTM
local_path = components/rtm
Expand Down
2 changes: 1 addition & 1 deletion Externals_CAM.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ required = True
local_path = src/physics/ncar_ccpp
protocol = git
repo_url = https://github.com/ESCOMP/atmospheric_physics
tag = atmos_phys0_02_003
tag = atmos_phys0_02_006
required = True

[externals_description]
Expand Down
5 changes: 4 additions & 1 deletion src/control/cam_comp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ module cam_comp

subroutine cam_init(caseid, ctitle, model_doi_url, &
initial_run_in, restart_run_in, branch_run_in, &
calendar, brnch_retain_casename, aqua_planet, &
post_assim_in, calendar, &
brnch_retain_casename, aqua_planet, &
single_column, scmlat, scmlon, &
eccen, obliqr, lambm0, mvelpp, &
perpetual_run, perpetual_ymd, &
Expand Down Expand Up @@ -105,6 +106,7 @@ subroutine cam_init(caseid, ctitle, model_doi_url, &
logical, intent(in) :: initial_run_in ! is inital run?
logical, intent(in) :: restart_run_in ! is restart run?
logical, intent(in) :: branch_run_in ! is branch run?
logical, intent(in) :: post_assim_in ! true => resume mode
character(len=cs), intent(in) :: calendar ! Calendar type
! brnch_retain_casename is a flag to allow a branch to use the same
! caseid as the run being branched from.
Expand Down Expand Up @@ -155,6 +157,7 @@ subroutine cam_init(caseid, ctitle, model_doi_url, &
initial_run_in=initial_run_in, &
restart_run_in=restart_run_in, &
branch_run_in=branch_run_in, &
post_assim_in=post_assim_in, &
aqua_planet_in=aqua_planet, &
brnch_retain_casename_in=brnch_retain_casename)

Expand Down
22 changes: 16 additions & 6 deletions src/control/cam_control_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,21 @@ module cam_control_mod
logical, protected :: initial_run ! startup mode which only requires a minimal initial file
logical, protected :: restart_run ! continue a previous run; requires a restart file
logical, protected :: branch_run ! branch from a previous run; requires a restart file
logical, protected :: post_assim ! We are resuming after a pause

logical, protected :: adiabatic ! true => no physics
logical, protected :: ideal_phys ! true => run Held-Suarez (1994) physics
logical, protected :: kessler_phys ! true => run Kessler physics
logical, protected :: tj2016_phys ! true => run tj2016 physics
logical, protected :: grayrad_phys ! true => run gray radiation (frierson) physics
logical, protected :: simple_phys ! true => adiabatic or ideal_phys or kessler_phys
! or tj2016
! or tj2016 or grayrad
logical, protected :: aqua_planet ! Flag to run model in "aqua planet" mode
logical, protected :: moist_physics ! true => moist physics enabled, i.e.,
! (.not. ideal_phys) .and. (.not. adiabatic)
! (.not. ideal_phys) .and. (.not. adiabatic)

logical, protected :: brnch_retain_casename ! true => branch run may use same caseid as
! the run being branched from
! the run being branched from

real(r8), protected :: eccen ! Earth's eccentricity factor (unitless) (typically 0 to 0.1)
real(r8), protected :: obliqr ! Earth's obliquity in radians
Expand All @@ -53,13 +55,15 @@ module cam_control_mod
!==============================================================================

subroutine cam_ctrl_init(caseid_in, ctitle_in, initial_run_in, &
restart_run_in, branch_run_in, aqua_planet_in, brnch_retain_casename_in)
restart_run_in, branch_run_in, post_assim_in, &
aqua_planet_in, brnch_retain_casename_in)

character(len=cl), intent(in) :: caseid_in ! case ID
character(len=cl), intent(in) :: ctitle_in ! case title
logical, intent(in) :: initial_run_in ! true => inital run
logical, intent(in) :: restart_run_in ! true => restart run
logical, intent(in) :: branch_run_in ! true => branch run
logical, intent(in) :: post_assim_in ! true => resume mode
logical, intent(in) :: aqua_planet_in ! Flag to run model in "aqua planet" mode
logical, intent(in) :: brnch_retain_casename_in ! Flag to allow a branch to use the same
! caseid as the run being branched from.
Expand All @@ -73,6 +77,7 @@ subroutine cam_ctrl_init(caseid_in, ctitle_in, initial_run_in, &
initial_run = initial_run_in
restart_run = restart_run_in
branch_run = branch_run_in
post_assim = post_assim_in

aqua_planet = aqua_planet_in

Expand All @@ -87,6 +92,8 @@ subroutine cam_ctrl_init(caseid_in, ctitle_in, initial_run_in, &
write(iulog,*) ' Restart of an earlier run'
else if (branch_run) then
write(iulog,*) ' Branch of an earlier run'
else if (post_assim) then
write(iulog,*) ' DART run using CAM initial mode'
else
write(iulog,*) ' Initial run'
end if
Expand Down Expand Up @@ -137,11 +144,12 @@ subroutine cam_ctrl_set_physics_type()
suite_name = suite_names(1)

adiabatic = trim(suite_name) == 'adiabatic'
ideal_phys = trim(suite_name) == 'held_suarez'
ideal_phys = trim(suite_name) == 'held_suarez_1994'
kessler_phys = trim(suite_name) == 'kessler'
tj2016_phys = trim(suite_name) == 'tj2016'
grayrad_phys = trim(suite_name) == 'grayrad'

simple_phys = adiabatic .or. ideal_phys .or. kessler_phys .or. tj2016_phys
simple_phys = adiabatic .or. ideal_phys .or. kessler_phys .or. tj2016_phys .or. grayrad_phys

moist_physics = .not. (adiabatic .or. ideal_phys)

Expand All @@ -159,6 +167,8 @@ subroutine cam_ctrl_set_physics_type()
write(iulog,*) 'Run model with Kessler warm-rain physics forcing'
else if (tj2016_phys) then
write(iulog,*) 'Run model with Thatcher-Jablonowski (2016) physics forcing (moist Held-Suarez)'
else if (grayrad_phys) then
write(iulog,*) 'Run model with Frierson (2006) gray radiation physics'
end if
end if

Expand Down
2 changes: 1 addition & 1 deletion src/control/cam_logfile.F90
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ subroutine cam_set_log_unit(unit_num)

integer, intent(in) :: unit_num

! Change iulog to unit_num on this PE or log a waring
! Change iulog to unit_num on this PE or log a warning
! The log unit number can be set at most once per run
if (iulog_set) then
write(iulog, *) 'cam_set_log_unit: Cannot change log unit during run'
Expand Down
Loading

0 comments on commit b7d9dbb

Please sign in to comment.