ec-jrc / lisflood-code

Lisflood OS - LISFLOOD
https://ec-jrc.github.io/lisflood
European Union Public License 1.2
118 stars 47 forks source link

Wrong calendar type #155

Closed Ivanleeg closed 2 months ago

Ivanleeg commented 4 months ago

Hello, For a hydrological study of the Dutch/ German Vecht catchment I want to use the LISFLOOD OS model. Currently I am trying to run the usecases using the Docker image as this is recommended when operating on a Windows system. When running the second usecase I get a warning about the calendar type and when I compare the dis.tss file with the dis_reference_LF_ETRS89.tss file I see that they are differing from each other.

The full running code from command prompt and a preview of the dis.tss output are added below.

I was hoping someone can give some advise!

Thanks in advance, Ivan


C:\Users\leegwate>docker pull jrce1/lisflood Using default tag: latest latest: Pulling from jrce1/lisflood Digest: sha256:9ffbae49c9493258724252c3f011f62d55fc2a4266f4c537cc6785e831bca789 Status: Image is up to date for jrce1/lisflood:latest docker.io/jrce1/lisflood:latest

What's Next? View a summary of image vulnerabilities and recommendations → docker scout quickview jrce1/lisflood

C:\Users\leegwate>docker run -v C:/Users/leegwate/LISFLOOD:/usecases jrce1/lisflood:latest usecases Copying test catchments to /usecases/...

C:\Users\leegwate>docker run -v C:/Users/leegwate/LISFLOOD/LF_ETRS89_UseCase:/input jrce1/lisflood /input/settings/cold.xml LisfloodPy 4.3.1 23/01/2024

Water balance and flood simulation model for large catchments

(C) Institute for Environment and Sustainability Joint Research Centre of the European Commission TP122, I-21020 Ispra (Va), Italy

WARNING! Wrong calendar type in dataset /input/settings/../meteo/et.nc, is "standard" and should be "proleptic_gregorian" Please double check your forcing datasets and update them to use the correct calendar type WARNING! Wrong calendar type in dataset /input/settings/../meteo/e0.nc, is "standard" and should be "proleptic_gregorian" Please double check your forcing datasets and update them to use the correct calendar type Warning! Output map /input/settings/../out/lz is duplicated, check list of outputs Warning! Output map /input/settings/../out/thfa is duplicated, check list of outputs Warning! Output map /input/settings/../out/thia is duplicated, check list of outputs Warning! Output map /input/settings/../out/tha is duplicated, check list of outputs Warning! Output map /input/settings/../out/thfb is duplicated, check list of outputs Warning! Output map /input/settings/../out/thib is duplicated, check list of outputs Warning! Output map /input/settings/../out/thb is duplicated, check list of outputs Warning! Output map /input/settings/../out/thfc is duplicated, check list of outputs Warning! Output map /input/settings/../out/thic is duplicated, check list of outputs Warning! Output map /input/settings/../out/thc is duplicated, check list of outputs Warning! Output map /input/settings/../out/uzf is duplicated, check list of outputs Warning! Output map /input/settings/../out/uz is duplicated, check list of outputs

========================== LISFLOOD Simulation Information and Setting ============================= [X] LISFLOOD is used in the Deterministic [X] The simulation output as specified in the settings file can be found in /input/settings/../out [X] Activated modules: SplitRouting,TransientWaterDemandChange,drainedIrrigation,nonInit,openwaterevapo,riceIrrigation,simulateLakes,simulateReservoirs,useWaterDemandAveYear,wateruse,wateruseRegion [X] Report options: repDischargeMaps,repDischargeTs,repGwPercUZLZMaps,repLZMaps,repMeteoUpsGauges,repPFMaps,repRWS,repRainMaps,repRateUpsGauges,repSnowCoverMaps,repSnowMaps,repSnowMeltMaps,repStateMaps,repStateUpsGauges,repSurfaceRunoffMaps,repThetaForestMaps,repThetaMaps,repUZMaps,repWaterDepthMaps,reportedmaps,repsimulateLakes,repsimulateReservoirs,repPFForestMaps

Start Step - End Step: 9496 - 9860 Start Date - End Date: 2016-01-01 06:00:00 - 2016-12-30 06:00:00 9860 - 30/12/2016 06:00


PREVIEW OF OUTPUT dis.tss file

timeseries valuescale.scalar settingsfile: /input/settings/cold.xml date: Tue May 21 11:30:48 2024 31 timestep 334 380 390 393 394 395 396 398 399 410 428 443 454 834 952 2787 2788 2789 2790 2791 2822 2823 2824 2825 2826 2827 2828 2829 2830 2910 9496 20.3127 1.52428 3.05317 429.019 2.18528 0.972849 2.68391 384.174 443.992 7.09031 10.5024 0.962072 2.91459 440.559 2.37094 20.9351 15.5782 17.7467 341.695 445.82 7.65666 31.5669 8.63202 15.4844 7.88133 159.651 60.6952 31.7233 6.35015 3.64063 9497 16.7948 0.322762 1.32944 499.51 1.15367 0.204064 1.92593 362.485 454.057 4.87033 2.91703 0.235631 1.60123 459.798 1.30927 19.4771 11.7333 14.8856 359.505 491.858 5.2877 15.2706 1.78442 7.11812 4.63319 179.908 29.2017 7.33947 8.38811 1.32546 9498 16.6803 0.158709 1.00396 539.165 1.03254 0.649634 1.24789 361.381 478.704 3.12095 1.29813 0.166489 1.11797 482.766 0.757188 18.1318 9.96929 14.4728 337.876 503.3 5.20896 8.3737 0.787763 4.59831 3.46423 135.087 25.7967 4.97901 8.45352 0.575255 9499 17.3165 0.137542 0.936711 560.572 1.17882 2.59151 1.20617 328.782 438.389 2.50889 0.848239 0.158819 0.980701 467.47 0.589663 17.7931 9.58485 15.3113 303.301 514.851 5.42527 6.76546 0.583115 3.79019 3.1713 107.889 24.9741 5.4201 9.0813 0.349635 9500 17.2529 0.148872 0.913113 551.008 1.5046 3.3622 3.07923 327.78 426.361 2.43157 1.05067 0.157577 1.08383 437.308 0.543318 17.6709 10.4612 17.1353 295.989 477.733 5.31242 6.64134 0.52759 3.57734 3.11324 100.169 24.7941 6.58791 9.90685 0.26694

doc78 commented 4 months ago

Dear @Ivanleeg if you want to compare your results with dis_reference_LF_ETRS89.tss in lisflood-usecase repository you should follow the steps of the lisflood-usecases README file, thus you have to run settings_ETRS89-PreRun.xml and then settings_ETRS89-Run.xml. After running these two xml file you should get the correct dis.tss file that matches the values of the dis_reference_LF_ETRS89.tss file. To run the settings_ETRS89-PreRun.xml and settings_ETRS89-Run.xml using docker, you should clone the lisflood-usecases repository, e.g.:

cd C:/Users/leegwate/LISFLOOD git clone https://github.com/ec-jrc/lisflood-usecases.git

then run the following docker commands

docker run -v C:/Users/leegwate/LISFLOOD/lisflood-usecases/LF_ETRS89_UseCase:/input jrce1/lisflood /input/settings_ETRS89-PreRun.xml

docker run -v C:/Users/leegwate/LISFLOOD/lisflood-usecases/LF_ETRS89_UseCase:/input jrce1/lisflood /input/settings_ETRS89-Run.xml

The resulting dis.tss file will be written in C:/Users/leegwate/LISFLOOD/lisflood-usecases/LF_ETRS89_UseCase/out Please try it and let me know if the files are correct. You can ignore the warning on the calendar type

Cheers Carlo

Ivanleeg commented 4 months ago

Dear @doc78, thanks for your help! I followed the steps and the ETRS89 usecase now gives correct results in the dis.tss file.

In addition I have a question regarding preparation of a settings file for my research. Is it best to use the file provided here: https://github.com/ec-jrc/lisflood-code/blob/master/src/lisfloodSettings_reference.xml Because in the lisflood-usecases/LF_lat_lon_UseCase folder two settings files are also provided: lisfloodSettings_reference_PreRun.xml lisfloodSettings_reference_Run.xml

I also tried to run the first usecase (settings_lat_lon-PreRun.xml) but this resulted in the following:


C:\Users\leegwate>cd C:/Users/leegwate/LISFLOOD

C:\Users\leegwate\LISFLOOD>docker run -v C:/Users/leegwate/LISFLOOD/lisflood-usecases/LF_lat_lon_UseCase:/input jrce1/lisflood /input/settings_lat_lon-PreRun.xml ERROR conda.cli.main_run:execute(33): Subprocess for 'conda run ['python', '/lisf1.py', '/input/settings_lat_lon-PreRun.xml']' command failed. (See above for error) LisfloodPy 4.3.1 23/01/2024

Water balance and flood simulation model for large catchments

(C) Institute for Environment and Sustainability Joint Research Centre of the European Commission TP122, I-21020 Ispra (Va), Italy

========================== LISFLOOD Simulation Information and Setting ============================= [X] LISFLOOD is used in the Deterministic [X] INITIALISATION RUN [X] The simulation output as specified in the settings file can be found in /input/out [X] Activated modules: InitLisflood,SplitRouting,drainedIrrigation,gridSizeUserDefined,inflow,openwaterevapo,riceIrrigation,simulateLakes,simulateReservoirs,wateruse,wateruseRegion [X] Report options: repDischargeTs,reportedmaps

Start Step - End Step: 1 - 11688 Start Date - End Date: 1986-01-02 00:00:00 - 2018-01-01 00:00:00 735Traceback (most recent call last): File "/lisf1.py", line 34, in sys.exit(main()) File "/lisflood/main.py", line 226, in main lisfloodexe(lissettings) File "/lisflood/main.py", line 157, in lisfloodexe model_to_run.run() File "/lisflood/global_modules/zusatz.py", line 147, in run self._runDynamic() File "/opt/conda/envs/lisflood/lib/python3.7/site-packages/pcraster/framework/frameworkBase.py", line 371, in _runDynamic self._userModel().dynamic() File "/lisflood/Lisflood_dynamic.py", line 248, in dynamic self.output_module.dynamic() File "/lisflood/global_modules/output.py", line 581, in dynamic self.output_maps.write() File "/lisflood/global_modules/output.py", line 445, in write out.stage() File "/lisflood/global_modules/output.py", line 292, in stage self.writer.stage() File "/lisflood/global_modules/output.py", line 182, in stage self.data = self._extract_map() File "/lisflood/global_modules/output.py", line 57, in _extract_map what = 'self.var.' + self.map_value.output_var AttributeError: 'PCRasterWriter' object has no attribute 'map_value'

11688 - 01/01/2018 00:00


Thanks for the support. Ivan

doc78 commented 3 months ago

Dear @Ivanleeg

Sorry for the late reply. I just updated the "settings_lat_lon-PreRun.xml" and reference files to work with new Lisflood version 4.3.1. It should work now as expected. Best Regards

Carlo