Skip to content
Snippets Groups Projects
Commit a38d6d68 authored by Christoph Knote's avatar Christoph Knote
Browse files

Fix for spack

parent 41b5075f
No related branches found
No related tags found
No related merge requests found
Showing
with 179 additions and 17 deletions
#!/bin/bash -l
#SBATCH --partition=alcc1,epyc
#SBATCH -o __runDir__/__mainJobName__.%j.%N.out
#SBATCH -D __runDir__
#SBATCH -J __mainJobName__
#SBATCH --nodes=3
#SBATCH --ntasks-per-node=28
#SBATCH --mem-per-cpu=2000
#SBATCH --mail-type=FAIL
#SBATCH --mail-user=christoph.knote@med.uni-augsburg.de
#SBATCH --time=18:00:00
#!/bin/bash -l
#SBATCH --partition=alcc1
#SBATCH -o __runDir__/__postJobName__.%j.%N.out
#SBATCH -D __runDir__
#SBATCH -J __postJobName__
#SBATCH --ntasks=1
#SBATCH --mem=5G
#SBATCH --mail-type=FAIL
#SBATCH --mail-user=christoph.knote@med.uni-augsburg.de
#SBATCH --time=02:00:00
#!/bin/bash -l
#SBATCH --partition=alcc1
#SBATCH -o __runDir__/__preJobName__.%j.%N.out
#SBATCH -D __runDir__
#SBATCH -J __preJobName__
#SBATCH --ntasks=1
#SBATCH --mem=10G
#SBATCH --mail-type=FAIL
#SBATCH --mail-user=christoph.knote@med.uni-augsburg.de
#SBATCH --time=03:00:00
#!/bin/bash -l
#SBATCH --partition=alcc1,epyc
#SBATCH -o __runDir__/__spinupJobName__.%j.%N.out
#SBATCH -D __runDir__
#SBATCH -J __spinupJobName__
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=28
#SBATCH --mem-per-cpu=2000
#SBATCH --mail-type=FAIL
#SBATCH --mail-user=christoph.knote@med.uni-augsburg.de
#SBATCH --time=01:00:00
#!/bin/bash -l
#SBATCH --partition=alcc1
#SBATCH -o __runDir__/__stagingJobName__.%j.%N.out
#SBATCH -D __runDir__
#SBATCH -J __stagingJobName__
#SBATCH --ntasks=1
#SBATCH --mem=5G
#SBATCH --mail-type=FAIL
#SBATCH --mail-user=christoph.knote@med.uni-augsburg.de
#SBATCH --time=01:00:00
#!/bin/bash
# ------------------------------------------------------------------------------
# WRFOTRON v 2.0b
# Christoph Knote (LMU Munich, Germany)
# 06/2016
# christoph.knote@lmu.de
# ------------------------------------------------------------------------------
# path to the WRFotron installation
chainDir=${HOME}/wrfotron
# --- Executable locations ---
# WPS installation directory
WPSDir=${WPS_SRC_PATH}
# WRF installation directory
WRFDir=${WRF_SRC_PATH}
# --- Input data settings ---
# path to geogrid input data
geogDir=/alcc/gpfs2/home/mbees/data/geog/
# meteo input
# Vtable for the chosen meteo input
metVtableFile=${WPS_SRC_PATH}/ungrib/Variable_Tables/Vtable.GFS
# time increment in hours
metInc=1
# full path to a met input file - you can use any "%<>" abbreviations known
# to the "date" command
metFilePattern="/alcc/gpfs2/home/mbees/data/meteo/GFS/GF%Y%m%d%H"
# example:
# "/glade/p/rda/data/ds083.2/grib2/%Y/%Y.%m/fnl_%Y%m%d_%H_00.grib2"
# --- Pre/Postprocessing settings ---
# prepararation script
preScriptPath=NONEXISTENT.bash
# postprocessing scripts (arbitrary)
postScriptPath=NONEXISTENT.bash
# postprocessing scripts (actions for each wrfout file)
postPerFileScriptPath=NONEXISTENT.bash
# --- Working directories ---
# where the WRF will be run (some fast, large disk like "scratch" or similar)
workDir=${SCRATCH}/WRF/work/
# where the unprocessed WRF output will be stored
stagingRootDir=${SCRATCH}/WRF/staging/
# where the WRF output will be stored
archiveRootDir=${SCRATCH}/archive/WRF/
# where the WRF restart files will be stored
restartRootDir=${SCRATCH}/WRF/restart/
# remove run directory after run is finished?
removeRunDir=false
# --- MPI settings ---
mpiCommandPre="mpirun /usr/bin/time -v"
mpiCommandMain="mpirun /usr/bin/time -v"
mpiCommandReal=${mpiCommandPre}
# --- Batch system ---
# argument to submit a job in a held state
batchHoldArgument="--hold"
# command to release a held job
batchReleaseCommand="scontrol release"
# command to submit jobs to the queueing system
batchSubmitCommand=sbatch
# dependency argument for chaining runs upon submission
batchDepArgument="--dependency=afterok:__id__"
# sed command ("used as s/__command/\1/") to retrieve job run PID upon
# submission with $batchSubmitCommand
batchPidSedCommand="Submitted batch job \(.*\)"
# --- Chemistry ---
withChemistry=true
# WRF-Chem installation directory
WRFChemDir=${WRF_CHEM_SRC_PATH}
# path to utility executables
meganBioEmissBin=megan_bio_emiss
mozbcBin=mozbc
weselyBin=wesely
exo_coldensBin=exo_coldens
anthro_emisBin=anthro_emis
fire_emisBin=fire_emis
# path to MEGAN input data
MEGANdir=/alcc/gpfs2/home/mbees/data/emissions/biogenic/MEGAN
# use anthro_emiss or predefined files?
emissUseAnthroEmiss=false
# raw emission input - the files you read in with anthro_emiss
emissDir=/alcc/gpfs2/home/mbees/data/emissions/anthropogenic/EDGARv5/MOZART_MOSAIC
# emission conversion script for anthro_emis - must match emissions in emissDir
emissInpFile=emis_edgarv5_mozmos.inp
# year the emissions are valid for (for offset calculation)
emissYear=2015
# FINN fires
fireFilePattern="/alcc/gpfs2/home/mbees/data/emissions/fires/FINN/GLOB_MOZ4_%Y%j.txt"
fireInpFile=finn_fires.inp
# boundary condition input
chembcFilePattern="/alcc/gpfs2/home/mbees/data/chembc/WACCM/WACCM%Y%m%d"
chembcInpFile=waccm.inp
# TUV photolysis option 4 data file
TUVDataPath="/alcc/gpfs2/home/mbees/data/tuv/TUV.phot.bz2"
......@@ -20,8 +20,7 @@ fi
if [ ! -f ${workDir}/${experiment}/wrfbiochemi_d01 ]
then
echo "MEGAN input files do not not exist - recreating from scratch. Grab a coffee..."
ln -s ${WRFMEGANdir}/megan_bio_emiss .
./megan_bio_emiss < megan_bio_emiss.inp > megan_bio_emiss.out
${meganBioEmissBin} < megan_bio_emiss.inp > megan_bio_emiss.out
for domain in $(seq -f "0%g" 1 ${max_dom})
do
meganDataFile=${workDir}/${experiment}/wrfbiochemi_d${domain}
......
......@@ -2,8 +2,6 @@
# Wesely, Exo_coldens
# -----------------------------------------------------------------------------
ln -s ${WRFmztoolsdir}/* .
${weselyBin} < wesely.inp > wesely.out
./wesely < wesely.inp > wesely.out
./exo_coldens < exo_coldens.inp > exo_coldens.out
${exo_coldensBin} < exo_coldens.inp > exo_coldens.out
......@@ -6,13 +6,11 @@ if [ "$emissUseAnthroEmiss" = "true" ]
then
if [ -f anthro_emis.inp ]
then
# using anthro_emiss
ln -s ${WRFanthrodir}/anthro_emis .
# difference in years for emission offset
emissYearOffset=0
let "emissYearOffset = __startYear__ - emissYear"
sed -e "s/__emissYearOffset__/${emissYearOffset}/g" -i anthro_emis.inp
./anthro_emis < anthro_emis.inp > anthro_emis.out
${anthro_emisBin} < anthro_emis.inp > anthro_emis.out
fi
else
if [ -f anthro_emis.inp ]
......@@ -28,13 +26,11 @@ if [ -f anthro_emis.inp ]
if [ ! -f ${workDir}/${experiment}/wrfchemi_d01 ]
then
# using anthro_emiss
ln -s ${WRFanthrodir}/anthro_emis .
# difference in years for emission offset
emissYearOffset=0
let "emissYearOffset = __startYear__ - emissYear"
sed -e "s/__emissYearOffset__/${emissYearOffset}/g" -i anthro_emis.inp
./anthro_emis < anthro_emis.inp > anthro_emis.out
${anthro_emisBin} < anthro_emis.inp > anthro_emis.out
for domain in $(seq -f "0%g" 1 ${max_dom})
do
......
......@@ -6,7 +6,6 @@
# using fire_emis:
if [ -f fire_emis.inp ]
then
ln -s ${WRFfiredir}/fire_emis .
ln -s $(dirname ${fireFilePattern})/*nc .
......@@ -58,5 +57,5 @@ EOF
fi
/bin/sed -s "s/__domain__/${max_dom}/" -i fire_emis.inp
./fire_emis < fire_emis.inp > fire_emis.out
${fire_emisBin} < fire_emis.inp > fire_emis.out
fi
......@@ -4,7 +4,6 @@
if [ -f mozbc_outer.inp ]
then
ln -s $WRFMOZARTdir/mozbc .
let totDays="((spinupTime+fcstTime)/24)+2"
i=0
......@@ -24,11 +23,11 @@ do
done
# first domain, always
./mozbc < mozbc_outer.inp > mozbc.log
${mozbcBin} < mozbc_outer.inp > mozbc.log
for domain in $(seq 2 ${max_dom})
do
/bin/sed -s "s/__domain__/${domain}/" < mozbc_inner.inp > mozbc_inner_d${domain}.inp
./mozbc < mozbc_inner_d${domain}.inp >> mozbc.log
${mozbcBin} < mozbc_inner_d${domain}.inp >> mozbc.log
done
fi
module load wrf wps anthro_emis fire_emis megan_bio_emiss mozbc wesely-exo_coldens
ulimit -s unlimited
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment