[186] | 1 | MODULE trc |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE trc *** |
---|
| 4 | !! Passive tracers : module for tracers defined |
---|
| 5 | !!====================================================================== |
---|
[945] | 6 | !! History : - ! 1996-01 (M. Levy) Original code |
---|
| 7 | !! - ! 1999-07 (M. Levy) for LOBSTER1 or NPZD model |
---|
| 8 | !! - ! 2000-04 (O. Aumont, M.A. Foujols) HAMOCC3 and P3ZD |
---|
| 9 | !! 1.0 ! 2004-03 (C. Ethe) Free form and module |
---|
[186] | 10 | !!---------------------------------------------------------------------- |
---|
[945] | 11 | !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) |
---|
| 12 | !! $Id$ |
---|
| 13 | !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) |
---|
[274] | 14 | !!---------------------------------------------------------------------- |
---|
[945] | 15 | #if defined key_top |
---|
[186] | 16 | !!---------------------------------------------------------------------- |
---|
[945] | 17 | !! 'key_top' TOP models |
---|
| 18 | !!---------------------------------------------------------------------- |
---|
[186] | 19 | USE par_oce |
---|
| 20 | USE par_trc |
---|
[945] | 21 | |
---|
[186] | 22 | IMPLICIT NONE |
---|
| 23 | PUBLIC |
---|
| 24 | |
---|
| 25 | !! passive tracers names and units (read in namelist) |
---|
| 26 | !! -------------------------------------------------- |
---|
[945] | 27 | CHARACTER(len=12), PUBLIC, DIMENSION(jptra) :: ctrcnm !: tracer name |
---|
| 28 | CHARACTER(len=12), PUBLIC, DIMENSION(jptra) :: ctrcun !: tracer unit |
---|
| 29 | CHARACTER(len=80), PUBLIC, DIMENSION(jptra) :: ctrcnl !: tracer long name |
---|
[186] | 30 | |
---|
| 31 | |
---|
| 32 | !! parameters for the control of passive tracers |
---|
| 33 | !! -------------------------------------------------- |
---|
[945] | 34 | INTEGER, PUBLIC :: numnat !: the number of the passive tracer NAMELIST |
---|
| 35 | LOGICAL, PUBLIC, DIMENSION(jptra) :: lutini !: initialisation from FILE or not (NAMELIST) |
---|
| 36 | LOGICAL, PUBLIC, DIMENSION(jptra) :: lutsav !: logical for saving tracer or not |
---|
| 37 | INTEGER, PUBLIC, DIMENSION(jptra) :: nutini !: FORTRAN LOGICAL UNIT for initialisation file |
---|
[186] | 38 | |
---|
| 39 | !! passive tracers fields (before,now,after) |
---|
| 40 | !! -------------------------------------------------- |
---|
[945] | 41 | REAL(wp), PUBLIC :: trai !: initial total tracer |
---|
| 42 | REAL(wp), PUBLIC :: areatot !: total volume |
---|
[186] | 43 | |
---|
[945] | 44 | REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jptra) :: trn !: traceur concentration for actual time step |
---|
| 45 | REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jptra) :: tra !: traceur concentration for next time step |
---|
| 46 | REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jptra) :: trb !: traceur concentration for before time step |
---|
[186] | 47 | |
---|
| 48 | |
---|
| 49 | !! numerical parameter (NAMELIST) |
---|
| 50 | !! -------------------------------------------------- |
---|
[945] | 51 | REAL(wp), PUBLIC :: rsc !: tuning coefficient for anti-diffusion |
---|
| 52 | REAL(wp), PUBLIC :: rtrn !: value for truncation |
---|
[186] | 53 | |
---|
| 54 | !! namelist parameters |
---|
| 55 | !! -------------------------------------------------- |
---|
[945] | 56 | INTEGER , PUBLIC :: ncortrc !: number of corrective phases |
---|
| 57 | INTEGER , PUBLIC :: ndttrc !: frequency of step on passive tracers |
---|
| 58 | INTEGER , PUBLIC :: nittrc000 !: first time step of passive tracers model |
---|
| 59 | LOGICAL , PUBLIC :: crosster !: logical if true computes crossterms |
---|
[186] | 60 | |
---|
| 61 | |
---|
| 62 | !! isopycnal scheme for passive tracers |
---|
[945] | 63 | !! ------------------------------------ |
---|
| 64 | REAL(wp), PUBLIC :: ahtrb0 !: background diffusivity coefficient for passive tracer (m2/s) |
---|
| 65 | REAL(wp), PUBLIC :: trcrat !: ratio between passive and active tracer coeff for diffusion |
---|
| 66 | REAL(wp), PUBLIC :: ahtrc0 !: horizontal eddy diffusivity for passive tracers (m2/s) |
---|
| 67 | REAL(wp), PUBLIC :: aeivtr0 !: eddy induced velocity coefficient (m2/s) |
---|
[186] | 68 | |
---|
| 69 | |
---|
| 70 | !! passive tracers restart (input and output) |
---|
[945] | 71 | !! ------------------------------------------ |
---|
| 72 | LOGICAL , PUBLIC :: lrsttr !: boolean term for restart i/o for passive tracers (namelist) |
---|
| 73 | INTEGER , PUBLIC :: nutwrs !: output FILE for passive tracers restart |
---|
| 74 | INTEGER , PUBLIC :: nutrst !: logical unit for restart FILE for passive tracers |
---|
| 75 | INTEGER , PUBLIC :: nrsttr !: control of the time step ( 0 or 1 ) for pass. tr. |
---|
[186] | 76 | |
---|
| 77 | |
---|
| 78 | !! interpolated gradient |
---|
| 79 | !!-------------------------------------------------- |
---|
[945] | 80 | REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jptra) :: gtru !: horizontal gradient at u-points at bottom ocean level |
---|
| 81 | REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jptra) :: gtrv !: horizontal gradient at v-points at bottom ocean level |
---|
[493] | 82 | |
---|
[186] | 83 | |
---|
[945] | 84 | # if defined key_trcldf_eiv && defined key_diaeiv |
---|
[186] | 85 | !! The three component of the eddy induced velocity |
---|
| 86 | !! -------------------------------------------------- |
---|
[945] | 87 | REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk) :: u_trc_eiv !: u-eiv (m/s) |
---|
| 88 | REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk) :: v_trc_eiv !: v-eiv (m/s) |
---|
| 89 | REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk) :: w_trc_eiv !: w-eiv (m/s) |
---|
| 90 | # endif |
---|
[186] | 91 | |
---|
| 92 | |
---|
| 93 | !! information for outputs |
---|
| 94 | !! -------------------------------------------------- |
---|
[945] | 95 | INTEGER , PUBLIC :: nwritetrc !: time step frequency for concentration outputs (namelist) |
---|
[186] | 96 | |
---|
[945] | 97 | # if defined key_trc_diaadd |
---|
[186] | 98 | !! additional 2D/3D outputs namelist |
---|
| 99 | !! -------------------------------------------------- |
---|
[945] | 100 | CHARACTER(len= 8), PUBLIC, DIMENSION (jpdia2d) :: ctrc2d !: 2d output field name |
---|
| 101 | CHARACTER(len= 8), PUBLIC, DIMENSION (jpdia2d) :: ctrc2u !: 2d output field unit |
---|
| 102 | CHARACTER(len= 8), PUBLIC, DIMENSION (jpdia3d) :: ctrc3d !: 3d output field name |
---|
| 103 | CHARACTER(len= 8), PUBLIC, DIMENSION (jpdia3d) :: ctrc3u !: 3d output field unit |
---|
| 104 | CHARACTER(len=80), PUBLIC, DIMENSION (jpdia2d) :: ctrc2l !: 2d output field long name |
---|
| 105 | CHARACTER(len=80), PUBLIC, DIMENSION (jpdia3d) :: ctrc3l !: 3d output field long name |
---|
| 106 | |
---|
[186] | 107 | |
---|
[945] | 108 | REAL(wp), PUBLIC, DIMENSION (jpi,jpj, jpdia2d) :: trc2d !: additional 2d outputs |
---|
| 109 | REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jpdia3d) :: trc3d !: additional 3d outputs |
---|
[186] | 110 | |
---|
| 111 | |
---|
| 112 | !! netcdf files and index common |
---|
| 113 | !! -------------------------------------------------- |
---|
[945] | 114 | INTEGER , PUBLIC :: nwritedia !: frequency of additional arrays outputs(namelist) |
---|
| 115 | # endif |
---|
[186] | 116 | |
---|
[945] | 117 | # if defined key_trc_diatrd |
---|
[186] | 118 | |
---|
| 119 | !! non conservative trends (biological, ...) |
---|
| 120 | !! -------------------------------------------------- |
---|
[945] | 121 | LOGICAL, PUBLIC, DIMENSION (jptra) :: luttrd !: large trends diagnostic to write or not (namelist) |
---|
[186] | 122 | |
---|
[945] | 123 | !! Advection-diffusion trends |
---|
[186] | 124 | !! -------------------------------------------------- |
---|
[945] | 125 | REAL(wp), PUBLIC, DIMENSION(:,:,:,:,:), ALLOCATABLE :: trtrd !: trends of the tracer equations |
---|
[186] | 126 | |
---|
[945] | 127 | INTEGER, PUBLIC, DIMENSION(jptra) :: ikeep ! indice of tracer for which dyn trends are stored |
---|
| 128 | INTEGER, PUBLIC :: nkeep ! number of tracers for which dyn trends are stored |
---|
| 129 | ! ! (used to allocate trtrd buffer) |
---|
[433] | 130 | |
---|
[186] | 131 | !! netcdf files and index common |
---|
| 132 | !! -------------------------------------------------- |
---|
[945] | 133 | INTEGER , PUBLIC :: nwritetrd !: frequency of additional arrays outputs(namelist) |
---|
[186] | 134 | |
---|
[945] | 135 | # endif |
---|
[186] | 136 | |
---|
| 137 | !! passive tracers data read and at given time_step |
---|
| 138 | !! -------------------------------------------------- |
---|
[945] | 139 | # if defined key_dtatrc |
---|
| 140 | INTEGER , PUBLIC, DIMENSION(jptra) :: numtr !: logical unit for passive tracers data |
---|
| 141 | # endif |
---|
[186] | 142 | |
---|
[945] | 143 | #else |
---|
| 144 | !!---------------------------------------------------------------------- |
---|
| 145 | !! Empty module : No passive tracer |
---|
| 146 | !!---------------------------------------------------------------------- |
---|
[439] | 147 | #endif |
---|
| 148 | |
---|
[186] | 149 | !!====================================================================== |
---|
| 150 | END MODULE trc |
---|