Skip to content

Commit

Permalink
Merge branch 'wanggangsheng/lnd/alm-pflotran-bgc-rebase3' (PR #1649)
Browse files Browse the repository at this point in the history
Migrate NGEE-Arctic CLM-PFLOTRAN to ACME Land Model through a
generic clm_interface

1. clm_interface_dataType consists of biogeochemistry (bgcType)
and thermal-hydrology (thType).
2. Rename namelist use_bgc_interface to use_clm_interface to
include bgc & th interfaces.
3. Data passing between ALM & clm_interface is implemented in
clm_interface_funcsMod.F90.
4. Data passing between clm_interface & PFLOTRAN is implemented in
clm_interface_pflotranMod.F90.
5. Global-scale ALM-PFLOTRAN-bgc coupled run is tested.
6. The clm_interface is extended to incorporate PLFOTRAN
thermal-hydrology in next step.
7. Add configuration for mach "cades" for alm-pflotran coupled run.
8. makefile: update "PETSC_LIB"-"variables" dir for
petsc-git-version 1a9d3c3.

[BFB]

Conflicts:
	components/clm/src/biogeochem/CNNStateUpdate1Mod.F90
	components/clm/src/biogeochem/CNNitrogenFluxType.F90
	components/clm/src/biogeochem/PStateUpdate1Mod.F90
	components/clm/src/biogeochem/PStateUpdate2Mod.F90
	components/clm/src/biogeochem/PStateUpdate3Mod.F90
	components/clm/src/biogeophys/HydrologyNoDrainageMod.F90
	components/clm/src/main/clm_initializeMod.F90
	components/clm/src/main/controlMod.F90
  • Loading branch information
jqyin committed Aug 17, 2017
2 parents bee6d17 + 612d057 commit 1291de9
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
9 changes: 5 additions & 4 deletions config/acme/machines/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,9 @@ ifeq ($(strip $(USE_PETSC)), TRUE)
$(error PETSC_PATH must be defined when USE_PETSC is TRUE)
endif

# Get the "PETSC_LIB" list an env var
include $(PETSC_PATH)/conf/variables
# Get the "PETSC_LIB" list an env var
include $(PETSC_PATH)/lib/petsc/conf/variables

endif

# Set Trilinos info if it is being used
Expand Down Expand Up @@ -564,7 +565,7 @@ endif

# Add PETSc libraries
ifeq ($(strip $(USE_PETSC)), TRUE)
SLIBS += -L${LIB_PETSC} ${PETSC_LIB}
SLIBS += ${PETSC_LIB}
endif

# Add trilinos libraries; too be safe, we include all libraries included in the trilinos build,
Expand Down Expand Up @@ -904,7 +905,7 @@ cleanrof:
$(RM) -fr $(EXEROOT)/rof/obj

cleanlnd:
$(RM) -f $(LIBROOT)/liblnd.a
$(RM) -f $(LIBROOT)/$(LNDLIB)
$(RM) -fr $(EXEROOT)/lnd/obj

cleancsmshare:
Expand Down
12 changes: 12 additions & 0 deletions config/acme/machines/config_compilers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ for mct, etc.
<ADD_CPPDEFS MODEL="pop"> -D_USE_FLOW_CONTROL </ADD_CPPDEFS>
</compiler>


<!-- hacking of mach/compiler generated 'Macros.make' for coupling with pflotran -->
<!-- ideally it should go with CLM configuration -->
<compiler>
<ADD_FFLAGS MODEL="clm" CLM_PFLOTRAN_COUPLED="TRUE"> -I$(CLM_PFLOTRAN_SOURCE_DIR) </ADD_FFLAGS>
<ADD_CPPDEFS MODEL="clm" CLM_PFLOTRAN_COUPLED="TRUE"> -DCLM_PFLOTRAN </ADD_CPPDEFS>
<ADD_CPPDEFS MODEL="clm" CLM_PFLOTRAN_COUPLED="TRUE" CLM_PFLOTRAN_COLMODE="TRUE"> -DCOLUMN_MODE </ADD_CPPDEFS>
<ADD_LDFLAGS MODEL="driver" CLM_PFLOTRAN_COUPLED="TRUE"> -L$(CLM_PFLOTRAN_SOURCE_DIR) -lpflotran $(PETSC_LIB) </ADD_LDFLAGS>
</compiler>
<!-- end of hacking 'Macros.make' for coupling with pflotran -->


<compiler COMPILER="ibm">
<!-- http://publib.boulder.ibm.com/infocenter/comphelp/v7v91/index.jsp
Notes: (see xlf user's guide for the details)
Expand Down
10 changes: 10 additions & 0 deletions config/acme/machines/config_machines.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1947,6 +1947,16 @@
<command name="load">netcdf-hdf5parallel/4.3.3.1</command>
</modules>
</module_system>

<!-- for CLM-PFLOTRAN coupling, the PETSC_PATH must be defined specifically upon machines -->
<environment_variables>
<env name="PETSC_PATH" compiler="gnu" mpilib="openmpi">/software/user_tools/current/cades-ccsi/petsc4pf/openmpi-1.10-gcc-5.3</env>
<!-- hack for PFLOTRAN coupling (this is a temporary solution, and user must manually edit it after case.setup)-->
<env name="CLM_PFLOTRAN_COUPLED">FALSE</env>
<env name="CLM_PFLOTRAN_COLMODE">FALSE</env>
<!-- dir for pflotran source code -->
<env name="CLM_PFLOTRAN_SOURCE_DIR">/lustre/or-hydra/cades-ccsi/$USER/models/pflotran-interface/src/clm-pflotran</env>
</environment_variables>
</machine>

<machine MACH="titan">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
use_clm_interface = .true.
use_clm_bgc = .true.
1 change: 1 addition & 0 deletions scripts/lib/update_acme_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
("SMS_Ld4.f45_f45.ICLM45ED","clm-fates"),
("ERS.f19_g16.I1850CLM45","clm-betr"),
("ERS.f19_g16.I1850CLM45","clm-vst"),
("ERS.f09_g16.I1850CLM45CN","clm-bgcinterface"),
"ERS.ne11_oQU240.I20TRCLM45",
"ERS.f09_g16.IMCLM45BC")
),
Expand Down

0 comments on commit 1291de9

Please sign in to comment.