Skip to content

Commit

Permalink
Merge pull request #187 from HPSCTerrSys/release_candidate
Browse files Browse the repository at this point in the history
Setting the release candidate as the new master
  • Loading branch information
chartick authored Apr 26, 2023
2 parents 2947951 + 16c915c commit dad9a4c
Show file tree
Hide file tree
Showing 717 changed files with 33,421 additions and 155,410 deletions.
33 changes: 0 additions & 33 deletions .gitlab/issue_templates/error-report.md

This file was deleted.

6 changes: 4 additions & 2 deletions LICENSE.txt → LICENSE
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
MIT License

Copyright 2010-2020 Prabhakar SHRESTHA, Mauro SULIS, Stefan KOLLET,
Copyright 2010-2023 Prabhakar SHRESTHA, Mauro SULIS, Stefan KOLLET,
Fabian GASPER, Wolfgang KURTZ, Jessica KEUNE, Ketan KULKARNI, Slavko BRDAR,
Niklas WAGNER, Mukund PONDKULE, Lukas STREBEL, Tobias SCHRUFF, Tim HOAR,
Cunbo HAN, Markus UEBEL, Guowei HE, Haojin ZHAO, Klaus GOERGEN, Abouzar Ghasemi
Cunbo HAN, Markus UEBEL, Guowei HE, Haojin ZHAO, Klaus GOERGEN, Abouzar GHASEMI,
Stefan POLL, Johannes KELLER, Paul RIGOR, Daniel CAVIEDES-VOULLIEME, Ilya ZHUKOV,
Joerg BENKE, Carl HARTICK

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ TSMP development has been driven by groups within the [Center for High-Performan
Please see [getting started section](https://hpscterrsys.github.io/TSMP/content/gettingstarted.html) for guided steps on how the model can be setup and configured for *one* specific experiment, which we use as one of the default test cases. To get an overview on possible TSMP applications refer to the [TSMP website](https://www.terrsysmp.org) and the [TSMP documention](https://hpscterrsys.github.io/TSMP/index.html).

## TSMP version history
The model components used in TSMP are OASIS3-MCT v2, COSMO v5.01, CLM v3.5, ParFlow 3.2 for TSMP versions v1.2.1, v1.2.2 and v1.2.3, and ParFlow 3.9 for version v1.3.3. TSMP supports ParFlow 3.7 onwards from version v1.3.3 onward.
The model components used in TSMP are OASIS3-MCT v2, COSMO v5.01, CLM v3.5, ParFlow 3.2 for TSMP versions v1.2.1, v1.2.2 and v1.2.3, ParFlow 3.9 for version v1.3.3 and ParFlow 3.12 for version v1.4.0. TSMP supports ParFlow 3.7 onwards from version v1.3.3 onward.

Those who need to work with ParFlow 3.2, should use the branch `TSMP_pdaf`.

Expand All @@ -39,8 +39,8 @@ If you use TSMP in a publication, please cite the these papers that describe the
* Gasper, F., Goergen, K., Kollet, S., Shrestha, P., Sulis, M., Rihani, J., and Geimer, M. (2014). Implementation and scaling of the fully coupled Terrestrial Systems Modeling Platform (TerrSysMP) in a massively parallel supercomputing environment – a case study on JUQUEEN (IBM Blue Gene/Q). Geoscientific Model Development, 7(5), 2531-2543. doi:[10.5194/gmd-7-2531-2014](https://dx.doi.org/10.5194/gmd-7-2531-2014).

## License
TSMP is open source software and is licensed under the [MIT-License](https://github.com/HPSCTerrSys/TSMP/blob/master/LICENSE.txt).
TSMP is open source software and is licensed under the [MIT-License](https://github.com/HPSCTerrSys/TSMP/blob/master/LICENSE).

## To come

HPSC-TerrSys will also stage run control scripts for different usage scenarios such as long climate runs, and a variety of pre- and postprocessing tools we developed specifically for TSMP. Documented test case experiments also encompass convection permitting simulations at 1km for COSMO and 0.5km for CLM and ParFlow, idealized experiments, a data assimilation experiment based on the TSMP-PDAF version. We will also update the generic machinefiles to make an adjustment of the built system more straightforward for external users.
HPSC-TerrSys will also stage run control scripts for different usage scenarios such as long climate runs, and a variety of pre- and postprocessing tools we developed specifically for TSMP. Documented test case experiments also encompass convection permitting simulations at 1km for COSMO and 0.5km for CLM and ParFlow, idealized experiments, a data assimilation experiment based on the TSMP-PDAF version. We will also update the generic machinefiles to make an adjustment of the built system more straightforward for external users.
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.3.3
v1.4.0
131 changes: 78 additions & 53 deletions bldsva/build_tsmp.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ getDefaults(){
def_mode="0" #0: let flags decide, 1:batch, 2:interactive
def_cplscheme="true"
def_readCLM="false"
def_maxpft="1" # (CLM default is 4)
def_freeDrain="false"

#compiler optimization
Expand Down Expand Up @@ -65,9 +66,9 @@ getDefaults(){
setDefaults(){
#load the default values
platform=$def_platform
if [[ $platform == "" ]] then ; platform="CLUMA2" ; fi #We need a hard default here
version=$def_version
if [[ $version == "" ]] then ; version="1.1.0MCT" ; fi #We need a hard default here
if [[ $platform == "" ]] then ; platform="JUWELS" ; fi #We need a hard default here
version=$def_combination
if [[ $version == "" ]] then ; version="" ; fi #We need a hard default here
rootdir=$def_rootdir
bindir=$def_bindir
optComp=$def_optComp
Expand All @@ -94,6 +95,7 @@ setDefaults(){

freeDrain=$def_freeDrain
readCLM=$def_readCLM
maxpft=${def_maxpft}
cplscheme=$def_cplscheme
mode=$def_mode

Expand Down Expand Up @@ -174,15 +176,45 @@ check
}

setCombination(){
set -A mList ${modelVersion[$version]}
if [[ $oasdir == "" ]] then ; oasdir=$rootdir/${mList[0]}_${platform}_${version}_${combination} ; fi
if [[ $cosdir == "" ]] then ; cosdir=$rootdir/${mList[2]}_${platform}_${version}_${combination} ; fi
if [[ $icondir == "" ]] then ; icondir=$rootdir/${mList[2]}_${platform}_${version}_${combination} ; fi
if [[ $clmdir == "" ]] then ; clmdir=$rootdir/${mList[1]}_${platform}_${version}_${combination} ; fi
if [[ $pfldir == "" ]] then ; pfldir=$rootdir/${mList[3]}_${platform}_${version}_${combination} ; fi
if echo "$combination" | grep -q 'pdaf'; then
if echo "$combination" | grep -q 'cos4'; then
mListgen="clm3-cos4-pfl-pdaf"
else
mListgen="clm3-cos5-pfl-pdaf"
fi
elif echo "$combination" | grep -q 'clm4' && echo "$combination" | grep -q 'cos4'; then
mListgen="clm4-cos4-pfl"
elif echo "$combination" | grep -q 'clm4'; then
mListgen="clm4-cos5-pfl"

elif echo "$combination" | grep -q 'icon21'; then
mListgen="clm3-icon21-pfl"
elif echo "$combination" | grep -q 'icon26'; then
mListgen="clm3-icon26-pfl"

elif echo "$combination" | grep -q 'eclm'; then
mListgen="eclm"
elif echo "$combination" | grep -q 'eclm-mct'; then
mListgen="eclm-mct"

else
if echo "$combination" | grep -q 'cos4'; then
mListgen="clm3-cos4-pfl"
else
mListgen="clm3-cos5-pfl"
fi
fi

version=$mListgen
set -A mList ${modelVersion[$mListgen]}
if [[ $oasdir == "" ]] then ; oasdir=$rootdir/${mList[0]}_${platform}_${combination} ; fi
if [[ $cosdir == "" ]] then ; cosdir=$rootdir/${mList[2]}_${platform}_${combination} ; fi
if [[ $icondir == "" ]] then ; icondir=$rootdir/${mList[2]}_${platform}_${combination} ; fi
if [[ $clmdir == "" ]] then ; clmdir=$rootdir/${mList[1]}_${platform}_${combination} ; fi
if [[ $pfldir == "" ]] then ; pfldir=$rootdir/${mList[3]}_${platform}_${combination} ; fi
#DA
if [[ $dadir == "" ]] then ; dadir=$rootdir/${mList[4]}_${platform}_${version}_${combination} ; fi
if [[ $bindir == "" ]] then ; bindir=$rootdir/bin/${platform}_${version}_${combination} ; fi
if [[ $dadir == "" ]] then ; dadir=$rootdir/${mList[4]}_${platform}_${combination} ; fi
if [[ $bindir == "" ]] then ; bindir=$rootdir/bin/${platform}_${combination} ; fi

withOAS="false"
withCOS="false"
Expand All @@ -202,18 +234,18 @@ setCombination(){
case "$combination" in *pfl*) withPFL="true" ;; esac
if [[ $withCLM == "true" && ( $withCOS == "true" || $withICON == "true" || $withPFL == "true" ) ]]; then
withOAS="true"
case "$version" in *MCT*) withOASMCT="true" ;; esac
withOASMCT="true"
fi
#DA
case "$version" in *PDAF*) withDA="true" ; withPDAF="true" ;; esac
case "$combination" in *pdaf*) withDA="true" ; withPDAF="true" ;; esac
}


compileClm(){
route "${cyellow}> c_compileClm${cnormal}"
comment " source clm interface script"
comment "intf_oas3/${mList[1]}/arch/${platform}/build_interface_${mList[1]}_${platform}.ksh"
. ${rootdir}/bldsva/intf_oas3/${mList[1]}/arch/${platform}/build_interface_${mList[1]}_${platform}.ksh >> $log_file 2>> $err_file
comment "intf_oas3/${mList[1]}/arch/build_interface_${mList[1]}.ksh"
. ${rootdir}/bldsva/intf_oas3/${mList[1]}/arch/build_interface_${mList[1]}.ksh >> $log_file 2>> $err_file
check
always_clm
if [[ ${options["clm"]} == "skip" ]] ; then ; route "${cyellow}< c_compileClm${cnormal}" ; return ;fi
Expand Down Expand Up @@ -244,7 +276,7 @@ route "${cyellow}< c_compileClm${cnormal}"
compileIcon(){
route "${cyellow}> c_compileIcon${cnormal}"
comment " source icon interface script"
. ${rootdir}/bldsva/intf_oas3/${mList[2]}/arch/${platform}/build_interface_${mList[2]}_${platform}.ksh >> $log_file 2>> $err_file
. ${rootdir}/bldsva/intf_oas3/${mList[2]}/arch/build_interface_${mList[2]}.ksh >> $log_file 2>> $err_file
check
always_icon
if [[ ${options["icon"]} == "skip" ]] ; then ; route "${cyellow}< c_compileIcon${cnormal}" ; return ;fi
Expand Down Expand Up @@ -272,7 +304,7 @@ route "${cyellow}< c_compileIcon${cnormal}"
compileCosmo(){
route "${cyellow}> c_compileCosmo${cnormal}"
comment " source cos interface script"
. ${rootdir}/bldsva/intf_oas3/${mList[2]}/arch/${platform}/build_interface_${mList[2]}_${platform}.ksh >> $log_file 2>> $err_file
. ${rootdir}/bldsva/intf_oas3/${mList[2]}/arch/build_interface_${mList[2]}.ksh >> $log_file 2>> $err_file
check
always_cos
if [[ ${options["cos"]} == "skip" ]] ; then ; route "${cyellow}< c_compileCosmo${cnormal}" ; return ;fi
Expand Down Expand Up @@ -300,7 +332,7 @@ route "${cyellow}< c_compileCosmo${cnormal}"
compileOasis(){
route "${cyellow}> c_compileOasis${cnormal}"
comment " source oas interface script"
. ${rootdir}/bldsva/intf_oas3/${mList[0]}/arch/${platform}/build_interface_${mList[0]}_${platform}.ksh >> $log_file 2>> $err_file
. ${rootdir}/bldsva/intf_oas3/${mList[0]}/arch/build_interface_${mList[0]}.ksh >> $log_file 2>> $err_file
check
always_oas
if [[ ${options["oas"]} == "skip" ]] ; then ; route "${cyellow}< c_compileOasis${cnormal}" ; return ;fi
Expand Down Expand Up @@ -328,7 +360,7 @@ route "${cyellow}< c_compileOasis${cnormal}"
compileParflow(){
route "${cyellow}> c_compileParflow${cnormal}"
comment " source pfl interface script"
. ${rootdir}/bldsva/intf_oas3/${mList[3]}/arch/${platform}/build_interface_${mList[3]}_${platform}.ksh >> $log_file 2>> $err_file
. ${rootdir}/bldsva/intf_oas3/${mList[3]}/arch/build_interface_${mList[3]}.ksh >> $log_file 2>> $err_file
check
always_pfl
if [[ ${options["pfl"]} == "skip" ]] ; then ; route "${cyellow}< c_compileParflow${cnormal}" ;return ;fi
Expand Down Expand Up @@ -427,7 +459,7 @@ interactive(){
print "Please type in your desired value..."
read platform
comment " source machine build interface for $platform"
. ${rootdir}/bldsva/machines/${platform}/build_interface_${platform}.ksh >> $log_file 2>> $err_file
. ${rootdir}/bldsva/machines/config_${platform}.ksh >> $log_file 2>> $err_file
check
clearMachineSelection
getMachineDefaults
Expand All @@ -448,25 +480,6 @@ interactive(){
setCombination
setSelection
fi
if [[ $numb == 2 ]] ; then
print "The following versions are available for $platform:"
for a in ${availability[$platform]} ; do
printf "%-20s #%s\n" "$a" "${versions[$a]} consisting of: "
for b in ${modelVersion[$a]} ; do
printf "%-20s - %s\n" "" "$b"
done
done
print "Please type in your desired value..."
read version
case "${combinations[$version]}" in
*" $combination "*);;
*)
set -A array ${combinations[$version]}
combination=${array[0]} ;;
esac
clearPathSelection
setCombination
fi
if [[ $numb == 3 ]] ; then
print "The following combinations are available for $version:"
for a in ${combinations[$version]} ; do
Expand Down Expand Up @@ -563,9 +576,10 @@ printState(){
print "${cred}(25)${cnormal} profiling (default=$def_profiling): ${cgreen}$profiling ${cnormal}"
print "${cred}(26)${cnormal} Couple-Scheme (default=$def_cplscheme): ${cgreen}$cplscheme ${cnormal}"
print "${cred}(27)${cnormal} readCLM: Consistently read CLM-mask (default=$def_readCLM): ${cgreen}$readCLM ${cnormal}"
print "${cred}(28)${cnormal} Compiles ParFlow with free drainage feature (default=$def_freeDrain): ${cgreen}$freeDrain ${cnormal}"
print "${cred}(29)${cnormal} compiler (default=$defaultcompiler): ${cgreen}$compiler ${cnormal}"
print "${cred}(30)${cnormal} processor (default=$defaultprocessor): ${cgreen}$processor ${cnormal}"
print "${cred}(28)${cnormal} maxpft: Set maxpft per grid cell for CLM (default=$def_maxpft): ${cgreen}$maxpft ${cnormal}"
print "${cred}(29)${cnormal} Compiles ParFlow with free drainage feature (default=$def_freeDrain): ${cgreen}$freeDrain ${cnormal}"
print "${cred}(30)${cnormal} compiler (default=$defaultcompiler): ${cgreen}$compiler ${cnormal}"
print "${cred}(31)${cnormal} processor (default=$defaultprocessor): ${cgreen}$processor ${cnormal}"
}

check(){
Expand Down Expand Up @@ -618,17 +632,20 @@ warning(){

hardSanityCheck(){

if [[ "${versions[${version}]}" == "" ]] then
print "The selected version '${version}' is not available. run '$call --man' for help"
terminate
fi

if [[ "${platforms[${platform}]}" == "" ]] then
print "The selected platform '${platform}' is not available. run '$call --man' for help"
terminate
fi

}

deprecatedVersion(){
if [[ "${version}" != "" ]] then
print "The use of the internal version with -v is deprecated. Please provide your desired combination with -c including version numbers (clm3-cos5-pfl). "
terminate
fi
}

softSanityCheck(){


Expand Down Expand Up @@ -811,7 +828,13 @@ getGitInfo(){
echo "Version (${mList[4]}):" >> $log_file
comment " Log version information (${mList[4]})"
echo ${rootdir}/${mList[4]} >> $log_file
cat ${rootdir}/${mList[4]}/src/PDAF-D_print_version.F90 | grep +++ | grep Version | cut -c 50-65 >> $log_file
# PDAF-version >= v2.0
if [[ -f ${rootdir}/${mList[4]}/src/PDAF_print_version.F90 ]] ; then
cat ${rootdir}/${mList[4]}/src/PDAF_print_version.F90 | grep +++ | grep Version | cut -c 50-65 >> $log_file
# PDAF-version v1.*
else
cat ${rootdir}/${mList[4]}/src/PDAF-D_print_version.F90 | grep +++ | grep Version | cut -c 50-65 >> $log_file
fi
check
echo "" >> $log_file
fi
Expand Down Expand Up @@ -853,7 +876,7 @@ getGitInfo(){
USAGE+="[R:rootdir?Absolute path to TerrSysMP root directory.]:[path:='$def_rootdir']"
USAGE+="[B:bindir?Absolute path to bin directory for the builded executables. bin/MACHINE_DATE will be taken if ''.]:[path:='$def_bindir']"

USAGE+="[v:version?Tagged TerrSysMP version. Note that not every version might be implemented on every machine. Run option -a, --avail to get a listing.]:[version:='$version']"
USAGE+="[v:version?Deprecated. Please specify your desired combination with the -c option.]"
USAGE+="[m:machine?Target Platform. Run option -a, --avail to get a listing.]:[machine:='$def_platform']"

USAGE+="[p:profiling?Makes necessary changes to compile with a profiling tool if available.]:[profiling:='$def_profiling']"
Expand All @@ -863,6 +886,7 @@ getGitInfo(){
USAGE+="[c:combination? Combination of component models.]:[combination:='$def_combination']"
USAGE+="[C:cplscheme? Couple-Scheme for CLM/COS coupling.]:[cplscheme:='$def_cplscheme']"
USAGE+="[r:readclm? Flag to consistently read in CLM mask.]:[readclm:='$def_readCLM']"
USAGE+="[f:maxpft? Flag to control maxpft per grid cell in CLM.]:[maxpft:='$def_maxpft']"
USAGE+="[d:freedrain? Compiles ParFlow with free drainage feature.]:[freedrain:='$def_freeDrain']"

USAGE+="[W:optoas?Build option for Oasis.]:[optoas:='${def_options["oas"]}']{"
Expand Down Expand Up @@ -916,6 +940,7 @@ getGitInfo(){
c) combination="$OPTARG" ; args=1 ;;
C) cplscheme="$OPTARG" ; args=1 ;;
r) readCLM="$OPTARG" ; args=1 ;;
f) maxpft="$OPTARG" ; args=1 ;;
d) freeDrain="$OPTARG" ; args=1 ;;
#DA
T) options+=(["icon"]="$OPTARG") ; args=1 ;;
Expand Down Expand Up @@ -943,8 +968,7 @@ getGitInfo(){
esac
done



deprecatedVersion

comment " source list with supported machines and configurations"
. $rootdir/bldsva/supported_versions.ksh
Expand All @@ -966,11 +990,12 @@ check

setCombination
comment " source machine build interface for $platform"
. ${rootdir}/bldsva/machines/${platform}/build_interface_${platform}.ksh >> $log_file 2>> $err_file
. ${rootdir}/bldsva/machines/config_${platform}.ksh >> $log_file 2>> $err_file
check
getMachineDefaults
setSelection

printf "$platform\n$profiling\n$optComp\n$compiler\n$version\n$rootdir$bindir\n$combination\n$readCLM" > build_info_${date}.txt

# determine whether or not to run interactive session
if [[ $mode == 0 ]] then
Expand All @@ -997,7 +1022,7 @@ check
runCompilation

echo "Patched files: NOTE: sed substitutions are not listed" >> $log_file
cat $patchlog_file >> $log_file
#cat $patchlog_file >> $log_file

echo "" >> $log_file
echo "Git:" >> $log_file
Expand Down
Loading

0 comments on commit dad9a4c

Please sign in to comment.