Skip to content

Commit

Permalink
Merge commit 'ff3783bdfabcadc7b0c6fcd18d96f0364644d6d7' into jgfouca/…
Browse files Browse the repository at this point in the history
…branch-for-to-acme-12-06-2017-pr

* commit 'ff3783bdfabcadc7b0c6fcd18d96f0364644d6d7':
  fix issue in scripts_regression_tests
  Add ability to customize CaseStatus success message for a phase.
  Fix bug in compare namelists
  add test for xmlquery DOCN_MODE
  Fix memory leak of newtimers in merge_thread_data
  in splitting comp vars make sure comp isnt subset of name
  Update ChangeLog
  nthrds > 1 should set build_threaded flag
  Update ChangeLog
  Update ChangeLog
  fix pylint issue
  fix gptl threaded build, batch change for cheyenne
  correct path for includes used in build
  Check for unicode in expect()
  update ACME to E3SM and changes related to Issue #1519 and PR #2062
  Do not use normalization when mapping glc2ocn
  Add comments about not needing to add fields to x2o_fluxes and x2i_fluxes
  Point to new glc2ocn mapping files
  Allow different glc2ocn mappings for liq and ice
  • Loading branch information
jgfouca committed Dec 6, 2017
2 parents 0f3f626 + 221a9b1 commit 37675ac
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 22 deletions.
3 changes: 2 additions & 1 deletion driver-mct/cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,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]
Expand Down
25 changes: 21 additions & 4 deletions driver-mct/cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1620,21 +1620,38 @@
<desc>glc2ice runoff mapping file decomp type</desc>
</entry>

<entry id="GLC2OCN_RMAPNAME">
<entry id="GLC2OCN_LIQ_RMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>glc2ocn runoff mapping file</desc>
<desc>glc2ocn runoff mapping file for liquid runoff</desc>
</entry>

<entry id="GLC2OCN_RMAPTYPE">
<entry id="GLC2OCN_LIQ_RMAPTYPE">
<type>char</type>
<valid_values>X,Y</valid_values>
<default_value>Y</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>glc2ocn runoff mapping file decomp type</desc>
<desc>glc2ocn runoff mapping file decomp type for liquid runoff</desc>
</entry>

<entry id="GLC2OCN_ICE_RMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>glc2ocn runoff mapping file for ice runoff</desc>
</entry>

<entry id="GLC2OCN_ICE_RMAPTYPE">
<type>char</type>
<valid_values>X,Y</valid_values>
<default_value>Y</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>glc2ocn runoff mapping file decomp type for ice runoff</desc>
</entry>

<entry id="OCN2WAV_SMAPNAME">
Expand Down
40 changes: 35 additions & 5 deletions driver-mct/cime_config/namelist_definition_drv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3546,20 +3546,20 @@
</values>
</entry>

<entry id="glc2ocn_rmapname" modify_via_xml="GLC2OCN_RMAPNAME">
<entry id="glc2ocn_liq_rmapname" modify_via_xml="GLC2OCN_LIQ_RMAPNAME">
<type>char</type>
<category>mapping</category>
<input_pathname>abs</input_pathname>
<group>seq_maps</group>
<desc>
glc to ocn runoff conservative mapping file
glc to ocn runoff conservative mapping file for liquid runoff
</desc>
<values>
<value>$GLC2OCN_RMAPNAME</value>
<value>$GLC2OCN_LIQ_RMAPNAME</value>
</values>
</entry>

<entry id="glc2ocn_rmaptype" modify_via_xml="GLC2OCN_RMAPTYPE">
<entry id="glc2ocn_liq_rmaptype" modify_via_xml="GLC2OCN_LIQ_RMAPTYPE">
<type>char</type>
<category>mapping</category>
<group>seq_maps</group>
Expand All @@ -3571,7 +3571,37 @@
grid.
</desc>
<values>
<value>$GLC2OCN_RMAPTYPE</value>
<value>$GLC2OCN_LIQ_RMAPTYPE</value>
<value bfbflag="on">X</value>
</values>
</entry>

<entry id="glc2ocn_ice_rmapname" modify_via_xml="GLC2OCN_ICE_RMAPNAME">
<type>char</type>
<category>mapping</category>
<input_pathname>abs</input_pathname>
<group>seq_maps</group>
<desc>
glc to ocn runoff conservative mapping file for ice runoff
</desc>
<values>
<value>$GLC2OCN_ICE_RMAPNAME</value>
</values>
</entry>

<entry id="glc2ocn_ice_rmaptype" modify_via_xml="GLC2OCN_ICE_RMAPTYPE">
<type>char</type>
<category>mapping</category>
<group>seq_maps</group>
<desc>
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.
</desc>
<values>
<value>$GLC2OCN_ICE_RMAPTYPE</value>
<value bfbflag="on">X</value>
</values>
</entry>
Expand Down
44 changes: 32 additions & 12 deletions driver-mct/main/prep_ocn_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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

!--------------------------------------------------------------------------
Expand All @@ -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
Expand Down Expand Up @@ -170,7 +172,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
Expand Down Expand Up @@ -322,11 +325,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)

Expand Down Expand Up @@ -1234,7 +1245,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=.false.)

call seq_map_map(mapper_Rg2o_ice, g2x_gx, g2x_ox(egi), &
fldlist=seq_flds_g2o_ice_fluxes, norm=.false.)
enddo
call t_drvstopf (trim(timer))
end subroutine prep_ocn_calc_g2x_ox
Expand Down Expand Up @@ -1335,10 +1350,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
Expand Down
14 changes: 14 additions & 0 deletions driver-mct/shr/seq_flds_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 = ''
Expand Down Expand Up @@ -2242,6 +2246,9 @@ 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'
units = 'kg m-2 s-1'
Expand All @@ -2250,6 +2257,9 @@ 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'
units = 'kg m-2 s-1'
Expand All @@ -2258,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'
Expand Down Expand Up @@ -3217,6 +3229,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)
Expand Down

0 comments on commit 37675ac

Please sign in to comment.