E3SM-Project / e3sm_diags

E3SM Diagnostics package
https://e3sm-project.github.io/e3sm_diags
BSD 3-Clause "New" or "Revised" License
39 stars 32 forks source link

[Bug]: Logger messages are printing twice (maybe just plotting) #762

Open tomvothecoder opened 9 months ago

tomvothecoder commented 9 months ago

What happened?

The logger message showing the plot file output directory is printing twice. This might be happening because of some nested calls to the plot functions.

The plot() function in e3sm_diags/plot/__init__.py calls a plot function found in a set's *_plot.py file. This might be instantiating duplicate loggers? https://github.com/E3SM-Project/e3sm_diags/blob/352c67741ed34cf9d89e5f1b298c3d4a1e26c500/e3sm_diags/plot/__init__.py#L36-L60

What did you expect to happen? Are there are possible answers you came across?

No response

Minimal Complete Verifiable Example (MVCE)

No response

Relevant log output

2023-12-07 14:21:57,253 [INFO]: e3sm_diags_driver.py(_save_env_yml:57) >> Saved environment yml file to: [/global/cfs/cdirs/e3sm/www/vo13/examples/run_refactor_single_param/prov/environment.yml](https://vscode-remote+ssh-002dremote-002bperlmutter.vscode-resource.vscode-cdn.net/global/cfs/cdirs/e3sm/www/vo13/examples/run_refactor_single_param/prov/environment.yml)
2023-12-07 14:21:57,255 [INFO]: e3sm_diags_driver.py(_save_parameter_files:68) >> Saved command used to: [/global/cfs/cdirs/e3sm/www/vo13/examples/run_refactor_single_param/prov/cmd_used.txt](https://vscode-remote+ssh-002dremote-002bperlmutter.vscode-resource.vscode-cdn.net/global/cfs/cdirs/e3sm/www/vo13/examples/run_refactor_single_param/prov/cmd_used.txt)
2023-12-07 14:21:57,256 [INFO]: e3sm_diags_driver.py(_save_python_script:132) >> Saved Python script to: [/global/cfs/cdirs/e3sm/www/vo13/examples/run_refactor_single_param/prov/ipykernel_launcher.py](https://vscode-remote+ssh-002dremote-002bperlmutter.vscode-resource.vscode-cdn.net/global/cfs/cdirs/e3sm/www/vo13/examples/run_refactor_single_param/prov/ipykernel_launcher.py)
2023-12-07 14:21:57,258 [INFO]: zonal_mean_xy_driver.py(run_diag:117) >> Variable: NET_FLUX_SRF
2023-12-07 14:21:59,521 [INFO]: zonal_mean_xy_driver.py(run_diag:228) >> Selected region: global
2023-12-07 14:21:59,801 [INFO]: zonal_mean_xy_plot.py(plot:108) >> Plot saved in: [/global/cfs/cdirs/e3sm/www/vo13/examples/run_refactor_single_param/zonal_mean_xy/model_vs_model/-NET_FLUX_SRF-ANN-global.png](https://vscode-remote+ssh-002dremote-002bperlmutter.vscode-resource.vscode-cdn.net/global/cfs/cdirs/e3sm/www/vo13/examples/run_refactor_single_param/zonal_mean_xy/model_vs_model/-NET_FLUX_SRF-ANN-global.png)
2023-12-07 14:21:59,801 [INFO]: zonal_mean_xy_plot.py(plot:108) >> Plot saved in: [/global/cfs/cdirs/e3sm/www/vo13/examples/run_refactor_single_param/zonal_mean_xy/model_vs_model/-NET_FLUX_SRF-ANN-global.png](https://vscode-remote+ssh-002dremote-002bperlmutter.vscode-resource.vscode-cdn.net/global/cfs/cdirs/e3sm/www/vo13/examples/run_refactor_single_param/zonal_mean_xy/model_vs_model/-NET_FLUX_SRF-ANN-global.png)
2023-12-07 14:21:59,802 [INFO]: zonal_mean_xy_driver.py(run_diag:117) >> Variable: NET_FLUX_SRF
2023-12-07 14:22:01,537 [INFO]: zonal_mean_xy_driver.py(run_diag:228) >> Selected region: global
2023-12-07 14:22:01,799 [INFO]: zonal_mean_xy_plot.py(plot:108) >> Plot saved in: [/global/cfs/cdirs/e3sm/www/vo13/examples/run_refactor_single_param/zonal_mean_xy/model_vs_model/-NET_FLUX_SRF-ANN-global.png](https://vscode-remote+ssh-002dremote-002bperlmutter.vscode-resource.vscode-cdn.net/global/cfs/cdirs/e3sm/www/vo13/examples/run_refactor_single_param/zonal_mean_xy/model_vs_model/-NET_FLUX_SRF-ANN-global.png)
2023-12-07 14:22:01,799 [INFO]: zonal_mean_xy_plot.py(plot:108) >> Plot saved in: [/global/cfs/cdirs/e3sm/www/vo13/examples/run_refactor_single_param/zonal_mean_xy/model_vs_model/-NET_FLUX_SRF-ANN-global.png](https://vscode-remote+ssh-002dremote-002bperlmutter.vscode-resource.vscode-cdn.net/global/cfs/cdirs/e3sm/www/vo13/examples/run_refactor_single_param/zonal_mean_xy/model_vs_model/-NET_FLUX_SRF-ANN-global.png)
2023-12-07 14:22:01,801 [INFO]: zonal_mean_xy_driver.py(run_diag:117) >> Variable: NET_FLUX_SRF

Anything else we need to know?

No response

Environment

Latest e3sm_diags