- Timestamp:
- 2019-11-22T15:29:17+01:00 (5 years ago)
- Location:
- NEMO/branches/2019/dev_r11943_MERGE_2019/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11943_MERGE_2019/src
- Property svn:mergeinfo deleted
-
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DYN/dynspg.F90
r11536 r11949 53 53 CONTAINS 54 54 55 SUBROUTINE dyn_spg( kt )55 SUBROUTINE dyn_spg( kt, Kbb, Kmm, Krhs, puu, pvv, pssh, puu_b, pvv_b, Kaa ) 56 56 !!---------------------------------------------------------------------- 57 57 !! *** ROUTINE dyn_spg *** … … 71 71 !! period is used to prevent the divergence of odd and even time step. 72 72 !!---------------------------------------------------------------------- 73 INTEGER, INTENT(in) :: kt ! ocean time-step index 73 INTEGER , INTENT( in ) :: kt ! ocean time-step index 74 INTEGER , INTENT( in ) :: Kbb, Kmm, Krhs, Kaa ! ocean time level indices 75 REAL(wp), DIMENSION(jpi,jpj,jpk,jpt), INTENT(inout) :: puu, pvv ! ocean velocities and RHS of momentum equation 76 REAL(wp), DIMENSION(jpi,jpj,jpt) , INTENT(inout) :: pssh, puu_b, pvv_b ! SSH and barotropic velocities at main time levels 74 77 ! 75 78 INTEGER :: ji, jj, jk ! dummy loop indices … … 83 86 IF( l_trddyn ) THEN ! temporary save of ta and sa trends 84 87 ALLOCATE( ztrdu(jpi,jpj,jpk) , ztrdv(jpi,jpj,jpk) ) 85 ztrdu(:,:,:) = ua(:,:,:)86 ztrdv(:,:,:) = va(:,:,:)88 ztrdu(:,:,:) = puu(:,:,:,Krhs) 89 ztrdv(:,:,:) = pvv(:,:,:,Krhs) 87 90 ENDIF 88 91 ! … … 126 129 DO jj = 2, jpjm1 ! add scalar approximation for load potential 127 130 DO ji = fs_2, fs_jpim1 ! vector opt. 128 spgu(ji,jj) = spgu(ji,jj) + zld * ( sshn(ji+1,jj) - sshn(ji,jj) ) * r1_e1u(ji,jj)129 spgv(ji,jj) = spgv(ji,jj) + zld * ( sshn(ji,jj+1) - sshn(ji,jj) ) * r1_e2v(ji,jj)131 spgu(ji,jj) = spgu(ji,jj) + zld * ( pssh(ji+1,jj,Kmm) - pssh(ji,jj,Kmm) ) * r1_e1u(ji,jj) 132 spgv(ji,jj) = spgv(ji,jj) + zld * ( pssh(ji,jj+1,Kmm) - pssh(ji,jj,Kmm) ) * r1_e2v(ji,jj) 130 133 END DO 131 134 END DO … … 150 153 DO jj = 2, jpjm1 151 154 DO ji = fs_2, fs_jpim1 ! vector opt. 152 ua(ji,jj,jk) = ua(ji,jj,jk) + spgu(ji,jj)153 va(ji,jj,jk) = va(ji,jj,jk) + spgv(ji,jj)155 puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) + spgu(ji,jj) 156 pvv(ji,jj,jk,Krhs) = pvv(ji,jj,jk,Krhs) + spgv(ji,jj) 154 157 END DO 155 158 END DO … … 161 164 ! 162 165 SELECT CASE ( nspg ) !== surface pressure gradient computed and add to the general trend ==! 163 CASE ( np_EXP ) ; CALL dyn_spg_exp( kt )! explicit164 CASE ( np_TS ) ; CALL dyn_spg_ts ( kt )! time-splitting166 CASE ( np_EXP ) ; CALL dyn_spg_exp( kt, Kmm, puu, pvv, Krhs ) ! explicit 167 CASE ( np_TS ) ; CALL dyn_spg_ts ( kt, Kbb, Kmm, Krhs, puu, pvv, pssh, puu_b, pvv_b, Kaa ) ! time-splitting 165 168 END SELECT 166 169 ! 167 170 IF( l_trddyn ) THEN ! save the surface pressure gradient trends for further diagnostics 168 ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)169 ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)170 CALL trd_dyn( ztrdu, ztrdv, jpdyn_spg, kt )171 ztrdu(:,:,:) = puu(:,:,:,Krhs) - ztrdu(:,:,:) 172 ztrdv(:,:,:) = pvv(:,:,:,Krhs) - ztrdv(:,:,:) 173 CALL trd_dyn( ztrdu, ztrdv, jpdyn_spg, kt, Kmm ) 171 174 DEALLOCATE( ztrdu , ztrdv ) 172 175 ENDIF 173 176 ! ! print mean trends (used for debugging) 174 IF(ln_ctl) CALL prt_ctl( tab3d_1= ua, clinfo1=' spg - Ua: ', mask1=umask, &175 & tab3d_2= va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' )177 IF(ln_ctl) CALL prt_ctl( tab3d_1=puu(:,:,:,Krhs), clinfo1=' spg - Ua: ', mask1=umask, & 178 & tab3d_2=pvv(:,:,:,Krhs), clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 176 179 ! 177 180 IF( ln_timing ) CALL timing_stop('dyn_spg')
Note: See TracChangeset
for help on using the changeset viewer.