Skip to content

Commit

Permalink
Merge pull request #1309 from mvertens/mvertens/scolpr
Browse files Browse the repository at this point in the history
New single column functionality for NUOPC/CMEPS
  • Loading branch information
ekluzek authored Mar 31, 2021
2 parents 6fad071 + 9bee7f5 commit cb6057e
Show file tree
Hide file tree
Showing 21 changed files with 575 additions and 428 deletions.
7 changes: 3 additions & 4 deletions Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ required = True
local_path = cime
protocol = git
repo_url = https://github.com/ESMCI/cime
tag = branch_tags/cime5.8.37_a02
tag = cime5.8.39
required = True

[cmeps]
local_path = cime/src/drivers/nuopc/
protocol = git
repo_url = https://github.com/ESCOMP/CMEPS.git
hash = c4acaa8
tag = v0.5.0
required = True

[cdeps]
local_path = components/cdeps
protocol = git
repo_url = https://github.com/ESCOMP/CDEPS.git
hash = 1f02a73
tag = v0.5.0
required = True

[doc-builder]
Expand All @@ -63,4 +63,3 @@ required = False

[externals_description]
schema_version = 1.0.0

2 changes: 1 addition & 1 deletion bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2003,7 +2003,7 @@ CLM datasets exist for years: 1000 (for testing), 1850, and 2000

<entry id="sim_year_range" type="char*9" category="default_settings"
group="default_settings" valid_values=
"constant,1000-1002,1000-1004,850-1850,1850-1855,1850-2000,1850-2005,1850-2100,1980-2015,2000-2100">
"constant,1000-1002,1000-1004,850-1850,1850-1855,1850-2000,1850-2005,1850-2100,1980-2015,2000-2025,2000-2100">
Range of years to simulate transitory datasets for (such as dynamic: land-use datasets, aerosol-deposition, Nitrogen deposition rates etc.)
Constant means simulation will be held at a constant year given in sim_year.
A sim_year_range of 1000-1002 or 1000-1004 corresponds to data used for testing only, NOT corresponding to any real datasets.
Expand Down
51 changes: 50 additions & 1 deletion cime_config/testdefs/ExpectedTestFails.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,62 @@

<!-- aux_clm test suite failures -->

<test name="ERS_Ln9.ne0ARCTICne30x4_ne0ARCTICne30x4_mt12.IHistClm50SpGs.cheyenne_intel.clm-clm50cam6LndTuningMode_1979Start">
<test name="ERS_Ln12.ne0ARCTICne30x4_ne0ARCTICne30x4_mt12.IHistClm50SpGs.cheyenne_intel.clm-clm50cam6LndTuningMode_1979Start">
<phase name="COMPARE_base_rest">
<status>FAIL</status>
<issue>#1117</issue>
</phase>
</test>

<test name="DAE_N2_D_Lh12_Vnuopc.f10_f10_mg37.I2000Clm50BgcCrop.cheyenne_intel.clm-DA_multidrv">
<phase name="RUN">
<status>FAIL</status>
<issue>ESCOMP/CMEPS#175</issue>
</phase>
</test>

<test name="SMS_D_Lm1_Mmpi-serial_Vnuopc.CLM_USRDAT.I1PtClm50SpRs.cheyenne_intel.clm-USUMB">
<phase name="RUN">
<status>FAIL</status>
<issue>ESMCI/cime#3905</issue>
</phase>
</test>

<test name="SMS_D_Lm1_Mmpi-serial.CLM_USRDAT.I1PtClm50SpRs.cheyenne_intel.clm-USUMB">
<phase name="RUN">
<status>FAIL</status>
<issue>ESMCI/cime#3905</issue>
</phase>
</test>

<test name="SMS_Ld5_D_P48x1_Vnuopc.f10_f10_mg37.IHistClm51Bgc.izumi_nag.clm-decStart">
<phase name="RUN">
<status>FAIL</status>
<issue>#1317</issue>
</phase>
</test>

<test name="SMS_P48x1_D_Ld5_Vnuopc.f10_f10_mg37.I2000Clm50Cn.izumi_nag.clm-default">
<phase name="RUN">
<status>FAIL</status>
<issue>#1317</issue>
</phase>
</test>

<test name="SMS_Vnuopc.f10_f10_mg37.I2000Clm50BgcCrop.izumi_pgi.clm-crop">
<phase name="BUILD">
<status>FAIL</status>
<issue>ESMCI/cime#3496</issue>
</phase>
</test>

<test name="SMS_D_Vnuopc.f10_f10_mg37.I2000Clm51BgcCrop.izumi_pgi.clm-crop">
<phase name="BUILD">
<status>FAIL</status>
<issue>ESMCI/cime#3496</issue>
</phase>
</test>

