From cbd021706ee7d1c1c70ce59e433b77be35fe035d Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Fri, 27 Oct 2017 11:23:40 -0600 Subject: [PATCH 01/21] Allow different glc2ocn mappings for liq and ice For now, I'm using the same mapping files for both liq and ice (with the same mapping files that have been used in the past) --- config/acme/config_grids.xml | 39 ++++++++++------ config/cesm/config_grids.xml | 27 ++++++++---- src/drivers/mct/cime_config/buildnml | 3 +- .../mct/cime_config/config_component.xml | 25 +++++++++-- .../cime_config/namelist_definition_drv.xml | 40 ++++++++++++++--- src/drivers/mct/main/prep_ocn_mod.F90 | 44 ++++++++++++++----- src/drivers/mct/shr/seq_flds_mod.F90 | 8 ++++ 7 files changed, 142 insertions(+), 44 deletions(-) diff --git a/config/acme/config_grids.xml b/config/acme/config_grids.xml index 3ce67f709f7..549677b15df 100644 --- a/config/acme/config_grids.xml +++ b/config/acme/config_grids.xml @@ -2451,44 +2451,55 @@ - cpl/gridmaps/gland4km/map_gland4km_to_gx1v6_nnsm_e1000r300_150512.nc + cpl/gridmaps/gland4km/map_gland4km_to_gx1v6_nnsm_e1000r300_150512.nc + cpl/gridmaps/gland4km/map_gland4km_to_gx1v6_nnsm_e1000r300_150512.nc - cpl/gridmaps/gland4km/map_gland4km_to_gx3v7_nnsm_e1000r300_150514.nc + cpl/gridmaps/gland4km/map_gland4km_to_gx3v7_nnsm_e1000r300_150514.nc + cpl/gridmaps/gland4km/map_gland4km_to_gx3v7_nnsm_e1000r300_150514.nc - cpl/gridmaps/gland5km/map_gland5km_to_gx1v6_nnsm_e1000r300_150512.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx1v6_nnsm_e1000r300_150512.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx1v6_nnsm_e1000r300_150512.nc - cpl/gridmaps/gland5km/map_gland5km_to_gx3v7_nnsm_e1000r300_150514.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx3v7_nnsm_e1000r300_150514.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx3v7_nnsm_e1000r300_150514.nc - cpl/gridmaps/gland5km/map_gland5km_to_gx1v6_nnsm_e1000r300_150512.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx1v6_nnsm_e1000r300_150512.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx1v6_nnsm_e1000r300_150512.nc - cpl/gridmaps/gland5km/map_gland5km_to_gx3v7_nnsm_e1000r300_150514.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx3v7_nnsm_e1000r300_150514.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx3v7_nnsm_e1000r300_150514.nc - cpl/gridmaps/gland10km/map_gland10km_to_gx1v6_nnsm_e1000r300_150512.nc + cpl/gridmaps/gland10km/map_gland10km_to_gx1v6_nnsm_e1000r300_150512.nc + cpl/gridmaps/gland10km/map_gland10km_to_gx1v6_nnsm_e1000r300_150512.nc - cpl/gridmaps/gland10km/map_gland10km_to_gx3v7_nnsm_e1000r300_150514.nc + cpl/gridmaps/gland10km/map_gland10km_to_gx3v7_nnsm_e1000r300_150514.nc + cpl/gridmaps/gland10km/map_gland10km_to_gx3v7_nnsm_e1000r300_150514.nc - cpl/gridmaps/gland20km/map_gland20km_to_gx1v6_nnsm_e1000r300_150512.nc + cpl/gridmaps/gland20km/map_gland20km_to_gx1v6_nnsm_e1000r300_150512.nc + cpl/gridmaps/gland20km/map_gland20km_to_gx1v6_nnsm_e1000r300_150512.nc - cpl/gridmaps/gland20km/map_gland20km_to_gx3v7_nnsm_e1000r300_150514.nc + cpl/gridmaps/gland20km/map_gland20km_to_gx3v7_nnsm_e1000r300_150514.nc + cpl/gridmaps/gland20km/map_gland20km_to_gx3v7_nnsm_e1000r300_150514.nc - cpl/gridmaps/mpas.gis20km/map_mpas.gis20km_to_mpas120_nnsmooth_150924.nc + cpl/gridmaps/mpas.gis20km/map_mpas.gis20km_to_mpas120_nnsmooth_150924.nc + cpl/gridmaps/mpas.gis20km/map_mpas.gis20km_to_mpas120_nnsmooth_150924.nc @@ -2647,7 +2658,8 @@ cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU240_aave.151209.nc cpl/gridmaps/oQU240/map_oQU240_to_ais20km_aave.151209.nc cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU240_nearestdtos.151209.nc - cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU240_nearestdtos.151209.nc + cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU240_nearestdtos.151209.nc + cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU240_nearestdtos.151209.nc cpl/gridmaps/oQU240/map_oQU240_to_ais20km_nearestdtos.151209.nc @@ -2655,7 +2667,8 @@ cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU120_aave.160331.nc cpl/gridmaps/oQU120/map_oQU120_to_ais20km_aave.160331.nc cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU120_nearestdtos.160331.nc - cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU120_nearestdtos.160331.nc + cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU120_nearestdtos.160331.nc + cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU120_nearestdtos.160331.nc cpl/gridmaps/oQU120/map_oQU120_to_ais20km_nearestdtos.160331.nc diff --git a/config/cesm/config_grids.xml b/config/cesm/config_grids.xml index c478d59ed0c..a25e8d5e07f 100644 --- a/config/cesm/config_grids.xml +++ b/config/cesm/config_grids.xml @@ -2081,33 +2081,42 @@ - cpl/gridmaps/gland4km/map_gland4km_to_gx1v6_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland4km/map_gland4km_to_gx1v6_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland4km/map_gland4km_to_gx1v6_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland4km/map_gland4km_to_gx1v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland4km/map_gland4km_to_gx1v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland4km/map_gland4km_to_gx1v7_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland4km/map_gland4km_to_gx3v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland4km/map_gland4km_to_gx3v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland4km/map_gland4km_to_gx3v7_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland5km/map_gland5km_to_gx1v6_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx1v6_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx1v6_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland5km/map_gland5km_to_gx1v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx1v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx1v7_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland5km/map_gland5km_to_gx3v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx3v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx3v7_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland20km/map_gland20km_to_gx1v6_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland20km/map_gland20km_to_gx1v6_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland20km/map_gland20km_to_gx1v6_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland20km/map_gland20km_to_gx1v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland20km/map_gland20km_to_gx1v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland20km/map_gland20km_to_gx1v7_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland20km/map_gland20km_to_gx3v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland20km/map_gland20km_to_gx3v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland20km/map_gland20km_to_gx3v7_nnsm_e1000r300_170501.nc diff --git a/src/drivers/mct/cime_config/buildnml b/src/drivers/mct/cime_config/buildnml index 970efa691c0..430b397e205 100755 --- a/src/drivers/mct/cime_config/buildnml +++ b/src/drivers/mct/cime_config/buildnml @@ -213,7 +213,8 @@ def write_seq_maps_file(case, nmlgen, confdir): # The following is only approriate for config_grids.xml version 2.0 or later grid_version = Grids().get_version() if grid_version >= 2.0: - ignore_idmaps = ["rof2ocn_fmapname", "glc2ice_rmapname", "glc2ocn_rmapname"] + ignore_idmaps = ["rof2ocn_fmapname", "glc2ice_rmapname", + "glc2ocn_liq_rmapname", "glc2ocn_ice_rmapname"] group_variables = nmlgen.get_group_variables("seq_maps") for name in group_variables: value = group_variables[name] diff --git a/src/drivers/mct/cime_config/config_component.xml b/src/drivers/mct/cime_config/config_component.xml index 18ea56ec15e..38b9e05f720 100644 --- a/src/drivers/mct/cime_config/config_component.xml +++ b/src/drivers/mct/cime_config/config_component.xml @@ -1626,21 +1626,38 @@ glc2ice runoff mapping file decomp type - + char idmap run_domain env_run.xml - glc2ocn runoff mapping file + glc2ocn runoff mapping file for liquid runoff - + char X,Y Y run_domain env_run.xml - glc2ocn runoff mapping file decomp type + glc2ocn runoff mapping file decomp type for liquid runoff + + + + char + idmap + run_domain + env_run.xml + glc2ocn runoff mapping file for ice runoff + + + + char + X,Y + Y + run_domain + env_run.xml + glc2ocn runoff mapping file decomp type for ice runoff diff --git a/src/drivers/mct/cime_config/namelist_definition_drv.xml b/src/drivers/mct/cime_config/namelist_definition_drv.xml index 083b03fda4f..11db20f71a1 100644 --- a/src/drivers/mct/cime_config/namelist_definition_drv.xml +++ b/src/drivers/mct/cime_config/namelist_definition_drv.xml @@ -3558,20 +3558,20 @@ - + char mapping abs seq_maps - glc to ocn runoff conservative mapping file + glc to ocn runoff conservative mapping file for liquid runoff - $GLC2OCN_RMAPNAME + $GLC2OCN_LIQ_RMAPNAME - + char mapping seq_maps @@ -3583,7 +3583,37 @@ grid. - $GLC2OCN_RMAPTYPE + $GLC2OCN_LIQ_RMAPTYPE + X + + + + + char + mapping + abs + seq_maps + + glc to ocn runoff conservative mapping file for ice runoff + + + $GLC2OCN_ICE_RMAPNAME + + + + + char + mapping + seq_maps + + The type of mapping desired, either "source" or "destination" mapping. + X is associated with rearrangement of the source grid to the + destination grid and then local mapping. Y is associated with mapping + on the source grid and then rearrangement and sum to the destination + grid. + + + $GLC2OCN_ICE_RMAPTYPE X diff --git a/src/drivers/mct/main/prep_ocn_mod.F90 b/src/drivers/mct/main/prep_ocn_mod.F90 index 6f14a5aca9f..27acfaa5af0 100644 --- a/src/drivers/mct/main/prep_ocn_mod.F90 +++ b/src/drivers/mct/main/prep_ocn_mod.F90 @@ -56,7 +56,8 @@ module prep_ocn_mod public :: prep_ocn_get_mapper_Rr2o_liq public :: prep_ocn_get_mapper_Rr2o_ice public :: prep_ocn_get_mapper_SFi2o - public :: prep_ocn_get_mapper_Rg2o + public :: prep_ocn_get_mapper_Rg2o_liq + public :: prep_ocn_get_mapper_Rg2o_ice public :: prep_ocn_get_mapper_Sw2o !-------------------------------------------------------------------------- @@ -77,7 +78,8 @@ module prep_ocn_mod type(seq_map), pointer :: mapper_Rr2o_liq type(seq_map), pointer :: mapper_Rr2o_ice type(seq_map), pointer :: mapper_SFi2o - type(seq_map), pointer :: mapper_Rg2o + type(seq_map), pointer :: mapper_Rg2o_liq + type(seq_map), pointer :: mapper_Rg2o_ice type(seq_map), pointer :: mapper_Sw2o ! attribute vectors @@ -169,7 +171,8 @@ subroutine prep_ocn_init(infodata, atm_c2_ocn, atm_c2_ice, ice_c2_ocn, rof_c2_oc allocate(mapper_Rr2o_liq) allocate(mapper_Rr2o_ice) allocate(mapper_SFi2o) - allocate(mapper_Rg2o) + allocate(mapper_Rg2o_liq) + allocate(mapper_Rg2o_ice) allocate(mapper_Sw2o) if (ocn_present) then @@ -321,11 +324,19 @@ subroutine prep_ocn_init(infodata, atm_c2_ocn, atm_c2_ice, ice_c2_ocn, rof_c2_oc if (glc_c2_ocn) then if (iamroot_CPLID) then write(logunit,*) ' ' - write(logunit,F00) 'Initializing mapper_Rg2o' + write(logunit,F00) 'Initializing mapper_Rg2o_liq' end if - call seq_map_init_rcfile(mapper_Rg2o, glc(1), ocn(1), & - 'seq_maps.rc', 'glc2ocn_rmapname:', 'glc2ocn_rmaptype:',samegrid_og, & - 'mapper_Rg2o initialization',esmf_map_flag) + call seq_map_init_rcfile(mapper_Rg2o_liq, glc(1), ocn(1), & + 'seq_maps.rc', 'glc2ocn_liq_rmapname:', 'glc2ocn_liq_rmaptype:',samegrid_og, & + 'mapper_Rg2o_liq initialization',esmf_map_flag) + + if (iamroot_CPLID) then + write(logunit,*) ' ' + write(logunit,F00) 'Initializing mapper_Rg2o_ice' + end if + call seq_map_init_rcfile(mapper_Rg2o_ice, glc(1), ocn(1), & + 'seq_maps.rc', 'glc2ocn_ice_rmapname:', 'glc2ocn_ice_rmaptype:',samegrid_og, & + 'mapper_Rg2o_ice initialization',esmf_map_flag) endif call shr_sys_flush(logunit) @@ -1233,7 +1244,11 @@ subroutine prep_ocn_calc_g2x_ox(timer) call t_drvstartf (trim(timer),barrier=mpicom_CPLID) do egi = 1,num_inst_glc g2x_gx => component_get_c2x_cx(glc(egi)) - call seq_map_map(mapper_Rg2o, g2x_gx, g2x_ox(egi), norm=.true.) + call seq_map_map(mapper_Rg2o_liq, g2x_gx, g2x_ox(egi), & + fldlist=seq_flds_g2o_liq_fluxes, norm=.true.) + + call seq_map_map(mapper_Rg2o_ice, g2x_gx, g2x_ox(egi), & + fldlist=seq_flds_g2o_ice_fluxes, norm=.true.) enddo call t_drvstopf (trim(timer)) end subroutine prep_ocn_calc_g2x_ox @@ -1334,10 +1349,15 @@ function prep_ocn_get_mapper_SFi2o() prep_ocn_get_mapper_SFi2o => mapper_SFi2o end function prep_ocn_get_mapper_SFi2o - function prep_ocn_get_mapper_Rg2o() - type(seq_map), pointer :: prep_ocn_get_mapper_Rg2o - prep_ocn_get_mapper_Rg2o => mapper_Rg2o - end function prep_ocn_get_mapper_Rg2o + function prep_ocn_get_mapper_Rg2o_liq() + type(seq_map), pointer :: prep_ocn_get_mapper_Rg2o_liq + prep_ocn_get_mapper_Rg2o_liq => mapper_Rg2o_liq + end function prep_ocn_get_mapper_Rg2o_liq + + function prep_ocn_get_mapper_Rg2o_ice() + type(seq_map), pointer :: prep_ocn_get_mapper_Rg2o_ice + prep_ocn_get_mapper_Rg2o_ice => mapper_Rg2o_ice + end function prep_ocn_get_mapper_Rg2o_ice function prep_ocn_get_mapper_Sw2o() type(seq_map), pointer :: prep_ocn_get_mapper_Sw2o diff --git a/src/drivers/mct/shr/seq_flds_mod.F90 b/src/drivers/mct/shr/seq_flds_mod.F90 index 1c37c5f9535..19e6cbf6f54 100644 --- a/src/drivers/mct/shr/seq_flds_mod.F90 +++ b/src/drivers/mct/shr/seq_flds_mod.F90 @@ -197,6 +197,8 @@ module seq_flds_mod character(CXX) :: seq_flds_g2x_states_to_lnd character(CXX) :: seq_flds_g2x_fluxes character(CXX) :: seq_flds_g2x_fluxes_to_lnd + character(CXX) :: seq_flds_g2o_liq_fluxes + character(CXX) :: seq_flds_g2o_ice_fluxes character(CXX) :: seq_flds_x2g_states character(CXX) :: seq_flds_x2g_fluxes @@ -315,6 +317,8 @@ subroutine seq_flds_set(nmlfile, ID, infodata) character(CXX) :: g2x_states_to_lnd = '' character(CXX) :: g2x_fluxes = '' character(CXX) :: g2x_fluxes_to_lnd = '' + character(CXX) :: g2o_liq_fluxes = '' + character(CXX) :: g2o_ice_fluxes = '' character(CXX) :: x2g_states = '' character(CXX) :: x2g_fluxes = '' character(CXX) :: xao_albedo = '' @@ -2242,6 +2246,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata) name = 'Fogg_rofl' call seq_flds_add(g2x_fluxes,trim(name)) + call seq_flds_add(g2o_liq_fluxes,trim(name)) longname = 'glc liquid runoff flux to ocean' stdname = 'glacier_liquid_runoff_flux_to_ocean' units = 'kg m-2 s-1' @@ -2250,6 +2255,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata) name = 'Fogg_rofi' call seq_flds_add(g2x_fluxes,trim(name)) + call seq_flds_add(g2o_ice_fluxes,trim(name)) longname = 'glc frozen runoff flux to ocean' stdname = 'glacier_frozen_runoff_flux_to_ocean' units = 'kg m-2 s-1' @@ -3217,6 +3223,8 @@ subroutine seq_flds_set(nmlfile, ID, infodata) seq_flds_x2o_fluxes = trim(x2o_fluxes) seq_flds_g2x_fluxes = trim(g2x_fluxes) seq_flds_g2x_fluxes_to_lnd = trim(g2x_fluxes_to_lnd) + seq_flds_g2o_liq_fluxes = trim(g2o_liq_fluxes) + seq_flds_g2o_ice_fluxes = trim(g2o_ice_fluxes) seq_flds_x2g_fluxes = trim(x2g_fluxes) seq_flds_xao_fluxes = trim(xao_fluxes) seq_flds_r2x_fluxes = trim(r2x_fluxes) From ca4022673019208fc1aeb4800f49efcca699187c Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Fri, 10 Nov 2017 05:17:09 -0700 Subject: [PATCH 02/21] Point to new glc2ocn mapping files These were generated with the runoff mapping tools in commit 184d7de --- config/cesm/config_grids.xml | 42 ++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/config/cesm/config_grids.xml b/config/cesm/config_grids.xml index a25e8d5e07f..7954e690370 100644 --- a/config/cesm/config_grids.xml +++ b/config/cesm/config_grids.xml @@ -2081,42 +2081,48 @@ - cpl/gridmaps/gland4km/map_gland4km_to_gx1v6_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland4km/map_gland4km_to_gx1v6_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland4km/map_gland4km_to_gx1v6_nn_open_ocean_nnsm_e1000r300_marginal_sea_171105.nc + cpl/gridmaps/gland4km/map_gland4km_to_gx1v6_nnsm_e1000r300_171105.nc - cpl/gridmaps/gland4km/map_gland4km_to_gx1v7_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland4km/map_gland4km_to_gx1v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland4km/map_gland4km_to_gx1v7_nn_open_ocean_nnsm_e1000r300_marginal_sea_171105.nc + cpl/gridmaps/gland4km/map_gland4km_to_gx1v7_nnsm_e1000r300_171105.nc + - cpl/gridmaps/gland4km/map_gland4km_to_gx3v7_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland4km/map_gland4km_to_gx3v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland4km/map_gland4km_to_gx3v7_nnsm_e1000r500_171105.nc + cpl/gridmaps/gland4km/map_gland4km_to_gx3v7_nnsm_e1000r500_171105.nc - cpl/gridmaps/gland5km/map_gland5km_to_gx1v6_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland5km/map_gland5km_to_gx1v6_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx1v6_nn_open_ocean_nnsm_e1000r300_marginal_sea_171105.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx1v6_nnsm_e1000r300_171105.nc - cpl/gridmaps/gland5km/map_gland5km_to_gx1v7_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland5km/map_gland5km_to_gx1v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx1v7_nn_open_ocean_nnsm_e1000r300_marginal_sea_171105.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx1v7_nnsm_e1000r300_171105.nc + - cpl/gridmaps/gland5km/map_gland5km_to_gx3v7_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland5km/map_gland5km_to_gx3v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx3v7_nnsm_e1000r500_171105.nc + cpl/gridmaps/gland5km/map_gland5km_to_gx3v7_nnsm_e1000r500_171105.nc - cpl/gridmaps/gland20km/map_gland20km_to_gx1v6_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland20km/map_gland20km_to_gx1v6_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland20km/map_gland20km_to_gx1v6_nn_open_ocean_nnsm_e1000r300_marginal_sea_171105.nc + cpl/gridmaps/gland20km/map_gland20km_to_gx1v6_nnsm_e1000r300_171105.nc - cpl/gridmaps/gland20km/map_gland20km_to_gx1v7_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland20km/map_gland20km_to_gx1v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland20km/map_gland20km_to_gx1v7_nn_open_ocean_nnsm_e1000r300_marginal_sea_171105.nc + cpl/gridmaps/gland20km/map_gland20km_to_gx1v7_nnsm_e1000r300_171105.nc + - cpl/gridmaps/gland20km/map_gland20km_to_gx3v7_nnsm_e1000r300_170501.nc - cpl/gridmaps/gland20km/map_gland20km_to_gx3v7_nnsm_e1000r300_170501.nc + cpl/gridmaps/gland20km/map_gland20km_to_gx3v7_nnsm_e1000r500_171105.nc + cpl/gridmaps/gland20km/map_gland20km_to_gx3v7_nnsm_e1000r500_171105.nc From 4a358a9159639c0ec5faf2edf0ba137f5a6fac72 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Mon, 13 Nov 2017 15:53:51 -0700 Subject: [PATCH 03/21] Add comments about not needing to add fields to x2o_fluxes and x2i_fluxes --- src/drivers/mct/shr/seq_flds_mod.F90 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/drivers/mct/shr/seq_flds_mod.F90 b/src/drivers/mct/shr/seq_flds_mod.F90 index 19e6cbf6f54..5c43caae900 100644 --- a/src/drivers/mct/shr/seq_flds_mod.F90 +++ b/src/drivers/mct/shr/seq_flds_mod.F90 @@ -2246,6 +2246,8 @@ subroutine seq_flds_set(nmlfile, ID, infodata) name = 'Fogg_rofl' call seq_flds_add(g2x_fluxes,trim(name)) + ! Don't need to add this to x2o_fluxes, because Foxx_rofl is already added in the + ! course of adding Forr_rofl call seq_flds_add(g2o_liq_fluxes,trim(name)) longname = 'glc liquid runoff flux to ocean' stdname = 'glacier_liquid_runoff_flux_to_ocean' @@ -2255,6 +2257,8 @@ subroutine seq_flds_set(nmlfile, ID, infodata) name = 'Fogg_rofi' call seq_flds_add(g2x_fluxes,trim(name)) + ! Don't need to add this to x2o_fluxes, because Foxx_rofi is already added in the + ! course of adding Forr_rofi call seq_flds_add(g2o_ice_fluxes,trim(name)) longname = 'glc frozen runoff flux to ocean' stdname = 'glacier_frozen_runoff_flux_to_ocean' @@ -2264,6 +2268,8 @@ subroutine seq_flds_set(nmlfile, ID, infodata) name = 'Figg_rofi' call seq_flds_add(g2x_fluxes,trim(name)) + ! Don't need to add this to x2i_fluxes, because Fixx_rofi is already added in the + ! course of adding Firr_rofi longname = 'glc frozen runoff_iceberg flux to ice' stdname = 'glacier_frozen_runoff_flux_to_seaice' units = 'kg m-2 s-1' From 9ee24970045da8ca3bb83a679965cffa6ae32b15 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Tue, 14 Nov 2017 15:36:55 -0700 Subject: [PATCH 04/21] Do not use normalization when mapping glc2ocn In talking this through with Mariana Vertenstein and Tony Craig, we came to the conclusion that normalization should never be used when doing runoff mapping (i.e., nearest neighbor with optional smoothing): doing normalization breaks conservation. I have verified that the remapping is conservative with norm=.false., but was not conservative with norm=.true. --- src/drivers/mct/main/prep_ocn_mod.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/mct/main/prep_ocn_mod.F90 b/src/drivers/mct/main/prep_ocn_mod.F90 index 27acfaa5af0..ef9c0511be6 100644 --- a/src/drivers/mct/main/prep_ocn_mod.F90 +++ b/src/drivers/mct/main/prep_ocn_mod.F90 @@ -1245,10 +1245,10 @@ subroutine prep_ocn_calc_g2x_ox(timer) do egi = 1,num_inst_glc g2x_gx => component_get_c2x_cx(glc(egi)) call seq_map_map(mapper_Rg2o_liq, g2x_gx, g2x_ox(egi), & - fldlist=seq_flds_g2o_liq_fluxes, norm=.true.) + fldlist=seq_flds_g2o_liq_fluxes, norm=.false.) call seq_map_map(mapper_Rg2o_ice, g2x_gx, g2x_ox(egi), & - fldlist=seq_flds_g2o_ice_fluxes, norm=.true.) + fldlist=seq_flds_g2o_ice_fluxes, norm=.false.) enddo call t_drvstopf (trim(timer)) end subroutine prep_ocn_calc_g2x_ox From 24652c9b24c7251957e89ecc01a1c8c3b047142b Mon Sep 17 00:00:00 2001 From: Alice Bertini Date: Thu, 16 Nov 2017 15:21:48 -0700 Subject: [PATCH 05/21] update ACME to E3SM and changes related to Issue #1519 and PR #2062 --- .gitignore | 4 +- doc/source/conf.py | 15 ++--- doc/source/data_models/data-ocean.rst | 58 +++++++++++++------ doc/source/index.rst | 2 +- doc/source/misc_tools/index.rst | 11 ++-- doc/source/users_guide/cloning-a-case.rst | 40 ++++++++++--- .../users_guide/introduction-and-overview.rst | 2 +- .../optimizing-processor-layout.rst | 2 +- doc/source/users_guide/porting-cime.rst | 14 ++--- doc/source/users_guide/running-a-case.rst | 14 ++--- doc/source/users_guide/testing.rst | 4 +- doc/source/xml_files/acme.rst | 24 ++++---- doc/source/xml_files/drivers.rst | 4 +- 13 files changed, 118 insertions(+), 76 deletions(-) diff --git a/.gitignore b/.gitignore index 80ad392be39..48e07c8e791 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,8 @@ buildnmlc # Ignore emacs backup files *~ -# Ignore doc/build/doctrees -##doc/build/doctrees # ignore for the merge to master and orphaning of the gh-pages branch doc/build +# ignore the JENKINS files created when make html is run +scripts/Tools/JENKINS* diff --git a/doc/source/conf.py b/doc/source/conf.py index 38c3af858f4..f6213988be9 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -55,16 +55,16 @@ # General information about the project. project = u'CIME' copyright = u'2017, U.S. National Science Foundation and U.S. Department of Energy' -author = u'Staff of the NSF/CESM and DOE/ACME projects' +author = u'Staff of the NSF/CESM and DOE/E3SM projects' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = u'5.3.0' +version = u'5.4.0' # The full version, including alpha/beta/rc tags. -release = u'5.3.0' +release = u'5.4.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -91,13 +91,14 @@ # a list of builtin themes. # #html_theme = 'alabaster' -html_theme = 'bizstyle' +#html_theme = 'bizstyle' +html_theme = 'classic' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # -html_theme_options = { } +html_theme_options = {"stickysidebar": "true"} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, @@ -135,7 +136,7 @@ # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'on.tex', u'on Documentation', - u'Staff of the NSF/CESM and DOE/ACME projects', 'manual'), + u'Staff of the NSF/CESM and DOE/E3SM projects', 'manual'), ] @@ -166,7 +167,7 @@ (master_doc, u'CIME_Users_Guide', u'CIME Users Guide (PDF)', - u'Staff of the NSF/CESM and DOE/ACME projects'), + u'Staff of the NSF/CESM and DOE/E3SM projects'), ] diff --git a/doc/source/data_models/data-ocean.rst b/doc/source/data_models/data-ocean.rst index 02b3632044f..fc680b3288d 100644 --- a/doc/source/data_models/data-ocean.rst +++ b/doc/source/data_models/data-ocean.rst @@ -13,21 +13,39 @@ DOCN has two distinct modes of operation. DOCN can run as a pure data model, reading in ocean SSTs (normally climatological) from input datasets, performing time/spatial interpolations, and passing these to the coupler. Alternatively, DOCN can compute updated SSTs by running as a slab ocean model where bottom ocean heat flux convergence and boundary layer depths are read in and used with the atmosphere/ocean and ice/ocean fluxes obtained from the driver. -DOCN running in prescribed mode assumes that the only field in the input stream is SST and also that SST is in Celsius and must be converted to Kelvin. -All other fields are set to zero except for ocean salinity, which is set to a constant reference salinity value. -Normally the ice fraction data (used for prescribed CICE) is found in the same data files that provide SST data to the data ocean model since SST and ice fraction data are derived from the same observational data sets and are consistent with each other. -For DOCN prescribed mode, default yearly climatological datasets are provided for various model resolutions. - -DOCN running as a slab ocean model is used in conjunction with active ice mode running in full prognostic mode (e.g. CICE for CESM). -This mode computes a prognostic sea surface temperature and a freeze/melt potential (surface Q-flux) used by the sea ice model. -This calculation requires an external SOM forcing data file that includes ocean mixed layer depths and bottom-of-the-slab Q-fluxes. -Scientifically appropriate bottom-of-the-slab Q-fluxes are normally ocean resolution dependent and are derived from the ocean model output of a fully coupled CCSM run. -Note that this mode no longer runs out of the box, the default testing SOM forcing file is not scientifically appropriate and is provided for testing and development purposes only. -Users must create scientifically appropriate data for their particular application or use one of the standard SOM forcing files from the full prognostic control runs. -For CESM, some of these are available in the `inputdata repository `_. -The user then modifies the ``$DOCN_SOM_FILENAME`` variable in env_run.xml to point to the appropriate SOM forcing dataset. - -.. note:: A tool is available to derive valid `SOM forcing `_ and more information on creating the SOM forcing is also available. +DOCN running in prescribed mode assumes that the only field in the +input stream is SST and also that SST is in Celsius and must be +converted to Kelvin. All other fields are set to zero except for +ocean salinity, which is set to a constant reference salinity value. +Normally the ice fraction data (used for prescribed CICE) is found in +the same data files that provide SST data to the data ocean model +since SST and ice fraction data are derived from the same +observational data sets and are consistent with each other. For DOCN +prescribed mode, default yearly climatological datasets are provided +for various model resolutions. + +DOCN running as a slab ocean model is used in conjunction with active +ice mode running in full prognostic mode (e.g. CICE for CESM). This +mode computes a prognostic sea surface temperature and a freeze/melt +potential (surface Q-flux) used by the sea ice model. This +calculation requires an external SOM forcing data file that includes +ocean mixed layer depths and bottom-of-the-slab Q-fluxes. +Scientifically appropriate bottom-of-the-slab Q-fluxes are normally +ocean resolution dependent and are derived from the ocean model output +of a fully coupled CCSM run. Note that this mode no longer runs out +of the box, the default testing SOM forcing file is not scientifically +appropriate and is provided for testing and development purposes only. +Users must create scientifically appropriate data for their particular +application or use one of the standard SOM forcing files from the full +prognostic control runs. For CESM, some of these are available in the +`inputdata repository +`_. +The user then modifies the ``$DOCN_SOM_FILENAME`` variable in +env_run.xml to point to the appropriate SOM forcing dataset. + +.. note:: A tool is available to derive valid `SOM forcing +`_ and more +information on creating the SOM forcing is also available. .. _docn-xml-vars: @@ -35,9 +53,13 @@ The user then modifies the ``$DOCN_SOM_FILENAME`` variable in env_run.xml to poi xml variables ------------- -The following are xml variables that CIME supports for DOCN. -These variables are defined in ``$CIMEROOT/src/components/data_comps/docn/cime_config/config_component.xml``. -These variables will appear in ``env_run.xml`` and are used by the DOCN ``cime_config/buildnml`` script to generate the DOCN namelist file ``docn_in`` and the required associated stream files for the case. +The following are xml variables that CIME supports for DOCN. These +variables are defined in +``$CIMEROOT/src/components/data_comps/docn/cime_config/config_component.xml``. +These variables will appear in ``env_run.xml`` and are used by the +DOCN ``cime_config/buildnml`` script to generate the DOCN namelist +file ``docn_in`` and the required associated stream files for the +case. .. note:: These xml variables are used by the the docn's **cime_config/buildnml** script in conjunction with docn's **cime_config/namelist_definition_docn.xml** file to generate the namelist file ``docn_in``. diff --git a/doc/source/index.rst b/doc/source/index.rst index aaf04d8ea06..f39f87c32fa 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -43,5 +43,5 @@ Python Module Indices and Search CIME is developed by the -`ACME `_ and +`E3SM `_ and `CESM `_ projects. diff --git a/doc/source/misc_tools/index.rst b/doc/source/misc_tools/index.rst index 13fe0b4ec40..b76a3291c24 100644 --- a/doc/source/misc_tools/index.rst +++ b/doc/source/misc_tools/index.rst @@ -17,13 +17,10 @@ tools that are necessary and/or useful when building a climate model. Guides fo :numbered: -Statistical Ensemble Test - -Mapping Tools - -cprnc - -load-balancing-tool.rst + Statistical Ensemble Test + Mapping Tools + cprnc + load-balancing-tool.rst Indices and tables ================== diff --git a/doc/source/users_guide/cloning-a-case.rst b/doc/source/users_guide/cloning-a-case.rst index d2ae3e94c9f..150123362b6 100644 --- a/doc/source/users_guide/cloning-a-case.rst +++ b/doc/source/users_guide/cloning-a-case.rst @@ -4,15 +4,23 @@ Cloning a Case ************************** -If you have access to a run that you want to clone, the **create_clone** command will create a new case while preserving local modifications to the case. +If you have access to a run that you want to clone, the +**create_clone** command will create a new case and run **case.setup** +while preserving local modifications to the case. Here is a simple example: :: > cd $CIMEROOT/scripts > create_clone --case $CASEROOT --clone $CLONEROOT + > cd $CLONEROOT + > case.build + > case.submit -The **create_clone** script preserves any local namelist modifications made in the **user_nl_xxxx** files as well as any source code modifications in the **SourceMods** tree. Otherwise, **$CASEROOT/** directory will appear as if **create_newcase** had just been run. +The **create_clone** script preserves any local namelist modifications +made in the **user_nl_xxxx** files as well as any source code +modifications in the **SourceMods** tree. Otherwise, **$CASEROOT/** +directory will appear as if **create_newcase** had just been run. **Important**: Do not change anything in the **env_case.xml** file. @@ -21,23 +29,37 @@ See the **help** text for more usage information. > create_clone --help -**create_clone** has several useful optional arguments. To point to the executable of the original case you are cloning from. +**create_clone** has several useful optional arguments. To point to +the executable of the original case you are cloning from. :: > create_clone --case $CASEROOT --clone $CLONEROOT --keepexe + > cd $CLONEROOT + > case.submit -If the ``--keepexe`` optional argument is used, then no SourceMods will be permitted in the cloned directory. -A link will be made when the cloned case is created pointing the cloned SourceMods/ directory to the original case SourceMods directory. +If the ``--keepexe`` optional argument is used, then no SourceMods +will be permitted in the cloned directory. A link will be made when +the cloned case is created pointing the cloned SourceMods/ directory +to the original case SourceMods directory. .. warning:: No changes should be made to ``env_build.xml`` or ``env_mach_pes.xml`` in the cloned directory. -**create_clone** also permits you to invoked the ``shell_commands`` and ``user_nl_xxx`` files in a user_mods directory by calling: +**create_clone** also permits you to invoked the ``shell_commands`` + and ``user_nl_xxx`` files in a user_mods directory by calling: :: > create_clone --case $CASEROOT --clone $CLONEROOT --user-mods-dir USER_MODS_DIR [--keepexe] Note that an optional ``--keepexe`` flag can also be used in this case. -.. warning:: If there is a ``shell_commands`` file, it should not have any changes to xml variables in either ``env_build.xml`` or ``env_mach_pes.xml``. - -Another approach to duplicating a case is to use the information in the case's **README.case** and **CaseStatus** files to create a new case and duplicate the relevant **xlmchange** commands that were issued in the original case. This alternative will *not* preserve any local modifications that were made to the original case, such as source-code or build-script revisions; you will need to import those changes manually. +.. warning:: If there is a ``shell_commands`` file, it should not have +any changes to xml variables in either ``env_build.xml`` or +``env_mach_pes.xml``. + +Another approach to duplicating a case is to use the information in +the case's **README.case** and **CaseStatus** files to create a new +case and duplicate the relevant **xlmchange** commands that were +issued in the original case. This alternative will *not* preserve any +local modifications that were made to the original case, such as +source-code or build-script revisions; you will need to import those +changes manually. diff --git a/doc/source/users_guide/introduction-and-overview.rst b/doc/source/users_guide/introduction-and-overview.rst index f87ea9f01f7..f39bb184f07 100644 --- a/doc/source/users_guide/introduction-and-overview.rst +++ b/doc/source/users_guide/introduction-and-overview.rst @@ -135,7 +135,7 @@ directory structure. :widths: 150, 300 "config/cesm/", "CESM-specific configuration options" - "config/acme/", "ACME-specific configuration options" + "config/acme/", "E3SM-specific configuration options" "src/components/", "CIME-provided components including data and stub models" "src/drivers/", "CIME-provided main driver for a climate model" "src/externals/", "Software provided with CIME for building a climate model" diff --git a/doc/source/users_guide/optimizing-processor-layout.rst b/doc/source/users_guide/optimizing-processor-layout.rst index 106e635d6bb..afc2b655ff6 100644 --- a/doc/source/users_guide/optimizing-processor-layout.rst +++ b/doc/source/users_guide/optimizing-processor-layout.rst @@ -57,7 +57,7 @@ Finally, decide whether components should run sequentially, concurrently, or in Typically, a series of short test runs with the desired production configuration can establish a reasonable load balance setup for the production job. The timing output can be used to compare test runs to help determine the optimal load balance. Changing the pe layout of the model has NO IMPACT on the scientific results. The basic order of operations and calling sequence are hardwired into the driver and do not change with the pe layout. that doesn't change when the pe layout is changed. -There are some constraints on the ability of either the CESM or ACME fully active configuration fully concurrent. For example, the atmosphere model always run sequentially with the ice and land models for scientific reasons. As a result, running the atmosphere concurrently with the ice and land will result in idle processors at some point in the timestepping sequence. +There are some constraints on the ability of either the CESM or E3SM fully active configuration fully concurrent. For example, the atmosphere model always run sequentially with the ice and land models for scientific reasons. As a result, running the atmosphere concurrently with the ice and land will result in idle processors at some point in the timestepping sequence. For more information about how the driver is implemented, see (Craig, A.P., Vertenstein, M., Jacob, R., 2012: A new flexible coupler for earth system modeling developed for CCSM4 and CESM1.0. International Journal of High Performance Computing Applications, 26, 31-42, 10.1177/1094342011428141). diff --git a/doc/source/users_guide/porting-cime.rst b/doc/source/users_guide/porting-cime.rst index 052915c7e2d..1ab636305c1 100644 --- a/doc/source/users_guide/porting-cime.rst +++ b/doc/source/users_guide/porting-cime.rst @@ -28,7 +28,7 @@ Steps for porting Porting CIME involves several steps in which you create, at a minimum, a **config_machines.xml** file in your **$HOME/.cime** directory. In addition, if you have a batch system, you will also need to add a **config_batch.xml** file to your **$HOME/.cime** directory. -All files in **$HOME/.cime/** are appended to the xml objects that are read into memory from the **$CIME/config/[model]**, where **[model]** is either ``acme`` or ``cesm``. +All files in **$HOME/.cime/** are appended to the xml objects that are read into memory from the **$CIME/config/[model]**, where **[model]** is either ``e3sm`` or ``cesm``. Follow these steps: @@ -45,7 +45,7 @@ Follow these steps: :: [main] - CIME_MODEL=acme + CIME_MODEL=e3sm #. Create a **config_machines.xml** file in the same directory. @@ -69,13 +69,13 @@ Follow these steps: #. If you have compiler settings that are specific to your machine, create a **$HOME/.cime/config_compilers.xml** file. - The default compiler settings are set in **$CIME/config/[model]/machines/config_compilers.xml**, where **[model]** can be either ``acme`` or ``cesm``. + The default compiler settings are set in **$CIME/config/[model]/machines/config_compilers.xml**, where **[model]** can be either ``e3sm`` or ``cesm``. There is no template for **config_compilers.xml**. #. If you have a batch system, create a **$HOME/.cime/config_batch.xml** file. - Out-of-the-box batch settings are set in **$CIME/config/[model]/machines/config_batch.xml**, where **[model]** can be either ``acme`` or ``cesm``. + Out-of-the-box batch settings are set in **$CIME/config/[model]/machines/config_batch.xml**, where **[model]** can be either ``e3sm`` or ``cesm``. #. Once you have defined a basic configuration for your machine in your **$HOME/.cime** xml files, run **scripts_regression_test.py** interactively from the **$CIME/scripts/tests** directory. This performs a number of basic unit tests starting from the simplest and working toward more complicated ones. @@ -103,7 +103,7 @@ Each ```` tag requires the following input: - ``COMPILERS``: compilers supported on the machine, in comma-separated list, default first - ``MPILIBS``: mpilibs supported on the machine, in comma-separated list, default first - ``PROJECT``: a project or account number used for batch jobs; can be overridden in environment or in **$HOME/.cime/config** -- ``SAVE_TIMING_DIR``: (ACME only) target directory for writing timing output +- ``SAVE_TIMING_DIR``: (E3SM only) target directory for writing timing output - ``CIME_OUTPUT_ROOT``: Base directory for case output; the **bld** and **run** directories are written below here - ``DIN_LOC_ROOT``: location of the input data directory - ``DIN_LOC_ROOT_CLMFORC``: optional input location for clm forcing data @@ -113,7 +113,7 @@ Each ```` tag requires the following input: - ``CCSM_CPRNC``: location of the cprnc tool, which compares model output in testing - ``GMAKE``: gnu-compatible make tool; default is "gmake" - ``GMAKE_J``: optional number of threads to pass to the gmake flag -- ``TESTS``: (ACME only) list of tests to run on the machine +- ``TESTS``: (E3SM only) list of tests to run on the machine - ``BATCH_SYSTEM``: batch system used on this machine (none is okay) - ``SUPPORTED_BY``: contact information for support for this system - ``MAX_TASKS_PER_NODE``: maximum number of threads/tasks per shared memory node on the machine @@ -151,7 +151,7 @@ Each ```` tag requires the following input: config_compilers.xml - compiler paths and options ================================================= -The **config_compilers.xml** file defines compiler flags for building CIME (and also CESM and ACME prognostic CIME-driven components). +The **config_compilers.xml** file defines compiler flags for building CIME (and also CESM and E3SM prognostic CIME-driven components). #. General compiler flags (e.g., for the gnu compiler) that are machine- and componen-independent are listed first. diff --git a/doc/source/users_guide/running-a-case.rst b/doc/source/users_guide/running-a-case.rst index 280744650a6..71e3ee145b6 100644 --- a/doc/source/users_guide/running-a-case.rst +++ b/doc/source/users_guide/running-a-case.rst @@ -457,9 +457,9 @@ long-term archiver tool that supported mass tape storage and HPSS systems. However, with the industry migration away from tape archives, it is no longer feasible for CIME to support all the possible archival schemes available. -============================ +================================================ Data Assimilation and other External Processing -============================ +================================================ CIME provides a capability to run a task on the compute nodes either before or after the model run. CIME also provides a data assimilation @@ -467,9 +467,9 @@ capability which will cycle the model and then a user defined task for a user determined number of cycles. ---------------------- +------------------------- Pre and Post run scripts ---------------------- +------------------------- Variables ``PRERUN_SCRIPT`` and ``POSTRUN_SCRIPT`` can each be used to name a script which should be exectuted immediately prior starting or @@ -480,9 +480,9 @@ directory. If the script is written in python and contains a subroutine with the same name as the script, it will be called as a subroutine rather than as an external shell script. ---------------------- -Data Assimilatin scripts ---------------------- +------------------------- +Data Assimilation scripts +------------------------- Variables ``DATA_ASSIMILATION``, ``DATA_ASSIMILATION_SCRIPT``, and ``DATA_ASSIMILATION_CYCLES`` may also be used to externally control diff --git a/doc/source/users_guide/testing.rst b/doc/source/users_guide/testing.rst index de3d6ecf4cb..aa6b89382ad 100644 --- a/doc/source/users_guide/testing.rst +++ b/doc/source/users_guide/testing.rst @@ -171,10 +171,10 @@ A cs.status.$testid script will be put in the test root. This script will allow current status of all your tests. ======================== -Using create_test (ACME) +Using create_test (E3SM) ======================== -Usage will differ slightly depending on if you're using ACME or CESM. +Usage will differ slightly depending on if you're using E3SM or CESM. Using examples to illustrate common use cases diff --git a/doc/source/xml_files/acme.rst b/doc/source/xml_files/acme.rst index 14384bdf56c..deb6b0b877c 100644 --- a/doc/source/xml_files/acme.rst +++ b/doc/source/xml_files/acme.rst @@ -1,10 +1,10 @@ .. _acme: ############################# -ACME Coupled Model XML Files +E3SM Coupled Model XML Files ############################# -XML files for ACME in CIMEROOT/config/acme. +XML files for E3SM in CIMEROOT/config/acme. .. toctree:: :maxdepth: 1 @@ -13,15 +13,15 @@ XML files for ACME in CIMEROOT/config/acme. CIMEROOT/config/acme ******************** -ACME XML settings for short term archiver. +E3SM XML settings for short term archiver. .. literalinclude:: ../../../config/acme/config_archive.xml -ACME XML settings for defining CASEROOT env_*.xml file entries. +E3SM XML settings for defining CASEROOT env_*.xml file entries. .. literalinclude:: ../../../config/acme/config_files.xml -ACME XML settings for defining supported grids. +E3SM XML settings for defining supported grids. .. literalinclude:: ../../../config/acme/config_grids.xml @@ -30,15 +30,15 @@ ACME XML settings for defining supported grids. CIMEROOT/config/acme/allactive ****************************** -ACME XML settings for all-active component set (compset) configurations. +E3SM XML settings for all-active component set (compset) configurations. .. literalinclude:: ../../../config/acme/allactive/config_compsets.xml -ACME XML settings for all-active test configurations. +E3SM XML settings for all-active test configurations. .. literalinclude:: ../../../config/acme/allactive/testlist_allactive.xml -ACME XML settings for optimized processor elements (PEs) layout configurations. +E3SM XML settings for optimized processor elements (PEs) layout configurations. .. literalinclude:: ../../../config/acme/allactive/config_pesall.xml @@ -47,19 +47,19 @@ ACME XML settings for optimized processor elements (PEs) layout configurations. CIMEROOT/config/acme/machines ***************************** -ACME XML settings for supported batch queuing systems. +E3SM XML settings for supported batch queuing systems. .. literalinclude:: ../../../config/acme/machines/config_batch.xml -ACME XML settings for supported compilers. +E3SM XML settings for supported compilers. .. literalinclude:: ../../../config/acme/machines/config_compilers.xml -ACME XML settings for supported machines. +E3SM XML settings for supported machines. .. literalinclude:: ../../../config/acme/machines/config_machines.xml -ACME XML settings for Parallel Input/Output (PIO) library. +E3SM XML settings for Parallel Input/Output (PIO) library. .. literalinclude:: ../../../config/acme/machines/config_pio.xml diff --git a/doc/source/xml_files/drivers.rst b/doc/source/xml_files/drivers.rst index 08197abf792..83af75db621 100644 --- a/doc/source/xml_files/drivers.rst +++ b/doc/source/xml_files/drivers.rst @@ -25,11 +25,11 @@ XML variables and component descriptions specific to the driver/coupler .. literalinclude:: ../../../src/drivers/mct/cime_config/config_component.xml -XML variables and component descriptions specific to the ACME driver/coupler +XML variables and component descriptions specific to the E3SM driver/coupler .. literalinclude:: ../../../src/drivers/mct/cime_config/config_component_acme.xml -XML variables and component descriptions specific to the ACME driver/coupler +XML variables and component descriptions specific to the E3SM driver/coupler .. literalinclude:: ../../../src/drivers/mct/cime_config/config_component_cesm.xml From c38f161fba5103105f3c28a5a8b687ebd3f155cb Mon Sep 17 00:00:00 2001 From: Jason Sarich Date: Tue, 28 Nov 2017 13:07:46 -0600 Subject: [PATCH 06/21] Check for unicode in expect() --- scripts/lib/CIME/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/lib/CIME/utils.py b/scripts/lib/CIME/utils.py index 33b2e848343..51970bdc3fe 100644 --- a/scripts/lib/CIME/utils.py +++ b/scripts/lib/CIME/utils.py @@ -74,7 +74,12 @@ def expect(condition, error_msg, exc_type=SystemExit, error_prefix="ERROR:"): if logger.isEnabledFor(logging.DEBUG): import pdb pdb.set_trace() - raise exc_type(error_prefix + " " + error_msg) + try: + msg = str(error_prefix + " " + error_msg) + except UnicodeEncodeError: + msg = (error_prefix + " " + error_msg).encode('utf-8') + raise exc_type(msg) + def id_generator(size=6, chars=string.ascii_lowercase + string.digits): return ''.join(random.choice(chars) for _ in range(size)) From 7394be41c1523ba398a5d308b0cef3ff5518e036 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 30 Nov 2017 00:17:37 -0700 Subject: [PATCH 07/21] correct path for includes used in build --- src/build_scripts/buildlib.mpi-serial | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build_scripts/buildlib.mpi-serial b/src/build_scripts/buildlib.mpi-serial index 45cad59e631..962e6b9705f 100755 --- a/src/build_scripts/buildlib.mpi-serial +++ b/src/build_scripts/buildlib.mpi-serial @@ -49,7 +49,7 @@ def buildlib(bldroot, installpath, caseroot): cimeroot = case.get_value("CIMEROOT") mct_dir = os.path.join(cimeroot,"src","externals","mct") for _file in glob.iglob(os.path.join(mct_dir, "mpi-serial","*.h")): - copyifnewer(_file, os.path.join(my_installpath,os.path.basename(_file))) + copyifnewer(_file, os.path.join(bldroot,os.path.basename(_file))) gmake_opts = "-f {} ".format(os.path.join(caseroot,"Tools","Makefile")) gmake_opts += " -C {} ".format(bldroot) From e28feaea80888fb7c29e8157d8f81d54aa2643bb Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 1 Dec 2017 14:09:16 -0700 Subject: [PATCH 08/21] fix gptl threaded build, batch change for cheyenne --- config/cesm/machines/config_batch.xml | 3 ++- scripts/Tools/Makefile | 4 ++++ src/build_scripts/buildlib.gptl | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config/cesm/machines/config_batch.xml b/config/cesm/machines/config_batch.xml index 945c443c66e..acda5900958 100644 --- a/config/cesm/machines/config_batch.xml +++ b/config/cesm/machines/config_batch.xml @@ -294,7 +294,8 @@ -l select={{ num_nodes }}:ncpus={{ max_tasks_per_node }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }} - regular + regular + economy diff --git a/scripts/Tools/Makefile b/scripts/Tools/Makefile index 6ad5d195953..419aff31360 100644 --- a/scripts/Tools/Makefile +++ b/scripts/Tools/Makefile @@ -44,13 +44,17 @@ PIO_VERSION ?= $(shell $(CASEROOT)/xmlquery --caseroot $(CASEROOT) PIO_VERSION - # Determine whether to compile threaded or not # Set the THREADDIR for the shared build # based on the threaded build status + ifeq ($(strip $(SMP)),TRUE) THREADDIR = threads + compile_threaded = true else ifeq ($(strip $(BUILD_THREADED)),TRUE) THREADDIR = threads + compile_threaded = true else THREADDIR = nothreads + compile_threaded = false endif endif diff --git a/src/build_scripts/buildlib.gptl b/src/build_scripts/buildlib.gptl index 02cd6d6142d..81c432bdb0e 100755 --- a/src/build_scripts/buildlib.gptl +++ b/src/build_scripts/buildlib.gptl @@ -51,7 +51,7 @@ def buildlib(bldroot, installpath, caseroot): gptl_dir, bldroot, installpath) build_threaded = case.get_value("SMP") or case.get_value("BUILD_THREADED") if build_threaded: - gmake_opts += " GPTL_CPPDEFS=-DTHREADED_OMP" + gmake_opts += " compile_threaded=true " gmake_cmd = case.get_value("GMAKE") From bea9e263aac44def8263f2ea38d1ac507ab2087b Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 1 Dec 2017 15:18:33 -0700 Subject: [PATCH 09/21] fix pylint issue --- src/build_scripts/buildlib.mpi-serial | 1 - 1 file changed, 1 deletion(-) diff --git a/src/build_scripts/buildlib.mpi-serial b/src/build_scripts/buildlib.mpi-serial index 962e6b9705f..b9990c9c7f9 100755 --- a/src/build_scripts/buildlib.mpi-serial +++ b/src/build_scripts/buildlib.mpi-serial @@ -44,7 +44,6 @@ formatter_class=argparse.ArgumentDefaultsHelpFormatter def buildlib(bldroot, installpath, caseroot): ############################################################################### - my_installpath = os.path.join(installpath,"mct","mpi-serial") with Case(caseroot, read_only=False) as case: cimeroot = case.get_value("CIMEROOT") mct_dir = os.path.join(cimeroot,"src","externals","mct") From dc4509e9ea7217b074af50f4692850e09602e323 Mon Sep 17 00:00:00 2001 From: Chris Fischer Date: Sun, 3 Dec 2017 11:56:27 -0700 Subject: [PATCH 10/21] Update ChangeLog --- ChangeLog | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/ChangeLog b/ChangeLog index 93f3ff3cfd9..12d1521d38d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,61 @@ ====================================================================== +Originator: Chris Fischer +Date: 12-03-2017 +Tag: cime5.4.0-alpha.12 +Answer Changes: None +Tests: scripts_regression_tests.py +Dependencies: + +Brief Summary: + - Update CIME RST documentation. + - Correct path for includes used in build. + - Check for unicode in expect(). + - Separate liq and ice in glc2ocn mapping, and fix glc2ocn mapping bug. + +User interface changes: + -Splits GLC2OCN_RMAPNAME xml variable into + GLC2OCN_LIQ_RMAPNAME and GLC2OCN_ICE_RMAPNAME, and similarly for + GLC2OCN_RMAPTYPE + +PR summary: git log --oneline --first-parent [previous_tag]..master +6dd6f09 Merge pull request #2105 from jedwards4b/gptl_threaded_build_fix +92f73e3 Merge pull request #2078 from bertinia/master +5dc7e19 Merge pull request #2101 from jedwards4b/mpiserial_bldfix +486efd6 Merge pull request #2097 from ESMCI/sarich/fix-buildexe-unicode +dd525f9 Merge pull request #2066 from billsacks/glc2ocn_separate_liq_ice + +Modified files: git diff --name-status [previous_tag] +M .gitignore +M config/acme/config_grids.xml +M config/cesm/config_grids.xml +M config/cesm/machines/config_batch.xml +M doc/source/conf.py +M doc/source/data_models/data-ocean.rst +M doc/source/index.rst +M doc/source/misc_tools/index.rst +M doc/source/users_guide/cloning-a-case.rst +M doc/source/users_guide/introduction-and-overview.rst +M doc/source/users_guide/optimizing-processor-layout.rst +M doc/source/users_guide/porting-cime.rst +M doc/source/users_guide/running-a-case.rst +M doc/source/users_guide/testing.rst +M doc/source/xml_files/acme.rst +M doc/source/xml_files/drivers.rst +M scripts/Tools/Makefile +M scripts/lib/CIME/utils.py +M src/build_scripts/buildlib.gptl +M src/build_scripts/buildlib.mpi-serial +M src/drivers/mct/cime_config/buildnml +M src/drivers/mct/cime_config/config_component.xml +M src/drivers/mct/cime_config/namelist_definition_drv.xml +M src/drivers/mct/main/prep_ocn_mod.F90 +M src/drivers/mct/shr/seq_flds_mod.F90 + +====================================================================== + +====================================================================== + Originator: Chris Fischer Date: 11-22-2017 Tag: cime5.4.0-alpha.11 From 4599aaf87febcb840415ef785205edd62b2f47e0 Mon Sep 17 00:00:00 2001 From: Chris Fischer Date: Sun, 3 Dec 2017 12:03:37 -0700 Subject: [PATCH 11/21] Update ChangeLog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 12d1521d38d..8f2738f8a89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ Tests: scripts_regression_tests.py Dependencies: Brief Summary: + - Fix gptl threaded build, batch change for cheyenne. - Update CIME RST documentation. - Correct path for includes used in build. - Check for unicode in expect(). From 630011e7a9617a763d29ada596f3ad62f879b42f Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Mon, 4 Dec 2017 09:51:36 -0700 Subject: [PATCH 12/21] nthrds > 1 should set build_threaded flag --- scripts/lib/CIME/case_setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/lib/CIME/case_setup.py b/scripts/lib/CIME/case_setup.py index 88bbee08e2b..ae628e32e8d 100644 --- a/scripts/lib/CIME/case_setup.py +++ b/scripts/lib/CIME/case_setup.py @@ -128,8 +128,10 @@ def _case_setup_impl(case, caseroot, clean=False, test_mode=False, reset=False): # Check ninst. # In CIME there can be multiple instances of each component model (an ensemble) NINST is the instance of that component. multi_driver = case.get_value("MULTI_DRIVER") + nthrds = 1 for comp in models: ntasks = case.get_value("NTASKS_{}".format(comp)) + nthrds = max(nthrds,case.get_value("NTHRDS_{}".format(comp))) if comp == "CPL": continue ninst = case.get_value("NINST_{}".format(comp)) @@ -145,6 +147,8 @@ def _case_setup_impl(case, caseroot, clean=False, test_mode=False, reset=False): else: expect(False, "NINST_{} value {:d} greater than NTASKS_{} {:d}".format(comp, ninst, comp, ntasks)) case.set_value("NTASKS_PER_INST_{}".format(comp), int(ntasks / ninst)) + if nthrds > 1: + case.set_value("BUILD_THREADED",True) if os.path.exists("case.run"): logger.info("Machine/Decomp/Pes configuration has already been done ...skipping") From 81a4d8343afbcf011e9af2f46533c9b3989ce129 Mon Sep 17 00:00:00 2001 From: Chris Fischer Date: Mon, 4 Dec 2017 10:25:10 -0700 Subject: [PATCH 13/21] Update ChangeLog --- ChangeLog | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8f2738f8a89..aa676762e02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,28 @@ ====================================================================== +Originator: Chris Fischer +Date: 12-04-2017 +Tag: cime5.4.0-alpha.13 +Answer Changes: None +Tests: scripts_regression_tests.py, SMS_P8x2.f19_g16.X.yellowstone_intel +Dependencies: + +Brief Summary: + - BUILD_THREADED needs to be set if any nthrds > 1. + +User interface changes: + +PR summary: git log --oneline --first-parent [previous_tag]..master +307251e Merge pull request #2106 from jedwards4b/nthrds_sets_build_threaded + + +Modified files: git diff --name-status [previous_tag] +M scripts/lib/CIME/case_setup.py + +====================================================================== + +====================================================================== + Originator: Chris Fischer Date: 12-03-2017 Tag: cime5.4.0-alpha.12 From a8b19607321416c6cb25390693ea8d87330f6198 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 5 Dec 2017 11:35:00 -0700 Subject: [PATCH 14/21] in splitting comp vars make sure comp isnt subset of name --- scripts/lib/CIME/XML/env_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lib/CIME/XML/env_base.py b/scripts/lib/CIME/XML/env_base.py index 9f78d9a6d2c..9952694417a 100644 --- a/scripts/lib/CIME/XML/env_base.py +++ b/scripts/lib/CIME/XML/env_base.py @@ -49,9 +49,9 @@ def check_if_comp_var(self, vid, attribute=None): if hasattr(self, "_components"): new_vid = None for comp in self._components: - if "_"+comp in vid: + if vid.endswith("_"+comp): new_vid = vid.replace('_'+comp, '', 1) - elif comp+"_" in vid: + elif vid.startswith(comp+"_"): new_vid = vid.replace(comp+'_', '', 1) if new_vid is not None: From 285d9e81aaa67e4a88a6675fa036e4eb92f954c9 Mon Sep 17 00:00:00 2001 From: Michael Deakin Date: Tue, 5 Dec 2017 12:21:37 -0700 Subject: [PATCH 15/21] Fix memory leak of newtimers in merge_thread_data --- src/share/timing/gptl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/share/timing/gptl.c b/src/share/timing/gptl.c index db319cf357c..0fc1bd0be4e 100644 --- a/src/share/timing/gptl.c +++ b/src/share/timing/gptl.c @@ -3389,6 +3389,7 @@ static int merge_thread_data() } } + free(newtimers); free(sort[0]); /* don't free timerlist[0], since needed for subsequent steps in gathering global statistics */ for (t = 1; t < nthreads; t++) { From bbb059cd86a47ab265bce3f6a0d0722039ee1e1d Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 5 Dec 2017 12:45:45 -0700 Subject: [PATCH 16/21] add test for xmlquery DOCN_MODE --- scripts/lib/CIME/XML/env_base.py | 7 ++++--- scripts/tests/scripts_regression_tests.py | 10 +++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/lib/CIME/XML/env_base.py b/scripts/lib/CIME/XML/env_base.py index 9952694417a..e5782a000c6 100644 --- a/scripts/lib/CIME/XML/env_base.py +++ b/scripts/lib/CIME/XML/env_base.py @@ -49,11 +49,12 @@ def check_if_comp_var(self, vid, attribute=None): if hasattr(self, "_components"): new_vid = None for comp in self._components: - if vid.endswith("_"+comp): + if vid.endswith('_'+comp): new_vid = vid.replace('_'+comp, '', 1) - elif vid.startswith(comp+"_"): + elif vid.startswith(comp+'_'): new_vid = vid.replace(comp+'_', '', 1) - + elif '_' + comp + '_' in vid: + new_vid = vid.replace(comp+'_','', 1) if new_vid is not None: break if new_vid is not None: diff --git a/scripts/tests/scripts_regression_tests.py b/scripts/tests/scripts_regression_tests.py index bce9a99ad4a..0560ef25c8a 100755 --- a/scripts/tests/scripts_regression_tests.py +++ b/scripts/tests/scripts_regression_tests.py @@ -381,6 +381,14 @@ def test_e_xmlquery(self): cmd = xmlquery + " BUILD_COMPLETE --value" output = run_cmd_no_fail(cmd, from_dir=casedir) self.assertTrue(output == "TRUE", msg="%s != %s"%(output, BUILD_COMPLETE)) + # we expect DOCN_MODE to be undefined in this X compset + # this test assures that we do not try to resolve this as a compvar + cmd = xmlquery + " DOCN_MODE --value" + _, output, error = run_cmd(cmd, from_dir=casedir) + self.assertTrue(error == "ERROR: No results found for variable DOCN_MODE", + msg="unexpected result for DOCN_MODE, output {}, error {}". + format(output, error)) + for comp in COMP_CLASSES: caseresult = case.get_value("NTASKS_%s"%comp) cmd = xmlquery + " NTASKS_%s --value"%comp @@ -2499,7 +2507,7 @@ def _main_func(): MACHINE = Machines(machine=mach_name) else: MACHINE = Machines() - + if "--compiler" in sys.argv: global TEST_COMPILER From f96a9b11edd9bcf4ca3b35cd654d8ef75f381dd1 Mon Sep 17 00:00:00 2001 From: James Foucar Date: Tue, 5 Dec 2017 13:34:27 -0700 Subject: [PATCH 17/21] Fix bug in compare namelists Tuple was being returned but return should only have been a string. --- scripts/lib/CIME/compare_namelists.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/CIME/compare_namelists.py b/scripts/lib/CIME/compare_namelists.py index 3e0c554beac..81d1daecabb 100644 --- a/scripts/lib/CIME/compare_namelists.py +++ b/scripts/lib/CIME/compare_namelists.py @@ -337,7 +337,7 @@ def _compare_values(name, gold_value, comp_value, case): comments = "" if (type(gold_value) != type(comp_value)): comments += " variable '{}' did not have expected type '{}', instead is type '{}'\n".format(name, type(gold_value), type(comp_value)) - return (False, comments) + return comments if (type(gold_value) is list): # Note, list values remain order sensitive From 07a8fec698dfcecb96a5b70b54cc7d1afcd5319a Mon Sep 17 00:00:00 2001 From: James Foucar Date: Tue, 5 Dec 2017 14:02:06 -0700 Subject: [PATCH 18/21] Add ability to customize CaseStatus success message for a phase. --- scripts/lib/CIME/case_submit.py | 7 +++++-- scripts/lib/CIME/utils.py | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/lib/CIME/case_submit.py b/scripts/lib/CIME/case_submit.py index 62e07f22a18..16c9e6bc1f7 100644 --- a/scripts/lib/CIME/case_submit.py +++ b/scripts/lib/CIME/case_submit.py @@ -7,7 +7,7 @@ """ import socket from CIME.XML.standard_module_setup import * -from CIME.utils import expect, run_and_log_case_status +from CIME.utils import expect, run_and_log_case_status, verbatim_success_msg from CIME.preview_namelists import create_namelists from CIME.check_lockedfiles import check_lockedfiles from CIME.check_input_data import check_all_input_data @@ -82,6 +82,8 @@ def _submit(case, job=None, no_batch=False, prereq=None, resubmit=False, if xml_jobid_text: case.set_value("JOB_IDS", xml_jobid_text) + return xml_jobid_text + def submit(case, job=None, no_batch=False, prereq=None, resubmit=False, skip_pnl=False, mail_user=None, mail_type=None, batch_args=None): if case.get_value("TEST"): @@ -102,7 +104,8 @@ def submit(case, job=None, no_batch=False, prereq=None, resubmit=False, resubmit=resubmit, skip_pnl=skip_pnl, mail_user=mail_user, mail_type=mail_type, batch_args=batch_args) - run_and_log_case_status(functor, "case.submit", caseroot=case.get_value("CASEROOT")) + run_and_log_case_status(functor, "case.submit", caseroot=case.get_value("CASEROOT"), + custom_success_msg_functor=verbatim_success_msg) except: # If something failed in the batch system, make sure to mark # the test as failed if we are running a test. diff --git a/scripts/lib/CIME/utils.py b/scripts/lib/CIME/utils.py index 51970bdc3fe..a35758f8d0e 100644 --- a/scripts/lib/CIME/utils.py +++ b/scripts/lib/CIME/utils.py @@ -1420,7 +1420,10 @@ def stringify_bool(val): expect(type(val) is bool, "Wrong type for val '{}'".format(repr(val))) return "TRUE" if val else "FALSE" -def run_and_log_case_status(func, phase, caseroot='.'): +def verbatim_success_msg(return_val): + return return_val + +def run_and_log_case_status(func, phase, caseroot='.', custom_success_msg_functor=None): append_case_status(phase, "starting", caseroot=caseroot) rv = None try: @@ -1430,7 +1433,8 @@ def run_and_log_case_status(func, phase, caseroot='.'): append_case_status(phase, "error", msg=("\n{}".format(e)), caseroot=caseroot) raise else: - append_case_status(phase, "success", caseroot=caseroot) + custom_success_msg = custom_success_msg_functor(rv) if custom_success_msg_functor else None + append_case_status(phase, "success", msg=custom_success_msg, caseroot=caseroot) return rv From 6383aff871e29eab087255129de3af54b1b49dc1 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 5 Dec 2017 16:53:20 -0700 Subject: [PATCH 19/21] fix issue in scripts_regression_tests --- scripts/tests/scripts_regression_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tests/scripts_regression_tests.py b/scripts/tests/scripts_regression_tests.py index 0560ef25c8a..e5ef8c109da 100755 --- a/scripts/tests/scripts_regression_tests.py +++ b/scripts/tests/scripts_regression_tests.py @@ -1504,7 +1504,7 @@ def test_cime_case_build_threaded_2(self): with Case(casedir, read_only=False) as case: build_threaded = case.get_value("BUILD_THREADED") - self.assertFalse(build_threaded) + self.assertTrue(build_threaded) build_threaded = case.get_build_threaded() self.assertTrue(build_threaded) From d698a43815e8cc8329708d7a39eb79165e44b68a Mon Sep 17 00:00:00 2001 From: James Foucar Date: Wed, 6 Dec 2017 12:26:35 -0700 Subject: [PATCH 20/21] This is no longer needed --- src/share/timing/Makefile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/share/timing/Makefile b/src/share/timing/Makefile index ab0e6af5862..e70b8dbe4df 100644 --- a/src/share/timing/Makefile +++ b/src/share/timing/Makefile @@ -4,14 +4,6 @@ VPATH := $(GPTL_DIR) -# Determine whether to compile threaded or not -ifeq ($(strip $(BUILD_THREADED)),TRUE) - compile_threaded = true -endif -ifeq ($(strip $(SMP)),TRUE) - compile_threaded = true -endif - ifndef MOD_SUFFIX MOD_SUFFIX := mod endif From 97bf71ddbe96f1ad0e1d948b1c5d0b8c29a657b8 Mon Sep 17 00:00:00 2001 From: Azamat Mametjanov Date: Thu, 7 Dec 2017 18:48:58 +0000 Subject: [PATCH 21/21] Ignore buildlib python bytecode files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 48e07c8e791..60ba8982f14 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Ignore python bytecode files *.pyc buildnmlc +buildlib.*c # Ignore emacs backup files *~