New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
p4zligand.F90 in branches/CNRS/dev_r6270_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z – NEMO

source: branches/CNRS/dev_r6270_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zligand.F90 @ 7180

Last change on this file since 7180 was 7180, checked in by aumont, 7 years ago

various bug fixes on iron chemistry

File size: 8.3 KB
Line 
1MODULE p4zligand
2   !!======================================================================
3   !!                         ***  MODULE p4zligand  ***
4   !! TOP :   PISCES Compute remineralization/dissolution of organic ligands
5   !!=========================================================================
6   !! History :   3.6  !  2016-03  (O. Aumont, A. Tagliabue) Quota model and reorganization
7   !!----------------------------------------------------------------------
8#if defined key_pisces || defined key_pisces_quota
9# if defined key_ligand
10   !!----------------------------------------------------------------------
11   !!   'key_top'       and                                      TOP models
12   !!   'key_pisces*'   and                                PISCES bio-model
13   !!   'key_ligand'                                        Ligand submodel
14   !!----------------------------------------------------------------------
15   !!   p4z_ligand       :  Compute remineralization/dissolution of organic ligands
16   !!   p4z_ligand_init  :  Initialisation of parameters for remineralisation
17   !!----------------------------------------------------------------------
18   USE oce_trc         !  shared variables between ocean and passive tracers
19   USE trc             !  passive tracers common variables
20   USE sms_pisces      !  PISCES Source Minus Sink variables
21   USE p4zopt          !  optical model
22   USE prtctl_trc      !  print control for debugging
23
24   IMPLICIT NONE
25   PRIVATE
26
27   PUBLIC   p4z_ligand         ! called in p4zbio.F90
28   PUBLIC   p4z_ligand_init    ! called in trcsms_pisces.F90
29
30   !! * Shared module variables
31   REAL(wp), PUBLIC ::  rlgw     !: lifetime (years) of weak ligands
32   REAL(wp), PUBLIC ::  rlgs     !: lifetime (years) of strong ligands
33   REAL(wp), PUBLIC ::  rlig     !: Remin ligand production
34   REAL(wp), PUBLIC ::  prlgw    !: Photochemical of weak ligand
35   REAL(wp), PUBLIC ::  rfep     !: Dissolution rate of FeP
36
37
38   !!* Substitution
39#  include "top_substitute.h90"
40   !!----------------------------------------------------------------------
41   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
42   !! $Id: p4zligand.F90 3160 2011-11-20 14:27:18Z cetlod $
43   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
44   !!----------------------------------------------------------------------
45CONTAINS
46
47   SUBROUTINE p4z_ligand( kt, jnt )
48      !!---------------------------------------------------------------------
49      !!                     ***  ROUTINE p4z_ligand  ***
50      !!
51      !! ** Purpose :   Compute remineralization/scavenging of organic ligands
52      !!
53      !! ** Method  : - ???
54      !!---------------------------------------------------------------------
55      !
56      INTEGER, INTENT(in) ::   kt, jnt ! ocean time step
57      !
58      INTEGER  ::   ji, jj, jk
59      REAL(wp) ::   zlgwp, zlgwpr, zlgwr, zlablgw, zrfepa, zfepr
60      REAL(wp) ::   zstep, zstep2, zrfact2
61      CHARACTER (len=25) :: charout
62      !!---------------------------------------------------------------------
63      !
64      IF( nn_timing == 1 )  CALL timing_start('p4z_ligand')
65      !
66      ! ------------------------------------------------------------------
67      ! Remineralization of iron ligands
68      ! ------------------------------------------------------------------
69      DO jk = 1, jpkm1
70         DO jj = 1, jpj
71            DO ji = 1, jpi
72               ! ----------------------------------------------------------
73               ! zstep converts per day to per timestep
74               ! zstep for the yearly rates
75               ! ---------------------------------------------------------
76               zstep   = xstep
77# if defined key_degrad
78               zstep = zstep * facvol(ji,jj,jk)
79# endif
80               zstep2  = zstep / 365. ! per year
81               ! production from remineralisation of organic matter
82               zlgwp  = orem(ji,jj,jk) * rlig
83               ! decay of weak ligand
84               ! This is based on the idea that as LGW is lower
85               ! there is a larger fraction of refractory OM
86               zlgwr = max( rlgs , rlgw * exp( -2 * (trn(ji,jj,jk,jplgw)*1e9) ) ) ! years
87               zlgwr = 1. / zlgwr * tgfunc(ji,jj,jk) * zstep2 * trn(ji,jj,jk,jplgw)
88               ! photochem loss of weak ligand
89               zlgwpr = prlgw * zstep * etot(ji,jj,jk) * trn(ji,jj,jk,jplgw) * (1. - fr_i(ji,jj))
90               tra(ji,jj,jk,jplgw) = tra(ji,jj,jk,jplgw) + zlgwp - zlgwr - zlgwpr
91            END DO
92         END DO
93      END DO
94
95      ! ----------------------------------------------------------
96      ! Dissolution of nanoparticle Fe
97      ! ----------------------------------------------------------
98
99      DO jk = 1, jpkm1
100         DO jj = 1, jpj
101            DO ji = 1, jpi
102               ! dissolution rate is maximal in the presence of light and
103               ! lower in the aphotici zone
104               ! ! 25 Wm-2 constant
105               zrfepa = rfep * (1- EXP(-etot(ji,jj,jk) / 25. ) ) * (1.- fr_i(ji,jj))
106               zrfepa = MAX( (zrfepa / 10.0), zrfepa ) ! min of 10 days lifetime
107               zfepr = rfep * zstep * trn(ji,jj,jk,jpfep)
108               tra(ji,jj,jk,jpfep) = tra(ji,jj,jk,jpfep) - zfepr
109               tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) + zfepr
110            END DO
111         END DO
112      END DO
113
114      IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
115         WRITE(charout, FMT="('ligand1')")
116         CALL prt_ctl_trc_info(charout)
117         CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
118       ENDIF
119      !
120      IF( nn_timing == 1 )  CALL timing_stop('p4z_ligand')
121      !
122   END SUBROUTINE p4z_ligand
123
124
125   SUBROUTINE p4z_ligand_init
126      !!----------------------------------------------------------------------
127      !!                  ***  ROUTINE p4z_ligand_init  ***
128      !!
129      !! ** Purpose :   Initialization of remineralization parameters
130      !!
131      !! ** Method  :   Read the nampislig namelist and check the parameters
132      !!      called at the first timestep
133      !!
134      !! ** input   :   Namelist nampislig
135      !!
136      !!----------------------------------------------------------------------
137      NAMELIST/nampislig/ rlgw, prlgw, rlgs, rfep, rlig
138      INTEGER :: ios                 ! Local integer output status for namelist read
139
140      REWIND( numnatp_ref )              ! Namelist nampislig in reference namelist : Pisces remineralization
141      READ  ( numnatp_ref, nampislig, IOSTAT = ios, ERR = 901)
142901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampislig in reference namelist', lwp )
143
144      REWIND( numnatp_cfg )              ! Namelist nampislig in configuration namelist : Pisces remineralization
145      READ  ( numnatp_cfg, nampislig, IOSTAT = ios, ERR = 902 )
146902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampislig in configuration namelist', lwp )
147      IF(lwm) WRITE ( numonp, nampislig )
148
149      IF(lwp) THEN                         ! control print
150         WRITE(numout,*) ' '
151         WRITE(numout,*) ' Namelist parameters for ligands, nampislig'
152         WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
153         WRITE(numout,*) '    Dissolution rate of FeP                        rfep =', rfep
154         WRITE(numout,*) '    Lifetime (years) of weak ligands               rlgw =', rlgw
155         WRITE(numout,*) '    Remin ligand production per unit C             rlig =', rlig
156         WRITE(numout,*) '    Photolysis of weak ligand                     prlgw =', prlgw
157         WRITE(numout,*) '    Lifetime (years) of strong ligands             rlgs =', rlgs
158      ENDIF
159      !
160   END SUBROUTINE p4z_ligand_init
161
162# else
163   !!======================================================================
164   !!  Dummy module :                                  No ligands sub-model
165   !!======================================================================
166CONTAINS
167   SUBROUTINE p4z_ligand(kt, jnt)                    ! Empty routine
168      INTEGER, INTENT(in) ::   kt, jnt ! ocean time step
169   END SUBROUTINE p4z_ligand
170# endif
171#else
172   !!======================================================================
173   !!  Dummy module :                                   No PISCES bio-model
174   !!======================================================================
175CONTAINS
176   SUBROUTINE p4z_ligand                    ! Empty routine
177   END SUBROUTINE p4z_ligand
178#endif 
179
180   !!======================================================================
181END MODULE p4zligand
Note: See TracBrowser for help on using the repository browser.