Commit 9e10116b authored by chrisdane's avatar chrisdane
Browse files

only indents

parent c468c2ce
...@@ -186,162 +186,159 @@ jsbach_prepare_init() ...@@ -186,162 +186,159 @@ jsbach_prepare_init()
jsbach_modify_forcing() { jsbach_modify_forcing() {
if [[ ${jsbach_VERSION} = "3.20" ]]; then if [[ ${jsbach_VERSION} = "3.20" ]]; then
echo -e "\t\tRES_jsbach=${RES_jsbach}" echo -e "\t\tRES_jsbach=${RES_jsbach}"
echo -e "\t\tSCENARIO_jsbach=${SCENARIO_jsbach}" echo -e "\t\tSCENARIO_jsbach=${SCENARIO_jsbach}"
echo -e "\t\tFORCING_DIR_jsbach=${FORCING_DIR_jsbach}" echo -e "\t\tFORCING_DIR_jsbach=${FORCING_DIR_jsbach}"
case ${RES_jsbach} in case ${RES_jsbach} in
T63 | T31 ) T63 | T31 )
case $SCENARIO_jsbach in case $SCENARIO_jsbach in
PALEO | 1850 | PI-CTRL* | 4CO2 | 1percCO2 | SCEN) PALEO | 1850 | PI-CTRL* | 4CO2 | 1percCO2 | SCEN)
for ((yr = YR0_jsbach + -2; yr <= YRN_jsbach + 0; ++yr)) do for ((yr = YR0_jsbach + -2; yr <= YRN_jsbach + 0; ++yr)) do
echo " jsbach: Setting year to $yr in forcing file Ndepo.${yr}.nc" echo " jsbach: Setting year to $yr in forcing file Ndepo.${yr}.nc"
cdo setyear,${yr} ${FORCING_DIR_jsbach}/Ndepo.${yr}.nc ${FORCING_DIR_jsbach}/foo${yr}.nc >> $dumpfile 2>&1 cdo setyear,${yr} ${FORCING_DIR_jsbach}/Ndepo.${yr}.nc ${FORCING_DIR_jsbach}/foo${yr}.nc >> $dumpfile 2>&1
mv ${FORCING_DIR_jsbach}/foo${yr}.nc ${FORCING_DIR_jsbach}/Ndepo.${yr}.nc >> $dumpfile mv ${FORCING_DIR_jsbach}/foo${yr}.nc ${FORCING_DIR_jsbach}/Ndepo.${yr}.nc >> $dumpfile
done done
;; ;;
HIST) HIST)
for ((yr = YR0_jsbach; yr <= YRN_jsbach + 0; ++yr)) do for ((yr = YR0_jsbach; yr <= YRN_jsbach + 0; ++yr)) do
echo -e "\t\t jsbach: selecting year $yr from ${FORCING_DIR_jsbach}/Ndepo.1850-2014.nc" echo -e "\t\t jsbach: selecting year $yr from ${FORCING_DIR_jsbach}/Ndepo.1850-2014.nc"
cdo selyear,${yr} ${FORCING_DIR_jsbach}/Ndepo.1850-2014.nc ${FORCING_DIR_jsbach}/foo${yr}.nc >> $dumpfile 2>&1 cdo selyear,${yr} ${FORCING_DIR_jsbach}/Ndepo.1850-2014.nc ${FORCING_DIR_jsbach}/foo${yr}.nc >> $dumpfile 2>&1
mv ${FORCING_DIR_jsbach}/foo${yr}.nc ${FORCING_DIR_jsbach}/Ndepo.${yr}.nc >> $dumpfile mv ${FORCING_DIR_jsbach}/foo${yr}.nc ${FORCING_DIR_jsbach}/Ndepo.${yr}.nc >> $dumpfile
add_to ${FORCING_DIR_jsbach}/Ndepo.${yr}.nc Ndepo.${yr}.nc add_to ${FORCING_DIR_jsbach}/Ndepo.${yr}.nc Ndepo.${yr}.nc
done done
;; ;;
1950) 1950)
echo "Nothing to do in jsbach_modify_forcing for scenario $SCENARIO_jsbach" echo "Nothing to do in jsbach_modify_forcing for scenario $SCENARIO_jsbach"
;; ;;
*) *)
echo "Unknown scenario $SCENARIO_jsbach" echo "Unknown scenario $SCENARIO_jsbach"
exit 42 exit 42
;; ;;
esac esac
;; ;;
esac esac
fi fi
} }
jsbach_prepare_forcing() jsbach_prepare_forcing()
{ {
if [[ "x${iterative_coupling}" == "x1" ]]; then if [[ "x${iterative_coupling}" == "x1" ]]; then
if [ -f "${CONFIG_DIR_jsbach}/jsbach_init_override.dat" ]; then if [ -f "${CONFIG_DIR_jsbach}/jsbach_init_override.dat" ]; then
echo "PG: Sourcing ${CONFIG_DIR_jsbach}/jsbach_init_override.dat" echo "PG: Sourcing ${CONFIG_DIR_jsbach}/jsbach_init_override.dat"
cat ${CONFIG_DIR_jsbach}/jsbach_init_override.dat cat ${CONFIG_DIR_jsbach}/jsbach_init_override.dat
source ${CONFIG_DIR_jsbach}/jsbach_init_override.dat source ${CONFIG_DIR_jsbach}/jsbach_init_override.dat
fi
fi fi
fi
if [ ! -z $LAND_BOUNDARY_CONDITIONS_jsbach ]; then
add_to ${LAND_BOUNDARY_CONDITIONS_jsbach} jsbach.nc if [ ! -z $LAND_BOUNDARY_CONDITIONS_jsbach ]; then
else add_to ${LAND_BOUNDARY_CONDITIONS_jsbach} jsbach.nc
case $SCENARIO_jsbach in else
case $SCENARIO_jsbach in
1850 | RCP* | PI-CTRL* | PALEO | 4CO2 | 1percCO2) 1850 | RCP* | PI-CTRL* | PALEO | 4CO2 | 1percCO2)
add_to ${ADJ_INPUT_DIR_jsbach}/jsbach_${RES_jsbach}${OCERES_jsbach}_11tiles_5layers_1850${jsbach_nc}.nc \ add_to ${ADJ_INPUT_DIR_jsbach}/jsbach_${RES_jsbach}${OCERES_jsbach}_11tiles_5layers_1850${jsbach_nc}.nc \
jsbach.nc jsbach.nc
;; ;;
1950 | SCEN) 1950 | SCEN)
add_to ${ADJ_INPUT_DIR_jsbach}/jsbach_${RES_jsbach}${OCERES_jsbach}_11tiles_5layers_1976${jsbach_nc}.nc \ add_to ${ADJ_INPUT_DIR_jsbach}/jsbach_${RES_jsbach}${OCERES_jsbach}_11tiles_5layers_1976${jsbach_nc}.nc \
jsbach.nc jsbach.nc
;; ;;
HIST) HIST)
add_to ${ADJ_INPUT_DIR_jsbach}/jsbach_${RES_jsbach}${OCERES_jsbach}_11tiles_5layers_1850${jsbach_nc}.nc \ add_to ${ADJ_INPUT_DIR_jsbach}/jsbach_${RES_jsbach}${OCERES_jsbach}_11tiles_5layers_1850${jsbach_nc}.nc \
jsbach.nc jsbach.nc
for ((yr = YR0_jsbach + -1; yr <= YRN_jsbach + 2; ++yr)); do for ((yr = YR0_jsbach + -1; yr <= YRN_jsbach + 2; ++yr)); do
if [ $yr -lt 1850 ]; then if [ $yr -lt 1850 ]; then
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/land_use_maps/cover_fract_${RES_jsbach}_11tiles_1850.nc cover_fract.${yr}.nc add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/land_use_maps/cover_fract_${RES_jsbach}_11tiles_1850.nc cover_fract.${yr}.nc
else else
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/land_use_maps/cover_fract_${RES_jsbach}_11tiles_${yr}.nc cover_fract.${yr}.nc add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/land_use_maps/cover_fract_${RES_jsbach}_11tiles_${yr}.nc cover_fract.${yr}.nc
fi fi
done done
;; ;;
SSP*) SSP*)
add_to ${ADJ_INPUT_DIR_jsbach}/jsbach_${RES_jsbach}${OCERES_jsbach}_11tiles_5layers_1850${jsbach_nc}.nc \ add_to ${ADJ_INPUT_DIR_jsbach}/jsbach_${RES_jsbach}${OCERES_jsbach}_11tiles_5layers_1850${jsbach_nc}.nc \
jsbach.nc jsbach.nc
for ((yr = YR0_jsbach + -1; yr <= YRN_jsbach + 2; ++yr)); do for ((yr = YR0_jsbach + -1; yr <= YRN_jsbach + 2; ++yr)); do
if [ $yr -lt 2015 ]; then if [ $yr -lt 2015 ]; then
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/land_use_maps/cover_fract_${RES_jsbach}_11tiles_${yr}.nc cover_fract.${yr}.nc add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/land_use_maps/cover_fract_${RES_jsbach}_11tiles_${yr}.nc cover_fract.${yr}.nc
else else
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/land_use_maps/ssp${SCEN_NB_jsbach}/cover_fract_${RES_jsbach}_11tiles_${yr}.nc cover_fract.${yr}.nc add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/land_use_maps/ssp${SCEN_NB_jsbach}/cover_fract_${RES_jsbach}_11tiles_${yr}.nc cover_fract.${yr}.nc
fi fi
done done
;; ;;
*) *)
echo "Unknown scenario $SCENARIO_jsbach in jsbach" echo "Unknown scenario $SCENARIO_jsbach in jsbach"
exit 42 exit 42
;; ;;
esac esac
fi fi
case ${RES_jsbach} in case ${RES_jsbach} in
T63 | T31 ) T63 | T31 )
if [[ ${jsbach_VERSION} = "3.20" ]]; then if [[ ${jsbach_VERSION} = "3.20" ]]; then
# PG: New input files needed for "spitfire" module # PG: New input files needed for "spitfire" module
# These appear to be independent of the scenario # These appear to be independent of the scenario
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/spitfire/a_nd_${RES_jsbach}.nc \ add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/spitfire/a_nd_${RES_jsbach}.nc \
a_nd_file.nc a_nd_file.nc
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/spitfire/LISOTD_HRMC_V2.2_${RES_jsbach}.nc \ add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/spitfire/LISOTD_HRMC_V2.2_${RES_jsbach}.nc \
lightning.nc lightning.nc
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/spitfire/population_density_HYDE_${RES_jsbach}.nc \ add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/spitfire/population_density_HYDE_${RES_jsbach}.nc \
population_density.nc population_density.nc
fi fi
case $SCENARIO_jsbach in case $SCENARIO_jsbach in
PALEO | 1850 | PI-CTRL* | 4CO2 | 1percCO2) PALEO | 1850 | PI-CTRL* | 4CO2 | 1percCO2)
for((yr = YR0_jsbach + -2; yr <= YRN_jsbach + 0; ++yr)) do for((yr = YR0_jsbach + -2; yr <= YRN_jsbach + 0; ++yr)) do
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/New_Hampshire_LCC/${hist_fold}/LUH_harvest_${RES_jsbach}_1850.nc \ add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/New_Hampshire_LCC/${hist_fold}/LUH_harvest_${RES_jsbach}_1850.nc \
landuseHarvest.${yr}.nc landuseHarvest.${yr}.nc
if [[ ${jsbach_VERSION} = "3.20" ]]; then if [[ ${jsbach_VERSION} = "3.20" ]]; then
# PG: New for mpiesm-1.2.01, nitrogren input files # PG: New for mpiesm-1.2.01, nitrogren input files
echo "\$jsbach_INPUT_DIR=${jsbach_INPUT_DIR=}" add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/${RES_jsbach}_ndepo_CMIP_NCAR_CCMI-1-0_gr_185001-185012-clim.nc \
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/${RES_jsbach}_ndepo_CMIP_NCAR_CCMI-1-0_gr_185001-185012-clim.nc \ Ndepo.${yr}.nc
Ndepo.${yr}.nc fi
fi done
;;
done 1950)
;; for((yr = YR0_jsbach + -2; yr <= YRN_jsbach + 0; ++yr))
1950 ) do
for((yr = YR0_jsbach + -2; yr <= YRN_jsbach + 0; ++yr)) add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/New_Hampshire_LCC/${hist_fold}/LUH_harvest_${RES_jsbach}_${SCENARIO_jsbach}.nc \
do landuseHarvest.${yr}.nc
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/New_Hampshire_LCC/${hist_fold}/LUH_harvest_${RES_jsbach}_${SCENARIO_jsbach}.nc \ done
landuseHarvest.${yr}.nc ;;
done SCEN | RCP* | HIST)
;; for((yr = YR0_jsbach + -2; yr <= YRN_jsbach + 0; ++yr))
SCEN | RCP* | HIST) do
for((yr = YR0_jsbach + -2; yr <= YRN_jsbach + 0; ++yr)) if [ $yr -le 1849 ] ; then
do add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/New_Hampshire_LCC/${hist_fold}/LUH_harvest_${RES_jsbach}_1850.nc \
if [ $yr -le 1849 ] ; then landuseHarvest.$yr.nc
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/New_Hampshire_LCC/${hist_fold}/LUH_harvest_${RES_jsbach}_1850.nc \ add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/land_use_maps/cover_fract_${RES_jsbach}_11tiles_1850.nc cover_fract.${yr}.nc
landuseHarvest.$yr.nc elif [ $yr -le 2015 ] ; then
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/land_use_maps/cover_fract_${RES_jsbach}_11tiles_1850.nc cover_fract.${yr}.nc add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/New_Hampshire_LCC/${hist_fold}/LUH_harvest_${RES_jsbach}_$yr.nc \
elif [ $yr -le 2015 ] ; then landuseHarvest.$yr.nc
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/New_Hampshire_LCC/${hist_fold}/LUH_harvest_${RES_jsbach}_$yr.nc \ add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/land_use_maps/cover_fract_${RES_jsbach}_11tiles_${yr}.nc cover_fract.${yr}.nc
landuseHarvest.$yr.nc else
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/land_use_maps/cover_fract_${RES_jsbach}_11tiles_${yr}.nc cover_fract.${yr}.nc add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/New_Hampshire_LCC/rcp${SCEN_NB_jsbach}/LUH_harvest_${RES_jsbach}_rcp${SCEN_NB_jsbach}_$yr.nc \
else landuseHarvest.$yr.nc
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/New_Hampshire_LCC/rcp${SCEN_NB_jsbach}/LUH_harvest_${RES_jsbach}_rcp${SCEN_NB_jsbach}_$yr.nc \ fi
landuseHarvest.$yr.nc done
fi if [[ ${jsbach_VERSION} = "3.20" ]]; then
done # PG: New for mpiesm-1.2.01, nitrogren input files
if [[ ${jsbach_VERSION} = "3.20" ]]; then add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/${RES_jsbach}_ndepo_CMIP_NCAR_CCMI-1-0_gr_185001-201412.nc \
# PG: New for mpiesm-1.2.01, nitrogren input files Ndepo.1850-2014.nc
echo "\$jsbach_INPUT_DIR=${jsbach_INPUT_DIR=}" fi
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/${RES_jsbach}_ndepo_CMIP_NCAR_CCMI-1-0_gr_185001-201412.nc \ ;;
Ndepo.1850-2014.nc SSP*)
fi for((yr = YR0_jsbach + -2; yr <= YRN_jsbach + 0; ++yr))
;; do
SSP*) if [ $yr -lt 2015 ] ; then
for((yr = YR0_jsbach + -2; yr <= YRN_jsbach + 0; ++yr)) # add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/New_Hampshire_LCC/${hist_fold}/LUH_harvest_${RES_jsbach}_${yr}.nc \
do # landuseHarvest.$yr.nc
if [ $yr -lt 2015 ] ; then add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/land_use_maps/cover_fract_${RES_jsbach}_11tiles_${yr}.nc cover_fract.${yr}.nc
# add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/New_Hampshire_LCC/${hist_fold}/LUH_harvest_${RES_jsbach}_${yr}.nc \ else
# landuseHarvest.$yr.nc # add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/New_Hampshire_LCC/ssp${SCEN_NB_jsbach}_${DYNVEG_jsbach}/LUH_harvest_${RES_jsbach}_rcp${SCEN_NB_jsbach}_$yr.nc \
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/land_use_maps/cover_fract_${RES_jsbach}_11tiles_${yr}.nc cover_fract.${yr}.nc # landuseHarvest.$yr.nc
else add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/land_use_maps/ssp${SCEN_NB_jsbach}/cover_fract_${RES_jsbach}_11tiles_${yr}.nc cover_fract.${yr}.nc
# add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/New_Hampshire_LCC/ssp${SCEN_NB_jsbach}_${DYNVEG_jsbach}/LUH_harvest_${RES_jsbach}_rcp${SCEN_NB_jsbach}_$yr.nc \ fi
# landuseHarvest.$yr.nc done
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/land_use_maps/ssp${SCEN_NB_jsbach}/cover_fract_${RES_jsbach}_11tiles_${yr}.nc cover_fract.${yr}.nc ;;
fi
done
;;
*) *)
echo "Unknown scenario $SCENARIO_jsbach" echo "Unknown scenario $SCENARIO_jsbach"
exit 42 exit 42
...@@ -351,8 +348,8 @@ jsbach_prepare_forcing() ...@@ -351,8 +348,8 @@ jsbach_prepare_forcing()
esac esac
for((yr = YR0_jsbach + -2; yr <= YRN_jsbach + 0; ++yr)) for((yr = YR0_jsbach + -2; yr <= YRN_jsbach + 0; ++yr))
do do
add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/New_Hampshire_LCC/no_LUH_transitions_${RES_jsbach}.nc \ add_to ${jsbach_INPUT_DIR}/${RES_jsbach}/New_Hampshire_LCC/no_LUH_transitions_${RES_jsbach}.nc \
landuseTransitions.${yr}.nc landuseTransitions.${yr}.nc
done done
echo " Taking jsbach forcing data from jsbach_INPUT_DIR=${jsbach_INPUT_DIR}" echo " Taking jsbach forcing data from jsbach_INPUT_DIR=${jsbach_INPUT_DIR}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment