geoschem / gcpy

Python toolkit for GEOS-Chem. Contains basic plotting scripts, plus the suite of GEOS-Chem benchmarking utilities.
https://gcpy.readthedocs.io
Other
51 stars 24 forks source link

Can't generate zonal differences for global vs nested model output #313

Open msulprizio opened 5 months ago

msulprizio commented 5 months ago

Name and Institution (Required)

Name: Melissa Sulprizio Institution: Harvard

Description of your issue or question

When generating concentration difference plots for 1-month TransportTracer runs at differing resolutions, I run into issues when comparing global and regional datasets. For example, when comparing global 4x5 output to North American 0.25x0.3125 output the surface plots are created without issue but the benchmark routines fail when attempting the zonal plots.

Using configuration file 1mo_benchmark.yml
Using species database /n/holylfs05/LABS/jacob_lab/msulprizio/Runs/Test_12km/gc_025x03125_NA_geosfp_TransportTracers/species_database.yml
The following plots and tables will be created for TransportTracersBenchmark
 - Concentration plots
Comparisons will be made for the following combinations:
 - GCC vs GCC
Using configuration file /n/home05/msulprizio/python/gcpy/gcpy/benchmark/modules/benchmark_categories.yml
joblib.externals.loky.process_executor._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/n/home05/msulprizio/python/mamba/envs/gcpy_env/lib/python3.9/site-packages/joblib/externals/loky/process_executor.py", line 463, in _process_worker
    r = call_item()
  File "/n/home05/msulprizio/python/mamba/envs/gcpy_env/lib/python3.9/site-packages/joblib/externals/loky/process_executor.py", line 291, in __call__
    return self.fn(*self.args, **self.kwargs)
  File "/n/home05/msulprizio/python/mamba/envs/gcpy_env/lib/python3.9/site-packages/joblib/parallel.py", line 589, in __call__
    return [func(*args, **kwargs)
  File "/n/home05/msulprizio/python/mamba/envs/gcpy_env/lib/python3.9/site-packages/joblib/parallel.py", line 589, in <listcomp>
    return [func(*args, **kwargs)
  File "/n/home05/msulprizio/python/gcpy/gcpy/benchmark/modules/benchmark_funcs.py", line 1420, in createplots
    compare_zonal_mean(
  File "/n/home05/msulprizio/python/gcpy/gcpy/plot/compare_zonal_mean.py", line 1051, in compare_zonal_mean
    results.append(createfig(i, temp_dir))
  File "/n/home05/msulprizio/python/gcpy/gcpy/plot/compare_zonal_mean.py", line 767, in createfig
    zm_diff = np.array(zm_dev_cmp) - np.array(zm_ref_cmp)
ValueError: operands could not be broadcast together with shapes (72,201) (72,721) 
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/n/home05/msulprizio/gcpy/gcpy/benchmark/run_benchmark.py", line 1671, in <module>
    main(sys.argv)
  File "/n/home05/msulprizio/gcpy/gcpy/benchmark/run_benchmark.py", line 1667, in main
    choose_benchmark_type(config)
  File "/n/home05/msulprizio/gcpy/gcpy/benchmark/run_benchmark.py", line 118, in choose_benchmark_type
    run_benchmark_default(config)
  File "/n/home05/msulprizio/gcpy/gcpy/benchmark/run_benchmark.py", line 402, in run_benchmark_default
    make_benchmark_conc_plots(
  File "/n/home05/msulprizio/python/gcpy/gcpy/benchmark/modules/benchmark_funcs.py", line 1494, in make_benchmark_conc_plots
    results = Parallel(n_jobs=n_job)(
  File "/n/home05/msulprizio/python/mamba/envs/gcpy_env/lib/python3.9/site-packages/joblib/parallel.py", line 1952, in __call__
    return output if self.return_generator else list(output)
  File "/n/home05/msulprizio/python/mamba/envs/gcpy_env/lib/python3.9/site-packages/joblib/parallel.py", line 1595, in _get_outputs
    yield from self._retrieve()
  File "/n/home05/msulprizio/python/mamba/envs/gcpy_env/lib/python3.9/site-packages/joblib/parallel.py", line 1699, in _retrieve
    self._raise_error_fast()
  File "/n/home05/msulprizio/python/mamba/envs/gcpy_env/lib/python3.9/site-packages/joblib/parallel.py", line 1734, in _raise_error_fast
    error_job.get_result(self.timeout)
  File "/n/home05/msulprizio/python/mamba/envs/gcpy_env/lib/python3.9/site-packages/joblib/parallel.py", line 736, in get_result
    return self._return_or_raise()
  File "/n/home05/msulprizio/python/mamba/envs/gcpy_env/lib/python3.9/site-packages/joblib/parallel.py", line 754, in _return_or_raise
    raise self._result
ValueError: operands could not be broadcast together with shapes (72,201) (72,721) 
real 14.69
user 27.28
sys 8.14
srun: error: holy7c18503: task 0: Exited with exit code 1

Configuration file used: 1mo_benchmark.yml.txt

github-actions[bot] commented 1 week ago

This issue has been automatically marked as stale because it has not had recent activity. If there are no updates within 7 days it will be closed. You can add the "never stale" tag to prevent the issue from closing this issue.

msulprizio commented 1 week ago

This may be addressed by fixes currently in the branch bugfix/add-extent-to-compare-diags. Tagging @yantosca.