MESH-Model / MESH-Dev

This repository contains the official MESH development code, which is the basis for the 'tags' listed under the MESH-Releases repository. The same tags are listed under this repository. Legacy branches and utilities have also been ported from the former SVN (Subversion) repository. Future developments must create 'forks' from this repository.
Other
2 stars 3 forks source link

1860 not reading vector based drainage database #6

Closed mee067 closed 8 months ago

mee067 commented 1 year ago

1860 seems to have trouble reading the drainage database of a vector-based setup. 1813 reads it fine. 1860 reports an error reading the number of GRUs and thus assumes there is 1 which is not compatible with the CLASS.ini file causing it to exit.

2005-2015 MESH 1.4 --- (1858)

READING: MESH_input_run_options.ini READING: MESH_drainage_database.nc ERROR: An error occurred reading information about the 'calendar' attribute (Code: -43). WARNING: The reference calendar for the 'time' variable is not set or is not equal to 'gregorian' or 'standard'. Errors may occur with deriving time-stamps from the file. ERROR: The dimension 'GRU' was not found (Code: -46). WARNING: The variable 'LandUse' is an unknown or unsupported data format (Code: 1). 22 valid fields found in the file. REMARK: The number of river classes is adjusted to the maximum 'IAK' or 'IRVR' value. Consider adjusting the input files. REMARK: At least one GRU (land cover) is required when tile-processing (HLSS) is enabled. The number of GRUs is not defined or the 'GRU' or 'LandCover' map is missing in the file. Assuming one active GRU. REMARK: No drainage area 'DA' variable found. Accumulating areas from surface area 'GridArea' by flow direction 'Next'. REMARK: No 'Bankfull' variable found. Setting the background field to zero. REMARK: No 'Chnl' or 'ICHNL' variable found. Assuming a single channel class. Total number of grids: 6055 Total number of grids inside the basin: 6054 Side length of grid: 1.00000000000000 m Number of GRUs: 1 Number of land-based tiles: 6055 Number of river classes: 7 READING: MESH_input_soil_levels.txt Number of soil layers: 4 READING: MESH_parameters_CLASS.ini ERROR: The number of GRUs does not match the drainage database. Drainage database: 1 MESH_parameters_CLASS.ini: 12 READING: MESH_parameters_hydrology.ini

ERROR: Errors occurred during initialization. Abnormal exit.

mee067 commented 1 year ago

turns out that 1860 needs the dim to be named "GRU" in capital letters while it was named 'gru' (as per the wiki). 1813 did not care whether it is capital or small. Having such flexibility is advisable. As "GRU" was used for the landcover fractions variable itself, I had to use 'NGRU' for the dim.

dprincz commented 1 year ago

I thought this code shouldn't care, unless there are changes still required in pending updates.. I would have to check. The supported dimension names are in this file: Modules/io_modules/mesh_io_constants.f90.