forked from adfriend45/RINGS_v3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DIST.f90
24 lines (24 loc) · 958 Bytes
/
DIST.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
!======================================================================!
SUBROUTINE DIST
!----------------------------------------------------------------------!
! Computes distance of each cell centre from phloem (μm).
!----------------------------------------------------------------------!
USE DOUBLE
USE CONTROL
USE PARAMS
USE STATE
!----------------------------------------------------------------------!
IMPLICIT NONE
!----------------------------------------------------------------------!
REAL(DP) :: z_phloem
!----------------------------------------------------------------------!
DO fi = 1, nfi
z_phloem = f_phloem * pz
D (fi,1) = z_phloem + L (fi,1) / 2.0_DP
DO ic = 2, ncells (fi)
D (fi,ic) = D (fi,ic-1) + L (fi,ic-1) / 2.0_DP + L (fi,ic) / 2.0_DP
END DO ! ic
END DO ! fi
!----------------------------------------------------------------------!
END SUBROUTINE DIST
!======================================================================!