[186] | 1 | MODULE trc |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE trc *** |
---|
| 4 | !! Passive tracers : module for tracers defined |
---|
| 5 | !!====================================================================== |
---|
| 6 | !! History : |
---|
| 7 | !! 8.2 ! 96-01 (M. Levy) Original code |
---|
| 8 | !! ! 99-07 (M. Levy) for LOBSTER1 or NPZD model |
---|
| 9 | !! ! 00-04 (O. Aumont, M.A. Foujols) HAMOCC3 and P3ZD |
---|
| 10 | !! 9.0 ! 04-03 (C. Ethe) Free form and module |
---|
| 11 | !!---------------------------------------------------------------------- |
---|
[274] | 12 | !! TOP 1.0, LOCEAN-IPSL (2005) |
---|
| 13 | !!---------------------------------------------------------------------- |
---|
[186] | 14 | #if defined key_passivetrc |
---|
| 15 | !!---------------------------------------------------------------------- |
---|
| 16 | !! 'key_passivetrc' : Passive tracer |
---|
| 17 | !!--------------------------------------------------------------------- |
---|
| 18 | !! * Modules used |
---|
| 19 | USE par_oce |
---|
| 20 | USE par_trc |
---|
| 21 | IMPLICIT NONE |
---|
| 22 | |
---|
| 23 | PUBLIC |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | !! passive tracers names and units (read in namelist) |
---|
| 27 | !! -------------------------------------------------- |
---|
| 28 | CHARACTER(len=12), PUBLIC, DIMENSION(jptra) :: & |
---|
| 29 | ctrcnm , & !!: tracer name |
---|
| 30 | ctrcun !!: tracer unit |
---|
| 31 | |
---|
| 32 | CHARACTER(len=80), PUBLIC, DIMENSION(jptra) :: & |
---|
| 33 | ctrcnl !!: tracer long name |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | !! parameters for the control of passive tracers |
---|
| 37 | !! -------------------------------------------------- |
---|
| 38 | INTEGER, PUBLIC :: & |
---|
| 39 | numnat !!: the number of the passive tracer NAMELIST |
---|
| 40 | |
---|
| 41 | LOGICAL, PUBLIC, DIMENSION(jptra) :: & |
---|
| 42 | lutini !!: initialisation from FILE or not (NAMELIST) |
---|
| 43 | |
---|
| 44 | INTEGER , PUBLIC, DIMENSION(jptra) :: & |
---|
| 45 | nutini !!: FORTRAN LOGICAL UNIT for initialisation file |
---|
| 46 | |
---|
| 47 | !! passive tracers fields (before,now,after) |
---|
| 48 | !! -------------------------------------------------- |
---|
| 49 | REAL(wp), PUBLIC :: & |
---|
| 50 | trai !!: initial total tracer |
---|
| 51 | |
---|
| 52 | REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jptra) :: & |
---|
| 53 | trn , & !!: traceur concentration for actual time step |
---|
| 54 | tra , & !!: traceur concentration for next time step |
---|
| 55 | trb !!: traceur concentration for before time step |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | !! numerical parameter (NAMELIST) |
---|
| 59 | !! -------------------------------------------------- |
---|
| 60 | REAL(wp), PUBLIC :: & |
---|
| 61 | rsc , & !!: tuning coefficient for anti-diffusion |
---|
| 62 | rtrn !!: value for truncation |
---|
| 63 | |
---|
| 64 | !! namelist parameters |
---|
| 65 | !! -------------------------------------------------- |
---|
| 66 | INTEGER , PUBLIC :: & |
---|
| 67 | ncortrc , & !!: number of corrective phases |
---|
| 68 | ndttrc , & !!: frequency of step on passive tracers |
---|
| 69 | nittrc000 !!: first time step of passive tracers model |
---|
| 70 | |
---|
| 71 | LOGICAL, PUBLIC :: & |
---|
| 72 | crosster !!: logical if true computes crossterms |
---|
| 73 | |
---|
| 74 | |
---|
| 75 | !! isopycnal scheme for passive tracers |
---|
| 76 | !! -------------------------------------------------- |
---|
| 77 | REAL(wp), PUBLIC :: & |
---|
| 78 | ahtrb0 , & !!: background diffusivity coefficient for passive tracer (m2/s) |
---|
| 79 | trcrat , & !!: ratio between passive and active tracer coeff for diffusion |
---|
| 80 | ahtrc0 , & !!: horizontal eddy diffusivity for passive tracers (m2/s) |
---|
| 81 | aeivtr0 !!: eddy induced velocity coefficient (m2/s) |
---|
| 82 | |
---|
| 83 | |
---|
| 84 | !! passive tracers restart (input and output) |
---|
| 85 | !! -------------------------------------------------- |
---|
| 86 | LOGICAL, PUBLIC :: & |
---|
| 87 | lrsttr !!: boolean term for restart i/o for passive tracers (namelist) |
---|
| 88 | |
---|
| 89 | INTEGER , PUBLIC :: & |
---|
| 90 | nutwrs , & !!: output FILE for passive tracers restart |
---|
| 91 | nutrst , & !!: logical unit for restart FILE for passive tracers |
---|
| 92 | nrsttr !!: control of the time step ( 0 or 1 ) for pass. tr. |
---|
| 93 | |
---|
| 94 | #if defined key_partial_steps |
---|
| 95 | |
---|
| 96 | !! interpolated gradient |
---|
| 97 | !!-------------------------------------------------- |
---|
| 98 | REAL (wp), PUBLIC, DIMENSION (jpi,jpj,jptra) :: & |
---|
| 99 | gtru , & !!: horizontal gradient at u-points at bottom ocean level |
---|
| 100 | gtrv !!: horizontal gradient at v-points at bottom ocean level |
---|
| 101 | #else |
---|
| 102 | REAL (wp), PUBLIC :: & |
---|
| 103 | gtru , & !!: horizontal gradient at u-points at bottom ocean level |
---|
| 104 | gtrv !!: horizontal gradient at v-points at bottom ocean level |
---|
| 105 | |
---|
| 106 | #endif |
---|
| 107 | |
---|
[197] | 108 | #if defined key_trcldf_eiv && defined key_diaeiv |
---|
[186] | 109 | !! The three component of the eddy induced velocity |
---|
| 110 | !! -------------------------------------------------- |
---|
| 111 | REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk) :: & |
---|
| 112 | u_trc_eiv, & !!: u-eiv (m/s) |
---|
| 113 | v_trc_eiv, & !!: v-eiv (m/s) |
---|
| 114 | w_trc_eiv !!: w-eiv (m/s) |
---|
| 115 | #endif |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | !! information for outputs |
---|
| 119 | !! -------------------------------------------------- |
---|
| 120 | INTEGER , PUBLIC :: & |
---|
[267] | 121 | nwritetrc !!: time step frequency for concentration outputs (namelist) |
---|
[186] | 122 | |
---|
| 123 | # if defined key_trc_diaadd |
---|
| 124 | !! additional 2D/3D outputs namelist |
---|
| 125 | !! -------------------------------------------------- |
---|
| 126 | CHARACTER(len=8), PUBLIC, DIMENSION (jpdia2d) :: & |
---|
| 127 | ctrc2d , & !!: 2d output field name |
---|
| 128 | ctrc2u !!: 2d output field unit |
---|
| 129 | |
---|
| 130 | CHARACTER(len=8), PUBLIC, DIMENSION (jpdia3d) :: & |
---|
| 131 | ctrc3d , & !!: 3d output field name |
---|
| 132 | ctrc3u !!: 3d output field unit |
---|
| 133 | |
---|
| 134 | CHARACTER(len=80), PUBLIC, DIMENSION (jpdia2d) :: & |
---|
| 135 | ctrc2l !!: 2d output field long name |
---|
| 136 | |
---|
| 137 | CHARACTER(len=80), PUBLIC, DIMENSION (jpdia3d) :: & |
---|
| 138 | ctrc3l !!: 3d output field long name |
---|
| 139 | |
---|
| 140 | REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpdia2d) :: & |
---|
| 141 | trc2d !!: additional 2d outputs |
---|
| 142 | |
---|
| 143 | REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jpdia3d) :: & |
---|
| 144 | trc3d !!: additional 3d outputs |
---|
| 145 | |
---|
| 146 | |
---|
| 147 | !! netcdf files and index common |
---|
| 148 | !! -------------------------------------------------- |
---|
| 149 | INTEGER , PUBLIC :: & |
---|
[267] | 150 | nwriteadd !!: frequency of additional arrays outputs(namelist) |
---|
[186] | 151 | #endif |
---|
| 152 | |
---|
| 153 | # if defined key_trc_diatrd |
---|
| 154 | |
---|
| 155 | !! non conservative trends (biological, ...) |
---|
| 156 | !! -------------------------------------------------- |
---|
| 157 | LOGICAL, PUBLIC, DIMENSION (jptra) :: & |
---|
| 158 | luttrd !!: large trends diagnostic to write or not (namelist) |
---|
| 159 | |
---|
| 160 | !! dynamical trends |
---|
| 161 | !! trtrd() : trends of the tracer equations |
---|
| 162 | !! 1 : X advection |
---|
| 163 | !! 2 : Y advection |
---|
| 164 | !! 3 : Z advection |
---|
| 165 | !! 4 : X diffusion |
---|
| 166 | !! 5 : Y diffusion |
---|
| 167 | !! 6 : Z diffusion |
---|
| 168 | !! 7 : X gent velocity |
---|
| 169 | !! 8 : Y gent velocity |
---|
| 170 | !! 9 : Z gent velocity |
---|
| 171 | !! -------------------------------------------------- |
---|
| 172 | |
---|
| 173 | |
---|
| 174 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk,jptra,jpdiatrc) :: & |
---|
| 175 | trtrd !!: trends of the tracer equations |
---|
| 176 | |
---|
| 177 | !! netcdf files and index common |
---|
| 178 | !! -------------------------------------------------- |
---|
| 179 | INTEGER , PUBLIC :: & |
---|
| 180 | nwritetrd !!: frequency of additional arrays outputs(namelist) |
---|
| 181 | |
---|
| 182 | #endif |
---|
| 183 | |
---|
| 184 | !! passive tracers data read and at given time_step |
---|
| 185 | !! -------------------------------------------------- |
---|
| 186 | #if defined key_trc_dta |
---|
| 187 | |
---|
| 188 | INTEGER , PUBLIC, DIMENSION(jptra) :: & |
---|
[267] | 189 | numtr !!: logical unit for passive tracers data |
---|
[186] | 190 | |
---|
| 191 | #endif |
---|
| 192 | |
---|
| 193 | #else |
---|
| 194 | !!====================================================================== |
---|
| 195 | !! Empty module : No passive tracer |
---|
| 196 | !!====================================================================== |
---|
| 197 | #endif |
---|
| 198 | |
---|
| 199 | END MODULE trc |
---|