From 228b1d83ed5c9e0aaf1f803ce06b2ef9976cf070 Mon Sep 17 00:00:00 2001 From: Brian Eaton Date: Thu, 29 Nov 2018 10:48:45 -0700 Subject: [PATCH] 'merge fixes from release branch Imported from https://svn-ccsm-models.cgd.ucar.edu/cam1/trunk@90256 Committed by Brian Eaton at 2018-11-29 10:48:45 -0700 Original svn commit message: merge fixes from release branch' --- cime_config/config_component.xml | 39 +++++---- cime_config/config_compsets.xml | 45 +++------- doc/ChangeLog | 87 +++++++++++++++++++ src/dynamics/eul/dyn_comp.F90 | 31 ++++--- .../initial_conditions/ic_baroclinic.F90 | 31 +++++-- src/physics/simple/tj2016.F90 | 2 +- 6 files changed, 163 insertions(+), 72 deletions(-) diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index 7873931219..dfbba10270 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -8,9 +8,9 @@ CAM =============== --> - CAM cam6 physics: - CAM cam5 physics: - CAM cam4 physics: + CAM cam6 physics: + CAM cam5 physics: + CAM cam4 physics: CAM simplified and non-versioned physics : CAM stand-alone single column mode -- need to define usermods directory with IOP settings: - CAM winds and temperature nudged towards prescribed meteorology: + CAM winds and temperature nudged towards prescribed meteorology: -analytic_ic @@ -240,13 +240,14 @@ 2006-2100_cam5_rcp60 2006-2100_cam5_rcp85 - sd_waccmx_ma_cam4 - sd_waccm_tsmlt_cam6 - sd_waccm_ma_cam6 - sd_waccm_ma_cam6 - sd_waccm_ma_cam4 - sd_trop_strat_vbs_cam6 - sd_cam6 + sd_waccmx_ma_cam4 + sd_waccmx_ma_cam4 + sd_waccm_tsmlt_cam6 + sd_waccm_ma_cam6 + sd_waccm_ma_cam6 + sd_waccm_ma_cam4 + sd_trop_strat_vbs_cam6 + sd_cam6 dabi_p2004 held_suarez_1994 diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml index 5e07c0c925..a6c6fe83f9 100644 --- a/cime_config/config_compsets.xml +++ b/cime_config/config_compsets.xml @@ -215,12 +215,12 @@ FCSD - SDYN_CAM60%CCTS_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV + HIST_CAM60%CCTS%SDYN_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV FSD - SDYN_CAM60_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV + HIST_CAM60%SDYN_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV @@ -312,7 +312,7 @@ FWSD - SDYN_CAM60%WCTS_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV + HIST_CAM60%WCTS%SDYN_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV @@ -327,7 +327,7 @@ FWmaSD - SDYN_CAM60%WCCM_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV + HIST_CAM60%WCCM%SDYN_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV @@ -337,7 +337,7 @@ FWmadSD - SDYN_CAM60%WCMD_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV + HIST_CAM60%WCMD%SDYN_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV @@ -346,7 +346,7 @@ FW4madSD - SDYN_CAM40%WCMD_CLM40%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV + HIST_CAM40%WCMD%SDYN_CLM40%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV @@ -356,13 +356,11 @@ FX2000 2000_CAM40%WXIE_CLM40%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV - FXHIST HIST_CAM40%WXIE_CLM40%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV - @@ -372,13 +370,12 @@ FXSD - SDYN_CAM40%WXIE_CLM40%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV - + HIST_CAM40%WXIE%SDYN_CLM40%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV FXmadSD - SDYN_CAM40%WXIED_CLM40%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV + HIST_CAM40%WXIED%SDYN_CLM40%SP_CICE%PRES_DOCN%DOM_RTM_SGLC_SWAV @@ -396,9 +393,9 @@ 1995-01-01 1995-01-01 2005-01-01 - 2005-01-01 - 2010-01-01 - 2000-01-01 + 2005-01-01 + 2010-01-01 + 2000-01-01 2004-01-01 1950-01-01 @@ -427,7 +424,7 @@ - GREGORIAN + GREGORIAN GREGORIAN @@ -469,12 +466,6 @@ $DIN_LOC_ROOT/atm/cam/sst/sst_HadOIBl_bc_0.9x1.25_2010climo_c180511.nc $DIN_LOC_ROOT/atm/cam/sst/sst_HadOIBl_bc_0.47x0.63_2010climo_c180511.nc $DIN_LOC_ROOT/atm/cam/sst/sst_HadOIBl_bc_0.23x0.31_2010climo_c180511.nc - - - $DIN_LOC_ROOT/atm/cam/sst/sst_HadOIBl_bc_1.9x2.5_1850_2016_c170525.nc - $DIN_LOC_ROOT/atm/cam/sst/sst_HadOIBl_bc_0.9x1.25_1850_2016_c170525.nc - $DIN_LOC_ROOT/atm/cam/sst/sst_HadOIBl_bc_0.47x0.63_1850_2016_c170525.nc - $DIN_LOC_ROOT/atm/cam/sst/sst_HadOIBl_bc_0.23x0.31_1850_2016_c170525.nc @@ -502,19 +493,9 @@ $DIN_LOC_ROOT/atm/cam/ocnfrac/domain.camocn.0.23x0.31_gx1v6_101108.nc - - - 1850 - - - - - 1850 - - - 2016 + 2016 diff --git a/doc/ChangeLog b/doc/ChangeLog index 0058534a71..77a531ae72 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,5 +1,92 @@ =============================================================== +Tag name: cam6_1_002 +Originator(s): eaton, fvitt +Date: Thu Nov 29 10:42:15 MST 2018 +One-line Summary: merge fixes from release branch + +Purpose of changes: +. Don't allow EUL initialization to change the dry mass when it has been + set via the analytic initial conditions option. + +. Fix analytic IC code for baroclinic wave to correctly initialize + constituents. The problem only shows up with EUL dycore. + +. Use "HIST_" time period and "%SDYN" in longname of SD compsets (specified dynamics). + This configures CLM to be in a transient mode. + +Bugs fixed (include bugzilla ID): above + +Describe any changes made to build system: none + +Describe any changes made to the namelist: none + +List any changes to the defaults for the boundary datasets: none + +Describe any substantial timing or memory changes: none + +Code reviewed by: eaton + +List all files eliminated: none + +List all files added and what they do: none + +List all existing files that have been modified, and describe the changes: +components/cam/cime_config/config_component.xml +components/cam/cime_config/config_compsets.xml +. use "HIST_" time period and "%SDYN" in longname of SD compsets (specified + dynamics). + +components/cam/src/dynamics/eul/dyn_comp.F90 +. global_int + - modify so that no change is made to PS if the analytic IC code is + active. + +components/cam/src/dynamics/tests/initial_conditions/ic_baroclinic.F90 +. bc_wav_set_ic + - remove assumption that all constituents are present in input + constituent array. This is to handle the Eulerian dycore which passes + one constituent at a time. + +components/cam/src/physics/simple/tj2016.F90 +. Thatcher_Jablonowski_sfc_pbl_hs + - change dimension of pint dummy arg from pver to pver+1 + +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: PASS + +cheyenne/intel/aux_cam: +ERP_Ld3.f19_f19_mg16.FW4madSD.cheyenne_intel.cam-outfrq3d (Overall: DIFF) details: + FAIL ERP_Ld3.f19_f19_mg16.FW4madSD.cheyenne_intel.cam-outfrq3d NLCOMP + FAIL ERP_Ld3.f19_f19_mg16.FW4madSD.cheyenne_intel.cam-outfrq3d BASELINE cam6_1_001: DIFF +SMS_D_Ln9.f09_f09_mg17.FSD.cheyenne_intel.cam-outfrq9s (Overall: DIFF) details: + FAIL SMS_D_Ln9.f09_f09_mg17.FSD.cheyenne_intel.cam-outfrq9s NLCOMP + FAIL SMS_D_Ln9.f09_f09_mg17.FSD.cheyenne_intel.cam-outfrq9s BASELINE cam6_1_001: DIFF + +- expected baseline failures due to changes in CLM namelist options in SD compsets + +SMS_Ld5.f09_f09_mg17.PC6.cheyenne_intel.cam-cam6_port_f09 (Overall: PASS) details: + FAIL SMS_Ld5.f09_f09_mg17.PC6.cheyenne_intel.cam-cam6_port_f09 MEMCOMP Error: Memory usage increase > 10% from baseline + +- looks like a testing glitch + +hobart/nag: PASS + +hobart/pgi: PASS + +CAM tag used for the baseline comparison tests if different than previous +tag: + +Summarize any changes to answers: BFB except SD compsets and some Eulerian + simple model configurations with terminator chemistry and moist physics. + +=============================================================== +=============================================================== + Tag name: cam6_1_001 Originator(s): eaton Date: Mon Nov 12 14:03:45 MST 2018 diff --git a/src/dynamics/eul/dyn_comp.F90 b/src/dynamics/eul/dyn_comp.F90 index d50ef6df21..5208bd122d 100644 --- a/src/dynamics/eul/dyn_comp.F90 +++ b/src/dynamics/eul/dyn_comp.F90 @@ -918,6 +918,7 @@ subroutine global_int() use hycoef, only: hyai, ps0 use eul_control_mod, only: pdela, qmass1, tmassf, fixmas, & tmass0, zgsint, qmass2, qmassf + use inic_analytic, only: analytic_ic_active !---------------------------Local workspace----------------------------- @@ -1020,11 +1021,15 @@ subroutine global_int() zgsint_tmp = zgsint_tmp*.5_r8/gravit qmassf_tmp = qmass1_tmp + qmass2_tmp - ! Globally avgd sfc. partial pressure of dry air (i.e. global dry mass): - tmass0 = 98222._r8/gravit - if (.not. associated(fh_topo)) tmass0 = (101325._r8-245._r8)/gravit - if (adiabatic) tmass0 = tmassf_tmp - if (ideal_phys ) tmass0 = 100000._r8/gravit + if (analytic_ic_active()) then + tmass0 = tmassf_tmp + else + ! Globally avgd sfc. partial pressure of dry air (i.e. global dry mass): + tmass0 = 98222._r8/gravit + if (.not. associated(fh_topo)) tmass0 = (101325._r8-245._r8)/gravit + if (adiabatic) tmass0 = tmassf_tmp + if (ideal_phys ) tmass0 = 100000._r8/gravit + end if if (masterproc) then write(iulog,*) sub//': INFO:' @@ -1034,14 +1039,18 @@ subroutine global_int() write(iulog,*) ' Globally averaged geopotential height (m) = ', zgsint_tmp end if - ! Compute and apply an initial mass fix factor which preserves horizontal - ! gradients of ln(ps). - if (.not. moist_physics) then - fixmas = tmass0/tmassf_tmp + if (analytic_ic_active()) then + fixmas = 1._r8 else - fixmas = (tmass0 + qmass1_tmp)/(tmassf_tmp - qmass2_tmp) + ! Compute and apply an initial mass fix factor which preserves horizontal + ! gradients of ln(ps). + if (.not. moist_physics) then + fixmas = tmass0/tmassf_tmp + else + fixmas = (tmass0 + qmass1_tmp)/(tmassf_tmp - qmass2_tmp) + end if + ps_tmp = ps_tmp*fixmas end if - ps_tmp = ps_tmp*fixmas ! Global integerals tmassf = tmassf_tmp diff --git a/src/dynamics/tests/initial_conditions/ic_baroclinic.F90 b/src/dynamics/tests/initial_conditions/ic_baroclinic.F90 index 34a25922c3..4bc9b0e7bb 100644 --- a/src/dynamics/tests/initial_conditions/ic_baroclinic.F90 +++ b/src/dynamics/tests/initial_conditions/ic_baroclinic.F90 @@ -113,6 +113,7 @@ subroutine bc_wav_set_ic(vcoord,latvals, lonvals, U, V, T, PS, PHIS, & real(r8) :: psurface real(r8) :: wvp,qdry logical :: lU, lV, lT, lQ, l3d_vars + logical :: cnst1_is_moisture real(r8), allocatable :: pdry_half(:), pwet_half(:),zdry_half(:),zk(:) if ((vcoord == vc_moist_pressure) .or. (vcoord == vc_dry_pressure)) then @@ -216,7 +217,13 @@ subroutine bc_wav_set_ic(vcoord,latvals, lonvals, U, V, T, PS, PHIS, & if (lu) nlev = size(U, 2) if (lv) nlev = size(V, 2) if (lt) nlev = size(T, 2) - if (lq) nlev = size(Q, 2) + + if (lq) then + nlev = size(Q, 2) + ! check whether first constituent in Q is water vapor. + cnst1_is_moisture = m_cnst(1) == 1 + end if + allocate(zk(nlev+1)) if ((lq.or.lt) .and. (vcoord == vc_dry_pressure)) then allocate(pdry_half(nlev+1)) @@ -259,7 +266,7 @@ subroutine bc_wav_set_ic(vcoord,latvals, lonvals, U, V, T, PS, PHIS, & else qk = 0.d0 end if - if (lq) Q(i,k,1) = qk + if (lq .and. cnst1_is_moisture) Q(i,k,1) = qk if (lt) then tvk = Tv_given_z(zk(k),latvals(i)) T(i,k) = tvk / (1.d0 + Mvap * qk) @@ -290,7 +297,7 @@ subroutine bc_wav_set_ic(vcoord,latvals, lonvals, U, V, T, PS, PHIS, & else qdry = 0.0_r8 end if - if (lq) then + if (lq .and. cnst1_is_moisture) then Q(i,k,1) = qdry end if if (lt) then @@ -307,21 +314,25 @@ subroutine bc_wav_set_ic(vcoord,latvals, lonvals, U, V, T, PS, PHIS, & if(lu .and. masterproc.and. verbose_use) write(iulog,*) ' U initialized by "',subname,'"' if(lv .and. masterproc.and. verbose_use) write(iulog,*) ' V initialized by "',subname,'"' if(lt .and. masterproc.and. verbose_use) write(iulog,*) ' T initialized by "',subname,'"' - if(lq .and. masterproc.and. verbose_use) write(iulog,*) & + if(lq .and. cnst1_is_moisture .and. masterproc.and. verbose_use) write(iulog,*) & ' ', trim(cnst_name(m_cnst(1))), ' initialized by "',subname,'"' end if if (lq) then ncnst = size(m_cnst, 1) if ((vcoord == vc_moist_pressure) .or. (vcoord == vc_dry_pressure)) then - do m = 2, ncnst - call cnst_init_default(m_cnst(m), latvals, lonvals, Q(:,:,m_cnst(m)),& + do m = 1, ncnst + + ! water vapor already done above + if (m_cnst(m) == 1) cycle + + call cnst_init_default(m_cnst(m), latvals, lonvals, Q(:,:,m),& mask=mask_use, verbose=verbose_use, notfound=.false.) #if 0 do k = 1, nlev do i=1,ncol if (mask_use(i)) then - Q(i,k,m_cnst(m)) = test_func(latvals(i),lonvals(i), k, m) + Q(i,k,m) = test_func(latvals(i),lonvals(i), k, m) end if end do end do @@ -330,8 +341,10 @@ subroutine bc_wav_set_ic(vcoord,latvals, lonvals, U, V, T, PS, PHIS, & end if #endif end do - end if - end if + + end if ! vcoord + end if ! lq + deallocate(mask_use) if (l3d_vars) then deallocate(zk) diff --git a/src/physics/simple/tj2016.F90 b/src/physics/simple/tj2016.F90 index 542ae54da4..5f46b13e2d 100644 --- a/src/physics/simple/tj2016.F90 +++ b/src/physics/simple/tj2016.F90 @@ -176,7 +176,7 @@ subroutine Thatcher_Jablonowski_sfc_pbl_hs(ncol, pver, dtime, clat, & real(r8), intent(in) :: clat(ncol) ! latitude real(r8), intent(in) :: PS(ncol) ! surface pressure (Pa) real(r8), intent(in) :: pmid(ncol,pver) ! mid-point pressure (Pa) - real(r8), intent(in) :: pint(ncol,pver) ! interface pressure (Pa) + real(r8), intent(in) :: pint(ncol,pver+1) ! interface pressure (Pa) real(r8), intent(in) :: lnpint(ncol,2) ! ln(interface pressure (Pa)) at and above the surface real(r8), intent(in) :: rpdel(ncol,pver) ! reciprocal of layer thickness (Pa)