Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instantaneous CAM-SIMA history infrastructure #274

Merged
merged 97 commits into from
Oct 25, 2024
Merged
Changes from 1 commit
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
8c066f0
Work on adding history
Jul 30, 2022
44f1660
Correct CIME paths for new CIME
Aug 2, 2022
ff48e4f
Start stripping out old stuff
Aug 2, 2022
56006e0
history test script and history unit test passing
Aug 7, 2022
ab8eb89
Added history external
Aug 7, 2022
478905b
Checkin to work on other branch
Feb 10, 2023
70dd483
Partial implementation of filename spec in new initialization scheme.
Mar 22, 2023
7f3bb0b
Improvements to reading configuration and associated tests
Mar 28, 2023
bbd2c4b
Resurrect Fortran history tests. Add ability to use real endrun for d…
Mar 31, 2023
ebb15c3
Merge remote-tracking branch 'ESCOMP/development' into history_court
Jun 26, 2023
e4fa834
Updating Externals_CAM.cfg to point to tj2016 atmospheric physics fork.
mwaxmonsky Mar 1, 2024
81224d5
Resolving merge conflicts with Externals_CAM.cfg
mwaxmonsky Mar 15, 2024
19e1586
Merging in updates from ccpp-framework and atmospheric_physcis. Upda…
mwaxmonsky Mar 15, 2024
680d5a8
Updates based on bug fixes and feedback.
mwaxmonsky Apr 3, 2024
fc35548
Updating to latest atmos_phys changes.
mwaxmonsky Apr 15, 2024
0eb4e8f
Merge branch 'development' into tj2016
mwaxmonsky Apr 25, 2024
b6e7ab4
merge forward; some namelist mods
May 6, 2024
dcb4a5c
Merge branch 'development' into tj2016
mwaxmonsky May 10, 2024
0b309d1
instantaneous file output working
May 28, 2024
05ddd39
move registry hist routines to new module; update precision logic
May 31, 2024
23bc2bb
merge to head of cam_development
May 31, 2024
1212435
add constituents handling for add and out fields
May 31, 2024
bc7eba2
code cleanup; better error handling; use new buffer interfaces
Jun 4, 2024
7baf682
code cleanup; fix for indexing on multiple files
Jun 5, 2024
c1acda8
fix and add hist_config tests
Jun 6, 2024
510ade6
add test for ic_names dictionary
Jun 6, 2024
0635898
more thoroughly separate physics history write from generate_registry
Jun 7, 2024
f76b038
Standard names update.
mwaxmonsky Jun 7, 2024
0f53092
Update to latest atmos_phys
mwaxmonsky Jun 7, 2024
7591a27
Update to match generated code from capgen.
mwaxmonsky Jun 7, 2024
52d9b06
create register history tests; update existing tests
Jun 8, 2024
abf329a
enable avg flags in registry; clear buffers
Jun 10, 2024
61963c8
remove fortran tests until we design a new framework
Jun 11, 2024
dc7fe59
merge to head of development
Jun 11, 2024
ae52006
fix mpi broadcast nl counts
Jun 12, 2024
222227a
Updating to latest atmos_phys.
mwaxmonsky Jun 14, 2024
138f410
Updating to latest atmos_phys.
mwaxmonsky Jun 17, 2024
c561a98
Updating to latest atmos_phys.
mwaxmonsky Jun 25, 2024
7eddc01
fix dimensions for parallel; move history to timestep_final
Jun 25, 2024
f1c8c30
merge to head of development
Jun 25, 2024
279a2ca
Fixing merge conflict with branch development
mwaxmonsky Jun 27, 2024
70c235c
Removing standard names csv file as no longer needed.
mwaxmonsky Jun 27, 2024
8a64782
Moving input names to standard names xml generator to tools directory.
mwaxmonsky Jun 27, 2024
dfd52b1
Updating to latest development ccpp-framework.
mwaxmonsky Jun 27, 2024
f63ebf2
Removing commented code and updating standard name.
mwaxmonsky Jun 27, 2024
4fd48f7
conditionally write instantaneous file
Jun 30, 2024
330509e
grid support clean-up
Jul 1, 2024
8319b96
remove pointers for iodesc to be passed to initdecomp
Jul 1, 2024
3ac1b72
Fixing pylint errors.
mwaxmonsky Jul 1, 2024
04fd2ba
fix for intel compiler; add "allocatable" for nl arrays
Jul 5, 2024
2c8c7c5
Merge remote-tracking branch 'ESCOMP/development' into HEAD
Jul 5, 2024
a1a5202
specify character len
Jul 5, 2024
8191b82
fix broadcasts for arrays of character arrays
Jul 5, 2024
1885961
fix frequency calculations; couple fixes for output
Jul 6, 2024
f7e9d1f
allow instantaneous and accumulated fields on same volume
Jul 8, 2024
6024452
Removing anomalous backslash in regex string by using raw string.
mwaxmonsky Jul 8, 2024
498dbbb
code cleanup
Jul 8, 2024
5a7c176
Adding missing docstrings.
mwaxmonsky Jul 9, 2024
2e4b42e
python clean-up
Jul 9, 2024
228fc52
python cleanup for test_hist_config
Jul 9, 2024
14dcf39
remove unnecessary python version check
Jul 9, 2024
d394b92
handle volume configured with no fields
Jul 9, 2024
d87e41f
fix hist_config test
Jul 9, 2024
1a58f15
fix write_nstep0 logic
Jul 9, 2024
67b0b21
add missing mpi_broadcast
Jul 10, 2024
0fe3378
Merge branch 'development' into tj2016
mwaxmonsky Jul 11, 2024
7e8562b
Addressing review comments.
mwaxmonsky Jul 12, 2024
dbdbbad
Addressing review comments and adding error checking to PIO calls.
mwaxmonsky Jul 15, 2024
0f673e2
Addressing review comments. Updating tphys variable name to better c…
mwaxmonsky Jul 15, 2024
277fbdf
Merge remote-tracking branch 'mwax/tj2016' into history_court
Jul 15, 2024
9bd89cb
use diagnostic schemes instead of python-generated history
Jul 22, 2024
512becc
bring to head of development
Jul 24, 2024
8ac3838
fix unit tests
Jul 24, 2024
48f0807
fix to enable no history configurations in nl
Aug 7, 2024
9525b75
remove pio dependency from modular history to enable unit testing
Aug 9, 2024
cf6aa62
merge to head of development
Aug 23, 2024
8322b49
address one wave of review comments
peverwhee Aug 29, 2024
ac7c8a2
Merge branch 'history_court' of https://github.com/peverwhee/CAM-SIMA…
peverwhee Aug 29, 2024
1f023c1
fix python unit tests
peverwhee Aug 29, 2024
0784bcf
fix another unit test
peverwhee Aug 29, 2024
68b73b5
address next chunk of reviewer comments; through cam_history_support
peverwhee Sep 5, 2024
39a66ed
next round of review comments; through cam_history.F90
peverwhee Sep 9, 2024
7db18c3
more cleanup of cam_hist_file
peverwhee Sep 12, 2024
a0533cc
put safe_endrun back
peverwhee Sep 13, 2024
e7a7fa1
append %f to user-specified filename template
peverwhee Sep 13, 2024
813f377
more python review comments; fix unit tests
peverwhee Sep 13, 2024
87a61f3
update regular expressions
peverwhee Sep 14, 2024
923089f
Merge remote-tracking branch 'ESCOMP/development' into history_court
Sep 16, 2024
ea14039
merge to head of cam development; update vertically integrated standa…
Sep 16, 2024
9120544
update standard names
Sep 16, 2024
3ea79b3
address review comments
Sep 25, 2024
b437934
fix unit tests
Sep 25, 2024
dd882d1
update atmospheric_physics hash; small clean-up to python
Oct 17, 2024
175b30b
merge to head of development
Oct 17, 2024
2f32b91
bring in formal history_output tag
Oct 22, 2024
cdf9222
fix num_samples bug
Oct 24, 2024
69ac862
merge to head of development
Oct 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
merge to head of development
Courtney Peverley committed Jun 11, 2024
commit dc7fe595d777759f634ade0651e38c6f5447473f
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
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
@@ -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
@@ -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
2 changes: 1 addition & 1 deletion Externals_CAM.cfg
Original file line number Diff line number Diff line change
@@ -24,7 +24,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]
5 changes: 4 additions & 1 deletion src/control/cam_comp.F90
Original file line number Diff line number Diff line change
@@ -67,7 +67,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, &
@@ -106,6 +107,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.
@@ -156,6 +158,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)

10 changes: 8 additions & 2 deletions src/control/cam_control_mod.F90
Original file line number Diff line number Diff line change
@@ -26,10 +26,11 @@ 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 :: aqua_planet ! Flag to run model in "aqua planet" mode
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
@@ -43,13 +44,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.
@@ -63,6 +66,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

@@ -77,6 +81,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
2 changes: 1 addition & 1 deletion src/control/cam_logfile.F90
Original file line number Diff line number Diff line change
@@ -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'
12 changes: 8 additions & 4 deletions src/control/cam_physics_control.F90
Original file line number Diff line number Diff line change
@@ -23,10 +23,11 @@ module cam_physics_control
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 :: moist_physics ! true => moist physics enabled, i.e.,
! (.not. ideal_phys) .and. (.not. adiabatic)
! (.not. ideal_phys) .and. (.not. adiabatic)


!==============================================================================
@@ -52,11 +53,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)

@@ -74,6 +76,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

Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.