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_c14b.F90 in branches/NERC/dev_r5518_GO6_split_trcbiomedusa/NEMOGCM/NEMO/TOP_SRC/C14b – NEMO

source: branches/NERC/dev_r5518_GO6_split_trcbiomedusa/NEMOGCM/NEMO/TOP_SRC/C14b/trcnam_c14b.F90

Last change on this file was 8434, checked in by jpalmier, 7 years ago

JPALM -- 11-08-2017 -- MEDUSA cleaned and purged

File size: 4.5 KB
RevLine 
[2038]1MODULE trcnam_c14b
2   !!======================================================================
3   !!                         ***  MODULE trcnam_c14b  ***
4   !! TOP :   initialisation of some run parameters for C14 chemical model
5   !!======================================================================
6   !! History :   2.0  !  2007-12  (C. Ethe, G. Madec) from trcnam.cfc.h90
7   !!----------------------------------------------------------------------
8#if defined key_c14b
9   !!----------------------------------------------------------------------
10   !!   'key_c14b'                                         C14 bomb tracer
11   !!----------------------------------------------------------------------
12   !! trc_nam_c14b      : C14 model initialisation
13   !!----------------------------------------------------------------------
14   USE oce_trc         ! Ocean variables
15   USE par_trc         ! TOP parameters
16   USE trc             ! TOP variables
17   USE trcsms_c14b     ! C14b specific variable
[3294]18   USE iom             ! I/O manager
[2038]19
20   IMPLICIT NONE
21   PRIVATE
22
23   PUBLIC   trc_nam_c14b   ! called by trcnam.F90 module
24
25   !!----------------------------------------------------------------------
[2287]26   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
[6486]27   !! $Id$
[2287]28   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
[2038]29   !!----------------------------------------------------------------------
30
31CONTAINS
32
33   SUBROUTINE trc_nam_c14b
34      !!-------------------------------------------------------------------
35      !!                  ***  ROUTINE trc_nam_c14b  ***
36      !!                 
37      !! ** Purpose :   Definition some run parameter for C14 model
38      !!
39      !! ** Method  :   Read the namc14 namelist and check the parameter
[3294]40      !!       values called at the first timestep (nittrc000)
[2038]41      !!
42      !! ** input   :   Namelist namelist_c14b
43      !!----------------------------------------------------------------------
[4147]44      INTEGER ::  numnatb_ref = -1   ! Logical unit for reference c14b namelist
45      INTEGER ::  numnatb_cfg = -1   ! Logical unit for configuration c14b namelist
46      INTEGER ::  numonb      = -1   ! Logical unit for output namelist
47      INTEGER :: ios                 ! Local integer output status for namelist read
[2038]48
49      ! definition of additional diagnostic as a structure
[3294]50      INTEGER :: jl, jn
[2038]51      !!
52      NAMELIST/namc14date/ ndate_beg_b, nyear_res_b
53      !!-------------------------------------------------------------------
54      !                             ! Open namelist file
[4147]55      CALL ctl_opn( numnatb_ref, 'namelist_c14b_ref'  ,     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
56      CALL ctl_opn( numnatb_cfg, 'namelist_c14b_cfg'  ,     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )   
[4624]57      IF(lwm) CALL ctl_opn( numonb, 'output.namelist.c14', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )     
[4147]58      REWIND( numnatb_ref )              ! Namelist namc14date in reference namelist : c14b parameters
59      READ  ( numnatb_ref, namc14date, IOSTAT = ios, ERR = 901)
60901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc14date in reference namelist', lwp )
[2038]61
[4147]62      REWIND( numnatb_cfg )              ! Namelist namc14date in configuration namelist : c14b parameters
63      READ  ( numnatb_cfg, namc14date, IOSTAT = ios, ERR = 902 )
64902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc14date in configuration namelist', lwp )
[4624]65      IF(lwm) WRITE ( numonb, namc14date )
[2038]66      IF(lwp) THEN                  ! control print
67         WRITE(numout,*)
68         WRITE(numout,*) ' trc_nam: Read namdates, namelist for C14 chemical model'
69         WRITE(numout,*) ' ~~~~~~~'
70         WRITE(numout,*) '    initial calendar date (aammjj) for C14  ndate_beg_b = ', ndate_beg_b
71         WRITE(numout,*) '    restoring time constant (year)          nyear_res_b = ', nyear_res_b
72      ENDIF
73      nyear_beg_b = ndate_beg_b / 10000
74      IF(lwp) WRITE(numout,*) '    initial year (aa)                  nyear_beg_b = ', nyear_beg_b
75      !
76
[4624]77   IF(lwm) CALL FLUSH ( numonb )     ! flush output namelist C14b
[4147]78
[2038]79   END SUBROUTINE trc_nam_c14b
80   
81#else
82   !!----------------------------------------------------------------------
83   !!  Dummy module :                                                No 14C
84   !!----------------------------------------------------------------------
85CONTAINS
86   SUBROUTINE trc_nam_c14b                      ! Empty routine
87   END  SUBROUTINE  trc_nam_c14b
88#endif 
89
90   !!======================================================================
91END MODULE trcnam_c14b
Note: See TracBrowser for help on using the repository browser.