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 7646 for trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90 – NEMO

Ignore:
Timestamp:
2017-02-06T10:25:03+01:00 (7 years ago)
Author:
timgraham
Message:

Merge of dev_merge_2016 into trunk. UPDATE TO ARCHFILES NEEDED for XIOS2.
LIM_SRC_s/limrhg.F90 to follow in next commit due to change of kind (I'm unable to do it in this commit).
Merged using the following steps:

1) svn merge --reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk .
2) Resolve minor conflicts in sette.sh and namelist_cfg for ORCA2LIM3 (due to a change in trunk after branch was created)
3) svn commit
4) svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
5) svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2016/dev_merge_2016 .
6) At this stage I checked out a clean copy of the branch to compare against what is about to be committed to the trunk.
6) svn commit #Commit code to the trunk

In this commit I have also reverted a change to Fcheck_archfile.sh which was causing problems on the Paris machine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90

    r6140 r7646  
    2424   USE ldfslp         ! iso-neutral slopes 
    2525   USE diaptr         ! poleward transport diagnostics 
     26   USE diaar5         ! AR5 diagnostics 
    2627   ! 
    2728   USE in_out_manager ! I/O manager 
     
    3637 
    3738   PUBLIC   tra_ldf_iso   ! routine called by step.F90 
     39 
     40   LOGICAL  ::   l_ptr   ! flag to compute poleward transport 
     41   LOGICAL  ::   l_hst   ! flag to compute heat transport 
    3842 
    3943   !! * Substitutions 
     
    107111      REAL(wp) ::  zmskv, zahv_w, zabe2, zcof2, zcoef4   !   -      - 
    108112      REAL(wp) ::  zcoef0, ze3w_2, zsign, z2dt, z1_2dt   !   -      - 
    109 #if defined key_diaar5 
    110       REAL(wp) ::   zztmp   ! local scalar 
    111 #endif 
    112113      REAL(wp), POINTER, DIMENSION(:,:)   ::   zdkt, zdk1t, z2d 
    113114      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zdit, zdjt, zftu, zftv, ztfw  
     
    127128         ah_wslp2(:,:,:) = 0._wp 
    128129      ENDIF 
    129       !                                               ! set time step size (Euler/Leapfrog) 
     130      !    
     131      l_hst = .FALSE. 
     132      l_ptr = .FALSE. 
     133      IF( cdtype == 'TRA' .AND. ln_diaptr )                                                 l_ptr = .TRUE.  
     134      IF( cdtype == 'TRA' .AND. ( iom_use("uadv_heattr") .OR. iom_use("vadv_heattr") .OR. & 
     135         &                        iom_use("uadv_salttr") .OR. iom_use("vadv_salttr")  ) )   l_hst = .TRUE. 
     136      ! 
     137      !                                            ! set time step size (Euler/Leapfrog) 
    130138      IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   z2dt =     rdt      ! at nit000   (Euler) 
    131139      ELSE                                        ;   z2dt = 2.* rdt      !             (Leapfrog) 
     
    369377            ! 
    370378            !                             ! "Poleward" diffusive heat or salt transports (T-S case only) 
    371             IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN 
    372                ! note sign is reversed to give down-gradient diffusive transports (#1043) 
    373                IF( jn == jp_tem)   htr_ldf(:) = ptr_sj( -zftv(:,:,:) ) 
    374                IF( jn == jp_sal)   str_ldf(:) = ptr_sj( -zftv(:,:,:) ) 
    375             ENDIF 
    376             ! 
    377             IF( iom_use("udiff_heattr") .OR. iom_use("vdiff_heattr") ) THEN 
    378               ! 
    379               IF( cdtype == 'TRA' .AND. jn == jp_tem  ) THEN 
    380                   z2d(:,:) = zftu(ji,jj,1)  
    381                   DO jk = 2, jpkm1 
    382                      DO jj = 2, jpjm1 
    383                         DO ji = fs_2, fs_jpim1   ! vector opt. 
    384                            z2d(ji,jj) = z2d(ji,jj) + zftu(ji,jj,jk)  
    385                         END DO 
    386                      END DO 
    387                   END DO 
    388 !!gm CAUTION I think there is an error of sign when using BLP operator.... 
    389 !!gm         a multiplication by zsign is required (to be checked twice !) 
    390                   z2d(:,:) = - rau0_rcp * z2d(:,:)     ! note sign is reversed to give down-gradient diffusive transports (#1043) 
    391                   CALL lbc_lnk( z2d, 'U', -1. ) 
    392                   CALL iom_put( "udiff_heattr", z2d )                  ! heat transport in i-direction 
    393                   ! 
    394                   z2d(:,:) = zftv(ji,jj,1)  
    395                   DO jk = 2, jpkm1 
    396                      DO jj = 2, jpjm1 
    397                         DO ji = fs_2, fs_jpim1   ! vector opt. 
    398                            z2d(ji,jj) = z2d(ji,jj) + zftv(ji,jj,jk)  
    399                         END DO 
    400                      END DO 
    401                   END DO 
    402                   z2d(:,:) = - rau0_rcp * z2d(:,:)     ! note sign is reversed to give down-gradient diffusive transports (#1043) 
    403                   CALL lbc_lnk( z2d, 'V', -1. ) 
    404                   CALL iom_put( "vdiff_heattr", z2d )                  !  heat transport in i-direction 
    405                END IF 
    406                ! 
    407             ENDIF 
     379               ! note sign is reversed to give down-gradient diffusive transports ) 
     380            IF( l_ptr )  CALL dia_ptr_hst( jn, 'ldf', -zftv(:,:,:)  ) 
     381            !                          ! Diffusive heat transports 
     382            IF( l_hst )  CALL dia_ar5_hst( jn, 'ldf', -zftu(:,:,:), -zftv(:,:,:) ) 
    408383            ! 
    409384         ENDIF                                                    !== end pass selection  ==! 
Note: See TracChangeset for help on using the changeset viewer.