[215] | 1 | MODULE trdmod |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE trdmod *** |
---|
| 4 | !! Ocean diagnostics: ocean tracers and dynamic trends |
---|
| 5 | !!===================================================================== |
---|
[503] | 6 | !! History : 9.0 ! 04-08 (C. Talandier) Original code |
---|
| 7 | !! ! 05-04 (C. Deltel) Add Asselin trend in the ML budget |
---|
| 8 | !!---------------------------------------------------------------------- |
---|
[215] | 9 | #if defined key_trdtra || defined key_trddyn || defined key_trdmld || defined key_trdvor || defined key_esopa |
---|
| 10 | !!---------------------------------------------------------------------- |
---|
| 11 | !! trd_mod : Call the trend to be computed |
---|
[503] | 12 | !! trd_mod_init : Initialization step |
---|
[215] | 13 | !!---------------------------------------------------------------------- |
---|
[503] | 14 | USE phycst ! physical constants |
---|
[215] | 15 | USE oce ! ocean dynamics and tracers variables |
---|
| 16 | USE dom_oce ! ocean space and time domain variables |
---|
[503] | 17 | USE zdf_oce ! ocean vertical physics variables |
---|
[215] | 18 | USE trdmod_oce ! ocean variables trends |
---|
[503] | 19 | USE ldftra_oce ! ocean active tracers lateral physics |
---|
[215] | 20 | USE trdvor ! ocean vorticity trends |
---|
| 21 | USE trdicp ! ocean bassin integral constraints properties |
---|
| 22 | USE trdmld ! ocean active mixed layer tracers trends |
---|
| 23 | USE in_out_manager ! I/O manager |
---|
[503] | 24 | USE taumod ! surface ocean stress |
---|
[215] | 25 | |
---|
| 26 | IMPLICIT NONE |
---|
| 27 | PRIVATE |
---|
| 28 | |
---|
[503] | 29 | REAL(wp) :: r2dt ! time-step, = 2 rdttra except at nit000 (=rdttra) if neuler=0 |
---|
[215] | 30 | |
---|
[503] | 31 | PUBLIC trd_mod ! called by all dynXX or traXX modules |
---|
| 32 | PUBLIC trd_mod_init ! called by opa.F90 module |
---|
| 33 | |
---|
[215] | 34 | !! * Substitutions |
---|
| 35 | # include "domzgr_substitute.h90" |
---|
| 36 | # include "vectopt_loop_substitute.h90" |
---|
| 37 | !!---------------------------------------------------------------------- |
---|
[247] | 38 | !! OPA 9.0 , LOCEAN-IPSL (2005) |
---|
| 39 | !! $Header$ |
---|
[503] | 40 | !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) |
---|
[215] | 41 | !!---------------------------------------------------------------------- |
---|
| 42 | |
---|
| 43 | CONTAINS |
---|
| 44 | |
---|
[503] | 45 | SUBROUTINE trd_mod( ptrdx, ptrdy, ktrd, ctype, kt, cnbpas ) |
---|
[215] | 46 | !!--------------------------------------------------------------------- |
---|
| 47 | !! *** ROUTINE trd_mod *** |
---|
| 48 | !! |
---|
| 49 | !! ** Purpose : Dispatch all trends computation, e.g. vorticity, mld or |
---|
[503] | 50 | !! integral constraints |
---|
| 51 | !!---------------------------------------------------------------------- |
---|
| 52 | INTEGER, INTENT( in ) :: kt ! time step |
---|
| 53 | INTEGER, INTENT( in ) :: ktrd ! tracer trend index |
---|
| 54 | CHARACTER(len=3), INTENT( in ) :: ctype ! momentum or tracers trends type 'DYN'/'TRA' |
---|
| 55 | CHARACTER(len=3), INTENT( in ), OPTIONAL :: cnbpas ! number of passage |
---|
| 56 | REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( inout ) :: ptrdx ! Temperature or U trend |
---|
| 57 | REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( inout ) :: ptrdy ! Salinity or V trend |
---|
[215] | 58 | !! |
---|
[503] | 59 | INTEGER :: ji, ikbu, ikbum1 |
---|
| 60 | INTEGER :: jj, ikbv, ikbvm1 |
---|
[521] | 61 | CHARACTER(len=3) :: ccpas ! number of passage |
---|
[503] | 62 | REAL(wp) :: zua, zva ! scalars |
---|
| 63 | REAL(wp), DIMENSION(jpi,jpj) :: ztswu, ztswv ! 2D workspace |
---|
| 64 | REAL(wp), DIMENSION(jpi,jpj) :: ztbfu, ztbfv ! 2D workspace |
---|
| 65 | REAL(wp), DIMENSION(jpi,jpj) :: z2dx, z2dy ! workspace arrays |
---|
[215] | 66 | !!---------------------------------------------------------------------- |
---|
| 67 | |
---|
[503] | 68 | z2dx(:,:) = 0.e0 ; z2dy(:,:) = 0.e0 ! initialization of workspace arrays |
---|
[215] | 69 | |
---|
[503] | 70 | ! Control of optional arguments |
---|
[521] | 71 | ccpas = 'fst' |
---|
| 72 | IF( PRESENT(cnbpas) ) ccpas = cnbpas |
---|
[215] | 73 | |
---|
[503] | 74 | IF( neuler == 0 .AND. kt == nit000 ) THEN ; r2dt = rdt ! = rdtra (restarting with Euler time stepping) |
---|
| 75 | ELSEIF( kt <= nit000 + 1) THEN ; r2dt = 2. * rdt ! = 2 rdttra (leapfrog) |
---|
| 76 | ENDIF |
---|
[215] | 77 | |
---|
| 78 | !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
[503] | 79 | ! I. Integral Constraints Properties for momentum and/or tracers trends |
---|
[215] | 80 | !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
---|
| 81 | |
---|
| 82 | IF( ( mod(kt,ntrd) == 0 .OR. kt == nit000 .OR. kt == nitend) ) THEN |
---|
[503] | 83 | ! |
---|
| 84 | IF( lk_trdtra .AND. ctype == 'TRA' ) THEN ! active tracer trends |
---|
| 85 | SELECT CASE ( ktrd ) |
---|
| 86 | CASE ( jptra_trd_ldf ) ; CALL trd_icp( ptrdx, ptrdy, jpicpt_ldf, ctype ) ! lateral diff |
---|
| 87 | CASE ( jptra_trd_zdf ) ; CALL trd_icp( ptrdx, ptrdy, jpicpt_zdf, ctype ) ! vertical diff (Kz) |
---|
| 88 | CASE ( jptra_trd_bbc ) ; CALL trd_icp( ptrdx, ptrdy, jpicpt_bbc, ctype ) ! bottom boundary cond |
---|
| 89 | CASE ( jptra_trd_bbl ) ; CALL trd_icp( ptrdx, ptrdy, jpicpt_bbl, ctype ) ! bottom boundary layer |
---|
| 90 | CASE ( jptra_trd_npc ) ; CALL trd_icp( ptrdx, ptrdy, jpicpt_npc, ctype ) ! static instability mixing |
---|
| 91 | CASE ( jptra_trd_dmp ) ; CALL trd_icp( ptrdx, ptrdy, jpicpt_dmp, ctype ) ! damping |
---|
| 92 | CASE ( jptra_trd_qsr ) ; CALL trd_icp( ptrdx, ptrdy, jpicpt_qsr, ctype ) ! penetrative solar radiat. |
---|
| 93 | CASE ( jptra_trd_nsr ) |
---|
| 94 | z2dx(:,:) = ptrdx(:,:,1) ; z2dy(:,:) = ptrdy(:,:,1) |
---|
| 95 | CALL trd_icp( z2dx, z2dy, jpicpt_nsr, ctype ) ! non solar radiation |
---|
| 96 | CASE ( jptra_trd_xad ) ; CALL trd_icp( ptrdx, ptrdy, jpicpt_xad, ctype ) ! x- horiz adv |
---|
| 97 | CASE ( jptra_trd_yad ) ; CALL trd_icp( ptrdx, ptrdy, jpicpt_yad, ctype ) ! y- horiz adv |
---|
| 98 | CASE ( jptra_trd_zad ) ! z- vertical adv |
---|
[521] | 99 | CALL trd_icp( ptrdx, ptrdy, jpicpt_zad, ctype, ccpas ) |
---|
[503] | 100 | ! compute the surface flux condition wn(:,:,1)*tn(:,:,1) |
---|
[521] | 101 | z2dx(:,:) = wn(:,:,1)*tn(:,:,1)/fse3t(:,:,1) |
---|
[503] | 102 | z2dy(:,:) = wn(:,:,1)*sn(:,:,1)/fse3t(:,:,1) |
---|
| 103 | CALL trd_icp( z2dx , z2dy , jpicpt_zl1, ctype ) ! 1st z- vertical adv |
---|
| 104 | END SELECT |
---|
| 105 | END IF |
---|
[215] | 106 | |
---|
[503] | 107 | IF( lk_trddyn .AND. ctype == 'DYN' ) THEN ! momentum trends |
---|
| 108 | ! |
---|
| 109 | SELECT CASE ( ktrd ) |
---|
| 110 | CASE ( jpdyn_trd_hpg ) ; CALL trd_icp( ptrdx, ptrdy, jpicpd_hpg, ctype ) ! hydrost. pressure grad |
---|
| 111 | CASE ( jpdyn_trd_keg ) ; CALL trd_icp( ptrdx, ptrdy, jpicpd_keg, ctype ) ! KE gradient |
---|
| 112 | CASE ( jpdyn_trd_rvo ) ; CALL trd_icp( ptrdx, ptrdy, jpicpd_rvo, ctype ) ! relative vorticity |
---|
| 113 | CASE ( jpdyn_trd_pvo ) ; CALL trd_icp( ptrdx, ptrdy, jpicpd_pvo, ctype ) ! planetary vorticity |
---|
| 114 | CASE ( jpdyn_trd_ldf ) ; CALL trd_icp( ptrdx, ptrdy, jpicpd_ldf, ctype ) ! lateral diffusion |
---|
| 115 | CASE ( jpdyn_trd_zad ) ; CALL trd_icp( ptrdx, ptrdy, jpicpd_zad, ctype ) ! vertical advection |
---|
| 116 | CASE ( jpdyn_trd_spg ) ; CALL trd_icp( ptrdx, ptrdy, jpicpd_spg, ctype ) ! surface pressure grad. |
---|
| 117 | CASE ( jpdyn_trd_dat ) ; CALL trd_icp( ptrdx, ptrdy, jpicpd_dat, ctype ) ! damping term |
---|
| 118 | CASE ( jpdyn_trd_zdf ) ! vertical diffusion |
---|
| 119 | ! subtract surface forcing/bottom friction trends |
---|
| 120 | ! from vertical diffusive momentum trends |
---|
| 121 | ztswu(:,:) = 0.e0 ; ztswv(:,:) = 0.e0 |
---|
| 122 | ztbfu(:,:) = 0.e0 ; ztbfv(:,:) = 0.e0 |
---|
| 123 | DO jj = 2, jpjm1 |
---|
| 124 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
| 125 | ! save the surface forcing momentum fluxes |
---|
| 126 | ztswu(ji,jj) = taux(ji,jj) / ( fse3u(ji,jj,1)*rau0 ) |
---|
| 127 | ztswv(ji,jj) = tauy(ji,jj) / ( fse3v(ji,jj,1)*rau0 ) |
---|
| 128 | ! save bottom friction momentum fluxes |
---|
| 129 | ikbu = MIN( mbathy(ji+1,jj ), mbathy(ji,jj) ) |
---|
| 130 | ikbv = MIN( mbathy(ji ,jj+1), mbathy(ji,jj) ) |
---|
| 131 | ikbum1 = MAX( ikbu-1, 1 ) |
---|
| 132 | ikbvm1 = MAX( ikbv-1, 1 ) |
---|
| 133 | zua = ua(ji,jj,ikbum1) * r2dt + ub(ji,jj,ikbum1) |
---|
| 134 | zva = va(ji,jj,ikbvm1) * r2dt + vb(ji,jj,ikbvm1) |
---|
| 135 | ztbfu(ji,jj) = - avmu(ji,jj,ikbu) * zua / ( fse3u(ji,jj,ikbum1)*fse3uw(ji,jj,ikbu) ) |
---|
| 136 | ztbfv(ji,jj) = - avmv(ji,jj,ikbv) * zva / ( fse3v(ji,jj,ikbvm1)*fse3vw(ji,jj,ikbv) ) |
---|
| 137 | ! |
---|
| 138 | ptrdx(ji,jj,1 ) = ptrdx(ji,jj,1 ) - ztswu(ji,jj) |
---|
| 139 | ptrdy(ji,jj,1 ) = ptrdy(ji,jj,1 ) - ztswv(ji,jj) |
---|
| 140 | ptrdx(ji,jj,ikbum1) = ptrdx(ji,jj,ikbum1) - ztbfu(ji,jj) |
---|
| 141 | ptrdy(ji,jj,ikbvm1) = ptrdy(ji,jj,ikbvm1) - ztbfv(ji,jj) |
---|
| 142 | END DO |
---|
| 143 | END DO |
---|
| 144 | ! |
---|
| 145 | CALL trd_icp( ptrdx, ptrdy, jpicpd_zdf, ctype ) |
---|
| 146 | CALL trd_icp( ztswu, ztswv, jpicpd_swf, ctype ) ! wind stress forcing term |
---|
| 147 | CALL trd_icp( ztbfu, ztbfv, jpicpd_bfr, ctype ) ! bottom friction term |
---|
| 148 | END SELECT |
---|
| 149 | ! |
---|
| 150 | END IF |
---|
| 151 | ! |
---|
| 152 | END IF |
---|
[215] | 153 | |
---|
| 154 | !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
| 155 | ! II. Vorticity trends |
---|
| 156 | !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
---|
| 157 | |
---|
| 158 | IF( lk_trdvor .AND. ctype == 'DYN' ) THEN |
---|
[503] | 159 | ! |
---|
| 160 | SELECT CASE ( ktrd ) |
---|
| 161 | CASE ( jpdyn_trd_hpg ) ; CALL trd_vor_zint( ptrdx, ptrdy, jpvor_prg ) ! Hydrostatique Pressure Gradient |
---|
| 162 | CASE ( jpdyn_trd_keg ) ; CALL trd_vor_zint( ptrdx, ptrdy, jpvor_keg ) ! KE Gradient |
---|
| 163 | CASE ( jpdyn_trd_rvo ) ; CALL trd_vor_zint( ptrdx, ptrdy, jpvor_rvo ) ! Relative Vorticity |
---|
| 164 | CASE ( jpdyn_trd_pvo ) ; CALL trd_vor_zint( ptrdx, ptrdy, jpvor_pvo ) ! Planetary Vorticity Term |
---|
| 165 | CASE ( jpdyn_trd_ldf ) ; CALL trd_vor_zint( ptrdx, ptrdy, jpvor_ldf ) ! Horizontal Diffusion |
---|
| 166 | CASE ( jpdyn_trd_zad ) ; CALL trd_vor_zint( ptrdx, ptrdy, jpvor_zad ) ! Vertical Advection |
---|
| 167 | CASE ( jpdyn_trd_spg ) ; CALL trd_vor_zint( ptrdx, ptrdy, jpvor_spg ) ! Surface Pressure Grad. |
---|
| 168 | CASE ( jpdyn_trd_dat ) ; CALL trd_vor_zint( ptrdx, ptrdy, jpvor_bev ) ! Beta V |
---|
| 169 | CASE ( jpdyn_trd_zdf ) ! Vertical Diffusion |
---|
| 170 | ! subtract surface forcing/bottom friction trends |
---|
| 171 | ! from vertical diffusive momentum trends |
---|
| 172 | ztswu(:,:) = 0.e0 ; ztswv(:,:) = 0.e0 |
---|
| 173 | ztbfu(:,:) = 0.e0 ; ztbfv(:,:) = 0.e0 |
---|
| 174 | DO jj = 2, jpjm1 |
---|
| 175 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
| 176 | ! save the surface forcing momentum fluxes |
---|
| 177 | ztswu(ji,jj) = taux(ji,jj) / ( fse3u(ji,jj,1)*rau0 ) |
---|
| 178 | ztswv(ji,jj) = tauy(ji,jj) / ( fse3v(ji,jj,1)*rau0 ) |
---|
| 179 | ! save bottom friction momentum fluxes |
---|
| 180 | ikbu = MIN( mbathy(ji+1,jj ), mbathy(ji,jj) ) |
---|
| 181 | ikbv = MIN( mbathy(ji ,jj+1), mbathy(ji,jj) ) |
---|
| 182 | ikbum1 = MAX( ikbu-1, 1 ) |
---|
| 183 | ikbvm1 = MAX( ikbv-1, 1 ) |
---|
| 184 | zua = ua(ji,jj,ikbum1) * r2dt + ub(ji,jj,ikbum1) |
---|
| 185 | zva = va(ji,jj,ikbvm1) * r2dt + vb(ji,jj,ikbvm1) |
---|
| 186 | ztbfu(ji,jj) = - avmu(ji,jj,ikbu) * zua / ( fse3u(ji,jj,ikbum1)*fse3uw(ji,jj,ikbu) ) |
---|
| 187 | ztbfv(ji,jj) = - avmv(ji,jj,ikbv) * zva / ( fse3v(ji,jj,ikbvm1)*fse3vw(ji,jj,ikbv) ) |
---|
| 188 | ! |
---|
| 189 | ptrdx(ji,jj,1 ) = ptrdx(ji,jj,1 ) - ztswu(ji,jj) |
---|
| 190 | ptrdx(ji,jj,ikbum1) = ptrdx(ji,jj,ikbum1) - ztbfu(ji,jj) |
---|
| 191 | ptrdy(ji,jj,1 ) = ptrdy(ji,jj,1 ) - ztswv(ji,jj) |
---|
| 192 | ptrdy(ji,jj,ikbvm1) = ptrdy(ji,jj,ikbvm1) - ztbfv(ji,jj) |
---|
| 193 | END DO |
---|
| 194 | END DO |
---|
| 195 | ! |
---|
| 196 | CALL trd_vor_zint( ptrdx, ptrdy, jpvor_zdf ) |
---|
| 197 | CALL trd_vor_zint( ztswu, ztswv, jpvor_swf ) ! Wind stress forcing term |
---|
| 198 | CALL trd_vor_zint( ztbfu, ztbfv, jpvor_bfr ) ! Bottom friction term |
---|
[215] | 199 | END SELECT |
---|
[503] | 200 | ! |
---|
[215] | 201 | ENDIF |
---|
| 202 | |
---|
| 203 | !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
[503] | 204 | ! III. Mixed layer trends for active tracers |
---|
[215] | 205 | !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
---|
| 206 | |
---|
| 207 | IF( lk_trdmld .AND. ctype == 'TRA' ) THEN |
---|
| 208 | |
---|
[503] | 209 | !----------------------------------------------------------------------------------------------- |
---|
| 210 | ! W.A.R.N.I.N.G : |
---|
| 211 | ! jptra_trd_ldf : called by traldf.F90 |
---|
| 212 | ! at this stage we store: |
---|
| 213 | ! - the lateral geopotential diffusion (here, lateral = horizontal) |
---|
| 214 | ! - and the iso-neutral diffusion if activated |
---|
| 215 | ! jptra_trd_zdf : called by trazdf.F90 |
---|
[521] | 216 | ! * in case of iso-neutral diffusion we store the vertical diffusion component in the |
---|
[503] | 217 | ! lateral trend including the K_z contrib, which will be removed later (see trd_mld) |
---|
| 218 | !----------------------------------------------------------------------------------------------- |
---|
| 219 | |
---|
[215] | 220 | SELECT CASE ( ktrd ) |
---|
[503] | 221 | CASE ( jptra_trd_xad ) ; CALL trd_mld_zint( ptrdx, ptrdy, jpmld_xad, '3D' ) ! merid. advection |
---|
| 222 | CASE ( jptra_trd_yad ) ; CALL trd_mld_zint( ptrdx, ptrdy, jpmld_yad, '3D' ) ! zonal advection |
---|
| 223 | CASE ( jptra_trd_zad ) ; CALL trd_mld_zint( ptrdx, ptrdy, jpmld_zad, '3D' ) ! vertical advection |
---|
| 224 | CASE ( jptra_trd_ldf ) ; CALL trd_mld_zint( ptrdx, ptrdy, jpmld_ldf, '3D' ) ! lateral diffusive |
---|
| 225 | CASE ( jptra_trd_bbl ) ; CALL trd_mld_zint( ptrdx, ptrdy, jpmld_bbl, '3D' ) ! bottom boundary layer |
---|
| 226 | CASE ( jptra_trd_zdf ) |
---|
[521] | 227 | IF( ln_traldf_iso ) THEN |
---|
| 228 | CALL trd_mld_zint( ptrdx, ptrdy, jpmld_ldf, '3D' ) ! vertical diffusion (K_z) |
---|
| 229 | ELSE |
---|
| 230 | CALL trd_mld_zint( ptrdx, ptrdy, jpmld_zdf, '3D' ) ! vertical diffusion (K_z) |
---|
| 231 | ENDIF |
---|
[503] | 232 | CASE ( jptra_trd_dmp ) ; CALL trd_mld_zint( ptrdx, ptrdy, jpmld_dmp, '3D' ) ! internal 3D restoring (tradmp) |
---|
| 233 | CASE ( jptra_trd_qsr ) ; CALL trd_mld_zint( ptrdx, ptrdy, jpmld_for, '3D' ) ! air-sea : penetrative sol radiat |
---|
| 234 | CASE ( jptra_trd_nsr ) |
---|
| 235 | ptrdx(:,:,2:jpk) = 0.e0 ; ptrdy(:,:,2:jpk) = 0.e0 |
---|
| 236 | CALL trd_mld_zint( ptrdx, ptrdy, jpmld_for, '2D' ) ! air-sea : non penetr sol radiat |
---|
| 237 | CASE ( jptra_trd_bbc ) ; CALL trd_mld_zint( ptrdx, ptrdy, jpmld_bbc, '3D' ) ! bottom bound cond (geoth flux) |
---|
| 238 | CASE ( jptra_trd_atf ) ; CALL trd_mld_zint( ptrdx, ptrdy, jpmld_atf, '3D' ) ! asselin numerical |
---|
| 239 | CASE ( jptra_trd_npc ) ; CALL trd_mld_zint( ptrdx, ptrdy, jpmld_npc, '3D' ) ! non penetr convect adjustment |
---|
| 240 | END SELECT |
---|
[215] | 241 | |
---|
| 242 | ENDIF |
---|
| 243 | |
---|
| 244 | END SUBROUTINE trd_mod |
---|
| 245 | |
---|
| 246 | # else |
---|
| 247 | !!---------------------------------------------------------------------- |
---|
| 248 | !! Default case : Empty module |
---|
| 249 | !!---------------------------------------------------------------------- |
---|
| 250 | USE trdmod_oce ! ocean variables trends |
---|
| 251 | |
---|
| 252 | CONTAINS |
---|
[507] | 253 | SUBROUTINE trd_mod(ptrd3dx, ptrd3dy, ktrd , ctype, kt, cnbpas) ! Empty routine |
---|
[215] | 254 | REAL, DIMENSION(:,:,:), INTENT( in ) :: & |
---|
[507] | 255 | ptrd3dx, & ! Temperature or U trend |
---|
| 256 | ptrd3dy ! Salinity or V trend |
---|
| 257 | INTEGER, INTENT( in ) :: ktrd ! momentum or tracer trend index |
---|
| 258 | INTEGER, INTENT( in ) :: kt ! Time step |
---|
| 259 | CHARACTER(len=3), INTENT( in ) :: ctype ! momentum or tracers trends type |
---|
| 260 | CHARACTER(len=3), INTENT( in ), OPTIONAL :: cnbpas ! number of passage |
---|
[215] | 261 | WRITE(*,*) 'trd_3d: You should not have seen this print! error ?', ptrd3dx(1,1,1) |
---|
| 262 | WRITE(*,*) ' " ": You should not have seen this print! error ?', ptrd3dy(1,1,1) |
---|
| 263 | WRITE(*,*) ' " ": You should not have seen this print! error ?', ktrd |
---|
| 264 | WRITE(*,*) ' " ": You should not have seen this print! error ?', ctype |
---|
| 265 | WRITE(*,*) ' " ": You should not have seen this print! error ?', kt |
---|
[522] | 266 | WRITE(*,*) ' " ": You should not have seen this print! error ?', cnbpas |
---|
[215] | 267 | END SUBROUTINE trd_mod |
---|
| 268 | # endif |
---|
| 269 | |
---|
[503] | 270 | SUBROUTINE trd_mod_init |
---|
| 271 | !!---------------------------------------------------------------------- |
---|
| 272 | !! *** ROUTINE trd_mod_init *** |
---|
| 273 | !! |
---|
| 274 | !! ** Purpose : Initialization of activated trends |
---|
| 275 | !!---------------------------------------------------------------------- |
---|
| 276 | USE in_out_manager ! I/O manager |
---|
| 277 | |
---|
| 278 | NAMELIST/namtrd/ ntrd, nctls, ln_trdmld_restart, ucf, ln_trdmld_instant |
---|
| 279 | !!---------------------------------------------------------------------- |
---|
| 280 | |
---|
| 281 | IF( l_trdtra .OR. l_trddyn ) THEN |
---|
| 282 | REWIND( numnam ) |
---|
| 283 | READ ( numnam, namtrd ) ! namelist namtrd : trends diagnostic |
---|
| 284 | |
---|
| 285 | IF(lwp) THEN |
---|
| 286 | WRITE(numout,*) |
---|
| 287 | WRITE(numout,*) ' trd_mod_init : Momentum/Tracers trends' |
---|
| 288 | WRITE(numout,*) ' ~~~~~~~~~~~~~' |
---|
| 289 | WRITE(numout,*) ' Namelist namtrd : set trends parameters' |
---|
| 290 | WRITE(numout,*) ' * frequency of trends diagnostics ntrd = ', ntrd |
---|
| 291 | WRITE(numout,*) ' * control surface type nctls = ', nctls |
---|
| 292 | WRITE(numout,*) ' * restart for ML diagnostics ln_trdmld_restart = ', ln_trdmld_restart |
---|
| 293 | WRITE(numout,*) ' * instantaneous or mean ML T/S ln_trdmld_instant = ', ln_trdmld_instant |
---|
| 294 | WRITE(numout,*) ' * unit conversion factor ucf = ', ucf |
---|
| 295 | ENDIF |
---|
| 296 | ENDIF |
---|
| 297 | ! |
---|
| 298 | IF( lk_trddyn .OR. lk_trdtra ) CALL trd_icp_init ! integral constraints trends |
---|
| 299 | IF( lk_trdmld ) CALL trd_mld_init ! mixed-layer trends (active tracers) |
---|
| 300 | IF( lk_trdvor ) CALL trd_vor_init ! vorticity trends |
---|
| 301 | ! |
---|
| 302 | END SUBROUTINE trd_mod_init |
---|
| 303 | |
---|
[215] | 304 | !!====================================================================== |
---|
| 305 | END MODULE trdmod |
---|