-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgotm_model_library.F90
43 lines (31 loc) · 1.05 KB
/
gotm_model_library.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
module gotm_model_library
use fabm_types, only: type_base_model_factory,type_base_model
implicit none
private
type,extends(type_base_model_factory) :: type_factory
contains
procedure :: create
end type
type (type_factory),save,target,public :: gotm_model_factory
contains
subroutine create(self,name,model)
use gotm_npzd
use gotm_fasham
use gotm_ergom
use gotm_light
use gotm_mspec
! Add new GOTM models here
! Krinstinb size_based phytoplankton model
class (type_factory),intent(in) :: self
character(*), intent(in) :: name
class (type_base_model),pointer :: model
select case (name)
case ('npzd'); allocate(type_gotm_npzd::model)
case ('fasham'); allocate(type_gotm_fasham::model)
case ('ergom'); allocate(type_gotm_ergom::model)
case ('light'); allocate(type_gotm_light::model)
case ('mspec'); allocate(type_gotm_mspec::model)
! Add new GOTM models here
end select
end subroutine
end module