source: NEMO/branches/2019/fix_sn_cfctl_ticket2328/src/TOP/PISCES/P4Z/p4zbio.F90 @ 11872

Last change on this file since 11872 was 11872, checked in by acc, 11 months ago

Branch 2019/fix_sn_cfctl_ticket2328. See #2328. Replacement of ln_ctl and activation of full functionality with
sn_cfctl structure. These changes rename structure components l_mppout and l_mpptop as l_prtctl and l_prttrc
and introduce l_glochk to activate former ln_ctl code in stpctl.F90 to perform global location of min and max
checks. Also added is l_allon which can be used to activate all output (much like the former ln_ctl). If l_allon
is .false. then l_config decides whether or not the suboptions are used.

   sn_cfctl%l_glochk = .FALSE.    ! Range sanity checks are local (F) or global (T). Set T for debugging only
   sn_cfctl%l_allon  = .FALSE.    ! IF T activate all options. If F deactivate all unless l_config is T
   sn_cfctl%l_config = .TRUE.     ! IF .true. then control which reports are written with the remaining options

Note, these changes pass SETTE tests but all references to ln_ctl need to be removed from the sette scripts.

  • Property svn:keywords set to Id
File size: 5.4 KB
Line 
1MODULE p4zbio
2   !!======================================================================
3   !!                         ***  MODULE p4zbio  ***
4   !! TOP :   PISCES bio-model
5   !!======================================================================
6   !! History :   1.0  !  2004     (O. Aumont) Original code
7   !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90
8   !!----------------------------------------------------------------------
9   !!   p4z_bio        :   computes the interactions between the different
10   !!                      compartments of PISCES
11   !!----------------------------------------------------------------------
12   USE oce_trc         !  shared variables between ocean and passive tracers
13   USE trc             !  passive tracers common variables
14   USE sms_pisces      !  PISCES Source Minus Sink variables
15   USE p4zsink         !  vertical flux of particulate matter due to sinking
16   USE p4zopt          !  optical model
17   USE p4zlim          !  Co-limitations of differents nutrients
18   USE p4zprod         !  Growth rate of the 2 phyto groups
19   USE p4zmort         !  Mortality terms for phytoplankton
20   USE p4zmicro        !  Sources and sinks of microzooplankton
21   USE p4zmeso         !  Sources and sinks of mesozooplankton
22   USE p5zlim          !  Co-limitations of differents nutrients
23   USE p5zprod         !  Growth rate of the 2 phyto groups
24   USE p5zmort         !  Mortality terms for phytoplankton
25   USE p5zmicro        !  Sources and sinks of microzooplankton
26   USE p5zmeso         !  Sources and sinks of mesozooplankton
27   USE p4zrem          !  Remineralisation of organic matter
28   USE p4zpoc          !  Remineralization of organic particles
29   USE p4zagg          !  Aggregation of particles
30   USE p4zfechem
31   USE p4zligand       !  Prognostic ligand model
32   USE prtctl_trc      !  print control for debugging
33   USE iom             !  I/O manager
34 
35   IMPLICIT NONE
36   PRIVATE
37
38   PUBLIC  p4z_bio   
39
40   !!----------------------------------------------------------------------
41   !! NEMO/TOP 4.0 , NEMO Consortium (2018)
42   !! $Id$
43   !! Software governed by the CeCILL license (see ./LICENSE)
44   !!----------------------------------------------------------------------
45CONTAINS
46
47   SUBROUTINE p4z_bio ( kt, knt )
48      !!---------------------------------------------------------------------
49      !!                     ***  ROUTINE p4z_bio  ***
50      !!
51      !! ** Purpose :   Ecosystem model in the whole ocean: computes the
52      !!              different interactions between the different compartments
53      !!              of PISCES
54      !!
55      !! ** Method  : - ???
56      !!---------------------------------------------------------------------
57      INTEGER, INTENT(in) :: kt, knt
58      !
59      INTEGER             :: ji, jj, jk, jn
60      CHARACTER (len=25) :: charout
61      !!---------------------------------------------------------------------
62      !
63      IF( ln_timing )   CALL timing_start('p4z_bio')
64      !
65      !     ASSIGN THE SHEAR RATE THAT IS USED FOR AGGREGATION
66      !     OF PHYTOPLANKTON AND DETRITUS
67
68      xdiss(:,:,:) = 1.
69!!gm the use of nmld should be better here?
70      DO jk = 2, jpkm1
71         DO jj = 1, jpj
72            DO ji = 1, jpi
73!!gm  :  use nmln  and test on jk ...  less memory acces
74               IF( gdepw_n(ji,jj,jk+1) > hmld(ji,jj) )   xdiss(ji,jj,jk) = 0.01
75            END DO
76         END DO
77      END DO
78
79      CALL p4z_opt     ( kt, knt )     ! Optic: PAR in the water column
80      CALL p4z_sink    ( kt, knt )     ! vertical flux of particulate organic matter
81      CALL p4z_fechem  ( kt, knt )     ! Iron chemistry/scavenging
82      !
83      IF( ln_p4z ) THEN
84         CALL p4z_lim  ( kt, knt )     ! co-limitations by the various nutrients
85         CALL p4z_prod ( kt, knt )     ! phytoplankton growth rate over the global ocean.
86         !                             ! (for each element : C, Si, Fe, Chl )
87         CALL p4z_mort ( kt      )     ! phytoplankton mortality
88         !                             ! zooplankton sources/sinks routines
89         CALL p4z_micro( kt, knt )           ! microzooplankton
90         CALL p4z_meso ( kt, knt )           ! mesozooplankton
91      ELSE
92         CALL p5z_lim  ( kt, knt )     ! co-limitations by the various nutrients
93         CALL p5z_prod ( kt, knt )     ! phytoplankton growth rate over the global ocean.
94         !                             ! (for each element : C, Si, Fe, Chl )
95         CALL p5z_mort ( kt      )     ! phytoplankton mortality
96         !                             ! zooplankton sources/sinks routines
97         CALL p5z_micro( kt, knt )           ! microzooplankton
98         CALL p5z_meso ( kt, knt )           ! mesozooplankton
99      ENDIF
100      !
101      CALL p4z_agg     ( kt, knt )     ! Aggregation of particles
102      CALL p4z_rem     ( kt, knt )     ! remineralization terms of organic matter+scavenging of Fe
103      CALL p4z_poc     ( kt, knt )     ! Remineralization of organic particles
104      !
105      IF( ln_ligand )  &
106      & CALL p4z_ligand( kt, knt )
107      !                                                             !
108      IF(sn_cfctl%l_prttrc)   THEN  ! print mean trends (used for debugging)
109         WRITE(charout, FMT="('bio ')")
110         CALL prt_ctl_trc_info(charout)
111         CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
112      ENDIF
113      !
114      IF( ln_timing )   CALL timing_stop('p4z_bio')
115      !
116   END SUBROUTINE p4z_bio
117
118   !!======================================================================
119END MODULE p4zbio
Note: See TracBrowser for help on using the repository browser.