source: branches/NERC/dev_r5518_GO6_conserv_check_up/NEMOGCM/NEMO/TOP_SRC/IDTRA/trcnam_idtra.F90 @ 9260

Last change on this file since 9260 was 6046, checked in by jpalmier, 5 years ago

JPALM — 14-12-2015 — Add the ideal tracer modules

File size: 5.6 KB
Line 
1MODULE trcnam_idtra
2   !!======================================================================
3   !!                         ***  MODULE trcnam_idtra  ***
4   !! TOP :   initialisation of some run parameters for IDEAL-TRACER chemical model
5   !!======================================================================
6   !! History :   2.0  !  2007-12  (C. Ethe, G. Madec) from trcnam.idtra.h90
7   !!----------------------------------------------------------------------
8#if defined key_idtra
9   !!----------------------------------------------------------------------
10   !!   'key_idtra'                                               IDEAL-TRACER tracers
11   !!----------------------------------------------------------------------
12   !! trc_nam_idtra      : IDEAL-TRACER model initialisation
13   !!----------------------------------------------------------------------
14   USE oce_trc         ! Ocean variables
15   USE par_trc         ! TOP parameters
16   USE trc             ! TOP variables
17   USE trcsms_idtra    ! IDEAL-TRACER specific variable
18   USE iom             ! I/O manager
19
20   IMPLICIT NONE
21   PRIVATE
22
23   PUBLIC   trc_nam_idtra   ! called by trcnam.F90 module
24
25   !!----------------------------------------------------------------------
26   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007)
27   !! $Id$
28   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
29   !!----------------------------------------------------------------------
30
31CONTAINS
32
33   SUBROUTINE trc_nam_idtra
34      !!-------------------------------------------------------------------
35      !!                  ***  ROUTINE trc_nam_idtra  ***
36      !!
37      !! ** Purpose :   Definition some run parameter for IDEAL-TRACER model
38      !!
39      !! ** Method  :   Read the namidtra namelist and check the parameter
40      !!       values called at the first timestep (nit000)
41      !!
42      !! ** input   :   Namelist namidtra
43      !!----------------------------------------------------------------------
44      INTEGER  :: numnatm_ref = -1   ! Logical unit for reference ID-TRA namelist
45      INTEGER  :: numnatm_cfg = -1   ! Logical unit for configuration ID-TRA namelist
46      INTEGER  :: numonc      = -1   ! Logical unit for output namelist
47      INTEGER  :: ios                 ! Local integer output status for namelist read
48      REAL(wp) :: tmp_decay          !! Years ; half time decay of our idealize tracer
49      REAL(wp) :: TDECyr, TDEC   
50      !! ----------------------------------------------------------------
51      NAMELIST/namidtra/tmp_decay
52      !!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53      !! Jpalm -- 4-11-2014
54      !! namelist for idealize tracer
55      !! only thing in namelist is the chosen half time decay
56      !! no atmospheric conditions, cause we do impose a surface concentration of 1,
57      !! and no additionnal diagnostics,
58      !! because the only thing we are interested in is the water mass concentration on this tracer.
59      !!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
60      IF(lwp) WRITE(numout,*)
61      IF(lwp) WRITE(numout,*) ' trc_nam_idtra: read IDEAL-TRACER namelist'
62      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
63      !!
64      !! Open the namelist file :
65      !!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66      CALL ctl_opn( numnatm_ref, 'namelist_idtra_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
67      CALL ctl_opn( numnatm_cfg, 'namelist_idtra_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
68      IF(lwm) CALL ctl_opn( numonc, 'output.namelist.idtra', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
69      !! Read the namelists :
70      !!~~~~~~~~~~~~~~~~~~~~~~~
71      !! First namelist of our idealize tracer :
72      !! read the decay 1/2 time of our tracer, to define in the namelist.
73      !! tmp_decay = 1y ; 10y ; 100y or 1000y depending of which water mass you want to track
74      !!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
75
76      REWIND( numnatm_ref )              ! Namelist namidtra in reference namelist : IDTRA parameters
77      READ  ( numnatm_ref, namidtra, IOSTAT = ios, ERR = 901)
78901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namidtra in reference namelist', lwp )
79
80      REWIND( numnatm_cfg )              ! Namelist namidtra in configuration namelist : IDTRA parameters
81      READ  ( numnatm_cfg, namidtra, IOSTAT = ios, ERR = 902 )
82902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namidtra in configuration namelist', lwp )
83      IF(lwm) WRITE ( numonc, namidtra )
84
85      IF(lwp) WRITE(numout,*) '   -  half time decay of our idealize tracer : ', tmp_decay
86
87      ! decroissance radioactive du traceur ideal
88      ! ---------------------------------------
89      ! TDECyr = 12.43/LOG(2.)             !! Tricium as example
90       TDECyr = tmp_decay/LOG(2.)          !! Idealise tracer -- with tmp_decay given in the idtracer namelist
91       TDEC = TDECyr*365.*24.*60.*60.      !! translate in second
92       FDEC = EXP( -rdt/TDEC )
93
94
95!! #if defined key_trc_diaadd  && ! defined key_iomput
96      !!
97      !!  -Here you can add tracers names to be read
98      !! in a namelist.
99      !!  -But this is not necessary with the iomput module
100      !! cause names are written in the Iodef file.
101      !!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102
103!! #endif
104
105   END SUBROUTINE trc_nam_idtra
106
107#else
108   !!----------------------------------------------------------------------
109   !!  Dummy module :                                                No IDEAL-TRACER
110   !!----------------------------------------------------------------------
111CONTAINS
112   SUBROUTINE trc_nam_idtra                      ! Empty routine
113   END  SUBROUTINE  trc_nam_idtra
114#endif
115
116   !!======================================================================
117END MODULE trcnam_idtra
118
119
120
121
122
123
Note: See TracBrowser for help on using the repository browser.