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

Parameter(s) missing in mapping file: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] #289

Closed
2 tasks done
shartgring opened this issue Sep 11, 2024 · 0 comments · Fixed by #290
Closed
2 tasks done

Parameter(s) missing in mapping file: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] #289

shartgring opened this issue Sep 11, 2024 · 0 comments · Fixed by #290
Assignees
Labels
bug Something isn't working workflows Issue linked to the workflows

Comments

@shartgring
Copy link
Collaborator

HydroMT-Wflow version checks

  • I have checked that this issue has not already been reported.
  • I have checked that this bug exists on the latest version of HydroMT-Wflow.

Reproducible Example

Using setup_laimaps_from_lulc_mapping gives following error:

2024-09-11 11:05:23,876 - update - log - DEBUG - Writing log messages to new file C:\SnapVolumesTemp\MountPoints\{45c63495-0000-0000-0000-100000000000}\{db1e65df-ac0c-4981-bb4b-9ce5f13a76f2}\SVROOT\Users\USER\MODEL\ModelLandUseChange\ModelUrbanOnly\hydromt.log.
2024-09-11 11:05:23,876 - update - log - INFO - HydroMT version: 0.9.4
2024-09-11 11:05:23,876 - update - main - INFO - Updating wflow model at C:\SnapVolumesTemp\MountPoints\{45c63495-0000-0000-0000-100000000000}\{db1e65df-ac0c-4981-bb4b-9ce5f13a76f2}\SVROOT\Users\USER\MODEL\FinalModel2016 (r).
2024-09-11 11:05:23,877 - update - main - INFO - Output dir: C:\SnapVolumesTemp\MountPoints\{45c63495-0000-0000-0000-100000000000}\{db1e65df-ac0c-4981-bb4b-9ce5f13a76f2}\SVROOT\Users\USER\MODEL\ModelLandUseChange\ModelUrbanOnly
2024-09-11 11:05:23,878 - update - main - INFO - User settings:
2024-09-11 11:05:24,033 - update - data_catalog - INFO - Reading data catalog deltares_data v2024.1.30
2024-09-11 11:05:24,033 - update - data_catalog - INFO - Parsing data catalog from
https://raw.githubusercontent.com/Deltares/hydromt/50863d777404a4a91b5f66bf285b3edaa56713b1/data/catalogs/deltares_data.yml
2024-09-11 11:05:24,439 - update - data_catalog - INFO - Parsing data catalog from C:/Users/USER/HydroMT_Vecht/DataCatalog.yml
2024-09-11 11:05:25,064 - update - log - DEBUG - Appending log messages to file C:\SnapVolumesTemp\MountPoints\{45c63495-0000-0000-0000-100000000000}\{db1e65df-ac0c-4981-bb4b-9ce5f13a76f2}\SVROOT\Users\USER\MODEL\ModelLandUseChange\ModelUrbanOnly\hydromt.log.
2024-09-11 11:05:25,074 - update - model_api - INFO - setup_lulcmaps.lulc_fn: LandUseUrbanOnly
2024-09-11 11:05:25,074 - update - model_api - INFO - setup_lulcmaps.lulc_mapping_fn: corine_mapping_default
2024-09-11 11:05:25,075 - update - model_api - INFO - setup_lulcmaps.lulc_vars: {'landuse': None, 'Kext': 'input.vertical.kext', 'N': 'input.lateral.land.n', 'PathFrac': 'input.vertical.pathfrac', 'RootingDepth': 'input.vertical.rootingdepth', 'Sl': 'input.vertical.specific_leaf', 'Swood': 'input.vertical.storage_wood', 'WaterFrac': 'input.vertical.waterfrac', 'alpha_h1': 'input.vertical.alpha_h1'}
2024-09-11 11:05:25,080 - update - wflow - INFO - Preparing LULC parameter maps.
2024-09-11 11:05:25,100 - update - rasterdataset - INFO - Reading LandUseUrbanOnly netcdf data from C:\Users\USER\MODEL\MapsNbs\LandUseUrbanOnly111.nc
2024-09-11 11:05:25,127 - update - rasterdataset - DEBUG - Clip to [6.201, 51.967, 7.458, 52.877] (epsg:4326))
2024-09-11 11:05:25,129 - update - dataframe - INFO - Reading corine_mapping_default csv data from C:\Users\USER\AppData\Local\miniforge3\envs\hydromt-wflow\Lib\site-packages\hydromt_wflow\data\lulc\corine_mapping.csv
2024-09-11 11:05:27,088 - update - landuse - INFO - Deriving landuse using nearest resampling (nodata=999).
2024-09-11 11:05:27,263 - update - landuse - INFO - Deriving Kext using average resampling (nodata=-999.0).
2024-09-11 11:05:27,441 - update - landuse - INFO - Deriving N using average resampling (nodata=-999.0).
2024-09-11 11:05:27,615 - update - landuse - INFO - Deriving PathFrac using average resampling (nodata=-999.0).
2024-09-11 11:05:27,784 - update - landuse - INFO - Deriving RootingDepth using average resampling (nodata=-999.0).
2024-09-11 11:05:27,953 - update - landuse - INFO - Deriving Sl using average resampling (nodata=-999.0).
2024-09-11 11:05:28,124 - update - landuse - INFO - Deriving Swood using average resampling (nodata=-999.0).
2024-09-11 11:05:28,296 - update - landuse - INFO - Deriving WaterFrac using average resampling (nodata=-999.0).
2024-09-11 11:05:28,466 - update - landuse - INFO - Deriving alpha_h1 using mode resampling (nodata=-999).
2024-09-11 11:05:28,655 - update - model_api - INFO - setup_laimaps_from_lulc_mapping.lulc_fn: LandUseUrbanOnly
2024-09-11 11:05:28,655 - update - model_api - INFO - setup_laimaps_from_lulc_mapping.lai_mapping_fn: C:\Users\USER\MODEL\FinalModel2016\lai_per_lulc_corine.csv
2024-09-11 11:05:28,656 - update - wflow - INFO - Preparing LAI maps from LULC data using LULC-LAI mapping table.
2024-09-11 11:05:28,666 - update - rasterdataset - INFO - Reading LandUseUrbanOnly netcdf data from C:\Users\USER\MODEL\MapsNbs\LandUseUrbanOnly111.nc
2024-09-11 11:05:28,685 - update - rasterdataset - DEBUG - Clip to [6.201, 51.967, 7.458, 52.877] (epsg:4326))
2024-09-11 11:05:28,687 - update - dataframe - INFO - Reading  csv data from C:\Users\USER\MODEL\FinalModel2016\lai_per_lulc_corine.csv
2024-09-11 11:05:28,696 - update - main - ERROR - Parameter(s) missing in mapping file: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]


### Current behaviour

Reading the mapping table as csv file results in the columns being read as strings, while the workflow looks for integers

### Desired behaviour

Convert strings to integers in workflow

### Additional context

_No response_
@shartgring shartgring added bug Something isn't working needs refinement issue still needs refinement labels Sep 11, 2024
@shartgring shartgring self-assigned this Sep 11, 2024
@shartgring shartgring added workflows Issue linked to the workflows and removed needs refinement issue still needs refinement labels Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working workflows Issue linked to the workflows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant