Skip to content

Commit

Permalink
Merge tag 'cime4.5.14' into gswp3drvflds
Browse files Browse the repository at this point in the history
Rework vertical gradient calculator for lnd to glc remapping, Remove inputdata files from usermods.
  • Loading branch information
ekluzek committed Jun 3, 2016
2 parents 7e01d2b + b631529 commit 790d13c
Show file tree
Hide file tree
Showing 25 changed files with 1,635 additions and 435 deletions.
4 changes: 0 additions & 4 deletions cime_config/cesm/allactive/usermods_dirs/b1850/user_nl_clm
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
fsurdat = '/glade/p/cesmdata/cseg/inputdata/lnd/clm2/surfdata_map/surfdata_0.9x1.25_16pftsmodwshrubwglcr_simyr1850_c151210.nc'
init_interp_fill_missing_with_natveg = .true.
finidat = '/glade/scratch/hannay/land_ic/b.e15.B1850.f09_g16.pi_control.35_ic.clm2.r.0001-01-06-00000.nc'


16 changes: 0 additions & 16 deletions cime_config/cesm/allactive/usermods_dirs/b1850/user_nl_pop

This file was deleted.

24 changes: 24 additions & 0 deletions cime_config/cesm/archive.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@
<subdir>rest</subdir>
<keep_last_in_rundir>true</keep_last_in_rundir>
</file_extension>
<file_extension regex_suffix=".rs1\..*">
<subdir>rest</subdir>
<keep_last_in_rundir>true</keep_last_in_rundir>
</file_extension>
<file_extension regex_suffix=".h\..*">
<subdir>hist</subdir>
<keep_last_in_rundir>true</keep_last_in_rundir>
Expand Down Expand Up @@ -188,6 +192,10 @@
<subdir>rest</subdir>
<keep_last_in_rundir>true</keep_last_in_rundir>
</file_extension>
<file_extension regex_suffix=".rs1\..*">
<subdir>rest</subdir>
<keep_last_in_rundir>true</keep_last_in_rundir>
</file_extension>
<file_extension regex_suffix=".h\..*">
<subdir>hist</subdir>
<keep_last_in_rundir>true</keep_last_in_rundir>
Expand Down Expand Up @@ -298,6 +306,10 @@
<subdir>rest</subdir>
<keep_last_in_rundir>true</keep_last_in_rundir>
</file_extension>
<file_extension regex_suffix=".rs1\..*">
<subdir>rest</subdir>
<keep_last_in_rundir>true</keep_last_in_rundir>
</file_extension>
<file_extension regex_suffix=".h\..*">
<subdir>hist</subdir>
<keep_last_in_rundir>true</keep_last_in_rundir>
Expand Down Expand Up @@ -338,6 +350,10 @@
<subdir>rest</subdir>
<keep_last_in_rundir>true</keep_last_in_rundir>
</file_extension>
<file_extension regex_suffix=".rs1\..*">
<subdir>rest</subdir>
<keep_last_in_rundir>true</keep_last_in_rundir>
</file_extension>
<file_extension regex_suffix=".h\..*">
<subdir>hist</subdir>
<keep_last_in_rundir>true</keep_last_in_rundir>
Expand Down Expand Up @@ -426,6 +442,10 @@
<subdir>rest</subdir>
<keep_last_in_rundir>true</keep_last_in_rundir>
</file_extension>
<file_extension regex_suffix=".rs1\..*">
<subdir>rest</subdir>
<keep_last_in_rundir>true</keep_last_in_rundir>
</file_extension>
<file_extension regex_suffix=".h\..*">
<subdir>hist</subdir>
<keep_last_in_rundir>false</keep_last_in_rundir>
Expand Down Expand Up @@ -492,6 +512,10 @@
<subdir>rest</subdir>
<keep_last_in_rundir>true</keep_last_in_rundir>
</file_extension>
<file_extension regex_suffix=".rs1\..*">
<subdir>rest</subdir>
<keep_last_in_rundir>true</keep_last_in_rundir>
</file_extension>
<file_extension regex_suffix=".h\..*">
<subdir>hist</subdir>
<keep_last_in_rundir>false</keep_last_in_rundir>
Expand Down
3 changes: 1 addition & 2 deletions cime_config/cesm/machines/Depends.intel
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ prim_advection_mod.o \
edge_mod.o \
derivative_mod.o \
bndry_mod.o \
prim_advance_mod.o \
uwshcu.o
prim_advance_mod.o

# CLM's SatellitePhenologyMod is compiled incorrectly with intel 15.0.0 at -O2
REDUCED_OPT_OBJS=\
Expand Down
20 changes: 0 additions & 20 deletions cime_config/cesm/machines/config_compilers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -868,26 +868,6 @@ for mct, etc.
<!-- <ADD_LDFLAGS compile_threaded="true"> -L/home/santos/lib/fake_omp -lfake_omp -Wl,-Wl,,rpath=/home/santos/lib/fake_omp -->
</compiler>

<compiler MACH="logan">
<MPI_LIB_NAME MPILIB="openmpi"> mpi</MPI_LIB_NAME>
<LAPACK_LIBDIR> /usr/lib64 </LAPACK_LIBDIR>
<ADD_SLIBS>$(shell $(NETCDF_PATH)/bin/nf-config --flibs)</ADD_SLIBS>
</compiler>

<compiler COMPILER="intel" MACH="logan">
<ADD_LDFLAGS> -Wl,-rpath,$(NETCDF_PATH)/lib </ADD_LDFLAGS>
<ADD_LDFLAGS> -Wl,-rpath,$(COMPILER_PATH)/lib/intel64 </ADD_LDFLAGS>
</compiler>

<compiler COMPILER="pgi" MACH="logan">
<ADD_CFLAGS DEBUG="FALSE"> -O2 </ADD_CFLAGS>
<ADD_FFLAGS DEBUG="FALSE"> -O2 </ADD_FFLAGS>
<ADD_LDFLAGS> -lgomp </ADD_LDFLAGS>
<ADD_LDFLAGS> -Wl,-R$(NETCDF_PATH)/lib</ADD_LDFLAGS>
<ADD_LDFLAGS> -Wl,-R$(COMPILER_PATH)/lib</ADD_LDFLAGS>
<ADD_LDFLAGS> -Wl,-R$(COMPILER_PATH)/libso</ADD_LDFLAGS>
</compiler>

<compiler COMPILER="nag" MACH="goldbach">
<NETCDF_PATH> /usr/local/netcdf-gcc-nag</NETCDF_PATH>
<MPI_PATH MPILIB="openmpi"> /usr/local/openmpi-gcc-nag</MPI_PATH>
Expand Down
1 change: 1 addition & 0 deletions driver_cpl/driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ list(APPEND drv_sources
seq_map_type_mod.F90
vertical_gradient_calculator_base.F90
vertical_gradient_calculator_2nd_order.F90
vertical_gradient_calculator_factory.F90
)

