Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 18 additions & 26 deletions bash_scripts/aprime_atm_diags.bash
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ if [ ! -d $remap_files_dir ]; then
echo "remap_files_dir $remap_files_dir does not exist! Please check."
echo "Exiting atmosphere diagnostics ..."
echo
echo
exit 1
fi

Expand All @@ -28,15 +27,13 @@ if [ ! -f $CERES_EBAF_regrid_wgt_file ]; then
echo "CERES_EBAF_regid_wgt_file $CERES_EBAF_regrid_wgt_file does not exist! Please check."
echo "Exiting atmosphere diagnostics ..."
echo
echo
exit 1
fi

if [ ! -f $ERS_regrid_wgt_file ]; then
echo "ERS_regrid_wgt_file $ERS_regrid_wgt_file does not exist! Please check."
echo "Exiting atmosphere diagnostics ..."
echo
echo
exit 1
fi

Expand Down Expand Up @@ -149,7 +146,7 @@ while [ $j -lt $n_cases ]; do

if [ $compute_climo -eq 1 ]; then
echo
echo "Submitting jobs to compute seasonal climatology for $casename"
echo "Computing seasonal climatology for $casename"
echo "Log files in $log_dir/climo_$casename..."
echo
./bash_scripts/compute_climo.bash $scratch_dir \
Expand Down Expand Up @@ -178,7 +175,7 @@ while [ $j -lt $n_cases ]; do

if [ $remap_climo -eq 1 ]; then
echo
echo "Submitting jobs to remap seasonal climatology files for $casename"
echo "Remapping seasonal climatology files for $casename"
echo "Log files in $log_dir/remap_climo_$casename..."
echo
./bash_scripts/remap_climo_nco.bash $scratch_dir \
Expand All @@ -198,7 +195,7 @@ echo

# Plot climatologies and differences
echo
echo "Submitting jobs to plot seasonal climatology and differences"
echo "Plotting seasonal climatology and differences"
echo "Log files in $log_dir/plot_climo..."
echo

Expand Down Expand Up @@ -313,7 +310,7 @@ while [ $j -lt $n_cases ]; do

if [ $remap_ts -eq 1 ]; then
echo
echo "Submitting jobs to interpolate time series files for $casename"
echo "Interpolating time series files for $casename"
echo "Log files in $log_dir/remap_time_series_${casename}..."
echo
./bash_scripts/remap_time_series_nco.bash $scratch_dir \
Expand All @@ -330,7 +327,7 @@ done

# Plot trends for different regions
echo
echo "Submitting jobs to plot time series"
echo "Plotting time series"
echo "Log files in $log_dir/"
echo

Expand Down Expand Up @@ -363,8 +360,6 @@ while [ $j -lt $n_test_cases ]; do
done




# ENSO DIAGS

if [ $generate_atm_enso_diags == 1 ]; then
Expand Down Expand Up @@ -433,7 +428,7 @@ if [ $generate_atm_enso_diags == 1 ]; then

if [ $compute_climo -eq 1 ]; then
echo
echo "Submitting jobs to compute seasonal climatology for $casename"
echo "Computing seasonal climatology for $casename"
echo "Log files in $log_dir/climo_$casename..."
echo
./bash_scripts/compute_climo.bash $scratch_dir \
Expand Down Expand Up @@ -462,7 +457,7 @@ if [ $generate_atm_enso_diags == 1 ]; then

if [ $remap_climo -eq 1 ]; then
echo
echo "Submitting jobs to remap seasonal climatology files for $casename"
echo "Remapping seasonal climatology files for $casename"
echo "Log files in $log_dir/remap_climo_$casename..."
echo
./bash_scripts/remap_climo_nco.bash $scratch_dir \
Expand All @@ -483,7 +478,7 @@ if [ $generate_atm_enso_diags == 1 ]; then
# ENSO Diags: Plot Meridional Average over the Tropical Pacific
echo
echo
echo Submitting jobs to plot meridional average over the Tropical Pacific
echo Plotting meridional average over the Tropical Pacific
echo Log files in $log_dir/
echo

Expand Down Expand Up @@ -582,7 +577,7 @@ if [ $generate_atm_enso_diags == 1 ]; then

if [ $remap_ts -eq 1 ]; then
echo
echo Submitting jobs to interpolate time series files for $casename
echo Interpolating time series files for $casename
echo Log files in $log_dir/remap_time_series_${casename}...
echo
bash_scripts/remap_time_series_nco.bash $scratch_dir \
Expand All @@ -600,7 +595,7 @@ if [ $generate_atm_enso_diags == 1 ]; then

