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.
trcnam_pisces.F90 in NEMO/trunk/src/TOP/PISCES – NEMO

source: NEMO/trunk/src/TOP/PISCES/trcnam_pisces.F90 @ 10222

Last change on this file since 10222 was 10222, checked in by aumont, 5 years ago

update of the sediment module + enhancement, bug correction in PISCES generating O2 negative values

  • Property svn:keywords set to Id
File size: 4.6 KB
Line 
1MODULE trcnam_pisces
2   !!======================================================================
3   !!                      ***  MODULE trcnam_pisces  ***
4   !! TOP :   initialisation of some run parameters for PISCES bio-model
5   !!======================================================================
6   !! History :    -   !  1999-10 (M.A. Foujols, M. Levy) original code
7   !!              -   !  2000-01 (L. Bopp) hamocc3, p3zd
8   !!             1.0  !  2003-08 (C. Ethe)  module F90
9   !!             2.0  !  2007-12  (C. Ethe, G. Madec) from trcnam.pisces.h90
10   !!----------------------------------------------------------------------
11   !! trc_nam_pisces   : PISCES model namelist read
12   !!----------------------------------------------------------------------
13   USE oce_trc         ! Ocean variables
14   USE par_trc         ! TOP parameters
15   USE trc             ! TOP variables
16   USE sms_pisces      ! sms trends
17   USE trdtrc_oce
18   USE iom             ! I/O manager
19
20   IMPLICIT NONE
21   PRIVATE
22
23   PUBLIC   trc_nam_pisces   ! called by trcnam.F90 module
24
25   !!----------------------------------------------------------------------
26   !! NEMO/TOP 4.0 , NEMO Consortium (2018)
27   !! $Id$
28   !! Software governed by the CeCILL license (see ./LICENSE)
29   !!----------------------------------------------------------------------
30CONTAINS
31
32   SUBROUTINE trc_nam_pisces
33      !!----------------------------------------------------------------------
34      !!                     ***  trc_nam_pisces  *** 
35      !!
36      !! ** Purpose :   read PISCES namelist
37      !!
38      !! ** input   :   file 'namelist.trc.sms' containing the following
39      !!             namelist: natext, natbio, natsms
40      !!----------------------------------------------------------------------
41      INTEGER :: jl, jn
42      INTEGER :: ios, ioptio         ! Local integer
43      CHARACTER(LEN=20)::   clname
44      !!
45      NAMELIST/nampismod/ln_p2z, ln_p4z, ln_p5z, ln_ligand, ln_sediment
46      !!----------------------------------------------------------------------
47
48      IF(lwp) WRITE(numout,*)
49      clname = 'namelist_pisces'
50
51      IF(lwp) WRITE(numout,*) 'trc_nam_pisces : read PISCES namelist'
52      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~'
53      CALL ctl_opn( numnatp_ref, TRIM( clname )//'_ref', 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
54      CALL ctl_opn( numnatp_cfg, TRIM( clname )//'_cfg', 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
55      IF(lwm) CALL ctl_opn( numonp     , 'output.namelist.pis' , 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
56      !
57      REWIND( numnatp_ref )              ! Namelist nampisbio in reference namelist : Pisces variables
58      READ  ( numnatp_ref, nampismod, IOSTAT = ios, ERR = 901)
59901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampismod in reference namelist', lwp )
60      REWIND( numnatp_cfg )              ! Namelist nampisbio in configuration namelist : Pisces variables
61      READ  ( numnatp_cfg, nampismod, IOSTAT = ios, ERR = 902 )
62902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampismod in configuration namelist', lwp )
63      IF(lwm) WRITE( numonp, nampismod )
64      !
65      IF(lwp) THEN                  ! control print
66         WRITE(numout,*) '   Namelist : nampismod '
67         WRITE(numout,*) '      Flag to use LOBSTER model            ln_p2z      = ', ln_p2z
68         WRITE(numout,*) '      Flag to use PISCES standard model    ln_p4z      = ', ln_p4z
69         WRITE(numout,*) '      Flag to use PISCES quota    model    ln_p5z      = ', ln_p5z
70         WRITE(numout,*) '      Flag to ligand                       ln_ligand   = ', ln_ligand
71         WRITE(numout,*) '      Flag to use sediment                 ln_sediment = ', ln_sediment
72      ENDIF
73      !
74      IF(lwp) THEN                         ! control print
75         WRITE(numout,*)
76         IF( ln_p5z      )  WRITE(numout,*) '   ==>>>   PISCES QUOTA model is used'
77         IF( ln_p4z      )  WRITE(numout,*) '   ==>>>   PISCES STANDARD model is used'
78         IF( ln_p2z      )  WRITE(numout,*) '   ==>>>   LOBSTER model is used'
79         IF( ln_ligand )  WRITE(numout,*) '   ==>>>   Compute remineralization/dissolution of organic ligands'
80         IF( ln_sediment )  WRITE(numout,*) '   ==>>>   Sediment module is used'
81      ENDIF
82   
83      ioptio = 0
84      IF( ln_p2z )    ioptio = ioptio + 1
85      IF( ln_p4z )    ioptio = ioptio + 1
86      IF( ln_p5z )    ioptio = ioptio + 1
87      !
88      IF( ioptio /= 1 )   CALL ctl_stop( 'Choose ONE PISCES model namelist nampismod' )
89       !
90   END SUBROUTINE trc_nam_pisces
91
92   !!======================================================================
93END MODULE trcnam_pisces
Note: See TracBrowser for help on using the repository browser.