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

Development updates #139

Merged
merged 37 commits into from
Jun 24, 2024
Merged

Development updates #139

merged 37 commits into from
Jun 24, 2024

Conversation

mikhailsmilovic
Copy link
Collaborator

No description provided.

mikhailsmilovic and others added 30 commits January 30, 2024 16:10
Update zonal abstractions to restrict channel zonal to potential surface water abstractions.

Lift abstractions and allocations corrected similar to the zonal abstractions.
Watercycle updates related to zonal and lift corrections
…r_1979.nc pr_1980.nc. A "else" in line 909 somehow got lost.
Crops are planted in the remaining available space, even if the space demand exceeds the available land. Previously, if the demand was greater than availability, the demand was discarded. Now, the demand is not discarded but plants up to the remaining available land.
reading land cover year in case static land is used for other land classes
Glaciers with static land cover
Waterbody buffers are no longer also used as command areas -- if no command area is given, command areas are set to zero. Abstractions from within waterbody buffers happen before abstractions from within command areas.
If the crop inputs are given in days, we pre-calculate the annual cycle of crop coefficients following the standard FAO/AEZ crop coefficient timeseries of flat - linear increase - flat - linear decrease
Start including daily crop coefficients
variables
- evapotranspiration
- ratio actual/potential

land planting potentially updating daily
cwatm_initial.py: a evaporation initial is included: loads 12 maps of kc factors and 12 maps for interception for each vegetation
Interception+ evaporation: major change: instead of reading maps every 10 days - 12 maps are loaded in the initial part for evaporation kc-crops in terception and daily kc and interception is interpolated from monthly values
soil: remove reading dz_rel (relative elevation) and put it into snow_frost.py
readmeteo: possibility to use radiation for snow with EMO1 maps
snow_frost: instead normal distribution for elevation it is using now 5 layers of dz_rel. Possibility to use lasperate maps, to use radiation also with EMO1 meteo maps
capillarrise.py: changed coding of capillar rise to make it shorter (old code is still in but outcommented)
Groundwater: put self.var.nonFossilGroundwaterAbs = globals.inZero in last line in initial
Timestep.ini: added a 30 day counter
datahandling: added reading12monthnetcdf. Changed init file reading - no smaller parts of a init file could be read in i.e only the Danube from global init file
to use self.var.cropKC also in irrigation.py
remove initialization out of the loop
Although using a convolute of different spatial extent and then correcting this in CWatM is prone to errors, I hope this additional line could help prevent unnoticed errors when using NC inputs that have different spatial extents.
add option maps_cut_individually
Instead of the pcraster tss default out put for timeseries is now a .csv format with real date
If you want to use th old output OPTION: reportOldTss = False
- Changed unit for netcdf for month and year. Pandas does not recognize "Month since ...".  So instead of month it is ""Day since ..." with the first day of a month (or year)
- Removed from OPTION: (now default)
 writeNetcdfStack = True, reportMap = True, reportTss = True
- save netcdf only the valid cells in Option (faster save and load for split global run)
netcdfasindex = True

- If GitPython is installed as a library - the git version is recorded in .nc and .csv
- Snow: Snowcover fraction of each cell can be output: SnowFraction

- Bugfix: totalET_WB (total act evapotrans + evapo from rivers and lakes/res) was wrongly computed) , now fixed (hopefully)
- EvapoChannel  was in unit [m3] before-> now changed to [m] (as all the other evaporation terms)
- EvapWaterBodyM is now the evaporation of a lake/reservoir for each gridcell (before it was the summed up evaporation of a lake at the outlet point)
Update landcoverType.py and data_handling.py
Instead of the last day of a period, the first day of a period is taken e.g. 1/2/2023 instead of 28/2/2023

Bugfix for EvapWaterBodyM and totalET_WB. EvapWaterBodyM had some missing values, because in same cases the fraction of water = 0 but it the cell is classified as a lake.
Instead of the last day of a period, the first day of a period is taken e.g. 1/2/2023 instead of 28/2/2023

Bugfix for EvapWaterBodyM and totalET_WB. EvapWaterBodyM had some missing values, because in same cases the fraction of water = 0 but it the cell is classified as a lake.
…sing now first date of a period e.g. 1/2/2023 instead of 28/2/23

Bugfix: EvapWaterBodyM had some missing values. If for some reason the water fraction is 0 but the cell is assigned to a lake/res then a missing values can happen
… m3, but it should be m3/s

readmeteo/datahandling: cleaned the reading of meteomaps -> put a lot of information gathering in the initial instead of dynamic
Put it a way of asynchr loading of meteo data (but outcommented) because it is not working
Reservoir transfers are now input with 366-day schedules. The previous version of a static daily transfer has been deprecated.

Reservoir transfers, inwards or outwards, are activated when reservoir_transfers = True in the text settings file. Choose the waterbody ID of the giving and receiving reservoirs and the amount, either as a fraction of live storage (values  ≤ 1)  or in cubic metres (values > 1). Waterbody ID 0 represents the infinite outside source/sink. Outward transfers are added to industrial demand/use.

Reservoir transfers occur daily, with Giving reservoirs transferring water to associated Receiving reservoirs. The amount of water transferred is determined by the associated fraction of live storage of the Giving reservoir, and the available space in the Receiving reservoir. If the Giving reservoir ID is 0 (Representing an outside source/sink), the water amount refers to the Receiving reservoir. Reservoirs can both receive and give to several reservoirs, and transfers are executed in the order they appear in the Excel sheet.
mikhailsmilovic and others added 7 commits May 22, 2024 19:14
Puts the value of lakeResStorage into all cells covered by the waterbody

Co-Authored-By: Carlacat9 <166910508+carlacat9@users.noreply.github.com>
EvapoChannel in CWatM has bee changed to unit Metres from unit M3. This is the associated Watercycle update.
@mikhailsmilovic mikhailsmilovic merged commit 7e1b25e into main Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants