Skip to content

Commit

Permalink
Fix logic in the updateHistory function in singleCarbonSpecies.sh
Browse files Browse the repository at this point in the history
run/shared/singleCarbonSpecies.sh
- Now also remove lines from HISTORY.rc with a space after the
  species name (such as '_CO ')
- Disable the Emissions collection for OCS-only simulations (as we
  do not yet have OCS emissions).  This is only relevant for GCHP.

Signed-off-by: Bob Yantosca <[email protected]>
  • Loading branch information
yantosca committed Apr 5, 2024
1 parent 670059d commit 77b89f5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions run/shared/singleCarbonSpecies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,17 @@ function updateHistory() {

# For GCHP: remove entries for species to be excluded
for spc in ${1}; do
sed -i "/\_${spc}/d" "${file}"
sed -i "/Emis${spc}/d" "${file}"
sed -i "/\_${spc}'/d" "${file}"
sed -i "/\_${spc} '/d" "${file}"
sed -i "/Emis${spc}_/d" "${file}"
done

# Also disable emissions for OCS-only simulations
# (as we currently do not have any)
isItemInList "OCS" "${1}"
if [[ $? == 1 ]]; then
sed -i -e "s/'Emissions/#'Emissions/" "${file}"
fi
}


Expand Down

0 comments on commit 77b89f5

Please sign in to comment.