Soil Water Balance (SWB2)
Toggle main menu visibility
Loading...
Searching...
No Matches
awc__gridded_values.F90
Go to the documentation of this file.
1
!> @file
2
!> Contains a single module, awc_gridded_values, which
3
!> populates awc by reading available water content directly from a gridded input.
4
5
6
!> Populate available water content by reading in
7
!> the available water content from a gridded data source.
8
9
module
awc__gridded_values
10
11
use
iso_c_binding,
only
: c_short, c_int, c_float, c_double
12
use
constants_and_conversions
13
use
data_catalog
14
use
data_catalog_entry
15
use
exceptions
16
17
implicit none
18
19
private
20
21
public
::
awc_gridded_values_initialize
,
awc_gridded_values_read
,
pawc_grid
22
23
type
(
data_catalog_entry_t
),
pointer
::
pawc_grid
24
25
contains
26
27
subroutine
awc_gridded_values_read
( )
28
29
! locate the data structure associated with the gridded available water content entries
30
pawc_grid
=>
dat
%find(
"AVAILABLE_WATER_CONTENT"
)
31
if
( .not.
associated
(
pawc_grid
) )
then
32
call
warn
(
"An AVAILABLE_WATER_CONTENT grid must be supplied in order to make use of this option."
, &
33
__file__, __line__)
34
35
else
36
37
call
pawc_grid
%getvalues( )
38
39
end if
40
41
end subroutine
awc_gridded_values_read
42
43
!--------------------------------------------------------------------------------------------------
44
45
subroutine
awc_gridded_values_initialize
( lActive, fAWC )
46
47
logical (c_bool)
,
intent(in)
:: lactive(:,:)
48
real
(c_float),
intent(inout)
:: fawc(:)
49
50
if
(
associated
(
pawc_grid
) )
then
51
52
fawc = pack(
pawc_grid
%pGrdBase%rData, lactive )
53
54
else
55
56
fawc = -9999.0
57
58
endif
59
60
end subroutine
awc_gridded_values_initialize
61
62
end module
awc__gridded_values
awc__gridded_values
Populate available water content by reading in the available water content from a gridded data source...
Definition
awc__gridded_values.F90:9
awc__gridded_values::awc_gridded_values_read
subroutine, public awc_gridded_values_read()
Definition
awc__gridded_values.F90:28
awc__gridded_values::pawc_grid
type(data_catalog_entry_t), pointer, public pawc_grid
Definition
awc__gridded_values.F90:23
awc__gridded_values::awc_gridded_values_initialize
subroutine, public awc_gridded_values_initialize(lactive, fawc)
Definition
awc__gridded_values.F90:46
constants_and_conversions
This module contains physical constants and convenience functions aimed at performing unit conversion...
Definition
constants_and_conversions.F90:8
data_catalog
Defines the DATA_CATALOG_T data type, which contains type-bound procedures to add,...
Definition
data_catalog.F90:10
data_catalog::dat
type(data_catalog_t), public dat
DAT is a global to hold data catalog entries.
Definition
data_catalog.F90:65
data_catalog_entry
Definition
data_catalog_entry.F90:8
exceptions
Definition
exceptions.F90:1
exceptions::warn
subroutine, public warn(smessage, smodule, iline, shints, lfatal, iloglevel, lecho)
Definition
exceptions.F90:245
data_catalog_entry::data_catalog_entry_t
Definition
data_catalog_entry.F90:46
src
awc__gridded_values.F90
Generated on
for Soil Water Balance (SWB2) by
1.17.0