forked from ESCOMP/CTSM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFATESFireNoDataMod.F90
146 lines (123 loc) · 4.64 KB
/
FATESFireNoDataMod.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
module FATESFireNoDataMod
#include "shr_assert.h"
!-----------------------------------------------------------------------
! !DESCRIPTION:
! module for FATES when not obtaining fire inputs from data
!
! !USES:
use shr_kind_mod, only: r8 => shr_kind_r8, CL => shr_kind_CL
use shr_log_mod, only: errmsg => shr_log_errMsg
use abortutils, only: endrun
use clm_varctl, only: iulog
use decompMod, only: bounds_type
use FatesFireBase, only: fates_fire_base_type
!
implicit none
private
!
! !PUBLIC TYPES:
public :: fates_fire_no_data_type
!
type, extends(fates_fire_base_type) :: fates_fire_no_data_type
private
! !PRIVATE MEMBER DATA:
contains
! !PUBLIC MEMBER FUNCTIONS:
procedure, public :: need_lightning_and_popdens
procedure, public :: GetLight24 ! Return the 24-hour averaged lightning data
procedure, public :: GetGDP ! Return the global gdp data
procedure, public :: InitAccBuffer ! Initialize accumulation processes
procedure, public :: InitAccVars ! Initialize accumulation variables
procedure, public :: UpdateAccVars ! Update/extract accumulations vars
end type fates_fire_no_data_type
character(len=*), parameter, private :: sourcefile = __FILE__
contains
!------------------------------------------------------------------------
function need_lightning_and_popdens(this)
! !ARGUMENTS:
class(fates_fire_no_data_type), intent(in) :: this
logical :: need_lightning_and_popdens ! function result
!
! !LOCAL VARIABLES:
character(len=*), parameter :: subname = 'need_lightning_and_popdens'
!-----------------------------------------------------------------------
need_lightning_and_popdens = .false.
end function need_lightning_and_popdens
!-----------------------------------------------------------------------
function GetLight24( this ) result(lnfm24)
!
! !DESCRIPTION: Get the 24-hour averaged lightning data
! !USES
!
! !ARGUMENTS:
class(fates_fire_no_data_type) :: this
real(r8), pointer :: lnfm24(:)
!---------------------------------------------------------------------
call endrun( "GetLight24 should NOT be called for the FATES No-Data case" )
!---------------------------------------------------------------------
end function
!-----------------------------------------------------------------------
function GetGDP( this ) result(gdp)
!
! !DESCRIPTION: Get the global gross domestic product data
! !USES
!
! !ARGUMENTS:
class(fates_fire_no_data_type) :: this
real(r8), pointer :: gdp(:)
!---------------------------------------------------------------------
call endrun( "GetGDP should NOT be called for the FATES No-Data case" )
!---------------------------------------------------------------------
end function
!-----------------------------------------------------------------------
subroutine InitAccBuffer (this, bounds)
!
! !DESCRIPTION:
! EMPTY subroutine for the no_data case.
! Initialize accumulation buffer for all required module accumulated fields
! This routine set defaults values that are then overwritten by the
! restart file for restart or branch runs
!
! !USES
!
! !ARGUMENTS:
class(fates_fire_no_data_type) :: this
type(bounds_type), intent(in) :: bounds
! !LOCAL VARIABLES:
!---------------------------------------------------------------------
end subroutine InitAccBuffer
!-----------------------------------------------------------------------
subroutine InitAccVars(this, bounds)
!
! !DESCRIPTION:
! EMPTY subroutine for the no_data case.
! Initialize module variables that are associated with
! time accumulated fields. This routine is called for both an initial run
! and a restart run (and must therefore must be called after the restart
! file is read in and the accumulation buffer is obtained)
!
! !USES
!
! !ARGUMENTS:
class(fates_fire_no_data_type) :: this
type(bounds_type), intent(in) :: bounds
!
! !LOCAL VARIABLES:
!---------------------------------------------------------------------
end subroutine InitAccVars
!-----------------------------------------------------------------------
subroutine UpdateAccVars (this, bounds)
!
! !DESCRIPTION:
! EMPTY subroutine for the no_data case.
!
! !USES
!
! !ARGUMENTS:
class(fates_fire_no_data_type) :: this
type(bounds_type), intent(in) :: bounds
!
! !LOCAL VARIABLES:
!---------------------------------------------------------------------
end subroutine UpdateAccVars
end module FATESFireNoDataMod