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/branches/2019/dev_r11613_ENHANCE-04_namelists_as_internalfiles/src/TOP/PISCES – NEMO

source: NEMO/branches/2019/dev_r11613_ENHANCE-04_namelists_as_internalfiles/src/TOP/PISCES/trcnam_pisces.F90 @ 11624

Last change on this file since 11624 was 11624, checked in by acc, 4 years ago

Branch 2019/dev_r11613_ENHANCE-04_namelists_as_internalfiles. Substantive changes required to replace all namelists with internal files. These are the key changes only; to compile and run tests all REWIND and CLOSE operations on the (no longer) units have to be removed. These changes affect many more files but can be scripted so are not included here in order to make a later merge easier. The scripts used to prepare code for testing are included on: wiki:2019WP/ENHANCE-04_AndrewC-reporting/Internal_Namelists. With these additional changes this code passes most SETTE tests but the AGRIF preprocessor does not currently accept the new allocatable character strings. To be investigated.

  • Property svn:keywords set to Id
File size: 4.3 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 load_nml( numnatp_ref, TRIM( clname )//'_ref', numout, .FALSE. )
54      CALL load_nml( numnatp_cfg, TRIM( clname )//'_cfg', numout, .FALSE. )
55      IF(lwm) CALL ctl_opn( numonp     , 'output.namelist.pis' , 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
56      !
57      READ  ( numnatp_ref, nampismod, IOSTAT = ios, ERR = 901)
58901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampismod in reference namelist' )
59      READ  ( numnatp_cfg, nampismod, IOSTAT = ios, ERR = 902 )
60902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampismod in configuration namelist' )
61      IF(lwm) WRITE( numonp, nampismod )
62      !
63      IF(lwp) THEN                  ! control print
64         WRITE(numout,*) '   Namelist : nampismod '
65         WRITE(numout,*) '      Flag to use LOBSTER model            ln_p2z      = ', ln_p2z
66         WRITE(numout,*) '      Flag to use PISCES standard model    ln_p4z      = ', ln_p4z
67         WRITE(numout,*) '      Flag to use PISCES quota    model    ln_p5z      = ', ln_p5z
68         WRITE(numout,*) '      Flag to ligand                       ln_ligand   = ', ln_ligand
69         WRITE(numout,*) '      Flag to use sediment                 ln_sediment = ', ln_sediment
70      ENDIF
71      !
72      IF(lwp) THEN                         ! control print
73         WRITE(numout,*)
74         IF( ln_p5z      )  WRITE(numout,*) '   ==>>>   PISCES QUOTA model is used'
75         IF( ln_p4z      )  WRITE(numout,*) '   ==>>>   PISCES STANDARD model is used'
76         IF( ln_p2z      )  WRITE(numout,*) '   ==>>>   LOBSTER model is used'
77         IF( ln_ligand )  WRITE(numout,*) '   ==>>>   Compute remineralization/dissolution of organic ligands'
78         IF( ln_sediment )  WRITE(numout,*) '   ==>>>   Sediment module is used'
79      ENDIF
80   
81      ioptio = 0
82      IF( ln_p2z )    ioptio = ioptio + 1
83      IF( ln_p4z )    ioptio = ioptio + 1
84      IF( ln_p5z )    ioptio = ioptio + 1
85      !
86      IF( ioptio /= 1 )   CALL ctl_stop( 'Choose ONE PISCES model namelist nampismod' )
87       !
88   END SUBROUTINE trc_nam_pisces
89
90   !!======================================================================
91END MODULE trcnam_pisces
Note: See TracBrowser for help on using the repository browser.