Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
forsyth2 committed Aug 25, 2022
1 parent a00707c commit 0c6705b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tests/integration/generated/directions_chrysalis.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ rm -rf /lcrc/group/e3sm/ac.forsyth2/zppy_test_bundles_output/v2.LR.historical_02
python tests/integration/utils.py
zppy -c tests/integration/generated/test_bundles.cfg
# bundle1 and bundle2 should run. After they finish, invoke zppy again to resolve remaining dependencies:
zppy -c tests/integration/test_bundles.cfg
zppy -c tests/integration/generated/test_bundles.cfg
# bundle3 and ilamb should run
```

Expand Down Expand Up @@ -48,7 +48,7 @@ rm -rf /lcrc/group/e3sm/public_html/zppy_test_resources/expected_bundles
cp -r /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_test_bundles_www/v2.LR.historical_0201 /lcrc/group/e3sm/public_html/zppy_test_resources/expected_bundles
mkdir -p /lcrc/group/e3sm/public_html/zppy_test_resources/expected_bundles/bundle_files
cp -r /lcrc/group/e3sm/ac.forsyth2/zppy_test_bundles_output/v2.LR.historical_0201/post/scripts/bundle*.bash /lcrc/group/e3sm/public_html/zppy_test_resources/expected_bundles/bundle_files
cd #expected_bundles
cd /lcrc/group/e3sm/public_html/zppy_test_resources/expected_bundles
# This file will list all the expected images.
find . -type f -name '*.png' > ../image_list_expected_bundles.txt
cd <top level of zppy repo>
Expand Down
10 changes: 7 additions & 3 deletions zppy/templates/coupled_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def getmoc(dir_in):
# Function to add horizontal line showing average value over a specified period
def add_line(year, var, year1, year2, ax, format="%4.2f", lw=1, color="b"):

print(f"AAA {year} {year1} {year2}")
print(f"BBB {type(year)} {type(year1)} {type(year2)}")
print("CCC {{ year1 }} {{ year2 }}")
print(f"DDD {type({{ year1 }})} {type({{ year2 }})}")
i1 = (np.abs(year - year1)).argmin()
i2 = (np.abs(year - year2)).argmin()

Expand Down Expand Up @@ -457,8 +461,8 @@ def run(parameters):
case_dir = parameters[1]
experiment_name = parameters[2]
figstr = parameters[3]
year1 = parameters[4]
year2 = parameters[5]
year1 = int(parameters[4])
year2 = int(parameters[5])
color = parameters[6]
ts_num_years = parameters[7]
if parameters[8].lower() == "false":
Expand Down Expand Up @@ -535,7 +539,7 @@ def run(parameters):
ncols = 2

for i in range(num_plots):
ax = plt.subplot(nrows, ncols, i)
ax = plt.subplot(nrows, ncols, i + 1)
try:
PLOT_DICT[plot_list[i]](ax, xlim, exps)
except KeyError:
Expand Down
2 changes: 1 addition & 1 deletion zppy/templates/default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ figstr = string(default="")
input_subdir = string(default="archive/ocn/hist")
moc_file = string(default="")
# The names of the plots you want displayed
plot_names = string(default="net_toa_flux_restom,global_surface_air_temperature,toa_radiation,net_atm_energy_imbalance,change_ohc,max_moc,change_sea_level,net_atm_water_imbalance"))
plot_names = string(default="net_toa_flux_restom,global_surface_air_temperature,toa_radiation,net_atm_energy_imbalance,change_ohc,max_moc,change_sea_level,net_atm_water_imbalance")
# The number of years in a time-series file
ts_num_years = integer(default=10)
ts_years = string_list(default=list(""))
Expand Down
2 changes: 1 addition & 1 deletion zppy/templates/global_time_series.bash
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fi

echo 'Update time series figures'
cd ${global_ts_dir}
python coupled_global.py ${case_dir} ${experiment_name} ${figstr} ${start_yr} ${end_yr} {{ color }} ${ts_num_years} ${atmosphere_only} ${plot_list}
python coupled_global.py ${case_dir} ${experiment_name} ${figstr} ${start_yr} ${end_yr} {{ color }} ${ts_num_years} ${atmosphere_only} "{{ plot_names }}"
if [ $? != 0 ]; then
cd {{ scriptDir }}
echo 'ERROR (5)' > {{ prefix }}.status
Expand Down

0 comments on commit 0c6705b

Please sign in to comment.