# ENSO Diags: Compute Nino and EQSOI indices
echo
echo Submitting jobs to compute Nino and EQSOI index
echo Computing Nino and EQSOI index
echo Log files in $log_dir/
echo

Expand Down Expand Up @@ -665,7 +660,7 @@ if [ $generate_atm_enso_diags == 1 ]; then
# ENSO Diags: Plot Nino and EQSOI time series

echo
echo Submitting job to plot Nino and EQSOI index
echo Plotting Nino and EQSOI index
echo Log files in $log_dir/
echo

Expand Down Expand Up @@ -696,7 +691,7 @@ if [ $generate_atm_enso_diags == 1 ]; then

# ENSO Diags: Plot Nino3, Nino3.4 and Nino4 index time series
echo
echo Submitting jobs to plot Nino3, Nino3.4 and Nino4 time series
echo Plotting Nino3, Nino3.4 and Nino4 time series
echo Log files in $log_dir/
echo

Expand Down Expand Up @@ -737,7 +732,7 @@ if [ $generate_atm_enso_diags == 1 ]; then

# ENSO Diags: Plot Nino3, Nino3.4 and Nino4 index seasonality
echo
echo Submitting jobs to plot seasonality of Nino indices
echo Plotting seasonality of Nino indices
echo Log files in $log_dir/
echo

Expand Down Expand Up @@ -776,7 +771,7 @@ if [ $generate_atm_enso_diags == 1 ]; then
split_yfit_x_0=0

echo
echo Submitting jobs to plot Bjerkenes feedback
echo Plotting Bjerkenes feedback
echo Log files in $log_dir/
echo

Expand Down Expand Up @@ -823,7 +818,7 @@ if [ $generate_atm_enso_diags == 1 ]; then
split_yfit_x_0=1

echo
echo Submitting jobs to plot Nino3 heat flux-SST feedbacks
echo Plotting Nino3 heat flux-SST feedbacks
echo Log files in $log_dir/
echo

Expand Down Expand Up @@ -868,9 +863,8 @@ if [ $generate_atm_enso_diags == 1 ]; then
field_reg='global'
field_reg_name='global'


echo
echo Submitting jobs to plot regression of variables against the $index_reg index
echo Plotting regression of variables against the $index_reg index
echo Log files in $log_dir/
echo

Expand Down Expand Up @@ -907,7 +901,7 @@ if [ $generate_atm_enso_diags == 1 ]; then

#ENSO Diags: Plot std. dev. over the Tropical Pacific
echo
echo Submitting jobs to plot std. dev. of fields over the Tropical Pacific
echo Plotting std. dev. of fields over the Tropical Pacific
echo Log files in $log_dir/

var_list_file=bash_scripts/var_list_enso_diags_time_series.bash
Expand Down Expand Up @@ -949,7 +943,7 @@ if [ $generate_atm_enso_diags == 1 ]; then


echo
echo Submitting jobs to plot ENSO evolution: Lead lag regression of TAUX and TS against the Nino3.4 index
echo Plotting ENSO evolution: Lead lag regression of TAUX and TS against the Nino3.4 index
echo Log files in $log_dir/
echo

Expand Down Expand Up @@ -985,8 +979,6 @@ if [ $generate_atm_enso_diags == 1 ]; then

fi



echo
echo "Completed atmosphere diagnostics!"
echo
Expand Down
10 changes: 9 additions & 1 deletion bash_scripts/aprime_ocnice_diags.bash
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,17 @@ unset tmp_currentdir tmp_gittopdir

export config_file="$log_dir/config.ocnice.$uniqueID"
python python/setup_ocnice_config.py
if [ $? -ne 0 ]; then
exstatus=$?
if [ $exstatus -ne 0 ]; then
echo
echo "Failed to build config.ocnice"
exit 1
fi

python python/MPAS-Analysis/run_mpas_analysis.py $config_file
exstatus=$?
if [ $exstatus -ne 0 ]; then
echo
echo "Failed some ocean/ice diagnostic tasks"
exit 1
fi
27 changes: 27 additions & 0 deletions bash_scripts/batch_atm.anvil.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
#
# Copyright (c) 2017, UT-BATTELLE, LLC
# All rights reserved.
#
# This software is released under the BSD license detailed
# in the LICENSE file in the top level a-prime directory
#

