Skip to content

Commit

Permalink
Merge branch 'release_5.11.1' into 'master'
Browse files Browse the repository at this point in the history
Release 5.11.1

See merge request mhm/mhm!69
  • Loading branch information
MuellerSeb committed Mar 3, 2021
2 parents ca6ce86 + 3b71dc7 commit 6f6e14f
Show file tree
Hide file tree
Showing 20 changed files with 791 additions and 765 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# The mesoscale Hydrological Model -- mHM

- The current release is **[mHM v5.10][1]**.
- The latest mHM release notes can be found in the file [RELEASES][3] or [online][4].
- The latest mHM release can be found [here][0].
- The changelog can be found in the file [RELEASES][3].
- General information can be found on the [mHM website](http://www.ufz.de/mhm/).
- The mHM comes with a [LICENSE][6] agreement, this includes also the GNU Lesser General Public License.
- There is a list of [publications using mHM][7].
Expand Down Expand Up @@ -42,7 +42,7 @@ See also the [documentation][5] for detailed instructions to setup mHM.
2. Run mHM on the test domains with the command `./mhm`, which uses settings from [mhm.nml](mhm.nml).
3. Explore the results in the [output directory](test_domain/), e.g. by using the NetCDF viewer `ncview`.


[0]: https://git.ufz.de/mhm/mhm/-/releases
[1]: https://git.ufz.de/mhm/mhm/tree/5.10
[3]: doc/RELEASES.md
[4]: https://git.ufz.de/mhm/mhm/tags/
Expand Down
2 changes: 1 addition & 1 deletion check/case_10/output_save/ConfigFile.log
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------------
mHM-UFZ v-5.10
mHM-UFZ v-5.11.1-dev0
L. Samaniego & R. Kumar, UFZ
--------------------------------------------------------------------------------

Expand Down
730 changes: 365 additions & 365 deletions check/case_10/output_save/b1_daily_discharge.out

Large diffs are not rendered by default.

Binary file modified check/case_10/output_save/b1_discharge.nc
Binary file not shown.
Binary file modified check/case_10/output_save/b1_mHM_Fluxes_States.nc
Binary file not shown.
Binary file modified check/case_10/output_save/b1_mHM_restart_001.nc
Binary file not shown.
Binary file modified check/case_10/output_save/b1_mRM_Fluxes_States.nc
Binary file not shown.
Binary file modified check/case_10/output_save/b1_mRM_restart_001.nc
Binary file not shown.
2 changes: 1 addition & 1 deletion check/case_12/output_save/ConfigFile.log
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------------
mHM-UFZ v-5.10
mHM-UFZ v-5.11.1-dev0
L. Samaniego & R. Kumar, UFZ
--------------------------------------------------------------------------------

Expand Down
730 changes: 365 additions & 365 deletions check/case_12/output_save/b1_daily_discharge.out

Large diffs are not rendered by default.

Binary file modified check/case_12/output_save/b1_discharge.nc
Binary file not shown.
Binary file modified check/case_12/output_save/b1_mHM_Fluxes_States.nc
Binary file not shown.
Binary file modified check/case_12/output_save/b1_mHM_restart_001.nc
Binary file not shown.
Binary file modified check/case_12/output_save/b1_mRM_Fluxes_States.nc
Binary file not shown.
Binary file modified check/case_12/output_save/b1_mRM_restart_001.nc
Binary file not shown.
12 changes: 10 additions & 2 deletions doc/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,16 @@ Some cygwin versions create a new home directory for you. You may check e.g. her
C:\cygwin64\home\$username

As from December 2019, step-by-step guidelines, how to install all netCDF dependencies
can be viewed in [this youtube video](https://www.youtube.com/watch?v=G0i7eDEIfPA&list=PLaT_WNTBfPhK2UT0wkmJR5luEoc9qhbFf)
created by Cüneyd Demirel (Istanbul Technical University).
can be viewed in [this youtube video](https://youtu.be/G0i7eDEIfPA)
created by Mehmet Cüneyd Demirel (Istanbul Technical University).

To avoid memory issues, allocate stack memory during cmake

cmake -DCMAKE_Fortran_FLAGS="-Wl,--stack,12485760" ..

Memory dump is a common issue for cygwin users when compiling with OpenMP. For memory allocation please use this line below.

....cmake -DCMAKE_Fortran_FLAGS="${CMAKE_Fortran_FLAGS} -Wl,--stack,12485760" -DCMAKE_WITH_OpenMP:STRING=ON -DCMAKE_BUILD_TYPE=Release ..

### Ubuntu, Mint and other apt-get based systems with matching repositories

Expand Down
11 changes: 11 additions & 0 deletions doc/RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# mHM Release Notes

## mHM v5.11.1 (Mar 2021)

### Enhancements

- added compile information for cygwin (!68)

### Bugfixes

- removed note about mHM 5.10 from the README
- smhorizon: tmp_rootfraccoef was corrected directly if it is not between 0 and 1, but actually FCnorm should always be between 0 and 1 (!67)

## mHM v5.11 (Feb 2021)

### Experimental Features
Expand Down
59 changes: 33 additions & 26 deletions src/MPR/mo_mpr_smhorizons.f90
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ module mo_mpr_SMhorizons
! M. Cuneyd Demirel, Simon Stisen Apr 2017 - added FC dependency on root fraction coefficient
! Robert Schweppe Jun 2018 - refactoring and reformatting
! M. Cuneyd Demirel, Simon Stisen Jun 2020 - added Feddes and FC dependency on root fraction coefficient processCase(3) = 4
! M. Cuneyd Demirel, Simon Stisen Feb 2021 - Bug fix normalization of FCnorm

subroutine mpr_SMhorizons(param, processMatrix, iFlag_soil, nHorizons_mHM, HorizonDepth, LCOVER0, soilID0, nHorizons, &
nTillHorizons, thetaS_till, thetaFC_till, thetaPW_till, thetaS, thetaFC, thetaPW, Wd, Db, &
Expand Down Expand Up @@ -295,6 +296,7 @@ subroutine mpr_SMhorizons(param, processMatrix, iFlag_soil, nHorizons_mHM, Horiz

real(dp) :: FCmax_glob

real(dp) :: FCnorm
! the minimum number of till horizons
integer(i4) :: min_nTH

Expand Down Expand Up @@ -400,7 +402,7 @@ subroutine mpr_SMhorizons(param, processMatrix, iFlag_soil, nHorizons_mHM, Horiz


!$OMP PARALLEL
!$OMP DO PRIVATE( l, tmp_rootFractionCoefficient_perviousFC ) SCHEDULE( STATIC )
!$OMP DO PRIVATE( l, tmp_rootFractionCoefficient_perviousFC, FCnorm ) SCHEDULE( STATIC )


celllloop0 : do k = 1, size(LCOVER0, 1)
Expand Down Expand Up @@ -463,19 +465,21 @@ subroutine mpr_SMhorizons(param, processMatrix, iFlag_soil, nHorizons_mHM, Horiz
! The normalization is based on Demirel et al 2018 (doi: 10.5194/hess-22-1299-2018)
! Case 3 is based on Jarvis (doi: 10.1016/0022-1694(89)90050-4)
! Case 4 is based on Feddes (doi: 10.1016/0022-1694(76)90017-2)
tmp_rootFractionCoefficient_perviousFC = ((((FC0(k) / (dpth_t - dpth_f)) - FCmin_glob) / &
((FCmax_glob - FCmin_glob)) * tmp_rootFractionCoefficient_clay)) &
+ ((1 - ((FC0(k) / (dpth_t - dpth_f)) - FCmin_glob) / (FCmax_glob - FCmin_glob)) * &
tmp_rootFractionCoefficient_sand)

if(tmp_rootFractionCoefficient_perviousFC .lt. 0.0_dp) then
print*, "tmp_rootFractionCoefficient_perviousFC is below 0, will become 0", tmp_rootFractionCoefficient_perviousFC
tmp_rootFractionCoefficient_perviousFC=0.0_dp
else if(tmp_rootFractionCoefficient_perviousFC .gt. 1.0_dp) then
print*, "tmp_rootFractionCoefficient_perviousFC is above 1, will become 1", tmp_rootFractionCoefficient_perviousFC
tmp_rootFractionCoefficient_perviousFC=1.0_dp

FCnorm = (((FC0(k) / (dpth_t - dpth_f)) - FCmin_glob) / (FCmax_glob - FCmin_glob))

if(FCnorm .lt. 0.0_dp) then
print*, "FCnorm is below 0, will become 0", FCnorm
FCnorm=0.0_dp
else if(FCnorm .gt. 1.0_dp) then
print*, "FCnorm is above 1, will become 1", FCnorm
FCnorm=1.0_dp
end if


tmp_rootFractionCoefficient_perviousFC = (FCnorm * tmp_rootFractionCoefficient_clay) &
+ ((1 - FCnorm) * tmp_rootFractionCoefficient_sand)

fRoots0(k) = (1.0_dp - tmp_rootFractionCoefficient_perviousFC**(dpth_t * 0.1_dp)) &
- (1.0_dp - tmp_rootFractionCoefficient_perviousFC**(dpth_f * 0.1_dp))

Expand All @@ -486,7 +490,7 @@ subroutine mpr_SMhorizons(param, processMatrix, iFlag_soil, nHorizons_mHM, Horiz
if((fRoots0(k) .lt. 0.0_dp) .OR. (fRoots0(k) .gt. 1.0_dp)) then
call message('***ERROR: Fraction of roots out of range [0,1]. Cell', &
num2str(k), ' has value ', num2str(fRoots0(k)))
! stop
! stop
end if
end select

Expand Down Expand Up @@ -553,7 +557,8 @@ subroutine mpr_SMhorizons(param, processMatrix, iFlag_soil, nHorizons_mHM, Horiz


!$OMP PARALLEL
!$OMP DO PRIVATE( l, tmp_rootFractionCoefficient_perviousFC ) SCHEDULE( STATIC )
!$OMP DO PRIVATE( l, tmp_rootFractionCoefficient_perviousFC, FCnorm ) SCHEDULE( STATIC )

celllloop1 : do k = 1, size(LCOVER0, 1)
l = LCOVER0(k)
!================================================================================
Expand Down Expand Up @@ -584,19 +589,21 @@ subroutine mpr_SMhorizons(param, processMatrix, iFlag_soil, nHorizons_mHM, Horiz
! The normalization is based on Demirel et al 2018 (doi: 10.5194/hess-22-1299-2018)
! Case 3 is based on Jarvis (doi: 10.1016/0022-1694(89)90050-4)
! Case 4 is based on Feddes (doi: 10.1016/0022-1694(76)90017-2)
tmp_rootFractionCoefficient_perviousFC = ((((FC0(k) / (dpth_t - dpth_f)) - FCmin_glob) / &
((FCmax_glob - FCmin_glob)) * tmp_rootFractionCoefficient_clay)) &
+ ((1 - ((FC0(k) / (dpth_t - dpth_f)) - FCmin_glob) / (FCmax_glob - FCmin_glob)) * &
tmp_rootFractionCoefficient_sand)

if(tmp_rootFractionCoefficient_perviousFC .lt. 0.0_dp) then
print*, "tmp_rootFractionCoefficient_perviousFC is below 0, will become 0", tmp_rootFractionCoefficient_perviousFC
tmp_rootFractionCoefficient_perviousFC=0.0_dp
else if(tmp_rootFractionCoefficient_perviousFC .gt. 1.0_dp) then
print*, "tmp_rootFractionCoefficient_perviousFC is above 1, will become 1", tmp_rootFractionCoefficient_perviousFC
tmp_rootFractionCoefficient_perviousFC=1.0_dp
FCnorm = (((FC0(k) / (dpth_t - dpth_f)) - FCmin_glob) / (FCmax_glob - FCmin_glob))

if(FCnorm .lt. 0.0_dp) then
print*, "FCnorm is below 0, will become 0", FCnorm
FCnorm=0.0_dp
else if(FCnorm .gt. 1.0_dp) then
print*, "FCnorm is above 1, will become 1", FCnorm
FCnorm=1.0_dp
end if


tmp_rootFractionCoefficient_perviousFC = (FCnorm * tmp_rootFractionCoefficient_clay) &
+ ((1 - FCnorm) * tmp_rootFractionCoefficient_sand)


fRoots0(k) = (1.0_dp - tmp_rootFractionCoefficient_perviousFC**(dpth_t * 0.1_dp)) &
- (1.0_dp - tmp_rootFractionCoefficient_perviousFC**(dpth_f * 0.1_dp))

Expand Down Expand Up @@ -668,7 +675,7 @@ subroutine mpr_SMhorizons(param, processMatrix, iFlag_soil, nHorizons_mHM, Horiz

!$OMP END DO
!$OMP END PARALLEL

!close(1)
end subroutine mpr_SMhorizons

end module mo_mpr_SMhorizons
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.11.0
5.11.1
2 changes: 1 addition & 1 deletion version_date.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Feb 2021
Mar 2021

0 comments on commit 6f6e14f

Please sign in to comment.