Skip to content

Commit

Permalink
Update GCHP deployment script to 12.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaweiZhuang committed Sep 19, 2019
1 parent 5c20372 commit d4a8bd0
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions scripts/build_environment/GCHP/deploy_GCHP.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!/bin/bash

GC_VERSION="12.1.1"
GCHP_VERSION="bugfix/GCHP_issues" # Fix GCHP run-time problems. See https://github.com/geoschem/gchp/issues/6#issuecomment-447475255
GC_VERSION="12.3.2"
GCHP_VERSION="12.3.2"
TOP_DIR="$HOME/gchp_12.3.2"

# Input data directory, need to pull real data later
mkdir -p $HOME/ExtData/HEMCO

# Create tutorial folder for demo project
mkdir ~/tutorial
cd ~/tutorial
mkdir $TOP_DIR
cd $TOP_DIR

# Source code
git clone https://github.com/geoschem/geos-chem.git Code.GCHP
Expand All @@ -23,17 +24,19 @@ git checkout $GCHP_VERSION
# generate run directory
cd Run
rm ${HOME}/.geoschem/config
printf "$HOME/ExtData \n 2 \n 1 \n $HOME/tutorial \n gchp_standard \n n" | ./createRunDir.sh
printf "$HOME/ExtData \n 2 \n 1 \n $TOP_DIR \n gchp_standard \n n" | ./createRunDir.sh

# compile source code
cd ~/tutorial/gchp_standard
ln -sf ~/gchp.ubuntu.env gchp.env # need to copy gchp.ubuntu.env to $HOME
make compile_clean
cd $TOP_DIR/gchp_standard
ln -sf ~/gchp.env gchp.env # need to put gchp.env to $HOME
make build_all

# modify run-time configurations

# correctly link restart file
ln -sf $HOME/ExtData/GEOSCHEM_RESTARTS/v2016-07/initial_GEOSChem_rst.c24_standard.nc initial_GEOSChem_rst.c24_standard.nc
ln -sf $HOME/ExtData/GEOSCHEM_RESTARTS/v2016-07/initial_GEOSChem_rst.c48_standard.nc initial_GEOSChem_rst.c48_standard.nc
ln -sf $HOME/ExtData/GEOSCHEM_RESTARTS/v2016-07/initial_GEOSChem_rst.c180_standard.nc initial_GEOSChem_rst.c180_standard.nc

# read low-resolution metfields to save space
ln -sf $HOME/ExtData/GEOS_4x5/GEOS_FP MetDir
Expand All @@ -42,9 +45,10 @@ sed -i -e 1,120s/025x03125.nc/4x5.nc/g ExtData.rc # only scan the first few line
# hard to see why simulation crashes with default debug level 0
# sed -i -e "s#DEBUG_LEVEL.*#DEBUG_LEVEL: 5#" CAP.rc

# Turn off CEDS as GCHP 12.1.0 still reads the old, large file.
# Turn off CEDS as GCHP 12.3.2 still reads the old, large file.
# https://github.com/geoschem/gchp/issues/3
sed -i -e "s#.--> CEDS.*# --> CEDS : false#" HEMCO_Config.rc
sed -i -e "s#.--> CEDS_SHIP.*# --> CEDS : false#" HEMCO_Config.rc
sed -i -e "s#.--> CEDS_SHIP.*# --> CEDS_SHIP : false#" HEMCO_Config.rc

# Turn off StateMet diagnostics to prevent error in https://github.com/geoschem/gchp/issues/12
sed -i -e "s/'StateMet_avg',/#'StateMet_avg',/" HISTORY.rc
Expand Down

0 comments on commit d4a8bd0

Please sign in to comment.