diff --git a/.gitmodules b/.gitmodules index bc66fe1682..9aeb7d4de0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -36,7 +36,7 @@ fxDONOTUSEurl = https://github.com/NCAR/fates-release [submodule "cism"] path = components/cism url = https://github.com/ESCOMP/CISM-wrapper -fxtag = cismwrap_2_2_002 +fxtag = cismwrap_2_2_005 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/CISM-wrapper @@ -44,7 +44,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CISM-wrapper [submodule "rtm"] path = components/rtm url = https://github.com/ESCOMP/RTM -fxtag = rtm1_0_84 +fxtag = rtm1_0_86 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/RTM @@ -52,7 +52,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/RTM [submodule "mosart"] path = components/mosart url = https://github.com/ESCOMP/MOSART -fxtag = mosart1.1.06 +fxtag = mosart1.1.07 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/MOSART @@ -60,7 +60,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/MOSART [submodule "mizuRoute"] path = components/mizuRoute url = https://github.com/ESCOMP/mizuRoute -fxtag = cesm-coupling.n02_v2.1.3 +fxtag = cesm-coupling.n03_v2.2.0 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute @@ -68,7 +68,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute [submodule "ccs_config"] path = ccs_config url = https://github.com/ESMCI/ccs_config_cesm.git -fxtag = ccs_config_cesm1.0.10 +fxtag = ccs_config_cesm1.0.16 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git @@ -76,7 +76,7 @@ fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git [submodule "cime"] path = cime url = https://github.com/ESMCI/cime -fxtag = cime6.1.49 +fxtag = cime6.1.59 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESMCI/cime @@ -84,7 +84,7 @@ fxDONOTUSEurl = https://github.com/ESMCI/cime [submodule "cmeps"] path = components/cmeps url = https://github.com/ESCOMP/CMEPS.git -fxtag = cmeps1.0.32 +fxtag = cmeps1.0.33 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git @@ -100,7 +100,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git [submodule "share"] path = share url = https://github.com/ESCOMP/CESM_share -fxtag = share1.1.6 +fxtag = share1.1.7 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/CESM_share diff --git a/WhatsNewInCTSM5.3.md b/WhatsNewInCTSM5.3.md index b1f753081b..1fabfd1192 100644 --- a/WhatsNewInCTSM5.3.md +++ b/WhatsNewInCTSM5.3.md @@ -1,53 +1,48 @@ -Purpose and description of changes since ctsm5.2.005 ----------------------------------------------------- +# What's new in CTSM 5.3 (tag `ctsm5.3.0`) -Bring in updates needed for the CESM3.0 science capability/functionality "chill". Most importantly bringing -in: CN Matrix to speed up spinup for the BGC model, updated surface datasets, updated Leung 2023 dust emissions, -explicit Air Conditioning for the Urban model, updates to crop calendars. For clm6_0 physics these options are now -default turned on in addition to Sturm snow, and excess ice. +## Purpose and description of changes since CTSM 5.2 (tag `ctsm5.2.005`) +- Adds CN Matrix method to speed up spinup for the BGC model. +- Updates surface datasets. +- Brings in new Leung 2023 dust emissions. +- Adds explicit air conditioning for the urban model. +- Updates crop calendars. +- Updates fire model with various improvements, including default parameterization against climate reanalysis from CRU-JRA instead of GSWP. +- FATES compsets can now be run with transient land use. -Changes to CTSM Infrastructure: -=============================== +These changes were needed ahead of the CESM3 capability/functionality "chill". For `clm6_0` physics these options are now turned on by default, in addition to Sturm snow and excess ice. - - manage_externals removed and replaced by git-fleximod - - Ability to handle CAM7 in LND_TUNING_MODE +## Changes to CTSM infrastructure + - `manage_externals` removed and replaced by `git-fleximod` + - Ability to handle CAM7 in `LND_TUNING_MODE` -Changes to CTSM Answers: -======================== +## Changes to CTSM answers - Changes to defaults for clm6_0 physics: + Changes to defaults for `clm6_0` physics: - Urban explicit A/C turned on - - Snow thermal conductivity is now Sturm_1997 - - New IC file for f09 1850 + - Snow thermal conductivity method is now `Sturm_1997` + - New initial conditions file for f09 ("1-degree") 1850, with more in progress - New crop calendars - - Dust emissions is now Leung_2023 + - Dust emissions method is now `Leung_2023` - Excess ice is turned on - - Updates to MEGAN for BVOC's + - Updates to MEGAN for BVOCs - Updates to BGC fire method Changes for all physics versions: - - Parameter files updated - FATES parameter file updated - Glacier region 1 is now undefined - - Update in FATES transient Land use + - Update in FATES transient land use - Pass active glacier (CISM) runoff directly to river model (MOSART) - - Add the option for using matrix for Carbon/Nitrogen BGC spinup + - Add the option for using Matrix CN method for Carbon/Nitrogen BGC spinup -New surface datasets: -===================== +## New surface datasets -- With new surface datasets the following GLC fields have region "1" set to UNSET: - glacier_region_behavior, glacier_region_melt_behavior, glacier_region_ice_runoff_behavior +- With new surface datasets the following GLC fields have region "1" set to UNSET: glacier_region_behavior, glacier_region_melt_behavior, glacier_region_ice_runoff_behavior - Updates to allow creating transient landuse timeseries files going back to 1700. -- Fix an important bug on soil fields that was there since ctsm5.2.0. This results in mksurfdata_esmf now giving identical answers with a change in number of processors, as it should. -- Add in creation of ne0np4.POLARCAP.ne30x4 surface datasets. -- Add version to the surface datasets. -- Remove the --hires_pft option from mksurfdata_esmf as we don't have the datasets for it. -- Remove VIC fields from surface datasets. - -New input datasets to mksurfdata_esmf: -====================================== - -- Updates in PFT/LAI/soil-color raw datasets (now from the TRENDY2024 timeseries that ends in 2023), as well as two fire datasets (AG fire, peatland), and the glacier behavior dataset. +- Fix an important bug on soil fields that was there since `ctsm5.2.0`. This has the side effect of `mksurfdata_esmf` now giving identical answers with a change in number of processors, as it should. +- Surface datasets now provided for the `ne0np4.POLARCAP.ne30x4` grid. +- Surface datasets now have their version number embedded to prevent mismatch of surface dataset and CTSM version. +- Remove the `--hires_pft` option from `mksurfdata_esmf` as we don't have the datasets for it. +- Remove `VIC` fields from surface datasets. +- Updates to input datasets in PFT/LAI/soil-color raw datasets (now from the TRENDY2024 timeseries that ends in 2023), as well as two fire datasets (crop fire peak month, peatland fraction), and the glacier behavior dataset. diff --git a/ccs_config b/ccs_config index 6e77e7ee17..a712a92045 160000 --- a/ccs_config +++ b/ccs_config @@ -1 +1 @@ -Subproject commit 6e77e7ee1748a4d3b2497d7ad3943498a7cec2aa +Subproject commit a712a920453dc0cb2831dce576e78c389b567f7e diff --git a/cime b/cime index b2f271b174..addf9e67ce 160000 --- a/cime +++ b/cime @@ -1 +1 @@ -Subproject commit b2f271b1742533715a05701b1bdd80a24bb2ad77 +Subproject commit addf9e67ceeb0e056de33ee793d67491176dd3a5 diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 79ead77c74..9735c02f4c 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -126,28 +126,7 @@ #2310 - - - - FAIL - #2914 - - - - - - FAIL - #2914 - - - - - - FAIL - #2905 - - - + FAIL @@ -187,212 +166,31 @@ - + FAIL - #2310 + #2913 - - - FAIL - #2310 - + FAIL #2310 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - - - FAIL - #2916 - - - - - + FAIL - #2916 + #2310 - - - - - + FAIL - #2916 + #2310 - - FAIL @@ -423,23 +221,12 @@ - - FAIL - #2454 - FAIL #2325 - - - FAIL - #2454 - - - FAIL diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 200468cf53..1986098533 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -12,6 +12,7 @@ hillslope: Experimental test list used for the hillslope option of the model rxcropmaturity: Short tests to be run during development related to prescribed crop calendars matrixcn: Tests exercising the matrix-CN capability + aux_clm_mpi_serial: aux_clm tests using mpi-serial. Useful for redoing tests that failed due to https://github.com/ESCOMP/CTSM/issues/2916, after having replaced libraries/mpi-serial with a fresh copy. --> @@ -905,6 +906,7 @@ + @@ -1149,6 +1151,7 @@ + @@ -1158,6 +1161,7 @@ + @@ -1701,6 +1705,7 @@ + @@ -1718,6 +1723,7 @@ + @@ -1727,6 +1733,7 @@ + @@ -1736,6 +1743,7 @@ + @@ -1746,6 +1754,7 @@ + @@ -1755,6 +1764,7 @@ + @@ -1764,6 +1774,7 @@ + @@ -1774,6 +1785,7 @@ + @@ -1794,6 +1806,7 @@ + @@ -1868,6 +1881,7 @@ + @@ -1878,6 +1892,7 @@ + @@ -1890,6 +1905,7 @@ + @@ -2257,6 +2273,7 @@ + @@ -2266,9 +2283,12 @@ + + + @@ -2366,6 +2386,7 @@ + @@ -2377,7 +2398,9 @@ + + @@ -2388,8 +2411,10 @@ + + @@ -2401,7 +2426,9 @@ + + @@ -2412,7 +2439,9 @@ + + @@ -2436,8 +2465,10 @@ + + @@ -2449,8 +2480,10 @@ + + @@ -2481,6 +2514,7 @@ + @@ -2526,6 +2560,7 @@ + @@ -2672,6 +2707,7 @@ + @@ -2681,6 +2717,7 @@ + @@ -2732,6 +2769,7 @@ + @@ -2836,7 +2874,9 @@ + + @@ -2845,6 +2885,7 @@ + @@ -2863,6 +2904,7 @@ + @@ -3175,6 +3217,7 @@ + @@ -3417,6 +3460,7 @@ + @@ -3427,6 +3471,7 @@ + @@ -3493,6 +3538,7 @@ + @@ -3637,6 +3683,7 @@ + diff --git a/components/cism b/components/cism index c84cc9f5b3..41843ef8fe 160000 --- a/components/cism +++ b/components/cism @@ -1 +1 @@ -Subproject commit c84cc9f5b3103766a35d0a7ddd5e9dbd7deae762 +Subproject commit 41843ef8fed91fcf60e2ea217c4f6f2ee5133c5d diff --git a/components/cmeps b/components/cmeps index a91cedfe58..4b636c6f79 160000 --- a/components/cmeps +++ b/components/cmeps @@ -1 +1 @@ -Subproject commit a91cedfe58658a9fc391195481137a2d83372c25 +Subproject commit 4b636c6f794ca02d854d15c620e26644751b449b diff --git a/components/mizuRoute b/components/mizuRoute index 2ff305a029..362bee329b 160000 --- a/components/mizuRoute +++ b/components/mizuRoute @@ -1 +1 @@ -Subproject commit 2ff305a0292cb06789de6cfea7ad3cc0d6173493 +Subproject commit 362bee329bd6bf1fd45c8f36e006b9c4294bb8ca diff --git a/components/mosart b/components/mosart index a246344e9b..330574fbd8 160000 --- a/components/mosart +++ b/components/mosart @@ -1 +1 @@ -Subproject commit a246344e9b28e4bb42313749094fa20d45e2b212 +Subproject commit 330574fbd8a4810b7a168175690cbf7e1a7f6dab diff --git a/components/rtm b/components/rtm index 6899b55816..26e96f500b 160000 --- a/components/rtm +++ b/components/rtm @@ -1 +1 @@ -Subproject commit 6899b55816ee4d9b7cf983d74ba2997b97a13c4d +Subproject commit 26e96f500b9500b32a870db20eed6b1bd37587ea diff --git a/doc/ChangeLog b/doc/ChangeLog index f1cf556e41..2c08950b2d 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,59 @@ =============================================================== +Tag name: ctsm5.3.020 +Originator(s): samrabin (Sam Rabin, UCAR/TSS, samrabin@ucar.edu) +Date: Fri Jan 17 12:21:24 MST 2025 +One-line Summary: Merge b4b-dev + +Purpose and description of changes +---------------------------------- + +Merging b4b-dev and ctsm5.3.019. Includes some improvements to test list / expected failures. + + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Notes of particular relevance for developers: +--------------------------------------------- + +Changes to tests or testing: +- New test suite: Useful for redoing tests that failed due to https://github.com/ESCOMP/CTSM/issues/2916, after having replaced libraries/mpi-serial with a fresh copy. + + +Testing summary: +---------------- + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + + +Other details +------------- +[Remove any lines that don't apply. Remove entire section if nothing applies.] + +List any git submodules updated (cime, rtm, mosart, cism, fates, etc.): + +Pull Requests that document the changes (include PR ids): +- ESCOMP/CTSM#2938: ctsm5.3.020: Merge b4b-dev 2025-01-16 (https://github.com/ESCOMP/CTSM/pull/2938) + +=============================================================== +=============================================================== Tag name: ctsm5.3.019 Originator(s): olyson (Keith Oleson, UCAR/TSS) Date: Tue 14 Jan 2025 02:46:11 PM MST diff --git a/doc/ChangeSum b/doc/ChangeSum index bf027e98fc..98739639a4 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.3.020 samrabin 01/17/2025 Merge b4b-dev ctsm5.3.019 olyson 01/14/2025 Stop running 0th time step ctsm5.3.018 slevis 01/10/2025 Change history time to be the middle of the time bounds ctsm5.3.017 slevis 01/09/2025 Merge tmp-241219 branch to master diff --git a/share b/share index a48ff8790a..c5e7603c29 160000 --- a/share +++ b/share @@ -1 +1 @@ -Subproject commit a48ff8790a21d3831873ed9f023a43c606a1ef03 +Subproject commit c5e7603c29ea5e2fe93ca16d88bc9c7f16175bcd diff --git a/src/cpl/lilac/lnd_comp_esmf.F90 b/src/cpl/lilac/lnd_comp_esmf.F90 index a2424a128f..0aa0fc9f81 100644 --- a/src/cpl/lilac/lnd_comp_esmf.F90 +++ b/src/cpl/lilac/lnd_comp_esmf.F90 @@ -374,7 +374,7 @@ subroutine lnd_init(comp, import_state, export_state, clock, rc) !-------------------------------- ! Finish initializing ctsm !-------------------------------- - call initialize2(ni,nj) + call initialize2(ni,nj, currTime) call ESMF_LogWrite(subname//"ctsm initialize2 done...", ESMF_LOGMSG_INFO) !-------------------------------- @@ -694,41 +694,41 @@ subroutine lnd_run(gcomp, import_state, export_state, clock, rc) call update_rad_dtime(doalb) !-------------------------------- - ! Determine if time to write restart + ! Determine if time to stop !-------------------------------- - call ESMF_ClockGetAlarm(clock, alarmname='lilac_restart_alarm', alarm=alarm, rc=rc) + call ESMF_ClockGetAlarm(clock, alarmname='lilac_stop_alarm', alarm=alarm, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return if (ESMF_AlarmIsRinging(alarm, rc=rc)) then if (ChkErr(rc,__LINE__,u_FILE_u)) return - rstwr = .true. + nlend = .true. call ESMF_AlarmRingerOff( alarm, rc=rc ) if (ChkErr(rc,__LINE__,u_FILE_u)) return else - rstwr = .false. + nlend = .false. endif if (masterproc) then - write(iulog,*)' restart alarm is ',rstwr + write(iulog,*)' stop alarm is ',nlend end if !-------------------------------- - ! Determine if time to stop + ! Determine if time to write restart !-------------------------------- - call ESMF_ClockGetAlarm(clock, alarmname='lilac_stop_alarm', alarm=alarm, rc=rc) + call ESMF_ClockGetAlarm(clock, alarmname='lilac_restart_alarm', alarm=alarm, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return if (ESMF_AlarmIsRinging(alarm, rc=rc)) then if (ChkErr(rc,__LINE__,u_FILE_u)) return - nlend = .true. + rstwr = .true. call ESMF_AlarmRingerOff( alarm, rc=rc ) if (ChkErr(rc,__LINE__,u_FILE_u)) return else - nlend = .false. + rstwr = .false. endif if (masterproc) then - write(iulog,*)' stop alarm is ',nlend + write(iulog,*)' restart alarm is ',rstwr end if !-------------------------------- diff --git a/src/cpl/nuopc/lnd_comp_nuopc.F90 b/src/cpl/nuopc/lnd_comp_nuopc.F90 index 33fc8e6f54..8ee6c2014e 100644 --- a/src/cpl/nuopc/lnd_comp_nuopc.F90 +++ b/src/cpl/nuopc/lnd_comp_nuopc.F90 @@ -1031,9 +1031,10 @@ subroutine ModelSetRunClock(gcomp, rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return call ESMF_LogWrite(subname//'setting alarms for ' // trim(name), ESMF_LOGMSG_INFO) - !---------------- + !---------------------------------------------------------------------------------- ! Stop alarm - !---------------- + ! MUST be set before the restart alarm in case restarts happen at the stop alarm + !---------------------------------------------------------------------------------- call NUOPC_CompAttributeGet(gcomp, name="stop_option", value=stop_option, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return @@ -1055,9 +1056,10 @@ subroutine ModelSetRunClock(gcomp, rc) call ESMF_AlarmSet(stop_alarm, clock=mclock, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - !---------------- + !---------------------------------------------------------------------------------- ! Restart alarm - !---------------- + ! MUST be set after the stop alarm in case restarts happen at the stop alarm + !---------------------------------------------------------------------------------- call NUOPC_CompAttributeGet(gcomp, name="restart_option", value=restart_option, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return diff --git a/src/main/histFileMod.F90 b/src/main/histFileMod.F90 index da7fb67c5d..cbb6e268f7 100644 --- a/src/main/histFileMod.F90 +++ b/src/main/histFileMod.F90 @@ -147,7 +147,7 @@ module histFileMod public :: hist_addfld1d ! Add a 1d single-level field to the list of all history fields public :: hist_addfld2d ! Add a 2d multi-level field to the list of all history fields public :: hist_addfld_decomp ! Add a 1d/2d field based on patch or column data - public :: hist_add_subscript ! Add a 2d subscript dimension + public :: hist_printflds ! Print summary of list of all history fields public :: htapes_fieldlist ! Finalize history file field lists, intersecting allhistfldlist with @@ -196,10 +196,6 @@ module histFileMod ! is 255. But this can't be increased until all hard ! coded values throughout the i/o stack are updated. integer, parameter :: max_chars = 199 ! max chars for char variables - integer, parameter :: max_subs = 100 ! max number of subscripts - integer :: num_subs = 0 ! actual number of subscripts - character(len=32) :: subs_name(max_subs) ! name of subscript - integer :: subs_dim(max_subs) ! dimension of subscript ! type2d value for a field without a level dimension. This value is important for the ! following reasons (as of 2023-08-21): @@ -256,8 +252,11 @@ end subroutine copy_entry_interface end interface ! Additional per-field metadata. See also history_entry. - ! These values are specified in hist_addfld* calls but then can be - ! overridden by namelist params like hist_fincl1. + ! For the primary history tape, some fields are enabled here (inside hist_addfld* + ! call) but then can be overridden by namelist params (like hist_fincl1). The + ! fields for other history tapes are theoretically settable here but in + ! practice are all disabled. Fields for those tapes have to be specified + ! explicitly and manually via hist_fincl2 et al. type, extends(entry_base) :: allhistfldlist_entry logical :: actflag(max_tapes) ! which history tapes to write to. character(len=avgflag_strlen) :: avgflag(max_tapes) ! type of time averaging @@ -307,8 +306,8 @@ end subroutine copy_entry_interface type (clmpoint_ra) :: clmptr_ra(max_mapflds) ! Real array data (2D) ! ! History field metadata including which history tapes (if any) it should be output to, and - ! type of accumulation to perform. The field ordering is arbitrary, depending on the order of - ! hist_addfld* calls in the code. + ! type of accumulation to perform. This list contains all possible fields, and their field ordering + ! is arbitrary, as it depends on the order of hist_addfld* calls in the code. ! For the field data itself, see 'tape'. ! type (allhistfldlist_entry) :: allhistfldlist(max_flds) ! list of all history fields @@ -2504,9 +2503,6 @@ subroutine htape_create (t, histrest) ! (although on the history file it will go 1:(nec+1) rather than 0:nec) call ncd_defdim(lnfid, 'elevclas' , maxpatch_glc + 1, dimid) - do n = 1,num_subs - call ncd_defdim(lnfid, subs_name(n), subs_dim(n), dimid) - end do call ncd_defdim(lnfid, 'string_length', hist_dim_name_length, strlen_dimid) call ncd_defdim(lnfid, 'scale_type_string_length', scale_type_strlen, dimid) call ncd_defdim( lnfid, 'levdcmp', nlevdecomp_full, dimid) @@ -5967,31 +5963,6 @@ integer function next_history_pointer_index () end function next_history_pointer_index - !----------------------------------------------------------------------- - subroutine hist_add_subscript(name, dim) - ! - ! !DESCRIPTION: - ! Add a history variable to the output history tape. - ! - ! !ARGUMENTS: - character(len=*), intent(in) :: name ! name of subscript - integer , intent(in) :: dim ! dimension of subscript - ! - ! !LOCAL VARIABLES: - character(len=*),parameter :: subname = 'hist_add_subscript' - !----------------------------------------------------------------------- - - num_subs = num_subs + 1 - if (num_subs > max_subs) then - write(iulog,*) trim(subname),' ERROR: ',& - ' num_subs = ',num_subs,' greater than max_subs= ',max_subs - call endrun(msg=errMsg(sourcefile, __LINE__)) - endif - subs_name(num_subs) = name - subs_dim(num_subs) = dim - - end subroutine hist_add_subscript - !----------------------------------------------------------------------- subroutine strip_null(str) diff --git a/src/utils/clm_time_manager.F90 b/src/utils/clm_time_manager.F90 index 3e3d1a8c45..f606c2832b 100644 --- a/src/utils/clm_time_manager.F90 +++ b/src/utils/clm_time_manager.F90 @@ -19,9 +19,9 @@ module clm_time_manager public ::& set_timemgr_init, &! setup startup values - timemgr_init, &! time manager initialization + timemgr_init, &! time manager initialization, called always timemgr_restart_io, &! read/write time manager restart info and restart time manager - timemgr_restart, &! restart the time manager using info from timemgr_restart + timemgr_restart, &! check that time manager is setup coorectly upcon restart timemgr_datediff, &! calculate difference between two time instants advance_timestep, &! increment timestep number get_curr_ESMF_Time, &! get current time in terms of the ESMF_Time @@ -157,7 +157,7 @@ subroutine set_timemgr_init( calendar_in, start_ymd_in, start_tod_in, r ! character(len=*), parameter :: sub = 'clm::set_timemgr_init' - if ( timemgr_set ) call shr_sys_abort( sub//":: timemgr_init or timemgr_restart already called" ) + if ( timemgr_set ) call shr_sys_abort( sub//":: timemgr_init already called" ) if (present(calendar_in) ) calendar = trim(calendar_in) if (present(start_ymd_in) ) start_ymd = start_ymd_in if (present(start_tod_in) ) start_tod = start_tod_in @@ -513,7 +513,10 @@ end subroutine timemgr_restart_io subroutine timemgr_restart() !--------------------------------------------------------------------------------- - ! Restart the ESMF time manager using the synclock for ending date. + ! On restart do some checkcing to make sure time is synchronized with the clock from CESM. + ! Set a couple of variables, and advance the clock, so time is aligned properly. + ! + ! timemgr_init MIST be called before this ! character(len=*), parameter :: sub = 'clm::timemgr_restart' @@ -525,13 +528,10 @@ subroutine timemgr_restart() type(ESMF_TimeInterval) :: day_step_size ! day step size type(ESMF_TimeInterval) :: step_size ! timestep size !--------------------------------------------------------------------------------- - call timemgr_spmdbcast( ) - - ! Initialize calendar from restart info - - call init_calendar() + ! Check that timemgr_init was already called + if ( .not. check_timemgr_initialized(sub) ) return - ! Initialize the timestep from restart info + ! Initialize the timestep dtime = rst_step_sec @@ -563,12 +563,6 @@ subroutine timemgr_restart() tm_first_restart_step = .true. - ! Print configuration summary to log file (stdout). - - if (masterproc) call timemgr_print() - - timemgr_set = .true. - end subroutine timemgr_restart !=========================================================================================