<!-- fates test suite failures -->

<test name="ERS_Ld60.f45_f45_mg37.I2000Clm45Fates.hobart_nag.clm-Fates">
Expand Down
144 changes: 124 additions & 20 deletions cime_config/testdefs/testlist_clm.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash

./xmlchange LND_TUNING_MODE="clm5_0_cam6.0"
./xmlchange ROF_NCPL='$ATM_NCPL'

2 changes: 2 additions & 0 deletions cime_config/testdefs/testmods_dirs/clm/pts/shell_commands
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@
./xmlchange NTASKS_ROF=1
./xmlchange NTASKS_WAV=1
./xmlchange NTASKS_ESP=1
./xmlchange MOSART_MODE=NULL
./xmlchange RTM_MODE=NULL
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
./xmlchange USE_ESMF_LIB=TRUE,ATM_NCPL=288,CALENDAR=GREGORIAN,ROF_NCPL='$ATM_NCPL',LND_TUNING_MODE="clm5_0_cam6.0"
./xmlchange CLM_BLDNML_OPTS="-megan -drydep" --append
./xmlchange RUN_STARTDATE=1979-01-01
./xmlchange ROF_NCPL='$ATM_NCPL'

117 changes: 117 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,121 @@
===============================================================
Tag name: ctsm5.1.dev030
Originator(s): mvertens / erik (Erik Kluzek,UCAR/TSS,303-497-1326)
Date: Wed Mar 31 16:46:04 MDT 2021
One-line Summary: New single column functionality for the NUOPC cap

Purpose and description of changes
----------------------------------

Implemented new nuopc/cmeps single column functionality.

In config/cesm/config_files.xml - single point domains are only used
for mct/cpl7. For cmeps single point meshes are now generated on the
fly and component domains files are no longer needed.
env_run.xml variables PTS_LAT, PTS_LON and PTS_DOMAINFILE are used
to determine if there is a single point or single column run.
If PTS_LAT and PTS_LON are not -999 and PTS_DOMAINFILE is UNSET,
then you have a single point run and the exact values of PTS_LAT
and PTS_LON are used. If PTS_LAT and PTS_LON are not -999 and
PTS_DOMAINFILE is not UNSET, then then the cmeps driver will recognize the nearest neighbor
values of PTS_LAT and PTS_LON in PTS_DOMAINFILE as the single column lat and lon to use.


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.]

[ ] clm5_1

[ ] clm5_0

[ ] ctsm5_0-nwp

[ ] clm4_5


Bugs fixed or introduced
------------------------

