Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Viewer support #648

Merged
merged 2 commits into from
Jan 14, 2025
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
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
Loading