#PBS -q acme
#PBS -l nodes=1
#PBS -l walltime=01:00:00
#PBS -A ACME
#PBS -N aprime_atm_diags
#PBS -o aprime_atm_diags.o$PBS_JOBID
#PBS -e aprime_atm_diags.e$PBS_JOBID
#PBS -V

cd $PBS_O_WORKDIR

./bash_scripts/aprime_atm_diags.bash

echo
echo "**** The following batch job will be submitted to cp files to www_dir *if* the atm diags are completed"
echo "**** jobID:"
batch_script="./bash_scripts/batch_update_wwwdir.$machname.bash"
qsub -W depend=afterok:$PBS_JOBID $batch_script
32 changes: 32 additions & 0 deletions bash_scripts/batch_ocnice.anvil.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
#
# Copyright (c) 2017, UT-BATTELLE, LLC
# All rights reserved.
#
# This software is released under the BSD license detailed
# in the LICENSE file in the top level a-prime directory
#

#PBS -q acme
#PBS -l nodes=1
#PBS -l walltime=01:00:00
#PBS -A ACME
#PBS -N aprime_ocnice_diags
#PBS -o aprime_ocnice_diags.o$PBS_JOBID
#PBS -e aprime_ocnice_diags.e$PBS_JOBID
#PBS -V

cd $PBS_O_WORKDIR

export command_prefix=""

unset LD_LIBRARY_PATH
soft add +acme-unified-1.1.1-x

./bash_scripts/aprime_ocnice_diags.bash

echo
echo "**** The following batch job will be submitted to cp files to www_dir *if* the ocn/ice diags are completed"
echo "**** jobID:"
batch_script="./bash_scripts/batch_update_wwwdir.$machname.bash"
qsub -W depend=afterok:$PBS_JOBID $batch_script
4 changes: 1 addition & 3 deletions bash_scripts/batch_ocnice.lanl.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
# in the LICENSE file in the top level a-prime directory
#

# change number of nodes to change the number of parallel tasks
# (anything between 1 and the total number of tasks to run)
#SBATCH --nodes=10
#SBATCH --nodes=1
#SBATCH --time=01:00:00
#SBATCH --account=climateacme
#SBATCH --job-name=aprime_ocnice_diags
Expand Down
4 changes: 1 addition & 3 deletions bash_scripts/batch_ocnice.nersc.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
#

#SBATCH --partition=regular
# change number of nodes to change the number of parallel tasks
# (anything between 1 and the total number of tasks to run)
#SBATCH --nodes=10
#SBATCH --nodes=1
#SBATCH --time=01:00:00
#SBATCH --account=acme
#SBATCH --job-name=aprime_ocnice_diags
Expand Down
4 changes: 1 addition & 3 deletions bash_scripts/batch_ocnice.olcf.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
#

#PBS -q batch
# change number of nodes to change the number of parallel tasks
# (anything between 1 and the total number of tasks to run)
#PBS -l nodes=10
#PBS -l nodes=1
#PBS -l walltime=01:00:00
#PBS -A cli115
#PBS -N aprime_ocnice_diags
Expand Down
24 changes: 24 additions & 0 deletions bash_scripts/batch_update_wwwdir.anvil.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
#
# Copyright (c) 2017, UT-BATTELLE, LLC
# All rights reserved.
#
# This software is released under the BSD license detailed
# in the LICENSE file in the top level a-prime directory
#

#PBS -q acme
#PBS -l nodes=1
#PBS -l walltime=00:20:00
#PBS -A ACME
#PBS -N aprime_update_wwwdir
#PBS -o aprime_update_wwwdir.o$PBS_JOBID
#PBS -e aprime_update_wwwdir.e$PBS_JOBID
#PBS -V

# Update www/plots directory with newly generated plots
cp -u $plots_dir/* $www_dir/$plots_dir_name
chmod -R ga+rX $www_dir/$plots_dir_name
echo
echo "Updated atm plots in website directory: $www_dir/$plots_dir_name"
echo
6 changes: 6 additions & 0 deletions bash_scripts/compute_climo.bash
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ if [ "$casename" != "obs" ]; then
--end_month $end_month \
--begin_yr $begin_yr \
--end_yr $end_yr >& $log_dir/climo_${casename}_${var}_${season_name}_years$begin_yr-$end_yr.log &
exstatus=$?
if [ $exstatus -ne 0 ]; then
echo
echo "Failed computing climatologies for season $ns"
exit 1
fi

fi

Expand Down
Loading