public subroutine PlantsParameterUpdate(time)
update parameter map that change in time
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
type(DateTime),
|
intent(in) |
|
|
:: |
time |
|
Variables
Type |
Visibility | Attributes |
|
Name |
| Initial | |
character(len=300),
|
public |
|
:: |
filename |
|
|
|
character(len=300),
|
public |
|
:: |
varname |
|
|
|
Source Code
SUBROUTINE PlantsParameterUpdate &
!
(time)
IMPLICIT NONE
!Arguments with intent(in):
TYPE (DateTime), INTENT (IN) :: time
!local declarations:
CHARACTER (LEN = 300) :: filename
CHARACTER (LEN = 300) :: varname
!------------------------------end of declarations-----------------------------
!leaf area index
IF ( time == lai % next_time ) THEN
!destroy current grid
filename = lai % file_name
varname = lai % var_name
CALL GridDestroy (lai)
!read new grid in netcdf file
CALL NewGrid (lai, TRIM(filename), NET_CDF, &
variable = TRIM(varname), time = time)
END IF
!fraction of vegetation coverage
IF ( time == fvcover % next_time ) THEN
!destroy current grid
filename = fvcover % file_name
varname = fvcover % var_name
CALL GridDestroy (fvcover)
!read new grid in netcdf file
CALL NewGrid (fvcover, TRIM(filename), NET_CDF, &
variable = TRIM(varname), time = time)
END IF
!plants height
IF ( time == plantsHeight % next_time ) THEN
!destroy current grid
filename = plantsHeight % file_name
varname = plantsHeight % var_name
CALL GridDestroy (plantsHeight)
!read new grid in netcdf file
CALL NewGrid (plantsHeight, TRIM(filename), NET_CDF, &
variable = TRIM(varname), time = time)
END IF
!minimum stomatal resistance
IF ( time == rsMin % next_time ) THEN
!destroy current grid
filename = rsMin % file_name
varname = rsMin % var_name
CALL GridDestroy (rsMin)
!read new grid in netcdf file
CALL NewGrid (rsMin, TRIM(filename), NET_CDF, &
variable = TRIM(varname), time = time)
END IF
RETURN
END SUBROUTINE PlantsParameterUpdate