diff --git a/bld/Makefile.in b/bld/Makefile.in index 9f16f305b8..96c3e0b06d 100644 --- a/bld/Makefile.in +++ b/bld/Makefile.in @@ -1122,7 +1122,7 @@ endif # ESMF_F90ESMFLINKLIBS ifneq ($(strip $(ESMF_LIBDIR)),) include $(ESMF_LIBDIR)/esmf.mk - FFLAGS += $(ESMF_F90COMPILEPATHS) + FFLAGS += $(ESMF_F90COMPILEPATHS) -DESMF_VERSION_MAJOR=$(ESMF_VERSION_MAJOR) -DESMF_VERSION_MINOR=$(ESMF_VERSION_MINOR) LDFLAGS += $(ESMF_F90LINKPATHS) $(ESMF_F90LINKRPATHS) $(ESMF_F90ESMFLINKLIBS) #override default linker with ESMF recommendation unless user has set linker ifeq ($(strip $(USER_LINKER)),) diff --git a/bld/namelist_files/use_cases/1950-2010_ccmi_refc1_waccmx_ma.xml b/bld/namelist_files/use_cases/1950-2010_ccmi_refc1_waccmx_ma.xml index 54634447f7..7354aabf3e 100644 --- a/bld/namelist_files/use_cases/1950-2010_ccmi_refc1_waccmx_ma.xml +++ b/bld/namelist_files/use_cases/1950-2010_ccmi_refc1_waccmx_ma.xml @@ -69,7 +69,6 @@ 'INTERP_MISSING_MONTHS' -atm/cam/chem/trop_mozart/emis/megan21_emis_factors_c20120313.nc .false. 'CH2O = formaldehyde', diff --git a/bld/namelist_files/use_cases/sd_waccm_ma_cam4.xml b/bld/namelist_files/use_cases/sd_waccm_ma_cam4.xml index e9747838ff..b2724af96a 100644 --- a/bld/namelist_files/use_cases/sd_waccm_ma_cam4.xml +++ b/bld/namelist_files/use_cases/sd_waccm_ma_cam4.xml @@ -83,7 +83,6 @@ 'INTERP_MISSING_MONTHS' -atm/cam/chem/trop_mozart/emis/megan21_emis_factors_c20120313.nc .false. 'CH2O = formaldehyde', diff --git a/bld/namelist_files/use_cases/sd_waccmx_ma_cam4.xml b/bld/namelist_files/use_cases/sd_waccmx_ma_cam4.xml index 95978db16b..167bf32918 100644 --- a/bld/namelist_files/use_cases/sd_waccmx_ma_cam4.xml +++ b/bld/namelist_files/use_cases/sd_waccmx_ma_cam4.xml @@ -69,7 +69,6 @@ 'INTERP_MISSING_MONTHS' -atm/cam/chem/trop_mozart/emis/megan21_emis_factors_c20120313.nc .false. 'CH2O = formaldehyde', diff --git a/bld/namelist_files/use_cases/waccm_ma_hist_cam4.xml b/bld/namelist_files/use_cases/waccm_ma_hist_cam4.xml index 2c1df5e57f..178fece0f3 100644 --- a/bld/namelist_files/use_cases/waccm_ma_hist_cam4.xml +++ b/bld/namelist_files/use_cases/waccm_ma_hist_cam4.xml @@ -68,7 +68,6 @@ 'INTERP_MISSING_MONTHS' -atm/cam/chem/trop_mozart/emis/megan21_emis_factors_c20120313.nc .false. 'CH2O = formaldehyde', diff --git a/bld/namelist_files/use_cases/waccmxie_ma_2000_cam4.xml b/bld/namelist_files/use_cases/waccmxie_ma_2000_cam4.xml index 364b249af3..018610cfd9 100644 --- a/bld/namelist_files/use_cases/waccmxie_ma_2000_cam4.xml +++ b/bld/namelist_files/use_cases/waccmxie_ma_2000_cam4.xml @@ -84,7 +84,6 @@ 2000 -atm/cam/chem/trop_mozart/emis/megan21_emis_factors_c20120313.nc .false. 'CH2O = formaldehyde', diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index dfbba10270..0f14b712eb 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -308,7 +308,6 @@ $COMP_ROOT_DIR_ATM/cime_config/usermods_dirs/aquap $COMP_ROOT_DIR_ATM/cime_config/usermods_dirs/aquap - $COMP_ROOT_DIR_ATM/cime_config/usermods_dirs/waccmx $COMP_ROOT_DIR_ATM/cime_config/usermods_dirs/scam_mandatory run_component_cam diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml index a6c6fe83f9..a267b29dd7 100644 --- a/cime_config/config_compsets.xml +++ b/cime_config/config_compsets.xml @@ -342,11 +342,11 @@ FW4madHIST - HIST_CAM40%WCMD_CLM40%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV + HIST_CAM40%WCMD_CLM50%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV FW4madSD - HIST_CAM40%WCMD%SDYN_CLM40%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV + HIST_CAM40%WCMD%SDYN_CLM50%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV @@ -355,27 +355,27 @@ FX2000 - 2000_CAM40%WXIE_CLM40%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV + 2000_CAM40%WXIE_CLM50%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV FXHIST - HIST_CAM40%WXIE_CLM40%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV + HIST_CAM40%WXIE_CLM50%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV FXmadHIST - HIST_CAM40%WXIED_CLM40%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV + HIST_CAM40%WXIED_CLM50%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV FXSD - HIST_CAM40%WXIE%SDYN_CLM40%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV + HIST_CAM40%WXIE%SDYN_CLM50%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV FXmadSD - HIST_CAM40%WXIED%SDYN_CLM40%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV + HIST_CAM40%WXIED%SDYN_CLM50%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV diff --git a/cime_config/testdefs/testlist_cam.xml b/cime_config/testdefs/testlist_cam.xml index c0647071e7..7e5d61ef9f 100644 --- a/cime_config/testdefs/testlist_cam.xml +++ b/cime_config/testdefs/testlist_cam.xml @@ -571,7 +571,7 @@ - + @@ -579,7 +579,7 @@ - + @@ -588,7 +588,7 @@ - + @@ -597,37 +597,42 @@ - + - + - + - + - + - + - + + + + + + @@ -637,23 +642,23 @@ - + - + - + - + @@ -661,7 +666,7 @@ - + @@ -690,17 +695,17 @@ - + - + - + @@ -710,7 +715,7 @@ - + @@ -719,7 +724,7 @@ - + @@ -1027,19 +1032,19 @@ - + - + - + diff --git a/cime_config/usermods_dirs/waccmx/user_nl_clm b/cime_config/usermods_dirs/waccmx/user_nl_clm deleted file mode 100644 index 09fd9bf389..0000000000 --- a/cime_config/usermods_dirs/waccmx/user_nl_clm +++ /dev/null @@ -1,3 +0,0 @@ - -finidat = '$DIN_LOC_ROOT/lnd/clm2/initdata/f.e11.FWTREFC1SD.f19.f19.ccmi30.001.clm2.r.2000-01-01-00000.nc' - diff --git a/doc/ChangeLog b/doc/ChangeLog index 6c93dccfe4..ff97831a30 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,5 +1,108 @@ =============================================================== +Tag name: cam6_1_004 +Originator(s): fvitt +Date: 6 Dec 2018 +One-line Summary: Use CLM50 in WACCMX compsets; bug fix and misc cleanup + +Purpose of changes: + + Use CLM50 in WACCMX compsets since CLM40 is deprecated beyond CESM2.1 + Fix bug in physics_update for WACCMX + - variable physics parameters need to be updated before use in physics_update + Misc cleanup + +Bugs fixed (include bugzilla ID): + + WACCMX physics parameters bug + - variable physics parameters need to be updated before use in physics_update + +Describe any changes made to build system: + +Describe any changes made to the namelist: + +List any changes to the defaults for the boundary datasets: + +Describe any substantial timing or memory changes: + +Code reviewed by: CAM review team + +List all files eliminated: +D components/cam/cime_config/usermods_dirs/waccmx +D components/cam/cime_config/usermods_dirs/waccmx/user_nl_clm + +List all files added and what they do: + +List all existing files that have been modified, and describe the changes: + +M components/cam/bld/Makefile.in + - need ESMF_VERSION* cpp variables set for cime + +M components/cam/bld/namelist_files/use_cases/sd_waccm_ma_cam4.xml + +M components/cam/bld/namelist_files/use_cases/1950-2010_ccmi_refc1_waccmx_ma.xml +M components/cam/bld/namelist_files/use_cases/waccmxie_ma_2000_cam4.xml +M components/cam/bld/namelist_files/use_cases/sd_waccmx_ma_cam4.xml +M components/cam/bld/namelist_files/use_cases/waccm_ma_hist_cam4.xml + - use the default MEGAN factors file for CLM5 + +M components/cam/cime_config/config_compsets.xml + - switch to CLM50 (CLM40 is deprecated) +M components/cam/cime_config/config_component.xml + - no longer need user mods to set CLM IC file + +M components/cam/cime_config/testdefs/testlist_cam.xml + - test WACCMX compsets with _mg17 ocean mask + - add WACCMX test + +M components/cam/src/physics/cam/physics_types.F90 + - need to set cpairv_loc and rairv_loc after physconst_update is called + - misc clean up + +M components/cam/src/chemistry/utils/apex.F90 + - write only 1 warning message to log when sim year is beyond 2020 + +If there were any failures reported from running test_driver.sh on any test +platform, and checkin with these failures has been OK'd by the gatekeeper, +then copy the lines from the td.*.status files for the failed tests to the +appropriate machine below. All failed tests must be justified. + +cheyenne/intel: +023 bl390 TBL.sh f1.9c4aqwmxdh outfrq3s+waccmx_ma_2000_cam4 9s ................................FAIL! rc= 7 at Wed Dec 5 16:01:35 MST 2018 +026 bl391 TBL.sh f1.9c4aqwmxidh outfrq3s 9s ...................................................FAIL! rc= 7 at Wed Dec 5 16:31:33 MST 2018 + - expected failures due to bug fix in physics_update + +cheyenne/intel/aux_cam: + ERP_Ld3.f19_f19_mg17.FW4madSD.cheyenne_intel.cam-outfrq3d (Overall: DIFF) details: + FAIL ERP_Ld3.f19_f19_mg17.FW4madSD.cheyenne_intel.cam-outfrq3d NLCOMP + FAIL ERP_Ld3.f19_f19_mg17.FW4madSD.cheyenne_intel.cam-outfrq3d BASELINE cam6_1_003: ERROR BFAIL baseline directory '/glade/p/cesmdata/cseg/cesm_baselines/cam6_1_003/ERP_Ld3.f19_f19_mg17.FW4madSD.cheyenne_intel.cam-outfrq3d' does not exist + - expected failures due to + . switch to CLM50 + . switch to mg17 ocean mask in aux_cam tests + + + ERS_Ln9.f19_f19_mg17.FXHIST.cheyenne_intel.cam-outfrq9s (Overall: DIFF) details: + FAIL ERS_Ln9.f19_f19_mg17.FXHIST.cheyenne_intel.cam-outfrq9s NLCOMP + FAIL ERS_Ln9.f19_f19_mg17.FXHIST.cheyenne_intel.cam-outfrq9s BASELINE cam6_1_003: ERROR BFAIL baseline directory '/glade/p/cesmdata/cseg/cesm_baselines/cam6_1_003/ERS_Ln9.f19_f19_mg17.FXHIST.cheyenne_intel.cam-outfrq9s' does not exist + SMS_D_Ln9.f19_f19_mg17.FXHIST.cheyenne_intel.cam-outfrq9s_amie (Overall: DIFF) details: + FAIL SMS_D_Ln9.f19_f19_mg17.FXHIST.cheyenne_intel.cam-outfrq9s_amie NLCOMP + FAIL SMS_D_Ln9.f19_f19_mg17.FXHIST.cheyenne_intel.cam-outfrq9s_amie BASELINE cam6_1_003: ERROR BFAIL baseline directory '/glade/p/cesmdata/cseg/cesm_baselines/cam6_1_003/SMS_D_Ln9.f19_f19_mg17.FXHIST.cheyenne_intel.cam-outfrq9s_amie' does not exist + - expected failures due to + . bug fix in physics_update + . switch to CLM50 + . switch to mg17 ocean mask in aux_cam tests + +hobart/nag: +050 bl426 TBL.sh f10c4aqwmxdm outfrq3s_newyear 9s .............................................FAIL! rc= 7 at Wed Dec 5 16:53:59 MST 2018 + - expected failure due to bug fix in physics_update + +hobart/pgi: All PASS + +Summarize any changes to answers: bit-for-bit unchanged expect for WACCMX + +=============================================================== +=============================================================== + Tag name: cam6_1_003 Originator(s): eaton Date: Fri Nov 30 15:08:35 MST 2018 diff --git a/src/chemistry/utils/apex.F90 b/src/chemistry/utils/apex.F90 index 6e24ec9dd4..d4b60af9b1 100644 --- a/src/chemistry/utils/apex.F90 +++ b/src/chemistry/utils/apex.F90 @@ -36,6 +36,7 @@ module apex use shr_kind_mod, only : r8 => shr_kind_r8 use cam_logfile, only : iulog use cam_abortutils,only : endrun + use spmd_utils, only : masterproc implicit none @@ -121,6 +122,7 @@ module apex integer, protected :: apex_end_yr logical :: igrf_set = .false. + logical :: first_warning = .false. contains !----------------------------------------------------------------------- @@ -203,9 +205,11 @@ subroutine ggrid(nvert,glatmin,glatmax,glonmin,glonmax,altmin,altmax, & if (gplon(nlon-1) >= glonmax) nlon = nlon-1 gpalt(1) = max(gpalt(1),0._r8) - write(iulog,"('ggrid: nlat=',i4,' gplat=',/,(6f9.2))") nlat,gplat - write(iulog,"('ggrid: nlon=',i4,' gplon=',/,(6f9.2))") nlon,gplon - write(iulog,"('ggrid: nalt=',i4,' gpalt=',/,(6f9.2))") nalt,gpalt + if (masterproc) then + write(iulog,"('ggrid: nlat=',i4,' gplat=',/,(6f9.2))") nlat,gplat + write(iulog,"('ggrid: nlon=',i4,' gplon=',/,(6f9.2))") nlon,gplon + write(iulog,"('ggrid: nalt=',i4,' gpalt=',/,(6f9.2))") nalt,gpalt + endif end subroutine ggrid @@ -1947,10 +1951,13 @@ subroutine cofrm(date) call endrun( 'cofrm' ) endif if (date > apex_end_yr-5) then + if (masterproc .and. .not. first_warning) then write(iulog,"('>>> WARNING cofrm:')") write(iulog,"(/,' This version of IGRF is intended for use up to ')") write(iulog,"(' 2020. Values for ',f9.3,' will be computed but')") date write(iulog,"(' may be of reduced accuracy.',/)") + first_warning=.true. + endif endif ! ! Set gh from g1,g2: diff --git a/src/physics/cam/physics_types.F90 b/src/physics/cam/physics_types.F90 index f08911ad50..e5626d060b 100644 --- a/src/physics/cam/physics_types.F90 +++ b/src/physics/cam/physics_types.F90 @@ -230,8 +230,8 @@ subroutine physics_update(state, ptend, dt, tend) real(r8) :: zvirv(state%psetcols,pver) ! Local zvir array pointer - real(r8),allocatable :: cpairv_loc(:,:,:) - real(r8),allocatable :: rairv_loc(:,:,:) + real(r8),allocatable :: cpairv_loc(:,:) + real(r8),allocatable :: rairv_loc(:,:) ! PERGRO limits cldliq/ice for macro/microphysics: character(len=24), parameter :: pergro_cldlim_names(4) = & @@ -272,29 +272,7 @@ subroutine physics_update(state, ptend, dt, tend) end if end if - !----------------------------------------------------------------------- - ! cpairv_loc and rairv_loc need to be allocated to a size which matches state and ptend - ! If psetcols == pcols, the cpairv is the correct size and just copy - ! If psetcols > pcols and all cpairv match cpair, then assign the constant cpair - if (state%psetcols == pcols) then - allocate (cpairv_loc(state%psetcols,pver,begchunk:endchunk)) - cpairv_loc(:,:,:) = cpairv(:,:,:) - else if (state%psetcols > pcols .and. all(cpairv(:,:,:) == cpair)) then - allocate(cpairv_loc(state%psetcols,pver,begchunk:endchunk)) - cpairv_loc(:,:,:) = cpair - else - call endrun('physics_update: cpairv is not allowed to vary when subcolumns are turned on') - end if - if (state%psetcols == pcols) then - allocate (rairv_loc(state%psetcols,pver,begchunk:endchunk)) - rairv_loc(:,:,:) = rairv(:,:,:) - else if (state%psetcols > pcols .and. all(rairv(:,:,:) == rair)) then - allocate(rairv_loc(state%psetcols,pver,begchunk:endchunk)) - rairv_loc(:,:,:) = rair - else - call endrun('physics_update: rairv_loc is not allowed to vary when subcolumns are turned on') - end if - + !----------------------------------------------------------------------- call phys_getopts(state_debug_checks_out=state_debug_checks) @@ -397,9 +375,30 @@ subroutine physics_update(state, ptend, dt, tend) if ( waccmx_is('ionosphere') .or. waccmx_is('neutral') ) then call physconst_update(state%q, state%t, state%lchnk, ncol) endif + + !----------------------------------------------------------------------- + ! cpairv_loc and rairv_loc need to be allocated to a size which matches state and ptend + ! If psetcols == pcols, the cpairv is the correct size and just copy + ! If psetcols > pcols and all cpairv match cpair, then assign the constant cpair + allocate(cpairv_loc(state%psetcols,pver)) + if (state%psetcols == pcols) then + cpairv_loc(:,:) = cpairv(:,:,state%lchnk) + else if (state%psetcols > pcols .and. all(cpairv(:,:,:) == cpair)) then + cpairv_loc(:,:) = cpair + else + call endrun('physics_update: cpairv is not allowed to vary when subcolumns are turned on') + end if + allocate(rairv_loc(state%psetcols,pver)) + if (state%psetcols == pcols) then + rairv_loc(:,:) = rairv(:,:,state%lchnk) + else if (state%psetcols > pcols .and. all(rairv(:,:,:) == rair)) then + rairv_loc(:,:) = rair + else + call endrun('physics_update: rairv_loc is not allowed to vary when subcolumns are turned on') + end if if ( waccmx_is('ionosphere') .or. waccmx_is('neutral') ) then - zvirv(:,:) = shr_const_rwv / rairv_loc(:,:,state%lchnk) - 1._r8 + zvirv(:,:) = shr_const_rwv / rairv_loc(:,:) - 1._r8 else zvirv(:,:) = zvir endif @@ -410,9 +409,9 @@ subroutine physics_update(state, ptend, dt, tend) if(ptend%ls) then do k = ptend%top_level, ptend%bot_level - state%t(:ncol,k) = state%t(:ncol,k) + ptend%s(:ncol,k)*dt/cpairv_loc(:ncol,k,state%lchnk) + state%t(:ncol,k) = state%t(:ncol,k) + ptend%s(:ncol,k)*dt/cpairv_loc(:ncol,k) if (present(tend)) & - tend%dtdt(:ncol,k) = tend%dtdt(:ncol,k) + ptend%s(:ncol,k)/cpairv_loc(:ncol,k,state%lchnk) + tend%dtdt(:ncol,k) = tend%dtdt(:ncol,k) + ptend%s(:ncol,k)/cpairv_loc(:ncol,k) end do end if @@ -421,11 +420,11 @@ subroutine physics_update(state, ptend, dt, tend) if (ptend%ls .or. ptend%lq(1)) then call geopotential_t ( & state%lnpint, state%lnpmid, state%pint , state%pmid , state%pdel , state%rpdel , & - state%t , state%q(:,:,1), rairv_loc(:,:,state%lchnk), gravit , zvirv , & + state%t , state%q(:,:,1), rairv_loc(:,:), gravit , zvirv , & state%zi , state%zm , ncol ) ! update dry static energy for use in next process do k = ptend%top_level, ptend%bot_level - state%s(:ncol,k) = state%t(:ncol,k )*cpairv_loc(:ncol,k,state%lchnk) & + state%s(:ncol,k) = state%t(:ncol,k)*cpairv_loc(:ncol,k) & + gravit*state%zm(:ncol,k) + state%phis(:ncol) end do end if @@ -1181,7 +1180,7 @@ subroutine physics_dme_adjust(state, tend, qini, dt) real(r8) :: zvirv(pcols,pver) ! Local zvir array pointer - real(r8),allocatable :: cpairv_loc(:,:,:) + real(r8),allocatable :: cpairv_loc(:,:) ! !----------------------------------------------------------------------- @@ -1248,12 +1247,11 @@ subroutine physics_dme_adjust(state, tend, qini, dt) ! If psetcols == pcols, cpairv is the correct size and just copy into cpairv_loc ! If psetcols > pcols and all cpairv match cpair, then assign the constant cpair + allocate(cpairv_loc(state%psetcols,pver)) if (state%psetcols == pcols) then - allocate (cpairv_loc(state%psetcols,pver,begchunk:endchunk)) - cpairv_loc(:,:,:) = cpairv(:,:,:) + cpairv_loc(:,:) = cpairv(:,:,state%lchnk) else if (state%psetcols > pcols .and. all(cpairv(:,:,:) == cpair)) then - allocate(cpairv_loc(state%psetcols,pver,begchunk:endchunk)) - cpairv_loc(:,:,:) = cpair + cpairv_loc(:,:) = cpair else call endrun('physics_dme_adjust: cpairv is not allowed to vary when subcolumns are turned on') end if @@ -1261,7 +1259,7 @@ subroutine physics_dme_adjust(state, tend, qini, dt) call geopotential_dse(state%lnpint, state%lnpmid, state%pint, & state%pmid , state%pdel , state%rpdel, & state%s , state%q(:,:,1), state%phis , rairv(:,:,state%lchnk), & - gravit, cpairv_loc(:,:,state%lchnk), zvirv, & + gravit, cpairv_loc(:,:), zvirv, & state%t , state%zi , state%zm , ncol) deallocate(cpairv_loc)