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

Required update to handle new QA4SM netCDF structure according to Jira-744 #77

Conversation

nfb2021
Copy link
Collaborator

@nfb2021 nfb2021 commented Jun 6, 2024

Update to handle new QA4SM netCDF file structure and provdide new plots for temporal sub-window based metrics

  • Adapted plotting to work with arbitrary tsws (from new qa4sm output netcdf file structure)
  • Created new type of plot: Comparison box plots for tsws
  • Added qa4sm logo (instead of watermark text)
  • Changed the directory structure of created graphics to better handle the abundance of images (needs to be accounted for in QA4SM front end @sheenaze)
  • Updated some about-to-be deprecated code (matplotlib related, in globals.py)

To Do

  • Tests are not yet adapted at all
  • plotting_methods._dict2df() does not work with tcol metrics and throws error

@nfb2021 nfb2021 marked this pull request as draft July 3, 2024 09:07
nfb2021 and others added 5 commits July 3, 2024 16:21
… of the `qa4sm_reader` package, isntead of `qa4sm`. Further, the globals file was adapted accordingly and now contains all vars required. `qa4sm` imports these specific vars then from the `qa4sm_reader.globals` file. Lastly, `qa4sm_reader.img.QA4SMImg` was adapted to check if a dimension corresponding to temporal sub-windows exists in the specified netCDF file and if not automatically transcribes the loaded dataset. Tests were adapted accordingly.
…cmetric_vars()` to exclude TC metric vars of same reference and metric dataset from being plotted
Integration of temporal sub-window logic and QA4SM netCDF transcription as well as adaptation of tests
nfb2021 and others added 21 commits July 8, 2024 09:41
* Update environment.yml

checking if defining pyscaffold in the env helps fixing the problem with failing tests

* Update CI and dependency list

* Update env

* Update CI

* Update env

* Update CI

---------

Co-authored-by: Wolfgang Preimesberger <[email protected]>
@wpreimes wpreimes marked this pull request as ready for review October 10, 2024 12:43
@wpreimes wpreimes merged commit b7e15a1 into awst-austria:beta-release Oct 10, 2024
5 checks passed
wpreimes added a commit that referenced this pull request Oct 10, 2024
…a-744 (#77) (#83)

* intial

* started adapting

* adapted existing code to properly handle temporal sub-windows, including renaming the output files and figure titles accordingly

* before testing

* fig titles and filenames now always contain the default or temporal sub-window case's name. also, maps are only created fo
r the default case

* intermediate saving

* added all code required to generate comparison boxplots

* fully integrated compariosn plots and all plots now have the logo instead of the watermark

* all statistics .csv files are now stroed in a dedicated zip archive

* intermediate commit

* Fix bugs with metadata plots

* automatic extraction of temporal sub-window names from provided netcdf file and enhanced type hints

* testing of tcol metrics plotting

* removed debugging statements, implemented bug fix for metadata plot generationwit tcol metrics

* comparison boxplots of tcol metrics are not created

* implemented saving of created figures in one go for multiple filetypes

* code for netcdf file transcription to new qa4sm nc structure

* removed accidentally staged restructured files

* implemented means for transcription for all test files

* added automatic netCDF file transcription prior to tests and corrected for temp. sub-win. dimension as additional item in `QA4SMImage.varnames` in `test_image.py::test_load_vars`

* pt2: added automatic netCDF file transcription prior to tests and corrected for temp. sub-win. dimension as additional item in `QA4SMImage.varnames` in `test_image.py::test_load_vars`

* netcdf_transcription.py and intra_annual_temp_windows.py now are part of the `qa4sm_reader` package, isntead of `qa4sm`. Further, the globals file was adapted accordingly and now contains all vars required. `qa4sm` imports these specific vars then from the `qa4sm_reader.globals` file. Lastly, `qa4sm_reader.img.QA4SMImg` was adapted to check if a dimension corresponding to temporal sub-windows exists in the specified netCDF file and if not automatically transcribes the loaded dataset. Tests were adapted accordingly.

* code cleaning.

* code cleaning

* introduced function `qa4sm_reader.utils.filter_out_self_combination_tcmetric_vars()` to exclude TC metric vars of same reference and metric dataset from being plotted

* added pytesmo dependency

* added MANIFEST.in to correctly install the static dir requried for inclusion of logo as watermark

* deleted superflous files

* adapted packaging of reader to incorporat the static dir containing the logo

* tests for intra_annual_temp_windows

* added tests to test_utils and made sure they run first

* started test_netcdf_transcription.py

* fixed test_logo_exists

* fixing test_keep_pytesmo_ncfile

* tests for netcdf_transcription

* finished test development for intra annual metrics and adapation of existing tests

* Update environment.yml (#81)

* Update environment.yml

checking if defining pyscaffold in the env helps fixing the problem with failing tests

* Update CI and dependency list

* Update env

* Update CI

* Update env

* Update CI

---------



* added test to check intra-annual metric related plots and proper file transcription

* fixed tests/test_netcdf_transcription.py::test_correct_file_transcription

* fixed tests/test_netcdf_transcription.py::test_correct_file_transcription

* fixed windows test failing

* fixed mamba workflow issue

* bug fix for  obtaining amount of chars from Path object

---------

Co-authored-by: Nicolas F. Bader <[email protected]>
Co-authored-by: Monika Tercjak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants