Skip to content

Commit

Permalink
Merge pull request #648 from E3SM-Project/issue-601-viewers
Browse files Browse the repository at this point in the history
Add Viewer support
  • Loading branch information
forsyth2 authored Jan 14, 2025
2 parents daa2b6f + d2e5bd9 commit 57c0891
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions zppy/defaults/default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,13 @@ figstr = string(default="")
# The specific subdirectory with the ocean data
# NOTE: always overrides value in [default]
input_subdir = string(default="archive/ocn/hist")
# Set to True to construct a Viewer page
make_viewer = string(default="False")
moc_file = string(default="")
# Number of columns per page
ncols = integer(default=2)
# Number of rows per page
nrows = integer(default=4)
# The names of the plots you want displayed
# Variable requirements:
# net_toa_flux_restom requires RESTOM
Expand All @@ -319,6 +325,7 @@ plots_original = string(default="net_toa_flux_restom,global_surface_air_temperat
# These should be a subset of the `vars` generated by the `ts` `glb` subtasks.
plots_atm = string(default="")
plots_ice = string(default="")
# Set `plots_lnd = "all"` to run every variable in the land csv file.
plots_lnd = string(default="")
plots_ocn = string(default="")
# regions to plot: glb, n, s (global, northern hemisphere, southern hemisphere)
Expand Down
3 changes: 2 additions & 1 deletion zppy/templates/global_time_series.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
################################################################################
results_dir={{ prefix }}_results

zi-global-time-series --use_ocn {{ use_ocn }} --input {{ input }} --input_subdir {{ input_subdir }} --moc_file {{ moc_file }} --case_dir {{ output }} --experiment_name {{ experiment_name }} --figstr {{ figstr }} --color {{ color }} --ts_num_years {{ ts_num_years }} --plots_original {{ plots_original }} --plots_atm {{ plots_atm }} --plots_ice {{ plots_ice }} --plots_lnd {{ plots_lnd }} --plots_ocn {{ plots_ocn }} --nrows 4 --ncols 2 --results_dir ${results_dir} --regions {{ regions }} --start_yr {{ year1 }} --end_yr {{ year2 }}
zi-global-time-series --use_ocn {{ use_ocn }} --input {{ input }} --input_subdir {{ input_subdir }} --moc_file {{ moc_file }} --case_dir {{ output }} --experiment_name {{ experiment_name }} --figstr {{ figstr }} --color {{ color }} --ts_num_years {{ ts_num_years }} --plots_original {{ plots_original }} --plots_atm {{ plots_atm }} --plots_ice {{ plots_ice }} --plots_lnd {{ plots_lnd }} --plots_ocn {{ plots_ocn }} --nrows {{ nrows }} --ncols {{ ncols }} --results_dir ${results_dir} --regions {{ regions }} --make_viewer {{ make_viewer }} --start_yr {{ year1 }} --end_yr {{ year2 }}

echo 'Copy images to directory'
results_dir_absolute_path={{ scriptDir }}/${results_dir}
mkdir -p ${results_dir_absolute_path}
cp ${results_dir}/*.pdf ${results_dir_absolute_path}
cp ${results_dir}/*.png ${results_dir_absolute_path}
cp -r ${results_dir}/viewer ${results_dir_absolute_path}

################################################################################
case={{ case }}
Expand Down
2 changes: 1 addition & 1 deletion zppy/templates/ts.bash
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ if grep -q "*" input.txt; then
fi
# Generate time series files
# If the user-defined parameter "vars" is "", then ${vars}, defined above, will be too.
cat input.txt | ncclimo \
cat input.txt | /home/ac.zender/bin_chrysalis/ncclimo --npo \
-c {{ case }} \
{%- if vars != '' %}
-v ${vars} \
Expand Down

0 comments on commit 57c0891

Please sign in to comment.