TreeMig Code
Loading...
Searching...
No Matches
GetEnvFactors.f90
Go to the documentation of this file.
1!==============================================================================
2!
29!===============================================================
30SUBROUTINE getenvfactors(year, lat, lon, ddegs, wtemp, drstr, avnit, brwpr, disturb, germDrought)
31
32 ! CALL modules for TYPE definitions and +- fixed variables>---------------------------------------------------------------
34
35 IMPLICIT NONE
36
37 ! Passed variables>-------------------------------------------------------------------------------
38 INTEGER, INTENT(in) :: year, & ! Passed simulation year
39 lat, lon ! Passed coordinates
40 REAL, INTENT(out) :: ddegs, wtemp, drstr, avnit, brwpr, disturb, germDrought
41
42 ! Here the SUBROUTINE starts>*********************************************************************
43 !----- Check whether cell is stockable (muDD>= 0). if not, set stockability to 0----------------------------------------------------
44 stockability(lat, lon) = 1.0
45 if (oldbioclim%bc(lat, lon)%muDD < 0.0) then
46 ! print *, lat, lon ,oldBioClim%bc(lat, lon)%muDD
47 stockability(lat, lon) = 0.0
48 ddegs = -999.0
49 end if
50 if (stockability(lat, lon) == 0.0) return
51 !----- if the cell is stockable get the values for the environmental factors ----------------------------------------------------
52
53 include_env: if (includeenv) then
54 !----- Read environmental (site) information per grid-cell -----------------------
55 if ( (envfromfile ) .AND. (stockability(lat, lon) > 0.0) ) then
56 call getbioclimsimple(year, lat, lon, ddegs, wtemp, drstr, avnit, brwpr, disturb, germdrought)
57 end if
58 end if include_env
59
60end SUBROUTINE getenvfactors
61!done
subroutine getbioclimsimple(year, lat, lon, ddegs, wtemp, drstr, avnit, brwpr, disturb, germdrought)
GetBioClimSimple.
subroutine getenvfactors(year, lat, lon, ddegs, wtemp, drstr, avnit, brwpr, disturb, germdrought)
GetEnvFactors.
real, dimension(:, :), allocatable stockability
Definition All_par.f90:53
logical envfromfile
Definition All_par.f90:59
logical includeenv
Definition All_par.f90:58
type(bioclimdata) oldbioclim
Definition All_par.f90:351