sourcelist_to_parent(drv_sources)
5 changes: 3 additions & 2 deletions driver_cpl/driver/map_lnd2glc_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ subroutine map_lnd2glc(l2x_l, landfrac_l, g2x_g, fieldname, gradient_calculator,
type(mct_aVect) , intent(in) :: landfrac_l ! lfrac field on the land grid
type(mct_aVect) , intent(in) :: g2x_g ! glc -> cpl fields on the glc grid
character(len=*) , intent(in) :: fieldname ! name of the field to map
class(vertical_gradient_calculator_base_type), intent(in) :: gradient_calculator
class(vertical_gradient_calculator_base_type), intent(inout) :: gradient_calculator
type(seq_map) , intent(inout) :: mapper
type(mct_aVect) , intent(inout) :: l2x_g ! lnd -> cpl fields on the glc grid
!
Expand Down Expand Up @@ -167,6 +167,7 @@ subroutine map_lnd2glc(l2x_l, landfrac_l, g2x_g, fieldname, gradient_calculator,
! Map ice elevation classes
! ------------------------------------------------------------------------

call gradient_calculator%calc_gradients()
do elevclass = 1, glc_get_num_elevation_classes()
call map_one_elevation_class(l2x_l, landfrac_l, fieldname_trimmed, elevclass, &
gradient_calculator, glc_topo, mapper, data_g_oneEC)
Expand Down Expand Up @@ -403,7 +404,7 @@ subroutine map_one_elevation_class(l2x_l, landfrac_l, fieldname, elevclass, &

call mct_aVect_exportRattr(l2x_l, fieldname_ec, data_l)
call mct_aVect_exportRattr(l2x_l, toponame_ec, topo_l)
call gradient_calculator%calc_vertical_gradient(elevclass, vertical_gradient_l)
call gradient_calculator%get_gradients_one_class(elevclass, vertical_gradient_l)
partial_remap_l = data_l - (vertical_gradient_l * topo_l)

call mct_aVect_importRattr(l2x_l_temp, partial_remap_tag, partial_remap_l)
Expand Down
10 changes: 6 additions & 4 deletions driver_cpl/driver/prep_glc_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,9 @@ subroutine prep_glc_map_one_field_lnd2glc(egi, eli, fieldname, fractions_lx, map
! vertical gradient calculator.

use vertical_gradient_calculator_2nd_order, only : vertical_gradient_calculator_2nd_order_type
use glc_elevclass_mod, only : glc_get_num_elevation_classes
use vertical_gradient_calculator_factory
use glc_elevclass_mod, only : glc_get_num_elevation_classes, &
glc_get_elevclass_bounds, glc_all_elevclass_strings
use map_lnd2glc_mod, only : map_lnd2glc

! Arguments
Expand All @@ -424,12 +426,12 @@ subroutine prep_glc_map_one_field_lnd2glc(egi, eli, fieldname, fractions_lx, map

g2x_gx => component_get_c2x_cx(glc(egi))

gradient_calculator = vertical_gradient_calculator_2nd_order_type( &
gradient_calculator = create_vertical_gradient_calculator_2nd_order( &
attr_vect = l2gacc_lx(eli), &
fieldname = fieldname, &
toponame = 'Sl_topo', &
min_elevation_class = 1, &
max_elevation_class = glc_get_num_elevation_classes())
elevclass_names = glc_all_elevclass_strings(), &
elevclass_bounds = glc_get_elevclass_bounds())
call map_lnd2glc(l2x_l = l2gacc_lx(eli), &
landfrac_l = fractions_lx, &
g2x_g = g2x_gx, &
Expand Down
34 changes: 17 additions & 17 deletions driver_cpl/driver/seq_rest_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ module seq_rest_mod
use shr_file_mod, only: shr_file_getunit, shr_file_freeunit
use mct_mod
use ESMF
use component_type_mod
use component_type_mod

! diagnostic routines
use seq_diag_mct, only : budg_dataG, budg_ns
use seq_diag_mct, only : budg_dataG, budg_ns

! Sets mpi communicators, logunit and loglevel
use seq_comm_mct, only: seq_comm_getdata=>seq_comm_setptrs, seq_comm_setnthreads, &
Expand All @@ -43,18 +43,18 @@ module seq_rest_mod
use seq_infodata_mod

! clock & alarm routines
use seq_timemgr_mod
use seq_timemgr_mod

! diagnostic routines
! diagnostic routines
use seq_diag_mct, only: budg_datag

! lower level io routines
use seq_io_mod
use seq_io_mod

! prep modules - coupler communication between different components
use prep_ocn_mod, only: prep_ocn_get_x2oacc_ox
use prep_ocn_mod, only: prep_ocn_get_x2oacc_ox_cnt
use prep_rof_mod, only: prep_rof_get_l2racc_lx
use prep_rof_mod, only: prep_rof_get_l2racc_lx
use prep_rof_mod, only: prep_rof_get_l2racc_lx_cnt
use prep_glc_mod, only: prep_glc_get_l2gacc_lx
use prep_glc_mod, only: prep_glc_get_l2gacc_lx_cnt
Expand Down Expand Up @@ -183,7 +183,7 @@ subroutine seq_rest_read(rest_file, infodata, &
ocn_present=ocn_present, &
glc_present=glc_present, &
wav_present=wav_present, &
esp_present=wav_present, &
esp_present=esp_present, &
atm_prognostic=atm_prognostic, &
lnd_prognostic=lnd_prognostic, &
ice_prognostic=ice_prognostic, &
Expand Down Expand Up @@ -235,22 +235,22 @@ subroutine seq_rest_read(rest_file, infodata, &
if (ice_present) then
gsmap => component_get_gsmap_cx(ice(1))
call seq_io_read(rest_file, gsmap, fractions_ix, 'fractions_ix')
call seq_io_read(rest_file, ice, 'c2x', 'i2x_ix')
call seq_io_read(rest_file, ice, 'c2x', 'i2x_ix')
endif
if (rof_present) then
gsmap => component_get_gsmap_cx(rof(1))
call seq_io_read(rest_file, gsmap, fractions_rx, 'fractions_rx')
call seq_io_read(rest_file, rof, 'c2x', 'r2x_rx')
call seq_io_read(rest_file, rof, 'c2x', 'r2x_rx')
endif
if (glc_present) then
gsmap => component_get_gsmap_cx(glc(1))
call seq_io_read(rest_file, gsmap, fractions_gx, 'fractions_gx')
call seq_io_read(rest_file, glc, 'c2x', 'g2x_gx')
call seq_io_read(rest_file, glc, 'c2x', 'g2x_gx')
endif
if (wav_present) then
gsmap => component_get_gsmap_cx(wav(1))
call seq_io_read(rest_file, gsmap, fractions_wx, 'fractions_wx')
call seq_io_read(rest_file, wav, 'c2x', 'w2x_wx')
call seq_io_read(rest_file, wav, 'c2x', 'w2x_wx')
endif
! Add ESP restart read here

Expand Down Expand Up @@ -361,7 +361,7 @@ subroutine seq_rest_write(EClock_d, seq_SyncClock, infodata, &
glc_prognostic=glc_prognostic, &
wav_prognostic=wav_prognostic, &
esp_prognostic=esp_prognostic, &
cpl_cdf64=cdf64, &
cpl_cdf64=cdf64, &
case_name=case_name)

! Write out infodata and time manager data to restart file
Expand Down Expand Up @@ -449,7 +449,7 @@ subroutine seq_rest_write(EClock_d, seq_SyncClock, infodata, &
call seq_io_write(rest_file, gsmap, fractions_ax, 'fractions_ax', &
whead=whead, wdata=wdata)
call seq_io_write(rest_file, atm, 'c2x', 'a2x_ax', &
whead=whead, wdata=wdata)
whead=whead, wdata=wdata)
call seq_io_write(rest_file, gsmap, xao_ax, 'xao_ax', &
whead=whead, wdata=wdata)
endif
Expand Down Expand Up @@ -484,7 +484,7 @@ subroutine seq_rest_write(EClock_d, seq_SyncClock, infodata, &
call seq_io_write(rest_file, gsmap, fractions_ox, 'fractions_ox', &
whead=whead, wdata=wdata)
call seq_io_write(rest_file, ocn, 'c2x', 'o2x_ox', &
whead=whead, wdata=wdata)
whead=whead, wdata=wdata)
call seq_io_write(rest_file, gsmap, x2oacc_ox, 'x2oacc_ox', &
whead=whead, wdata=wdata)
call seq_io_write(rest_file, x2oacc_ox_cnt, 'x2oacc_ox_cnt', &
Expand All @@ -497,7 +497,7 @@ subroutine seq_rest_write(EClock_d, seq_SyncClock, infodata, &
call seq_io_write(rest_file, gsmap, fractions_ix, 'fractions_ix', &
whead=whead, wdata=wdata)
call seq_io_write(rest_file, ice, 'c2x', 'i2x_ix', &
whead=whead, wdata=wdata)
whead=whead, wdata=wdata)
endif
if (rof_present) then
gsmap => component_get_gsmap_cx(rof(1))
Expand All @@ -511,14 +511,14 @@ subroutine seq_rest_write(EClock_d, seq_SyncClock, infodata, &
call seq_io_write(rest_file, gsmap, fractions_gx, 'fractions_gx', &
whead=whead, wdata=wdata)
call seq_io_write(rest_file, glc, 'c2x', 'g2x_gx', &
whead=whead, wdata=wdata)
whead=whead, wdata=wdata)
endif
if (wav_present) then
gsmap => component_get_gsmap_cx(wav(1))
call seq_io_write(rest_file, gsmap, fractions_wx, 'fractions_wx', &
whead=whead, wdata=wdata)
call seq_io_write(rest_file, wav, 'c2x', 'w2x_wx', &
whead=whead, wdata=wdata)
whead=whead, wdata=wdata)
endif
! Write ESP restart data here
enddo
Expand Down
Loading

0 comments on commit 790d13c

Please sign in to comment.