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

Adjusted and improved the 'metfile_from_knmi' function and the 'Flux' object 'drainage' #67

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from

Conversation

markvdbrink
Copy link
Collaborator

The metfile_from_knmi has been changed drastically. I didn't function well, with missing variables causing SWAP crashes and incorrect units. The DAILYMETEODATA table is now used, which comes with correct validation of the table headers (#60). The field CSVTable and the serializer serialize_csv_table were deleted since it was not used by any other method. Variables retrieved from knmi are now fixed, to ensure proper formatting for SWAP (#63).

Additionally, the drainage tables are now imported and used in the drainage files (#58)

markvdbrink and others added 10 commits February 25, 2025 14:48
Changed the content data type of the MetFile from CSVTable to Table. Removed CSVTable from fields.py. Removed serialize_csv_table from serializers.py. Changed the functions metfile_from_csv and metfile_from_knmi. Added tests and test csv-files in test folder.
Because ruff was conflicting with prettier I couldnt do previous commit with passing all pre-commit hooks. In the end I committed without the hooks, but forgot this file which caused the problem (the definition of the variables list in metfile_from_knmi input).
The order of columns was not correct in the last commit, causing SWAP to crash. It is corrected now and tests are adjusted as well.
Variables can no longer be specified and only the required variables by SWAP are retrieved from knmi. Units are now properly converted. Added tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant