Skip to content

Commit bb5cab8

Browse files
committed
Cleanup of Xml files having old .map path in map keys. Updated filename check in NetCDF loadmap_base
1 parent 9d42d70 commit bb5cab8

16 files changed

+187
-187
lines changed

src/lisflood/global_modules/add1.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ def loadmap_base(name, pcr=False, lddflag=False, timestampflag='exact', averagey
404404
if not load:
405405
# read a netcdf (single one not a stack)
406406
# here we already tried to load the map as PCRaster and failed, thus try as NetCDF (with or without .nc extension)
407-
filename = value if value.lower().endswith('.nc') else value + '.nc'
407+
filename = value if value.lower().endswith('.nc') or value.lower().endswith('.map') else value + '.nc'
408408
# get mapextend of netcdf map and calculate the cutting
409409
cut0, cut1, cut2, cut3 = mapattrNetCDF(filename)
410410
# load netcdf map but only the rectangle needed

tests/data/LF_ETRS89_UseCase/settings/cold.xml

+5-5
Original file line numberDiff line numberDiff line change
@@ -4558,7 +4558,7 @@ LFBINDING: MORE LOW-LEVEL CONTROL OVER MODEL IN- AND OUTPUT
45584558

45594559
<textvar name="DirectRunoffFraction" value="$(PathMapsLanduse)/fracsealed">
45604560
<comment>
4561-
$(PathMapsLanduse)/fracsealed.map
4561+
$(PathMapsLanduse)/fracsealed
45624562
urban area (0-1)
45634563
</comment>
45644564
</textvar>
@@ -4571,7 +4571,7 @@ LFBINDING: MORE LOW-LEVEL CONTROL OVER MODEL IN- AND OUTPUT
45714571

45724572
<textvar name="ForestFraction" value="$(PathMapsLanduse)/fracforest">
45734573
<comment>
4574-
$(PathMapsLanduse)/fracforest.map
4574+
$(PathMapsLanduse)/fracforest
45754575
forest fraction of a pixel (0-1)
45764576
</comment>
45774577
</textvar>
@@ -4585,7 +4585,7 @@ LFBINDING: MORE LOW-LEVEL CONTROL OVER MODEL IN- AND OUTPUT
45854585

45864586
<textvar name="WaterFraction" value="$(PathMapsLanduse)/fracwater">
45874587
<comment>
4588-
$(PathMapsLanduse)/fracwater.map
4588+
$(PathMapsLanduse)/fracwater
45894589
forest fraction of a pixel (0-1)
45904590
</comment>
45914591
</textvar>
@@ -4599,7 +4599,7 @@ LFBINDING: MORE LOW-LEVEL CONTROL OVER MODEL IN- AND OUTPUT
45994599

46004600
<textvar name="OtherFraction" value="$(PathMapsLanduse)/fracother">
46014601
<comment>
4602-
$(PathMapsLanduse)/fracother.map
4602+
$(PathMapsLanduse)/fracother
46034603
forest fraction of a pixel (0-1)
46044604
</comment>
46054605
</textvar>
@@ -4613,7 +4613,7 @@ LFBINDING: MORE LOW-LEVEL CONTROL OVER MODEL IN- AND OUTPUT
46134613

46144614
<textvar name="IrrigationFraction" value="$(PathMapsLanduse)/fracirrigated">
46154615
<comment>
4616-
$(PathMapsLanduse)/fracirrigated.map
4616+
$(PathMapsLanduse)/fracirrigated
46174617
irrigated area fraction of a pixel (0-1)
46184618
</comment>
46194619
</textvar>

0 commit comments

Comments
 (0)