- Timestamp:
- 2014-01-27T11:31:19+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
r4370 r4374 24 24 USE dynspg_oce ! surface pressure gradient variables 25 25 USE phycst ! physical constants 26 USE domvvl ! variable volume27 26 USE dynvor ! vorticity term 28 27 USE bdy_par ! for lk_bdy 29 USE bdy_oce ! Lateral open boundary condition30 28 USE bdytides ! open boundary condition data 31 29 USE bdydyn2d ! open boundary conditions on barotropic variables … … 38 36 USE iom ! IOM library 39 37 USE restart ! only for lrst_oce 40 USE zdf_oce ! Vertical diffusion38 USE zdf_oce ! Bottom friction coefts 41 39 USE wrk_nemo ! Memory Allocation 42 40 USE timing ! Timing … … 111 109 !! ** Purpose : 112 110 !! -Compute the now trend due to the explicit time stepping 113 !! of the quasi-linear barotropic system. Barotropic variables are 114 !! advanced from internal time steps "n" to "n+1" (if ln_bt_cen=F) 115 !! or from "n-1" to "n+1" time steps (if ln_bt_cen=T) with a 116 !! generalized forward-backward (see ref. below) time stepping. 117 !! -Update the free surface at step "n+1" (ssha, zsshu_a, zsshv_a). 118 !! -Compute barotropic advective velocities at step "n" to be used 119 !! to advect tracers latter on. These are compliant with discrete 120 !! continuity equation taken at the baroclinic time steps, thus 121 !! ensuring tracers conservation. 111 !! of the quasi-linear barotropic system. 122 112 !! 123 113 !! ** Method : 114 !! Barotropic variables are advanced from internal time steps 115 !! "n" to "n+1" if ln_bt_fw=T 116 !! or from 117 !! "n-1" to "n+1" if ln_bt_fw=F 118 !! thanks to a generalized forward-backward time stepping (see ref. below). 124 119 !! 125 !! ** Action : - Update barotropic velocities: ua_b, va_b 126 !! - Update trend (ua,va) with barotropic component 127 !! - Update ssha, zsshu_a, zsshv_a 128 !! - Update barotropic advective velocity at kt=now 120 !! ** Action : 121 !! -Update the filtered free surface at step "n+1" : ssha 122 !! -Update filtered barotropic velocities at step "n+1" : ua_b, va_b 123 !! -Compute barotropic advective velocities at step "n" : un_adv, vn_adv 124 !! These are used to advect tracers and are compliant with discrete 125 !! continuity equation taken at the baroclinic time steps. This 126 !! ensures tracers conservation. 127 !! -Update 3d trend (ua, va) with barotropic component. 129 128 !! 130 129 !! References : Shchepetkin, A.F. and J.C. McWilliams, 2005: … … 138 137 ! 139 138 LOGICAL :: ll_fw_start ! if true, forward integration 140 LOGICAL :: ll_init ! if true, special startup of 2d equations139 LOGICAL :: ll_init ! if true, special startup of 2d equations 141 140 INTEGER :: ji, jj, jk, jn ! dummy loop indices 142 141 INTEGER :: ikbu, ikbv, noffset ! local integers 143 142 REAL(wp) :: zraur, z1_2dt_b, z2dt_bf ! local scalars 144 REAL(wp) :: zx1, zy1, zx2, zy2 145 REAL(wp) :: z1_12, z1_8, z1_4, z1_2 ! - -146 REAL(wp) :: zu_spg, zv_spg ! - -147 REAL(wp) :: zhura, zhvra ! - -148 REAL(wp) :: za0, za1, za2, za3 ! - -143 REAL(wp) :: zx1, zy1, zx2, zy2 ! - - 144 REAL(wp) :: z1_12, z1_8, z1_4, z1_2 ! - - 145 REAL(wp) :: zu_spg, zv_spg ! - - 146 REAL(wp) :: zhura, zhvra ! - - 147 REAL(wp) :: za0, za1, za2, za3 ! - - 149 148 ! 150 149 REAL(wp), POINTER, DIMENSION(:,:) :: zun_e, zvn_e, zsshp2_e … … 158 157 IF( nn_timing == 1 ) CALL timing_start('dyn_spg_ts') 159 158 ! 160 ! !* Allocate tempora y arrays159 ! !* Allocate temporary arrays 161 160 CALL wrk_alloc( jpi, jpj, zsshp2_e, zhdiv ) 162 161 CALL wrk_alloc( jpi, jpj, zu_trd, zv_trd, zun_e, zvn_e ) … … 212 211 ! Do it once at kt=nit000 if volume is fixed, else at each long time step. 213 212 ! Note that these arrays are also used during barotropic loop. These are however frozen 214 ! although they should be updated in variable volume case. Not a big approximation.213 ! although they should be updated in the variable volume case. Not a big approximation. 215 214 ! To remove this approximation, copy lines below inside barotropic loop 216 ! and update depths at T-F points (ht and hf resp.) at each barotropic time step215 ! and update depths at T-F points (ht and zhf resp.) at each barotropic time step 217 216 ! 218 217 IF ( kt == nit000 .OR. lk_vvl ) THEN … … 243 242 zhf(:,:) = 0. 244 243 IF ( .not. ln_sco ) THEN 244 ! JC: It not clear yet what should be the depth at f-points over land in z-coordinate case 245 ! Set it to zero for the time being 245 246 ! IF( rn_hmin < 0._wp ) THEN ; jk = - INT( rn_hmin ) ! from a nb of level 246 247 ! ELSE ; jk = MINLOC( gdepw_0, mask = gdepw_0 > rn_hmin, dim = 1 ) ! from a depth … … 333 334 END DO 334 335 ! 335 ELSEIF ( ln_dynvor_ens ) THEN ! enstrophy conserving scheme336 ELSEIF ( ln_dynvor_ens ) THEN ! enstrophy conserving scheme 336 337 DO jj = 2, jpjm1 337 338 DO ji = fs_2, fs_jpim1 ! vector opt. … … 345 346 END DO 346 347 ! 347 ELSEIF ( ln_dynvor_een ) THEN ! enstrophy and energy conserving scheme348 ELSEIF ( ln_dynvor_een ) THEN ! enstrophy and energy conserving scheme 348 349 DO jj = 2, jpjm1 349 350 DO ji = fs_2, fs_jpim1 ! vector opt. … … 529 530 CALL lbc_lnk( zwx, 'U', 1._wp ) ; CALL lbc_lnk( zwy, 'V', 1._wp ) 530 531 ! 531 zhup2_e (:,:) = hu_0(:,:) + zwx(:,:) ! Ocean depth at U- and V-points532 zhup2_e (:,:) = hu_0(:,:) + zwx(:,:) ! Ocean depth at U- and V-points 532 533 zhvp2_e (:,:) = hv_0(:,:) + zwy(:,:) 533 534 ELSE … … 795 796 DO ji = 1, jpim1 ! NO Vector Opt. 796 797 zsshu_a(ji,jj) = z1_2 * umask(ji,jj,1) * r1_e12u(ji,jj) & 797 & * ( e12t(ji ,jj) * ssha _e(ji ,jj) &798 & + e12t(ji+1,jj) * ssha _e(ji+1,jj) )798 & * ( e12t(ji ,jj) * ssha(ji ,jj) & 799 & + e12t(ji+1,jj) * ssha(ji+1,jj) ) 799 800 zsshv_a(ji,jj) = z1_2 * vmask(ji,jj,1) * r1_e12v(ji,jj) & 800 & * ( e12t(ji,jj ) * ssha _e(ji,jj ) &801 & + e12t(ji,jj+1) * ssha _e(ji,jj+1) )801 & * ( e12t(ji,jj ) * ssha(ji,jj ) & 802 & + e12t(ji,jj+1) * ssha(ji,jj+1) ) 802 803 END DO 803 804 END DO … … 1102 1103 END MODULE dynspg_ts 1103 1104 1105
Note: See TracChangeset
for help on using the changeset viewer.