Issues fixed (include CTSM Issue #):
Fixes #1312 -- Add NUOPC tests
Fixes #1302 -- Setup to allow landuse.timeseries file for high resolution cases for 2000-2025
Fixes #1183 -- mkmapdata needs input option for large file support, current defaults unsuitable for high res grids.

Known bugs introduced in this tag (include issue #):

Known bugs found since the previous tag (include issue #):
#1317 -- MPI timeout for some izumi_nag tests reading in datm forcing files in NUOPC cap
#1314 -- Send unset value for scol_lat/lon from driver

Notes of particular relevance for users
---------------------------------------

Notes of particular relevance for developers:
---------------------------------------------
NOTE: Be sure to review the steps in README.CHECKLIST.master_tags as well as the coding style in the Developers Guide
[Remove any lines that don't apply. Remove entire section if nothing applies.]

Caveats for developers (e.g., code that is duplicated that requires double maintenance):
Nine step tests changed so that they have ROF run at same frequency as ATM (like the similar CAM tests)
as these will fail with NUOPC since it doesn't allow you to end not on an even time-step for all components.
One of these tests changed to a CAM type test from decStart

Changes to tests or testing: Add more NUOPC tests to test list


Testing summary: regular
----------------
[PASS means all tests PASS; OK means tests PASS other than expected fails.]

build-namelist tests (if CLMBuildNamelist.pm has changed):

cheyenne - PASS

tools-tests (test/tools) (if tools have been changed):

cheyenne - OK

python testing (if python code has changed; see instructions in python/README.md; document testing done):

cheyenne -- FAIL

regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):

cheyenne ---- OK
izumi ------- OK

any other testing (give details below): Ran full izumi test list for nuopc driver (failed tests appear above)

If the tag used for baseline comparisons was NOT the previous tag, note that here:


Answer changes
--------------

Changes answers relative to baseline: No
(List of fields change though)


Other details
-------------

List any externals directories updated (cime, rtm, mosart, cism, fates, etc.): cime, CDEPS, CMEPS
cime to cime5.8.39
CDEPS to v0.5.0
CMEPS to v0.5.0

Pull Requests that document the changes (include PR ids):
(https://github.com/ESCOMP/ctsm/pull)
#1309 -- New single column functionality for NUOPC/CMEPS
#1310 -- run_sys_tests: add --retry option on izumi

===============================================================
===============================================================
Tag name: ctsm5.1.dev029
Originator(s): mvertens (Mariana Vertenstein), sacks (Bill Sacks)
Date: Thu Mar 18 21:21:21 MDT 2021
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Tag Who Date Summary
============================================================================================================================
ctsm5.1.dev030 erik 03/31/2021 New single column functionality for the NUOPC cap
ctsm5.1.dev029 mvertens 03/18/2021 Rework domain initialization for nuopc
ctsm5.1.dev028 swensosc 03/17/2021 Change limitation of top layer evaporation/sublimation
ctsm5.1.dev027 sacks 03/15/2021 Update cime and other externals; includes switch to pio2
Expand Down
17 changes: 0 additions & 17 deletions src/biogeochem/SatellitePhenologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ module SatellitePhenologyMod
use shr_log_mod , only : errMsg => shr_log_errMsg
use decompMod , only : bounds_type
use abortutils , only : endrun
use clm_varctl , only : scmlat,scmlon,single_column
use clm_varctl , only : iulog, use_lai_streams, inst_name
use clm_varcon , only : grlnd
use controlMod , only : NLFilename
Expand Down Expand Up @@ -501,7 +500,6 @@ subroutine readAnnualVegetation (bounds, canopystate_inst)
use domainMod , only : ldomain
use fileutils , only : getfil
use clm_varctl , only : fsurdat
use shr_scam_mod, only : shr_scam_getCloseLatLon
!
! !ARGUMENTS:
type(bounds_type), intent(in) :: bounds
Expand All @@ -511,7 +509,6 @@ subroutine readAnnualVegetation (bounds, canopystate_inst)
type(file_desc_t) :: ncid ! netcdf id
real(r8), pointer :: annlai(:,:) ! 12 months of monthly lai from input data set
real(r8), pointer :: mlai(:,:) ! lai read from input files
real(r8):: closelat,closelon ! single column vars
integer :: ier ! error code
integer :: g,k,l,m,n,p ! indices
integer :: ni,nj,ns ! indices
Expand All @@ -520,7 +517,6 @@ subroutine readAnnualVegetation (bounds, canopystate_inst)
integer :: nlon_i ! number of input data longitudes
integer :: nlat_i ! number of input data latitudes
integer :: npft_i ! number of input data patch types
integer :: closelatidx,closelonidx ! single column vars
logical :: isgrid2d ! true => file is 2d
character(len=256) :: locfn ! local file name
character(len=32) :: subname = 'readAnnualVegetation'
Expand Down Expand Up @@ -553,11 +549,6 @@ subroutine readAnnualVegetation (bounds, canopystate_inst)
end if
call check_dim_size(ncid, 'lsmpft', maxsoil_patches)

if (single_column) then
call shr_scam_getCloseLatLon(locfn, scmlat, scmlon, &
closelat, closelon, closelatidx, closelonidx)
endif

do k=1,12 !! loop over months and read vegetated data

call ncd_io(ncid=ncid, varname='MONTHLY_LAI', flag='read', data=mlai, &
Expand Down Expand Up @@ -600,7 +591,6 @@ subroutine readMonthlyVegetation (bounds, &
use pftconMod , only : noveg
use fileutils , only : getfil
use spmdMod , only : masterproc, mpicom, MPI_REAL8, MPI_INTEGER
use shr_scam_mod , only : shr_scam_getCloseLatLon
use clm_time_manager , only : get_nstep
use netcdf
!
Expand All @@ -620,8 +610,6 @@ subroutine readMonthlyVegetation (bounds, &
integer :: nlat_i ! number of input data latitudes
integer :: npft_i ! number of input data patch types
integer :: ier ! error code
integer :: closelatidx,closelonidx
real(r8):: closelat,closelon
logical :: readvar
real(r8), pointer :: mlai(:,:) ! lai read from input files
real(r8), pointer :: msai(:,:) ! sai read from input files
Expand Down Expand Up @@ -651,11 +639,6 @@ subroutine readMonthlyVegetation (bounds, &
call getfil(fveg, locfn, 0)
call ncd_pio_openfile (ncid, trim(locfn), 0)

if (single_column) then
call shr_scam_getCloseLatLon (ncid, scmlat, scmlon, closelat, closelon,&
closelatidx, closelonidx)
endif

do k=1,2 !loop over months and read vegetated data

call ncd_io(ncid=ncid, varname='MONTHLY_LAI', flag='read', data=mlai, dim1name=grlnd, &
Expand Down
3 changes: 1 addition & 2 deletions src/biogeophys/SoilMoistureStreamMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ module SoilMoistureStreamMod
use shr_log_mod , only : errMsg => shr_log_errMsg
use decompMod , only : bounds_type
use abortutils , only : endrun
use clm_varctl , only : scmlat,scmlon,single_column, inst_name
use clm_varctl , only : iulog, use_soil_moisture_streams
use clm_varctl , only : iulog, use_soil_moisture_streams, inst_name
use clm_varcon , only : grlnd
use controlMod , only : NLFilename
use decompMod , only : gsMap_lnd2Dsoi_gdc2glo
Expand Down
3 changes: 1 addition & 2 deletions src/cpl/lilac/lnd_import_export.F90
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ subroutine check_atm_landfrac(importState, bounds, rc)
!---------------------------------------------------------------------------

! Implementation notes: The CTSM decomposition is set up so that ocean points appear
! at the end of the vectors received from the coupler. Thus, in order to check if
! at the end of the vectors received from the atm. Thus, in order to check if
! there are any points that the atmosphere considers land but CTSM considers ocean,
! it is sufficient to check the points following the typical ending bounds in the
! vectors received from the coupler.
Expand All @@ -291,7 +291,6 @@ subroutine check_atm_landfrac(importState, bounds, rc)
if (atm_landfrac(n) > 0._r8) then
write(iulog,*) 'At point ', n, ' atm landfrac = ', atm_landfrac(n)
write(iulog,*) 'but CTSM thinks this is ocean.'
write(iulog,*) "Make sure the mask on CTSM's fatmlndfrc file agrees with the atmosphere's land mask"
call shr_sys_abort( subname//&
' ERROR: atm landfrac > 0 for a point that CTSM thinks is ocean')
end if
Expand Down
13 changes: 12 additions & 1 deletion src/cpl/mct/lnd_comp_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module lnd_comp_mct
! !uses:
use shr_kind_mod , only : r8 => shr_kind_r8
use shr_sys_mod , only : shr_sys_flush
use shr_log_mod , only : errMsg => shr_log_errMsg
use mct_mod , only : mct_avect, mct_gsmap, mct_gGrid
use decompmod , only : bounds_type, ldecomp
use lnd_import_export, only : lnd_import, lnd_export
Expand All @@ -28,6 +29,9 @@ module lnd_comp_mct
private :: lnd_domain_mct ! set the land model domain information
private :: lnd_handle_resume ! handle pause/resume signals from the coupler

character(len=*), parameter, private :: sourcefile = &
__FILE__

!====================================================================================
contains
!====================================================================================
Expand All @@ -44,7 +48,7 @@ subroutine lnd_init_mct( EClock, cdata_l, x2l_l, l2x_l, NLFilename )
use clm_time_manager , only : get_nstep, set_timemgr_init, set_nextsw_cday
use clm_initializeMod, only : initialize1, initialize2
use clm_instMod , only : water_inst, lnd2atm_inst, lnd2glc_inst
use clm_varctl , only : finidat,single_column, clm_varctl_set, iulog
use clm_varctl , only : finidat, single_column, clm_varctl_set, iulog
use clm_varctl , only : inst_index, inst_suffix, inst_name
use clm_varorb , only : eccen, obliqr, lambm0, mvelpp
use controlMod , only : control_setNL
Expand Down Expand Up @@ -105,6 +109,7 @@ subroutine lnd_init_mct( EClock, cdata_l, x2l_l, l2x_l, NLFilename )
type(bounds_type) :: bounds ! bounds
logical :: noland
integer :: ni,nj
real(r8) , parameter :: rundef = -9999999._r8
character(len=32), parameter :: sub = 'lnd_init_mct'
character(len=*), parameter :: format = "('("//trim(sub)//") :',A)"
!-----------------------------------------------------------------------
Expand Down Expand Up @@ -173,6 +178,12 @@ subroutine lnd_init_mct( EClock, cdata_l, x2l_l, l2x_l, NLFilename )
start_type=starttype, model_version=version, &
hostname=hostname, username=username )

! Single Column
if ( single_column .and. (scmlat == rundef .or. scmlon == rundef ) ) then
call endrun(msg=' ERROR:: single column mode on -- but scmlat and scmlon are NOT set'//&
errMsg(sourcefile, __LINE__))
end if

! Note that we assume that CTSM's internal dtime matches the coupling time step.
! i.e., we currently do NOT allow sub-cycling within a coupling time step.
call set_timemgr_init( calendar_in=calendar, start_ymd_in=start_ymd, start_tod_in=start_tod, &
Expand Down
Loading

0 comments on commit cb6057e

Please sign in to comment.