- 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/TRA/traadv.F90
r11536 r11949 75 75 CONTAINS 76 76 77 SUBROUTINE tra_adv( kt )77 SUBROUTINE tra_adv( kt, Kbb, Kmm, pts, Krhs ) 78 78 !!---------------------------------------------------------------------- 79 79 !! *** ROUTINE tra_adv *** … … 81 81 !! ** Purpose : compute the ocean tracer advection trend. 82 82 !! 83 !! ** Method : - Update (ua,va) with the advection term following nadv 84 !!---------------------------------------------------------------------- 85 INTEGER, INTENT(in) :: kt ! ocean time-step index 83 !! ** Method : - Update (uu(:,:,:,Krhs),vv(:,:,:,Krhs)) with the advection term following nadv 84 !!---------------------------------------------------------------------- 85 INTEGER , INTENT(in) :: kt ! ocean time-step index 86 INTEGER , INTENT(in) :: Kbb, Kmm, Krhs ! time level indices 87 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts ! active tracers and RHS of tracer equation 86 88 ! 87 89 INTEGER :: jk ! dummy loop index 88 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zu n, zvn, zwn! 3D workspace90 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zuu, zvv, zww ! 3D workspace 89 91 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ztrdt, ztrds 90 92 !!---------------------------------------------------------------------- … … 98 100 ! 99 101 ! !== effective transport ==! 100 zu n(:,:,jpk) = 0._wp101 zv n(:,:,jpk) = 0._wp102 zw n(:,:,jpk) = 0._wp102 zuu(:,:,jpk) = 0._wp 103 zvv(:,:,jpk) = 0._wp 104 zww(:,:,jpk) = 0._wp 103 105 IF( ln_wave .AND. ln_sdw ) THEN 104 106 DO jk = 1, jpkm1 ! eulerian transport + Stokes Drift 105 zu n(:,:,jk) = e2u (:,:) * e3u_n(:,:,jk) * ( un(:,:,jk) + usd(:,:,jk) )106 zv n(:,:,jk) = e1v (:,:) * e3v_n(:,:,jk) * ( vn(:,:,jk) + vsd(:,:,jk) )107 zw n(:,:,jk) = e1e2t(:,:) * ( wn(:,:,jk) + wsd(:,:,jk) )107 zuu(:,:,jk) = e2u (:,:) * e3u(:,:,jk,Kmm) * ( uu(:,:,jk,Kmm) + usd(:,:,jk) ) 108 zvv(:,:,jk) = e1v (:,:) * e3v(:,:,jk,Kmm) * ( vv(:,:,jk,Kmm) + vsd(:,:,jk) ) 109 zww(:,:,jk) = e1e2t(:,:) * ( ww(:,:,jk) + wsd(:,:,jk) ) 108 110 END DO 109 111 ELSE 110 112 DO jk = 1, jpkm1 111 zu n(:,:,jk) = e2u (:,:) * e3u_n(:,:,jk) * un(:,:,jk) ! eulerian transport only112 zv n(:,:,jk) = e1v (:,:) * e3v_n(:,:,jk) * vn(:,:,jk)113 zw n(:,:,jk) = e1e2t(:,:) * wn(:,:,jk)113 zuu(:,:,jk) = e2u (:,:) * e3u(:,:,jk,Kmm) * uu(:,:,jk,Kmm) ! eulerian transport only 114 zvv(:,:,jk) = e1v (:,:) * e3v(:,:,jk,Kmm) * vv(:,:,jk,Kmm) 115 zww(:,:,jk) = e1e2t(:,:) * ww(:,:,jk) 114 116 END DO 115 117 ENDIF 116 118 ! 117 119 IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN ! add z-tilde and/or vvl corrections 118 zu n(:,:,:) = zun(:,:,:) + un_td(:,:,:)119 zv n(:,:,:) = zvn(:,:,:) + vn_td(:,:,:)120 ENDIF 121 ! 122 zu n(:,:,jpk) = 0._wp ! no transport trough the bottom123 zv n(:,:,jpk) = 0._wp124 zw n(:,:,jpk) = 0._wp120 zuu(:,:,:) = zuu(:,:,:) + un_td(:,:,:) 121 zvv(:,:,:) = zvv(:,:,:) + vn_td(:,:,:) 122 ENDIF 123 ! 124 zuu(:,:,jpk) = 0._wp ! no transport trough the bottom 125 zvv(:,:,jpk) = 0._wp 126 zww(:,:,jpk) = 0._wp 125 127 ! 126 128 IF( ln_ldfeiv .AND. .NOT. ln_traldf_triad ) & 127 & CALL ldf_eiv_trp( kt, nit000, zu n, zvn, zwn, 'TRA') ! add the eiv transport (if necessary)128 ! 129 IF( ln_mle ) CALL tra_mle_trp( kt, nit000, zu n, zvn, zwn, 'TRA') ! add the mle transport (if necessary)130 ! 131 CALL iom_put( "uocetr_eff", zu n) ! output effective transport132 CALL iom_put( "vocetr_eff", zv n)133 CALL iom_put( "wocetr_eff", zw n)129 & CALL ldf_eiv_trp( kt, nit000, zuu, zvv, zww, 'TRA', Kmm, Krhs ) ! add the eiv transport (if necessary) 130 ! 131 IF( ln_mle ) CALL tra_mle_trp( kt, nit000, zuu, zvv, zww, 'TRA', Kmm ) ! add the mle transport (if necessary) 132 ! 133 CALL iom_put( "uocetr_eff", zuu ) ! output effective transport 134 CALL iom_put( "vocetr_eff", zvv ) 135 CALL iom_put( "wocetr_eff", zww ) 134 136 ! 135 137 !!gm ??? 136 IF( ln_diaptr ) CALL dia_ptr( zvn )! diagnose the effective MSF138 IF( ln_diaptr ) CALL dia_ptr( Kmm, zvv ) ! diagnose the effective MSF 137 139 !!gm ??? 138 140 ! 139 141 IF( l_trdtra ) THEN !* Save ta and sa trends 140 142 ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) ) 141 ztrdt(:,:,:) = tsa(:,:,:,jp_tem)142 ztrds(:,:,:) = tsa(:,:,:,jp_sal)143 ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) 144 ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) 143 145 ENDIF 144 146 ! … … 146 148 ! 147 149 CASE ( np_CEN ) ! Centered scheme : 2nd / 4th order 148 CALL tra_adv_cen ( kt, nit000, 'TRA', zu n, zvn, zwn , tsn, tsa, jpts, nn_cen_h, nn_cen_v )150 CALL tra_adv_cen ( kt, nit000, 'TRA', zuu, zvv, zww, Kmm, pts, jpts, Krhs, nn_cen_h, nn_cen_v ) 149 151 CASE ( np_FCT ) ! FCT scheme : 2nd / 4th order 150 CALL tra_adv_fct ( kt, nit000, 'TRA', r2dt, zu n, zvn, zwn, tsb, tsn, tsa, jpts, nn_fct_h, nn_fct_v )152 CALL tra_adv_fct ( kt, nit000, 'TRA', r2dt, zuu, zvv, zww, Kbb, Kmm, pts, jpts, Krhs, nn_fct_h, nn_fct_v ) 151 153 CASE ( np_MUS ) ! MUSCL 152 CALL tra_adv_mus ( kt, nit000, 'TRA', r2dt, zu n, zvn, zwn, tsb, tsa, jpts, ln_mus_ups )154 CALL tra_adv_mus ( kt, nit000, 'TRA', r2dt, zuu, zvv, zww, Kbb, Kmm, pts, jpts, Krhs, ln_mus_ups ) 153 155 CASE ( np_UBS ) ! UBS 154 CALL tra_adv_ubs ( kt, nit000, 'TRA', r2dt, zu n, zvn, zwn, tsb, tsn, tsa, jpts, nn_ubs_v )156 CALL tra_adv_ubs ( kt, nit000, 'TRA', r2dt, zuu, zvv, zww, Kbb, Kmm, pts, jpts, Krhs, nn_ubs_v ) 155 157 CASE ( np_QCK ) ! QUICKEST 156 CALL tra_adv_qck ( kt, nit000, 'TRA', r2dt, zu n, zvn, zwn, tsb, tsn, tsa, jpts)158 CALL tra_adv_qck ( kt, nit000, 'TRA', r2dt, zuu, zvv, zww, Kbb, Kmm, pts, jpts, Krhs ) 157 159 ! 158 160 END SELECT … … 160 162 IF( l_trdtra ) THEN ! save the advective trends for further diagnostics 161 163 DO jk = 1, jpkm1 162 ztrdt(:,:,jk) = tsa(:,:,jk,jp_tem) - ztrdt(:,:,jk)163 ztrds(:,:,jk) = tsa(:,:,jk,jp_sal) - ztrds(:,:,jk)164 ztrdt(:,:,jk) = pts(:,:,jk,jp_tem,Krhs) - ztrdt(:,:,jk) 165 ztrds(:,:,jk) = pts(:,:,jk,jp_sal,Krhs) - ztrds(:,:,jk) 164 166 END DO 165 CALL trd_tra( kt, 'TRA', jp_tem, jptra_totad, ztrdt )166 CALL trd_tra( kt, 'TRA', jp_sal, jptra_totad, ztrds )167 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_totad, ztrdt ) 168 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_totad, ztrds ) 167 169 DEALLOCATE( ztrdt, ztrds ) 168 170 ENDIF 169 171 ! ! print mean trends (used for debugging) 170 IF(ln_ctl) CALL prt_ctl( tab3d_1= tsa(:,:,:,jp_tem), clinfo1=' adv - Ta: ', mask1=tmask, &171 & tab3d_2= tsa(:,:,:,jp_sal), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' )172 IF(ln_ctl) CALL prt_ctl( tab3d_1=pts(:,:,:,jp_tem,Krhs), clinfo1=' adv - Ta: ', mask1=tmask, & 173 & tab3d_2=pts(:,:,:,jp_sal,Krhs), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' ) 172 174 ! 173 175 IF( ln_timing ) CALL timing_stop( 'tra_adv' )
Note: See TracChangeset
for help on using the changeset viewer.