Soil Water Balance (SWB2)
Loading...
Searching...
No Matches
actual_et__gridded_values.F90
Go to the documentation of this file.
1!> @file
2!> Contains a single module, actual_et__gridded_values, which
3!> populates the reference et by applying the monthly value obtained from a reference grid.
4
5
6!> Populate actual evapotranspiration by substituting in
7!> the daily average actual ET from a gridded data source.
8
10
11 use iso_c_binding, only : c_short, c_int, c_float, c_double
13 use data_catalog
15 use datetime, only : datetime_t
16 use exceptions
17 use simulation_datetime, only : sim_dt
18 use fstring
19 use fstring_list
20
21 implicit none
22
23 private
24
28
30
31 real ( c_float), allocatable :: actual_et(:)
32
34
35contains
36
37 subroutine actual_et_gridded_values_initialize( is_cell_active )
38
39 logical (c_bool), intent(in) :: is_cell_active(:,:)
40
41 ! [ LOCALS ]
42 integer (c_int) :: istat
43 type (fstring_list_t) :: slstring
44 integer (c_int) :: iindex
45
46 ! locate the data structure associated with the gridded actual_et entries
47 paet_grid => dat%find("ACTUAL_ET")
48 if (.not. associated(paet_grid) ) &
49 call die("A set of ACTUAL_ET grids must be supplied in order to make" &
50 //" use of this option.", __file__, __line__)
51
52 allocate( actual_et( count( is_cell_active ) ), stat=istat )
53 call assert( istat==0, "Problem allocating memory for ACTUAL_ET vector.", &
54 __file__, __line__)
55
57
58!--------------------------------------------------------------------------------------------------
59
60 subroutine actual_et_gridded_values_calculate( is_cell_active )
61
62 logical (c_bool), intent(in) :: is_cell_active(:,:)
63
64 if ( .not. date_of_last_retrieval == sim_dt%curr ) then
65
66 call paet_grid%getvalues( sim_dt%curr )
68 actual_et = pack( paet_grid%pGrdBase%rData, is_cell_active)
69
70 endif
71
73
Populate actual evapotranspiration by substituting in the daily average actual ET from a gridded data...
subroutine, public actual_et_gridded_values_initialize(is_cell_active)
subroutine, public actual_et_gridded_values_calculate(is_cell_active)
type(data_catalog_entry_t), pointer paet_grid
real(c_float), dimension(:), allocatable, public actual_et
This module contains physical constants and convenience functions aimed at performing unit conversion...
Defines the DATA_CATALOG_T data type, which contains type-bound procedures to add,...
type(data_catalog_t), public dat
DAT is a global to hold data catalog entries.
This module contains the DATETIME_T class and associated time and date-related routines,...
Definition datetime.F90:9
subroutine, public die(smessage, smodule, iline, shints, scalledby, icalledbyline)
type(date_range_t), public sim_dt