New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 463 for trunk/NEMO/OPA_SRC/ZDF/zdfkpp.F90 – NEMO

Ignore:
Timestamp:
2006-05-10T19:26:55+02:00 (18 years ago)
Author:
opalod
Message:

nemo_v1_update_054:RB: take into account tracers and dynamics reorganization, change atsk to jki

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/ZDF/zdfkpp.F90

    r258 r463  
    1616   USE dom_oce         ! ocean space and time domain 
    1717   USE zdf_oce         ! ocean vertical physics 
    18    USE in_out_manager  ! I/O manager 
    19    USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    2018   USE phycst          ! physical constants 
    2119   USE taumod          ! surface stress 
     
    2321   USE ocesbc          ! thermohaline fluxes 
    2422   USE zdfddm          ! double diffusion mixing 
     23   USE in_out_manager  ! I/O manager 
     24   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    2525   USE prtctl          ! Print control 
    2626 
     
    3030   !! * Routine accessibility 
    3131   PUBLIC zdf_kpp   ! routine called by step.F90 
     32   PUBLIC tra_kpp   ! routine called by step.F90 
    3233 
    3334   !! * Share Module variables 
     
    12621263 
    12631264 
     1265   SUBROUTINE tra_kpp 
     1266      !!---------------------------------------------------------------------- 
     1267      !!                  ***  ROUTINE tra_kpp  *** 
     1268      !! 
     1269      !! ** Purpose :   compute and add to the tracer trend the non-local 
     1270      !!      tracer flux 
     1271      !! 
     1272      !! ** Method  :   ??? 
     1273      !! 
     1274      !! history : 
     1275      !!     9.0  ! 05-11 (G. Madec)  Original code 
     1276      !!---------------------------------------------------------------------- 
     1277      !! * Modules used 
     1278      USE oce, ONLY :    ztrdt => ua,       & ! use ua as 3D workspace 
     1279                         ztrds => va          ! use va as 3D workspace 
     1280      !!---------------------------------------------------------------------- 
     1281 
     1282      IF( kt == nit000 ) THEN 
     1283         IF(lwp) WRITE(numout,*) 
     1284         IF(lwp) WRITE(numout,*) 'tra_kpp : KPP non-local tracer fluxes' 
     1285         IF(lwp) WRITE(numout,*) '~~~~~~~   ' 
     1286      ENDIF 
     1287 
     1288 
     1289      ! Save ta and sa trends 
     1290      IF( l_trdtra )   THEN 
     1291         ztrdt(:,:,:) = ta(:,:,:) 
     1292         ztrds(:,:,:) = sa(:,:,:) 
     1293      ENDIF 
     1294 
     1295      ! add non-local temperature and salinity flux ( in convective case only) 
     1296      DO jk = 1, jpkm1 
     1297         DO jj = 2, jpjm1 
     1298            DO ji = fs_2, fs_jpim1 
     1299               ta(ji,jj,jk) =  ta(ji,jj,jk)                           & 
     1300                  &         - ( ghats(ji,jj,jk  ) * avt(ji,jj,jk  )   & 
     1301                  &           - ghats(ji,jj,jk+1) * avt(ji,jj,jk+1) ) * wt0(ji,jj) / fse3t(ji,jj,jk) 
     1302               sa(ji,jj,jk) = sa(ji,jj,jk)                              & 
     1303                  &         - ( ghats(ji,jj,jk  ) * fsavs(ji,jj,jk  )   & 
     1304                  &           - ghats(ji,jj,jk+1) * fsavs(ji,jj,jk+1) ) * ws0(ji,jj) / fse3t(ji,jj,jk) 
     1305            END DO 
     1306         END DO 
     1307      END DO 
     1308 
     1309      ! save the non-local tracer flux trends for diagnostic 
     1310      IF( l_trdtra )   THEN 
     1311         ztrdt(:,:,:) = ta(:,:,:) - ztrdt(:,:,:) 
     1312         ztrds(:,:,:) = sa(:,:,:) - ztrds(:,:,:) 
     1313!!bug gm jpttdzdf ==> jpttkpp 
     1314         CALL trd_mod(ztrdt, ztrds, jpttdzdf, 'TRA', kt) 
     1315      ENDIF 
     1316 
     1317      IF(ln_ctl) THEN         ! print mean trends (used for debugging) 
     1318         CALL prt_ctl(tab3d_1=ta, clinfo1=' kpp  - Ta: ', mask1=tmask, & 
     1319            &         tab3d_2=sa, clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra') 
     1320      ENDIF 
     1321 
     1322   END SUBROUTINE tra_kpp 
     1323 
    12641324 
    12651325   SUBROUTINE zdf_kpp_init 
     
    15471607      WRITE(*,*) 'zdf_kpp: You should not have seen this print! error?', kt 
    15481608   END SUBROUTINE zdf_kpp 
     1609   SUBROUTINE tra_kpp( kt )          ! Empty routine 
     1610      WRITE(*,*) 'tra_kpp: You should not have seen this print! error?', kt 
     1611   END SUBROUTINE tra_kpp 
    15491612#endif 
    15501613 
Note: See TracChangeset for help on using the changeset viewer.