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 NEMO/branches/2021/ticket2632_r14588_theta_sbcblk/src/TOP/PISCES/P4Z – NEMO

source: NEMO/branches/2021/ticket2632_r14588_theta_sbcblk/src/TOP/PISCES/P4Z/p4zligand.F90 @ 15548

Last change on this file since 15548 was 15548, checked in by gsamson, 3 years ago

update branch to the head of the trunk (r15547); ticket #2632

  • Property svn:keywords set to Id
File size: 7.4 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   !!   p4z_ligand     :  Compute remineralization/dissolution of organic ligands
9   !!   p4z_ligand_init:  Initialisation of parameters for remineralisation
10   !!----------------------------------------------------------------------
11   USE oce_trc         ! shared variables between ocean and passive tracers
12   USE trc             ! passive tracers common variables
13   USE sms_pisces      ! PISCES Source Minus Sink variables
14   USE prtctl          ! print control for debugging
15   USE iom             !  I/O manager
16
17   IMPLICIT NONE
18   PRIVATE
19
20   PUBLIC   p4z_ligand         ! called in p4zbio.F90
21   PUBLIC   p4z_ligand_init    ! called in trcsms_pisces.F90
22
23   REAL(wp), PUBLIC ::  rlgw     !: lifetime (years) of weak ligands
24   REAL(wp), PUBLIC ::  rlgs     !: lifetime (years) of strong ligands
25   REAL(wp), PUBLIC ::  rlig     !: Remin ligand production
26   REAL(wp), PUBLIC ::  prlgw    !: Photochemical of weak ligand
27   REAL(wp), PUBLIC ::  xklig    !: 1/2 saturation constant of photolysis
28
29   !! * Substitutions
30#  include "do_loop_substitute.h90"
31   !!----------------------------------------------------------------------
32   !! NEMO/TOP 4.0 , NEMO Consortium (2018)
33   !! $Id$
34   !! Software governed by the CeCILL license (see ./LICENSE)
35   !!----------------------------------------------------------------------
36CONTAINS
37
38   SUBROUTINE p4z_ligand( kt, knt, Kbb, Krhs )
39      !!---------------------------------------------------------------------
40      !!                     ***  ROUTINE p4z_ligand  ***
41      !!
42      !! ** Purpose :   Compute remineralization/scavenging of organic ligands
43      !!---------------------------------------------------------------------
44      INTEGER, INTENT(in) ::   kt, knt   ! ocean time step
45      INTEGER, INTENT(in)  ::  Kbb, Krhs ! time level indices
46      !
47      INTEGER  ::   ji, jj, jk
48      REAL(wp) ::   zlgwp, zlgwpr, zlgwr, zlablgw 
49      REAL(wp) ::   zlam1a, zlam1b, zaggliga, zligco
50      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zligrem, zligpr, zligprod, zlcoll3d
51      CHARACTER (len=25) ::   charout
52      !!---------------------------------------------------------------------
53      !
54      IF( ln_timing )   CALL timing_start('p4z_ligand')
55      !
56      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
57         !
58         ! ------------------------------------------------------------------
59         ! Remineralization of iron ligands
60         ! ------------------------------------------------------------------
61         ! production from remineralisation of organic matter
62         zlgwp = orem(ji,jj,jk) * rlig
63         ! decay of weak ligand
64         ! This is based on the idea that as LGW is lower
65         ! there is a larger fraction of refractory OM
66         zlgwr = ( 1.0 / rlgs * MAX(0., tr(ji,jj,jk,jplgw,Kbb) - xfecolagg(ji,jj,jk) * 1.0E-9 )    &
67         &       + 1.0 / rlgw * xfecolagg(ji,jj,jk) * 1.0E-9 ) / ( rtrn + tr(ji,jj,jk,jplgw,Kbb) )
68         zlgwr = zlgwr * tgfunc(ji,jj,jk) * ( xstep / nyear_len(1) ) * blim(ji,jj,jk) * tr(ji,jj,jk,jplgw,Kbb)
69         ! photochem loss of weak ligand
70         zlgwpr = prlgw * xstep * etot(ji,jj,jk) * tr(ji,jj,jk,jplgw,Kbb)**3 * (1. - fr_i(ji,jj))   &
71         &        / ( tr(ji,jj,jk,jplgw,Kbb)**2 + (xklig)**2)
72         ! Coagulation of ligands due to various processes (Brownian, shear, diff. sedimentation
73         ! xcoagfe is computed in p4zfechem
74         ! -------------------------------------------------------------------------------------
75         ! 50% of the ligands are supposed to be in the colloidal size fraction
76         ! as for FeL
77         zligco   = 0.5 * MAX(0., tr(ji,jj,jk,jplgw,Kbb) - xfecolagg(ji,jj,jk) * 1.0E-9 )
78         zaggliga = xcoagfe(ji,jj,jk) * xstep * zligco
79
80         tr(ji,jj,jk,jplgw,Krhs) = tr(ji,jj,jk,jplgw,Krhs) + zlgwp - zlgwr - zlgwpr - zaggliga
81         !
82         zligrem(ji,jj,jk)   = zlgwr
83         zligpr(ji,jj,jk)    = zlgwpr
84         zligprod(ji,jj,jk)  = zlgwp
85         zlcoll3d(ji,jj,jk)  = zaggliga
86      END_3D
87      !
88      !  Output of some diagnostics variables
89      !     ---------------------------------
90      IF( lk_iomput .AND. knt == nrdttrc ) THEN
91         IF( iom_use( "LIGREM" ) ) THEN
92           zligrem(:,:,jpk) = 0.  ; CALL iom_put( "LIGREM", zligrem(:,:,:) * 1e9 * 1.e+3 * rfact2r * tmask(:,:,:) )
93         ENDIF
94         IF( iom_use( "LIGPR" ) ) THEN
95           zligpr(:,:,jpk) = 0.   ; CALL iom_put( "LIGPR" , zligpr(:,:,:) * 1e9 * 1.e+3 * rfact2r * tmask(:,:,:) )
96         ENDIF
97         IF( iom_use( "LPRODR" ) ) THEN
98           zligprod(:,:,jpk) = 0. ; CALL iom_put( "LPRODR", zligprod(:,:,:) * 1e9 * 1.e+3 * rfact2r * tmask(:,:,:) )
99         ENDIF
100         IF( iom_use( "LGWCOLL" ) ) THEN
101            zlcoll3d(:,:,jpk) = 0. ; CALL iom_put( "LGWCOLL", zlcoll3d(:,:,:) * 1.e9 *  1.e+3 * rfact2r * tmask(:,:,:) )
102         ENDIF
103      ENDIF
104      !
105      IF(sn_cfctl%l_prttrc)   THEN  ! print mean trends (used for debugging)
106         WRITE(charout, FMT="('ligand1')")
107         CALL prt_ctl_info( charout, cdcomp = 'top' )
108         CALL prt_ctl(tab4d_1=tr(:,:,:,:,Krhs), mask1=tmask, clinfo=ctrcnm)
109      ENDIF
110      !
111      IF( ln_timing )   CALL timing_stop('p4z_ligand')
112      !
113   END SUBROUTINE p4z_ligand
114
115
116   SUBROUTINE p4z_ligand_init
117      !!----------------------------------------------------------------------
118      !!                  ***  ROUTINE p4z_ligand_init  ***
119      !!
120      !! ** Purpose :   Initialization of remineralization parameters
121      !!
122      !! ** Method  :   Read the nampislig namelist and check the parameters
123      !!
124      !! ** input   :   Namelist nampislig
125      !!----------------------------------------------------------------------
126      INTEGER ::   ios   ! Local integer
127      !
128      NAMELIST/nampislig/ rlgw, prlgw, rlgs, rlig, xklig
129      !!----------------------------------------------------------------------
130      !
131      IF(lwp) THEN
132         WRITE(numout,*)
133         WRITE(numout,*) 'p4z_ligand_init : remineralization/scavenging of organic ligands'
134         WRITE(numout,*) '~~~~~~~~~~~~~~~'
135      ENDIF
136      READ  ( numnatp_ref, nampislig, IOSTAT = ios, ERR = 901)
137901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampislig in reference namelist' )
138      READ  ( numnatp_cfg, nampislig, IOSTAT = ios, ERR = 902 )
139902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampislig in configuration namelist' )
140      IF(lwm) WRITE ( numonp, nampislig )
141      !
142      IF(lwp) THEN                         ! control print
143         WRITE(numout,*) '   Namelist : nampislig'
144         WRITE(numout,*) '      Lifetime (years) of weak ligands             rlgw  =', rlgw
145         WRITE(numout,*) '      Remin ligand production per unit C           rlig  =', rlig
146         WRITE(numout,*) '      Photolysis of weak ligand                    prlgw =', prlgw
147         WRITE(numout,*) '      Lifetime (years) of strong ligands           rlgs  =', rlgs
148         WRITE(numout,*) '      1/2 saturation for photolysis                xklig =', xklig
149      ENDIF
150      !
151   END SUBROUTINE p4z_ligand_init
152
153   !!======================================================================
154END MODULE p4zligand
Note: See TracBrowser for help on using the repository browser.