Skip to content

Commit

Permalink
Merge pull request #975 from ekluzek/rel2300ext
Browse files Browse the repository at this point in the history
Fix irrigation for 2300 extensions
  • Loading branch information
ekluzek authored Apr 7, 2020
2 parents 8e1309a + a8b720c commit 72a2987
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 19 deletions.
3 changes: 3 additions & 0 deletions bld/namelist_files/namelist_defaults_clm4_5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<irrigate use_crop=".true." phys="clm5_0" use_cndv=".false." sim_year_range="1850-2100">.true.</irrigate>
<irrigate use_crop=".true." phys="clm5_0" use_cndv=".true." sim_year_range="1850-2100">.false.</irrigate>
<irrigate use_crop=".true." phys="clm4_5" sim_year_range="1850-2100">.false.</irrigate>
<irrigate use_crop=".true." phys="clm5_0" use_cndv=".false." sim_year_range="2100-2300">.true.</irrigate>
<irrigate use_crop=".true." phys="clm5_0" use_cndv=".true." sim_year_range="2100-2300">.false.</irrigate>
<irrigate use_crop=".true." phys="clm4_5" sim_year_range="2100-2300">.false.</irrigate>

<irrigate use_crop=".true." >.false.</irrigate>
<irrigate use_crop=".false.">.true.</irrigate>
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
============================================================================================================================
release-clm5.0.33 erik 04/07/2020 Turn irrigation on for 2300 SSP extensions
release-clm5.0.32 erik 04/02/2020 Extensions to 2300 for SSP5-8.5,SSP5-3.4, and SSP1-2.6
release-clm5.0.31 erik 03/29/2020 Bring in raw datasets for 2100-2300 extension for SSP5-8.5/3.5 and SSP1-2.6, some other misc. changes
release-clm5.0.30 erik 01/21/2020 Update FATES to sci.1.30.0_api.8.0.0
Expand Down
91 changes: 91 additions & 0 deletions doc/release-clm5.0.ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,95 @@
===============================================================
Tag name: release-clm5.0.33
Originator(s): erik (Erik Kluzek)
Date: Tue Apr 7 13:21:28 MDT 2020
One-line Summary: Turn irrigation on for 2300 SSP extensions

Purpose of this version:
------------------------

Irrigation was turned off for the 2300 extensions. This turns it on. Also add SSP2-4.5 to the
anomaly forcing script.

CTSM Master Tag This Corresponds To: ctsm1.0.dev025 (with many other changes)

Summary of changes:
-------------------

Issues fixed (include CTSM Issue #): #974 #972 #966
#974 -- Python3 problem in SSP test
#972 -- Irrigate is turned off for the 2300 extensions
#966 -- Units for a few history fields needs to change for ILAMB

Science changes since: release-clm5.0.32
Irrigation is now properly turned on for the 2100-2300 SSP extensions
Change some units of history fields

Software changes since: release-clm5.0.32
Anomaly forcing script can now do SSP2-4.5
Small changes to anomoly forcing script and singlept script

Changes to User Interface since: release-clm5.0.32

Testing:
--------

[PASS means all tests PASS and OK means tests PASS other than expected fails.]

build-namelist tests:

cheyenne - PASS (two tests are different than before because of irrigate)

unit-tests (components/clm/src):

cheyenne - PASS

tools-tests (components/clm/test/tools): None

PTCLM testing (components/clm/tools/shared/PTCLM/test): None

regular tests (aux_clm):

cheyenne_intel ---- OK
cheyenne_gnu ------ OK
izumi_nag --------- PASS
izumi_pgi --------- PASS
izumi_intel ------- PASS

Summary of Answer changes:
-------------------------

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

Changes answers relative to baseline:

Summarize any changes to answers, i.e.,
- what code configurations:
- what platforms/compilers: All
- nature of change: Climate changing as irrigation is on

Will new REFCASES need to be made for cesm and/or CAM?: No
(This will likely be true if the LII tests failed)

Detailed list of changes:
------------------------

Externals being used: No updates

cism: cism-release-cesm2.1.2_04
rtm: release-cesm2.0.04
mosart: release-cesm2.0.04
cime: cim5.6.33
FATES: sci.1.30.0_api.8.0.0
PTCLM: PTCLM2_20200121

CTSM Tag versions pulled over from master development branch: None

Pull Requests that document the changes (include PR ids): #975
(https://github.com/ESCOMP/ctsm/pull)
#975 -- fix irrigate for 2300 extensions

===============================================================
===============================================================
Tag name: release-clm5.0.32
Originator(s): erik (Erik Kluzek)
Date: Thu Apr 2 00:23:04 MDT 2020
Expand Down
6 changes: 3 additions & 3 deletions src/biogeochem/CNVegStateType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -321,17 +321,17 @@ subroutine InitHistory(this, bounds)
ptr_col=this%nfire_col)

this%farea_burned_col(begc:endc) = spval
call hist_addfld1d (fname='FAREA_BURNED', units='proportion/sec', &
call hist_addfld1d (fname='FAREA_BURNED', units='s-1', &
avgflag='A', long_name='timestep fractional area burned', &
ptr_col=this%farea_burned_col)

this%baf_crop_col(begc:endc) = spval
call hist_addfld1d (fname='BAF_CROP', units='proportion/sec', &
call hist_addfld1d (fname='BAF_CROP', units='s-1', &
avgflag='A', long_name='fractional area burned for crop', &
ptr_col=this%baf_crop_col)

this%baf_peatf_col(begc:endc) = spval
call hist_addfld1d (fname='BAF_PEATF', units='proportion/sec', &
call hist_addfld1d (fname='BAF_PEATF', units='s-1', &
avgflag='A', long_name='fractional area burned in peatland', &
ptr_col=this%baf_peatf_col)

Expand Down
8 changes: 4 additions & 4 deletions src/biogeophys/PhotosynthesisMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -360,30 +360,30 @@ subroutine InitHistory(this, bounds)
! Don't output photosynthesis variables when FATES is on as they aren't calculated
if (.not. use_fates) then
this%fpsn_patch(begp:endp) = spval
call hist_addfld1d (fname='FPSN', units='umol/m2s', &
call hist_addfld1d (fname='FPSN', units='umol m-2 s-1', &
avgflag='A', long_name='photosynthesis', &
ptr_patch=this%fpsn_patch, set_lake=0._r8, set_urb=0._r8)

! Don't by default output this rate limiting step as only makes sense if you are outputing
! the others each time-step
this%fpsn_wc_patch(begp:endp) = spval
call hist_addfld1d (fname='FPSN_WC', units='umol/m2s', &
call hist_addfld1d (fname='FPSN_WC', units='umol m-2 s-1', &
avgflag='I', long_name='Rubisco-limited photosynthesis', &
ptr_patch=this%fpsn_wc_patch, set_lake=0._r8, set_urb=0._r8, &
default='inactive')

! Don't by default output this rate limiting step as only makes sense if you are outputing
! the others each time-step
this%fpsn_wj_patch(begp:endp) = spval
call hist_addfld1d (fname='FPSN_WJ', units='umol/m2s', &
call hist_addfld1d (fname='FPSN_WJ', units='umol m-2 s-1', &
avgflag='I', long_name='RuBP-limited photosynthesis', &
ptr_patch=this%fpsn_wj_patch, set_lake=0._r8, set_urb=0._r8, &
default='inactive')

! Don't by default output this rate limiting step as only makes sense if you are outputing
! the others each time-step
this%fpsn_wp_patch(begp:endp) = spval
call hist_addfld1d (fname='FPSN_WP', units='umol/m2s', &
call hist_addfld1d (fname='FPSN_WP', units='umol m-2 s-1', &
avgflag='I', long_name='Product-limited photosynthesis', &
ptr_patch=this%fpsn_wp_patch, set_lake=0._r8, set_urb=0._r8, &
default='inactive')
Expand Down
2 changes: 1 addition & 1 deletion src/biogeophys/WaterfluxType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ subroutine InitHistory(this, bounds)
ptr_patch=this%qflx_evap_veg_patch, default='inactive', c2l_scale_type='urbanf')

this%qflx_evap_tot_patch(begp:endp) = spval
call hist_addfld1d (fname='QFLX_EVAP_TOT', units='mm H2O/s', &
call hist_addfld1d (fname='QFLX_EVAP_TOT', units='kg m-2 s-1', &
avgflag='A', long_name='qflx_evap_soi + qflx_evap_can + qflx_tran_veg', &
ptr_patch=this%qflx_evap_tot_patch, c2l_scale_type='urbanf')

Expand Down
6 changes: 3 additions & 3 deletions tools/contrib/singlept
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ datm_eyr=2014
#-- Modify landunit structure
overwrite_single_pft = True
dominant_pft = 7 #BETr
zero_nonveg_pfts = True
zero_nonveg_landunits= True
uniform_snowpack = True
no_saturation_excess = True

Expand Down Expand Up @@ -204,7 +204,7 @@ if create_surfdata:
if overwrite_single_pft:
f3['PCT_NAT_PFT'][:,:,:] = 0
f3['PCT_NAT_PFT'][:,:,dominant_pft] = 100
if zero_nonveg_pfts:
if zero_nonveg_landunits:
f3['PCT_NATVEG'][:,:] = 100
f3['PCT_CROP'][:,:] = 0
f3['PCT_LAKE'][:,:] = 0.
Expand Down Expand Up @@ -233,7 +233,7 @@ if create_surfdata:
f1.to_netcdf(path='~/junk.nc', mode='w')
#f1.to_netcdf(path=fsurf2, mode='w')
f1.close()
if zero_nonveg_pfts:
if zero_nonveg_landunits:
#f1 = xr.open_dataset(fsurf2)
f1 = xr.open_dataset('~/junk.nc')
f1['PCT_NATVEG'] = 100
Expand Down
21 changes: 13 additions & 8 deletions tools/contrib/ssp_anomaly_forcing_smooth
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ This script creates CLM anomaly forcing data

print( "Create anomoly forcing data that can be used by CTSM in CESM" )
# Input and output directories make sure they exist
datapath = "/glade/p/cesm/sdwg_dev/thesis/data/cesm_tools/anomalyforcing" # Path on cheyenne
datapath = "/glade/p/cgd/tss/historyfiles/" # Path on cheyenne
spath = './'
if ( os.path.exists(datapath) ):
print( "Input data directory:"+datapath )
Expand All @@ -67,24 +67,29 @@ else:
today = datetime.date.today()
creationdate = "_c"+today.strftime( "%Y%m%d" )
historydate = today.strftime( "%a %b %d %Y" )
sspnum = 3
sspnum = 4
smoothsize = 5

hist_case = 'b.e21.BHIST.f09_g17.CMIP6-historical.010'

if sspnum == 1:
# SSP1-26
ssptag = 'SSP1-2.6'
hist_case = 'b.e21.BHIST.f09_g17.CMIP6-historical.010'
fut_case = 'b.e21.BSSP126cmip6.f09_g17.CMIP6-SSP1-2.6.001'
if sspnum == 2:
elif sspnum == 2:
# SSP3-70
ssptag = 'SSP3-7.0'
hist_case = 'b.e21.BHIST.f09_g17.CMIP6-historical.010'
fut_case = 'b.e21.BSSP370cmip6.f09_g17.CMIP6-SSP3-7.0.001'
if sspnum == 3:
elif sspnum == 3:
# SSP5-85
ssptag = 'SSP5-8.5'
hist_case = 'b.e21.BHIST.f09_g17.CMIP6-historical.010'
fut_case = 'b.e21.BSSP585cmip6.f09_g17.CMIP6-SSP5-8.5.001'
elif sspnum == 4:
# SSP2-45
ssptag = 'SSP2-4.5'
fut_case = 'b.e21.BSSP245cmip6.f09_g17.CMIP6-SSP2-4.5.001'
else:
sys.exit( "sspnum is out of range: "+sspnum )

sspoutdir = 'anomaly_forcing/CMIP6-'+ssptag

Expand Down Expand Up @@ -121,7 +126,7 @@ futnm = nmo*fut_nyrs
totnm = nmo*tot_nyrs
outnm = nmo*fut_nyrs

dpath = datapath + '/historyfiles/'
dpath = datapath
dfile = '/lnd/proc/tseries/month_1/'
hdir = dpath+hist_case+dfile
fdir = dpath+fut_case+dfile
Expand Down

0 comments on commit 72a2987

Please sign in to comment.