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 5350 for branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90 – NEMO

Ignore:
Timestamp:
2015-06-04T16:12:19+02:00 (9 years ago)
Author:
hadcv
Message:

Update to head of the trunk (r5344).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r5134_UKMO4_CF_compliance/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90

    r5120 r5350  
    2828   USE in_out_manager  ! I/O manager 
    2929   USE iom             ! I/O library 
    30 #if defined key_diaar5 
    3130   USE phycst          ! physical constants 
    3231   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    33 #endif 
    3432   USE wrk_nemo        ! Memory Allocation 
    3533   USE timing          ! Timing 
     
    110108      REAL(wp) ::  zmskv, zabe2, zcof2, zcoef4   !   -      - 
    111109      REAL(wp) ::  zcoef0, zbtr, ztra            !   -      - 
    112 #if defined key_diaar5 
    113       REAL(wp)                         ::   zztmp               ! local scalar 
    114 #endif 
    115110      REAL(wp), POINTER, DIMENSION(:,:  ) ::  z2d 
    116111      REAL(wp), POINTER, DIMENSION(:,:,:) ::  zdkt, zdk1t, zdit, zdjt, ztfw  
     
    240235         ! 
    241236         ! "Poleward" diffusive heat or salt transports (T-S case only) 
    242          IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nn_fptr ) == 0 ) ) THEN 
     237         IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN 
    243238            ! note sign is reversed to give down-gradient diffusive transports (#1043) 
    244             IF( jn == jp_tem)   htr_ldf(:) = ptr_vj( -zftv(:,:,:) ) 
    245             IF( jn == jp_sal)   str_ldf(:) = ptr_vj( -zftv(:,:,:) ) 
     239            IF( jn == jp_tem)   htr_ldf(:) = ptr_sj( -zftv(:,:,:) ) 
     240            IF( jn == jp_sal)   str_ldf(:) = ptr_sj( -zftv(:,:,:) ) 
    246241         ENDIF 
    247242  
    248 #if defined key_diaar5 
    249          IF( cdtype == 'TRA' .AND. jn == jp_tem  ) THEN 
    250             z2d(:,:) = 0._wp  
    251             ! note sign is reversed to give down-gradient diffusive transports (#1043) 
    252             zztmp = -1.0_wp * rau0 * rcp 
    253             DO jk = 1, jpkm1 
    254                DO jj = 2, jpjm1 
    255                   DO ji = fs_2, fs_jpim1   ! vector opt. 
    256                      z2d(ji,jj) = z2d(ji,jj) + zftu(ji,jj,jk)  
     243         IF( iom_use("udiff_heattr") .OR. iom_use("vdiff_heattr") ) THEN 
     244           ! 
     245           IF( cdtype == 'TRA' .AND. jn == jp_tem  ) THEN 
     246               z2d(:,:) = 0._wp  
     247               DO jk = 1, jpkm1 
     248                  DO jj = 2, jpjm1 
     249                     DO ji = fs_2, fs_jpim1   ! vector opt. 
     250                        z2d(ji,jj) = z2d(ji,jj) + zftu(ji,jj,jk)  
     251                     END DO 
    257252                  END DO 
    258253               END DO 
    259             END DO 
    260             z2d(:,:) = zztmp * z2d(:,:) 
    261             CALL lbc_lnk( z2d, 'U', -1. ) 
    262             CALL iom_put( "udiff_heattr", z2d )                  ! heat transport in i-direction 
    263             z2d(:,:) = 0._wp  
    264             DO jk = 1, jpkm1 
    265                DO jj = 2, jpjm1 
    266                   DO ji = fs_2, fs_jpim1   ! vector opt. 
    267                      z2d(ji,jj) = z2d(ji,jj) + zftv(ji,jj,jk)  
     254               z2d(:,:) = - rau0_rcp * z2d(:,:)     ! note sign is reversed to give down-gradient diffusive transports (#1043) 
     255               CALL lbc_lnk( z2d, 'U', -1. ) 
     256               CALL iom_put( "udiff_heattr", z2d )                  ! heat transport in i-direction 
     257               ! 
     258               z2d(:,:) = 0._wp  
     259               DO jk = 1, jpkm1 
     260                  DO jj = 2, jpjm1 
     261                     DO ji = fs_2, fs_jpim1   ! vector opt. 
     262                        z2d(ji,jj) = z2d(ji,jj) + zftv(ji,jj,jk)  
     263                     END DO 
    268264                  END DO 
    269265               END DO 
    270             END DO 
    271             z2d(:,:) = zztmp * z2d(:,:) 
    272             CALL lbc_lnk( z2d, 'V', -1. ) 
    273             CALL iom_put( "vdiff_heattr", z2d )                  !  heat transport in i-direction 
    274          END IF 
    275 #endif 
     266               z2d(:,:) = - rau0_rcp * z2d(:,:)     ! note sign is reversed to give down-gradient diffusive transports (#1043) 
     267               CALL lbc_lnk( z2d, 'V', -1. ) 
     268               CALL iom_put( "vdiff_heattr", z2d )                  !  heat transport in i-direction 
     269            END IF 
     270            ! 
     271         ENDIF 
    276272 
    277273         !!---------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.