Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ELM->ATS coupling #4

Open
wants to merge 73 commits into
base: elm-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
38ccc85
Need to explicitly initialize 'budg_fluxG' for plev=p_inf (so-called …
fmyuan Jul 13, 2021
3e39eba
Modifying CNPBudgetMod error tolerance to be consistent with those in…
fmyuan Jul 22, 2021
9acdf27
After rename 'clm' to 'elm', have to rename 'CLM_USRDAT' to 'ELM_USRD…
fmyuan Sep 28, 2020
11a2f7f
Machine File Modifications (1): add a locally user-defined Mac machin…
fmyuan Sep 6, 2017
a8d6be3
Machine File Modifications (2a): Update machine configurations and in…
fmyuan Oct 26, 2018
e0feef6
Machine File Modifications (2b): Add a machine settings, MPILIBS=open…
fmyuan Jun 30, 2021
de67158
Machine File Modifications (2c): Add 'mpi-serial' for ELM on ORNL mac…
fmyuan Aug 23, 2021
1df8332
CPL_BYPASS modification (1): in case 'scale_factor' or 'add_offset' n…
fmyuan Dec 27, 2018
2fc053c
CPL_BYPASS modification (2): if v1 GSWP3 metdata for ICB, let the end…
fmyuan Jan 2, 2019
4bfb853
CPL_BYPASS modification (3): adding a check for specific humidity.
fmyuan Jan 3, 2019
79a9493
CPL_BYPASS modification (4): a bug fix for CPL_BYPASS data load. The …
fmyuan Jan 29, 2019
89366cb
CPL_BYPASS modification (5): re-do CO2 import for CPL_BYPASS option -…
fmyuan Jan 3, 2019
816d3fd
CPL_BYPASS modification (6): Fix an inconsistence of longitude format…
fmyuan Jan 16, 2020
3580871
CPL_BYPASS modification (7): Update GSWP3_daymet option for 'datm' mo…
fmyuan Sep 9, 2020
999ddc1
Add walltime and memory usage checking into CPL_BYPASS data loading.
fmyuan Jan 19, 2022
0d064db
Bugs in mosart - NO idea why it suddenly appears when building ELM wi…
fmyuan Nov 15, 2021
8784cba
GSWP3v2 is added as one option of 'DATM_MODE'.
fmyuan Jan 24, 2022
9197dfb
The checking of grid-system in radians or degrees is only working for…
fmyuan Jan 24, 2022
daab843
change datm's topo and presaero yearly extrapolating method.
fmyuan Jan 28, 2022
bcab2df
A potential bug fix in CH4Mod.F90.
fmyuan Feb 1, 2022
0bee420
Hyperthreading on Summit appears to slow IO very much in ELM when wit…
fmyuan Feb 22, 2022
fb1617e
Add a machine, 'wsl', Windows Subsystem for Linux for building/runnin…
fmyuan Jul 1, 2021
ac0a124
Add an example 'bashrc_wsl' to override $HOME/.bashrc, to port ELM mo…
fmyuan Jul 7, 2021
e5b17a2
Add an example 'bashrc_gnu' to override $HOME/.bashrc, to port ELM mo…
fmyuan Feb 25, 2022
443f2a1
GNU Fortran version >=10, for legacy fortran code it may require a fl…
fmyuan Apr 7, 2022
db50584
a BOZ bug for gcc version>=10.
fmyuan Apr 7, 2022
4d84e08
Add openmpi to mymac's available mpilib.
fmyuan Apr 7, 2022
eb4996d
EMI modifications for Alquimia, carried out by Ben Sulman.
fmyuan Oct 28, 2021
56e1a80
CMake building settings for coupling ATS libraries into ELM.
fmyuan Nov 2, 2021
380827d
ELM namelist addition for ATS coupling. This will add 3 namelists - u…
fmyuan Nov 12, 2021
ce53c69
Arbitrarily set saturated conductivity and porosity for bedrock botto…
fmyuan Mar 1, 2022
ddf6768
EMI modifications for ATS - 1st attempt.
fmyuan Nov 2, 2021
655892b
EMI modifications for ATS - 10th attempt: v0
fmyuan Nov 10, 2021
2238e2d
Add optional controls from ELM interface for ATS outputs.
fmyuan May 5, 2022
3b080cd
in ATS, source (mass) is in negative (out of soils), and sink positiv…
fmyuan May 9, 2022
69e83a4
Let ATS interface run for one ELM time-step.
fmyuan May 10, 2022
94f2414
Allow ELM change ATS's starting time, when passing initial conditions.
fmyuan May 11, 2022
d233ed6
In ATS, source-sink terms are in units of per m2 for surface water, b…
fmyuan May 17, 2022
8f0cf61
When coupling with ATS or PFLOTRAN, let init_cold water condition not…
fmyuan Jun 1, 2022
29787a4
bug fixes in CNPBudgetMod.F90. NOTE: it's fixed in later ELM version.…
fmyuan Jun 14, 2022
3731673
Initializing ATS flow PK's initial condition by ELM's ground water ta…
fmyuan Jun 15, 2022
39ef5ff
Let ELM hist_tape(0) control ATS vis output frequency.
fmyuan Jun 15, 2022
35b017b
When coupling with ATS, surface water inputs, named as 'gross_infiltr…
fmyuan Jun 22, 2022
cd7fbb8
Total vegetation transpiration is as one of input to extract water fr…
fmyuan Jun 22, 2022
e3cc23a
Additional terms for water Sources/Sinks from ELM to ATS.
fmyuan Jun 29, 2022
ffcee75
Passing ATS water state variables to ELM.
fmyuan Jun 29, 2022
fbad886
At present, don't allow ATS simulated water states over-ride ELM's.
fmyuan Jun 30, 2022
7975038
When ELM get data from ATS, 'water_content' and 'capillary_pressure_g…
fmyuan Jul 1, 2022
7a9aca7
ats libraries updated.
fmyuan Sep 22, 2022
2313ccd
wsl cmake changing.
fmyuan Sep 30, 2022
36cc3fd
EMI-ats writing control option bug - when ELM not writing out at all.
fmyuan Oct 6, 2022
877c3f9
updates ATS API to match that on the ATS side
ecoon Sep 29, 2022
30788b3
updates to ELM-ATS API based on team-code effort with Fengming and Ethan
ecoon Nov 2, 2022
7d847bb
Update EMI-ats codes after interface API changing.
fmyuan Nov 2, 2022
64ed418
Update EMI-ats libraries.
fmyuan Nov 4, 2022
54d9fa9
WSL machine files
fmyuan Nov 14, 2022
af17918
Merge branch 'EMI-ats' of https://github.com/fmyuan/E3SM into EMI-ats
fmyuan Nov 14, 2022
bc758dc
updates to ELM-ATS api -- for now assuming PFTs are consistent or set…
ecoon Nov 22, 2022
df46a6b
Merge branch 'EMI-ats' of https://github.com/fmyuan/E3SM into EMI-ats
fmyuan Jan 17, 2023
2663b91
update Fortran-C interface - WIP
jbeisman Jul 10, 2023
e97fc74
updated generic EMI interface - WIP
jbeisman Jul 10, 2023
e37c129
updates to ATS interface and driver code
jbeisman Aug 3, 2023
cf3af91
add a few new EMI variable enumerations
jbeisman Aug 3, 2023
3480ff4
changes to data definition files
jbeisman Aug 3, 2023
03fe205
changes to data exchange files
jbeisman Aug 3, 2023
51f27f4
cleanup some debugging statements
jbeisman Aug 3, 2023
2476ed7
add modified HydrologyNoDrainage and config files specific to my system
jbeisman Aug 3, 2023
b047961
Brought some new variables into EMI, created realively convenient pat…
jbeisman Aug 9, 2023
02d1a64
Deactivate ELM subroutine Drainage() when running ATS; Make sure wate…
jbeisman Aug 9, 2023
0700d99
Getting closer - more cleanup, added some variables to EMI, etc.
jbeisman Aug 9, 2023
23a211a
Work toward full water balance accounting
jbeisman Aug 9, 2023
baa3b3c
Added environment file and shell script to aid in building examples.
jbeisman Aug 29, 2023
4b91bf6
Removes some stray comments and fixes a few assignments
jbeisman Oct 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .ELMenv
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

export CC_ROOT=/usr/local
export FC_ROOT=/usr/local
export MPI_ROOT=${OPENMPI_DIR}


export HDF5_PATH=${AMANZI_TPLS_DIR}
export NETCDF_PATH=${AMANZI_TPLS_DIR}
#export PNETCDF_PATH=${AMANZI_TPLS_DIR}
export PNETCDF_PATH=/Users/80x/Software/kernel_test_E3SM/pnetcdf/pnetcdf-install
export BLASLAPACK_DIR=/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/lib


export PROJECT_E3SM=${ATS_BASE}/E3SM_jb_branch
export E3SM_ROOT=${PROJECT_E3SM}/E3SM
export E3SM_INPUTDATA=${E3SM_ROOT}/pt-e3sm-inputdata


export MACH_NAME=mymac

export OMPI_CC=gcc
export OMPI_FC=gfortran
export OMPI_CXX=g++

export PYTHONPATH=${E3SM_ROOT}/python:$PYTHONPATH
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ buildlib_cmakec

# Ignore emacs backup files
*~
buildlib_cmakec
97 changes: 97 additions & 0 deletions bld_elm_ats.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#!/usr/bin/env bash

# set NCOLS=1 to run single-column example
# set NCOLS=5 to run 5-column hillslope example
export NCOLS=5

# set compset name
export COMPSET=ICB1850CNPRDCTCBC
export COMPDIR="${PROJECT_E3SM}/cases/${COMPSET}"
export RUNDIR="${PROJECT_E3SM}/scratch/${COMPSET}/run"

cd ${E3SM_ROOT}/cime/scripts &&
./create_newcase --case ${COMPDIR} --res ELM_USRDAT --mach ${MACH_NAME} --compiler gnu --compset ${COMPSET} --walltime 06:00:00

cd ${COMPDIR} &&
./xmlchange --id ELM_USRDAT_NAME --val "${NCOLS}x1pt_Oakharbor-GRID"
./xmlchange NTASKS=1
./xmlchange NTASKS_PER_INST=1
./xmlchange PIO_TYPENAME=netcdf
./xmlchange RUN_STARTDATE=2000-07-15
./xmlchange STOP_N=100
./xmlchange HIST_N=1

# expect to error here
# part of pt-mode ELM hack
cd ${COMPDIR}; ./case.setup

# exit on error beyond this point
set -e

# write to user_nl_elm
if [[ $NCOLS -eq 1 ]]
then
## single-column
cd ${COMPDIR} &&
echo "metdata_type = 'gswp3'
metdata_bypass = '/Users/80x/Software/ats_newstate/repos/E3SM/pt-e3sm-inputdata/atm/datm7/atm_forcing.datm7.GSWP3.0.5d.v2.c180716_Oakharbor-Grid/cpl_bypass_full'
fsurdat = '/Users/80x/Software/ats_newstate/repos/E3SM/pt-e3sm-inputdata/lnd/clm2/surfdata_map/surfdata_1x1pt_Oakharbor-GRID_simyr1850_c360x720_c20230522.nc'
aero_file = '/Users/80x/Software/ats_newstate/repos/E3SM/pt-e3sm-inputdata/atm/cam/chem/trop_mozart_aero/aero/aerosoldep_monthly_1850_mean_1.9x2.5_c090803.nc'
CO2_file = '/Users/80x/Software/ats_newstate/repos/E3SM/pt-e3sm-inputdata/atm/datm7/CO2/fco2_datm_1765-2007_c100614.nc'
nyears_ad_carbon_only = 0
spinup_mortality_factor = 10
hist_empty_htapes = .true.
hist_nhtfrq = -24
hist_fincl1 = 'TBOT', 'PBOT','RH','RAIN','SNOW', 'TLAI', 'ZWT', 'SMP', 'SOILLIQ', 'SOILICE','SOIL_PRESSURE'
hist_mfilt = 1
use_ats = .true.
ats_inputdir = '/Users/80x/Software/ats_newstate/repos/E3SM/pt-e3sm-inputdata/lnd/clm2/ats'
ats_inputfile = 'column_jb.xml'
&dynamic_subgrid
do_harvest = .false.
do_transient_pfts = .false.
flanduse_timeseries = ''
/
&finidat_consistency_checks
check_finidat_fsurdat_consistency = .false.
check_finidat_year_consistency = .false.
/
" >> user_nl_elm;
fi

if [[ $NCOLS -eq 5 ]]
then
## 5-column 2D hillslope
cd ${COMPDIR} &&
echo "metdata_type = 'gswp3'
fsurdat = '/Users/80x/Software/ats_newstate/repos/E3SM/pt-e3sm-inputdata/lnd/clm2/surfdata_map/surfdata_5x1pt_Oakharbor-GRID_simyr1850_c360x720_c20230522.nc'
flanduse_timeseries = '/Users/80x/Software/ats_newstate/repos/E3SM/pt-e3sm-inputdata/lnd/clm2/surfdata_map/surfdata_5x1pt_Oakharbor-GRID_simyr1850_c360x720_c20230522.nc'
nyears_ad_carbon_only = 25
spinup_mortality_factor = 10
hist_empty_htapes = .true.
hist_nhtfrq = -24
hist_fincl1 = 'TBOT', 'PBOT','RH','RAIN','SNOW', 'TLAI', 'ZWT', 'SMP', 'SOILLIQ', 'SOILICE','SOIL_PRESSURE'
hist_mfilt = 365
metdata_bypass = '/Users/80x/Software/ats_newstate/repos/E3SM/pt-e3sm-inputdata/atm/datm7/atm_forcing.datm7.GSWP3.0.5d.v2.c180716_Oakharbor-Grid/cpl_bypass_full'
aero_file = '/Users/80x/Software/ats_newstate/repos/E3SM/pt-e3sm-inputdata/atm/cam/chem/trop_mozart_aero/aero/aerosoldep_monthly_1850_mean_1.9x2.5_c090421.nc'
CO2_file = '/Users/80x/Software/ats_newstate/repos/E3SM/pt-e3sm-inputdata/atm/datm7/CO2/fco2_datm_1765-2007_c100614.nc'
use_ats = .true.
ats_inputdir = '/Users/80x/Software/ats_newstate/repos/E3SM/pt-e3sm-inputdata/lnd/clm2/ats'
ats_inputfile = 'hillslope_jb.xml'
&dynamic_subgrid
do_harvest = .false.
do_transient_pfts = .false.
flanduse_timeseries = ''
/
&finidat_consistency_checks
check_finidat_fsurdat_consistency = .false.
check_finidat_year_consistency = .false.
/
" >> user_nl_elm;
fi

# setup again - this time with correct nl variables in place
cd ${COMPDIR}; ./case.setup

# build
cd ${COMPDIR}; ./case.build
86 changes: 86 additions & 0 deletions cime_config/machines/bashrc_gnu
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
export PATH=/usr/sbin:/sbin:/usr/bin:/bin:/opt/X11/bin
export PATH=/usr/local/CMake.app/Contents/bin:$PATH
export LD_LIBRARY_PATH=/usr/lib:/opt/X11/lib

export PATH=/Library/Frameworks/Python.framework/Versions/3.6/bin:$PATH

# blas-lapack library dir
export BLASLAPACK_DIR=/usr/local/blas-lapack-dir
export LD_LIBRARY_PATH=$BLASLAPACK_DIR:$LD_LIBRARY_PATH

##--------------------------------------------------------------------------------------------------##

export PATH=/usr/local/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

# GNU tools, built with clang/clang++
export PATH=/usr/local/gnutools/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/autotools/lib:$LD_LIBRARY_PATH

# whole package of GCC, built by clang/clang++
export PACKAGE_ROOT=/usr/local/gcc-x
export FC_ROOT=$PACKAGE_ROOT/gcc-x-clang
export CC_ROOT=$PACKAGE_ROOT/gcc-x-clang
if [ -d $CC_ROOT ] ; then
export PATH=$CC_ROOT/bin:$PATH
export LD_LIBRARY_PATH=$CC_ROOT/lib:$LD_LIBRARY_PATH
fi;

##--------------------------------------------------------------------------------------------------##
############# NOTE: the following are built using clang OR gcc, and gfortran #########

# MPICH-3.3 or openmpi-4
export MPINAME=mpich
export MPI_CURRENT=mpich-3.3
if [ -d $PACKAGE_ROOT/$MPI_CURRENT ] ; then
export MPI_ROOT=$PACKAGE_ROOT/$MPI_CURRENT
export PATH=$MPI_ROOT/bin:$PATH
export LD_LIBRARY_PATH=$MPI_ROOT/lib:$LD_LIBRARY_PATH
fi;

# HDF5-1.10 built with mpich/gcc or mpich/clang-gfortran
# a note here - HDF5-1.10 seems have unknown issues with pflotran
export HDF5_CURRENT=hdf5-1.10
if [ -d $PACKAGE_ROOT/$HDF5_CURRENT ] ; then
export HDF5_PATH=$PACKAGE_ROOT/$HDF5_CURRENT
export PATH=$HDF5_PATH/bin:$PATH
export LD_LIBRARY_PATH=$HDF5_PATH/lib:$LD_LIBRARY_PATH
fi;

# NETCDF-4.x built with HDF5 and mpich
export NC_CURRENT=netcdf-4.x-hdf5
if [ -d $PACKAGE_ROOT/$NC_CURRENT ] ; then
export NETCDF_PATH=$PACKAGE_ROOT/$NC_CURRENT
export PATH=$NETCDF_PATH/bin:$PATH
export LD_LIBRARY_PATH=$NETCDF_PATH/lib:$LD_LIBRARY_PATH

export NETCDF_C_PATH=$NETCDF_PATH
export NETCDF_FORTRAN_PATH=$NETCDF_PATH

fi;

export PNETCDF_CURRENT=pnetcdf-1.11.2
if [ -d $PACKAGE_ROOT/$PNETCDF_CURRENT ] ; then
export PNETCDF_PATH=$PACKAGE_ROOT/$PNETCDF_CURRENT
export PATH=$PNETCDF_PATH/bin:$PATH
export LD_LIBRARY_PATH=$PNETCDF_PATH/lib:$LD_LIBRARY_PATH
else
export PNETCDF_PATH=
fi;

#-------------------------------------------------------------------
# Jupyter Notebook installation
export PATH=/Users/f9y/Library/Python/3.6/bin:$PATH

#-----------------------------------------------------------------
# Mac doesn't automatically set all ENV for GUI applications
# have to by 'launchd'
launchctl setenv PATH $PATH
launchctl setenv CC_ROOT $CC_ROOT
launchctl setenv FC_ROOT $FC_ROOT
launchctl setenv HDF5_PATH $HDF5_PATH
launchctl setenv NETCDF_PATH $NETCDF_PATH
launchctl setenv MPI_ROOT $MPI_ROOT
launchctl setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH
launchctl setenv PYTHONPATH $PYTHONPATH

144 changes: 144 additions & 0 deletions cime_config/machines/bashrc_wsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi

if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'

alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi

# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi

#--------------------------------------------------------------------
# the following are likely required for E3SM Land Model (ELM) settings
#
export PATH=~/.local/bin:$PATH

# user-defined
export FC_ROOT=/usr
export CC_ROOT=/usr
export MPI_ROOT=/usr

export LD_LIBRARY_PATH=/usr/local/lib:/lib
export BLASLAPACK_LIBDIR=/usr/local/lib

export ZLIB_DIR=/usr/lib/x86_64-linux-gnu
export LD_LIBRARY_PATH=${ZLIB_DIR}:${LD_LIBRARY_PATH}

export HDF5_PATH=/usr/local/hdf5-1.10-parallel
export PATH=${HDF5_PATH}/bin:${PATH}
export LD_LIBRARY_PATH=${HDF5_PATH}/lib:${LD_LIBRARY_PATH}

export NETCDF_PATH=/usr/local/netcdf-4.x-hdf5-parallel
export PATH=${NETCDF_PATH}/bin:${PATH}
export LD_LIBRARY_PATH=${NETCDF_PATH}/lib:${LD_LIBRARY_PATH}
export NETCDF_C_PATH=${NETCDF_PATH}
export NETCDF_FORTRAN_PATH=${NETCDF_PATH}

2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/Darwin.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
string(APPEND CPPDEFS " -DSYSDARWIN")
if (COMP_CLASS STREQUAL cpl)
string(APPEND LDFLAGS " -all_load")
string(APPEND LDFLAGS " ")
endif()
3 changes: 2 additions & 1 deletion cime_config/machines/cmake_macros/Macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ set(OS_MACRO ${MACROS_DIR}/${OS}.cmake)
set(MACHINE_MACRO ${MACROS_DIR}/${MACH}.cmake)
set(COMPILER_OS_MACRO ${MACROS_DIR}/${COMPILER}_${OS}.cmake)
set(COMPILER_MACHINE_MACRO ${MACROS_DIR}/${COMPILER}_${MACH}.cmake)
set(USERDEFINED_MACRO ${MACROS_DIR}/userdefined.cmake)

if (CONVERT_TO_MAKE)
get_cmake_property(VARS_BEFORE_BUILD_INTERNAL_IGNORE VARIABLES)
endif()

# Include order defines precedence
foreach (MACRO_FILE ${UNIVERSAL_MACRO} ${COMPILER_MACRO} ${OS_MACRO} ${MACHINE_MACRO} ${COMPILER_OS_MACRO} ${COMPILER_MACHINE_MACRO})
foreach (MACRO_FILE ${UNIVERSAL_MACRO} ${COMPILER_MACRO} ${OS_MACRO} ${MACHINE_MACRO} ${COMPILER_OS_MACRO} ${COMPILER_MACHINE_MACRO} ${USERDEFINED_MACRO})
if (EXISTS ${MACRO_FILE})
include(${MACRO_FILE})
else()
Expand Down
3 changes: 3 additions & 0 deletions cime_config/machines/cmake_macros/gnu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ endif()
set(CXX_LINKER "FORTRAN")
string(APPEND FC_AUTO_R8 " -fdefault-real-8")
string(APPEND FFLAGS " -mcmodel=medium -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none")
if (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0.0)
string(APPEND FFLAGS " -fallow-argument-mismatch")
endif()
if (compile_threaded)
string(APPEND FFLAGS " -fopenmp")
endif()
Expand Down
Loading