Commit 338f652f authored by POLCHER Jan's avatar POLCHER Jan 🚴🏾
Browse files

Better treatment of dz when computing for the HTU. It is now limited to being...

Better treatment of dz when computing for the HTU. It is now limited to being larger or equal to zero. The limit is only applied when computing the topoindex.
parent e227b9c7
......@@ -17,7 +17,7 @@ MODULE routing_reg
REAL(r_std), SAVE :: hydro_meandz = 0.0
REAL(r_std), SAVE :: hydro_mindz = 0.0
REAL(r_std), SAVE :: hydro_dzprecision = 0.1
REAL(r_std), SAVE :: hydro_dzprecision = 0.05
REAL(r_std), SAVE, ALLOCATABLE, DIMENSION(:,:) :: routing_area_glo !! Surface of basin (m^2)
REAL(r_std), SAVE, ALLOCATABLE, DIMENSION(:,:) :: routing_orog_mean_glo !! Mean topography (m)
......@@ -2151,7 +2151,9 @@ SUBROUTINE routing_reg_divbas_divide(nb_htu, nbv,nbi,nbj, ijdimmax, tbname, tsz,
!
LOGICAL :: okpoint=.TRUE.
LOGICAL :: debug =.FALSE.
LOGICAL :: Limitdz = .TRUE.
! If Limitdz=.TRUE. then the dz will be limited to hydro_dzprecision.
! Else it will just be limited to zero.
LOGICAL :: Limitdz = .FALSE.
!
!
INTEGER(i_std) :: main_loc(nbv,2), tri_loc(nbne,nbv,2)
......@@ -2356,6 +2358,8 @@ SUBROUTINE routing_reg_divbas_divide(nb_htu, nbv,nbi,nbj, ijdimmax, tbname, tsz,
!
IF ( Limitdz ) THEN
dorog = MAX(hydro_dzprecision, dorog)
ELSE
dorog = MAX(0.0, dorog)
ENDIF
distance = SUM(main_len(:cnt))
! topoindex is in km while distance and dorog are in meters
......
......@@ -19,7 +19,7 @@ log_master, log_world = getargs.getLogger(__name__)
INFO, DEBUG, ERROR = log_master.info, log_master.debug, log_world.error
INFO_ALL, DEBUG_ALL = log_world.info, log_world.debug
#
elevation_precision=0.1
elevation_precision=0.05
#
def getbox(ncdf, corners) :
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment