-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathmo_apply_fedep.F90
75 lines (61 loc) · 2.89 KB
/
mo_apply_fedep.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
! Copyright (C) 2022 S. J. Schwinger
!
! This file is part of BLOM/iHAMOCC.
!
! BLOM is free software: you can redistribute it and/or modify it under the
! terms of the GNU Lesser General Public License as published by the Free
! Software Foundation, either version 3 of the License, or (at your option)
! any later version.
!
! BLOM is distributed in the hope that it will be useful, but WITHOUT ANY
! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
! FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
! more details.
!
! You should have received a copy of the GNU Lesser General Public License
! along with BLOM. If not, see https://www.gnu.org/licenses/.
module mo_apply_fedep
!************************************************************************************************
! Routines for applying iron deposition data
! This module replaces code previously found inside the ocprod-routine and
! encapsulates it in a module.
!
! J. Schwinger, *NORCE climate, Bergen* 2022-05-19
!************************************************************************************************
implicit none
private
public :: apply_fedep ! apply iron deposition to the ocean tracer field
contains
subroutine apply_fedep(kpie,kpje,kpke,pddpo,omask,dust)
!--------------------------------------------------------------------------------
! Apply dust deposition input to oceanic tracer fields
!--------------------------------------------------------------------------------
use mo_control_bgc, only: dtb
use mo_param1_bgc, only: ifdust,iiron
use mo_param_bgc, only: perc_diron
use mo_carbch, only: ocetra
integer,intent(in) :: kpie ! 1st dimension of model grid.
integer,intent(in) :: kpje ! 2nd dimension of model grid.
integer,intent(in) :: kpke ! 3rd (vertical) dimension of model grid.
real, intent(in) :: pddpo(kpie,kpje,kpke) ! size of scalar grid cell (3rd dimension) [m].
real, intent(in) :: omask(kpie,kpje) ! ocean mask
real, intent(in) :: dust(kpie,kpje) ! dust deposition flux [kg/m2/month].
! local variables
integer :: i,j
real :: dustinp
! dust flux from the atmosphere to the surface layer; dust fields are
! monthly mean values (kg/m2/month - assume 30 days per month here)
! dissolved iron is a fixed fraction (typically 3.5%), and immediately released
!$OMP PARALLEL DO PRIVATE(i,dustinp)
do j = 1,kpje
do i = 1,kpie
if(omask(i,j) > 0.5) then
dustinp = dust(i,j) / 30. * dtb / pddpo(i,j,1)
ocetra(i,j,1,ifdust) = ocetra(i,j,1,ifdust) + dustinp
ocetra(i,j,1,iiron) = ocetra(i,j,1,iiron) + dustinp * perc_diron
endif
enddo
enddo
!$OMP END PARALLEL DO
end subroutine apply_fedep
end module mo_apply_fedep