-
Notifications
You must be signed in to change notification settings - Fork 46
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
Bug in GOTM water balance? #30
Comments
Hi Xia,
thanks for reporting. Please see some first comments below.
On 1/12/22 08:50, shajar007 wrote:
When using GOTM with lake support version 5.4.0 , it is possible to
set parameters so that GOTM will calculate lake level. The parameters
are water_balance_method = 3 and zeta_method=3.
I guess these parameters are rarely used because many lakes have
constant lake level. However, at least in lake Kinneret, calculating
lake level is important. By calculating daily water balance out of the
GOTM output file it can be shown that GOTM fails to calculate lake
level correctly when using these parameters. If lake level is supplied
to the model externally using parameters: water_balance_method = 2,
zeta_method=2, GOTM calculates the water balance correctly using a
residual stream.
Water balance calculation:
Daily water balance = Inflow + (evaporation + precipitation) *
surface_area + Residual_stream – Δ_lake_level * surface_area.
Where the variables are from the GOTM output.nc file:
Inflow=Qlayer [m3/s] * 86400
Evaporation = evap [m/s] * 86400
Precipitation = percip [m/s] * 86400
surface_area = Af [m2]
Residual_stream = Qres [m3/s] * 86400
Δ_lake_level = number of layers * (h(t) - h(t-1)) [m/day].
(86400 is converting seconds into a day)
Daily water balance should be zero.
When calculating the water balance with parameters
(water_balance_method = 2, zeta_method=2) the daily water balance is
exactly zero when there is no change in lake level, and around zero
when there is lake level change. This suggests that changes in lake
volume is calculated different than Δ_lake_level * surface_area –
maybe it is calculated hourly where I use the output file which is
daily – resulting in a small difference. The daily balance is +/- 400
m3/day in my lake Kinneret model.
Your formula above does not consider the time-dependent surface_area.
Maybe you want to try to calculate the time-dependent lake volume as the
sum of the layer volumes. To do so please try registering Vc for output:
+++ b/src/gotm/register_all_variables.F90
@@ -354,6 +354,7 @@
call fm%register('ga', '', 'coordinate scaling',
standard_name='??', dimensions=(/id_dim_z/),
data1d=ga(1:nlev),category='column_structure')
if (lake) then
call fm%register('Af', 'm^2', 'hypsograph at grid interfaces',
standard_name='??', dimensions=(/id_dim_z/), data1d=Af(1:nlev),
category='column_structure')
+ call fm%register('Vc', 'm^3', 'volume of layers',
standard_name='??', dimensions=(/id_dim_z/), data1d=Vc(1:nlev),
category='column_structure')
call fm%register('int_flow', 'm3', 'stream: integrated',
data0d=int_flows, category='meanflow/waterbalance')
call fm%register('int_water_balance', 'm3', 'integrated total
water balance', data0d=int_water_balance, category='meanflow/waterbalance')
else
When calculating the water balance with parameters
(water_balance_method = 3, zeta_method=3) the daily water balance is
off by +/- 2*10^6 m3/day ! The water balance is obviously off with
these parameters resulting in the inability to calculate lake level.
based on your inflow and net_precip data between two instants of time,
can you diagnose whether the change of model sea level is completely
wrong (sign or orders of magnitude)?
Apart from that: is the model sea level always below your uppermost
input hypsography level?
Cheers, Knut
… This issue can probably be reproduced with any lake model with these
water balance parameters. Attached is an R code to calculate water
balance, assuming output is daily.
Am I missing a parameter? Thanks
GOTM_water_balance.zip
<https://github.com/gotm-model/code/files/7852543/GOTM_water_balance.zip>
—
Reply to this email directly, view it on GitHub
<#30>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2RV6UFANW7IUH36F7DAZLUVUXFXANCNFSM5LYIS7QQ>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this
thread.Message ID: ***@***.***>
|
Hi Knut, |
Update |
Hi Shajar, |
Hmmm. I'll reinspect and update accordingly. |
I rechecked my calculations according to Tobias comment, I think my calculations are correct. |
Hi @knutaros , @TobiasKAndersen
|
When using GOTM with lake support version 5.4.0 , it is possible to set parameters so that GOTM will calculate lake level. The parameters are water_balance_method = 3 and zeta_method=3.
I guess these parameters are rarely used because many lakes have constant lake level. However, at least in lake Kinneret, calculating lake level is important. By calculating daily water balance out of the GOTM output file it can be shown that GOTM fails to calculate lake level correctly when using these parameters. If lake level is supplied to the model externally using parameters: water_balance_method = 2, zeta_method=2, GOTM calculates the water balance correctly using a residual stream.
Water balance calculation:
Daily water balance = Inflow + (evaporation + precipitation) * surface_area + Residual_stream – Δ_lake_level * surface_area.
Where the variables are from the GOTM output.nc file:
Inflow=Qlayer [m3/s] * 86400
Evaporation = evap [m/s] * 86400
Precipitation = percip [m/s] * 86400
surface_area = Af [m2]
Residual_stream = Qres [m3/s] * 86400
Δ_lake_level = number of layers * (h(t) - h(t-1)) [m/day].
(86400 is converting seconds into a day)
Daily water balance should be zero.
When calculating the water balance with parameters (water_balance_method = 2, zeta_method=2) the daily water balance is exactly zero when there is no change in lake level, and around zero when there is lake level change. This suggests that changes in lake volume is calculated different than Δ_lake_level * surface_area – maybe it is calculated hourly where I use the output file which is daily – resulting in a small difference. The daily balance is +/- 400 m3/day in my lake Kinneret model.
When calculating the water balance with parameters (water_balance_method = 3, zeta_method=3) the daily water balance is off by +/- 2*10^6 m3/day ! The water balance is obviously off with these parameters resulting in the inability to calculate lake level.
This issue can probably be reproduced with any lake model with these water balance parameters. Attached is an R code to calculate water balance, assuming output is daily.
Am I missing a parameter? Thanks
GOTM_water_balance.zip
The text was updated successfully, but these errors were encountered: