228 | | Has been tested and validated against an modified leap frog GYRE in the same configuration with the same namelist. |
| 228 | Has been tested and validated against an modified leap frog GYRE in the same configuration with the same namelist.[[BR]] |
| 229 | |
| 230 | r14549 Allow RK3 time-stepping with 2D mode. [[BR]] |
| 231 | Prepare forcings and barotropic 2D fields. dynspg_ts remains for 2D mode integration. dyn_vor_RK3 only computes 2D relative vorticity and metric term from 3D to 2D. |
| 232 | stp_2D is called by stprk3 in single first. |
| 233 | {{{ |
| 234 | OCE |
| 235 | |--DYN |
| 236 | |-- dynspg_ts.F90 |
| 237 | #remove k_only_ADV |
| 238 | PUBLIC dyn_drg_init ! called by rk3ssh |
| 239 | ! Phase 1 : Coupling between general trend and barotropic estimates (1st step) |
| 240 | IF( kt == nit000 ) THEN |
| 241 | IF( .NOT.ln_bt_fw .OR. ln_bt_av ) CALL ctl_stop( 'dyn_spg_ts: RK3 requires ln_bt_fw=T AND ln_bt_av=F') |
| 242 | ENDIF |
| 243 | ! ! set values computed in RK3_ssh |
| 244 | zssh_frc(:,:) = sshe_rhs(:,:) |
| 245 | zu_frc(:,:) = Ue_rhs(:,:) |
| 246 | zv_frc(:,:) = Ve_rhs(:,:) |
| 247 | zCdU_u (:,:) = CdU_u (:,:) |
| 248 | zCdU_v (:,:) = CdU_v (:,:) |
| 249 | ! |
| 250 | IF( kt == nit000 .OR. .NOT. ln_linssh ) CALL dyn_cor_2D_init( Kmm ) ! Set zwz, the barotropic Coriolis force coefficient |
| 251 | ! Phase 3. update the general trend with the barotropic trend |
| 252 | IF(.NOT.ln_bt_av ) THEN !* Update Kaa barotropic external mode |
| 253 | uu_b(:,:,Kaa) = ua_e (:,:) |
| 254 | pvv_b(:,:,Kaa) = va_e (:,:) |
| 255 | pssh (:,:,Kaa) = ssha_e(:,:) |
| 256 | ENDIF |
| 257 | un_adv... |
| 258 | ubar... |
| 259 | |-- dynspg.F90 |
| 260 | #remove k_only_ADV |
| 261 | |-- dynvor.F90 |
| 262 | SUBROUTINE dyn_vor_3D( kt, Kmm, puu, pvv, Krhs ) |
| 263 | |-- dynzdf.F90 |
| 264 | zDt_2 = rDt * 0.5_wp # small cosmetic optim |
| 265 | |-- stprk3_stg.F90 |
| 266 | |-- stp2d.F90 |
| 267 | |-- stprk3.F90 |
| 268 | 179 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
| 269 | 180 ! RK3 : single first external mode computation |
| 270 | 181 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
| 271 | 182 |
| 272 | 183 CALL stp_2D( kstp, Nbb, Nbb, Naa, Nrhs ) ! out: ssh, (uu_b,vv_b) and (un_adv,vn_adv) at Naa |
| 273 | 184 |
| 274 | 185 |
| 275 | 186 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
| 276 | 187 ! RK3 time integration |
| 277 | 188 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
| 278 | 189 |
| 279 | 190 ! Stage 1 : |
| 280 | 191 CALL stp_RK3_stg( 1, kstp, Nbb, Nbb, Nrhs, Naa ) |
| 281 | 192 ! |
| 282 | 193 Nrhs = Nnn ; Nnn = Naa ; Naa = Nrhs ! Swap: Nbb unchanged, Nnn <==> Naa |
| 283 | 194 ! |
| 284 | 195 ! Stage 2 : |
| 285 | 196 CALL stp_RK3_stg( 2, kstp, Nbb, Nnn, Nrhs, Naa ) |
| 286 | 197 ! |
| 287 | 198 Nrhs = Nnn ; Nnn = Naa ; Naa = Nrhs ! Swap: Nbb unchanged, Nnn <==> Naa |
| 288 | 199 ! |
| 289 | 200 ! Stage 3 : |
| 290 | 201 CALL stp_RK3_stg( 3, kstp, Nbb, Nnn, Nrhs, Naa ) |
| 291 | 202 ! |
| 292 | 203 Nrhs = Nbb ; Nbb = Naa ; Naa = Nrhs ! Swap: Nnn unchanged, Nbb <==> Naa |
| 293 | }}} |