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 7179 for branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90 – NEMO

Ignore:
Timestamp:
2016-11-03T16:39:56+01:00 (7 years ago)
Author:
timgraham
Message:

Manually merge in changes from v3.6_extra_CMIP6_diagnostics branch.
This change also includes a change of the domain_def.xml file so XIOS2 must be used from this revision onwards

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90

    r6498 r7179  
    323323      CALL iom_put( "hdiv", hdivn )                  ! Horizontal divergence 
    324324      ! 
    325       IF( iom_use("u_masstr") .OR. iom_use("u_heattr") .OR. iom_use("u_salttr") ) THEN 
     325      IF( iom_use("u_masstr") .OR. iom_use("u_masstr_vint") .OR. iom_use("u_heattr") .OR. iom_use("u_salttr") ) THEN 
    326326         z3d(:,:,jpk) = 0.e0 
     327         z2d(:,:) = 0.e0 
    327328         DO jk = 1, jpkm1 
    328329            z3d(:,:,jk) = rau0 * un(:,:,jk) * e2u(:,:) * fse3u(:,:,jk) * umask(:,:,jk) 
     330            z2d(:,:) = z2d(:,:) + z3d(:,:,jk) 
    329331         END DO 
    330332         CALL iom_put( "u_masstr", z3d )                  ! mass transport in i-direction 
     333         CALL iom_put( "u_masstr_vint", z2d )             ! mass transport in i-direction vertical sum 
    331334      ENDIF 
    332335       
     
    391394         CALL iom_put( "v_salttr", 0.5 * z2d )            !  heat transport in j-direction 
    392395      ENDIF 
     396 
     397      ! Vertical integral of temperature 
     398      IF( iom_use("tosmint") ) THEN 
     399         z2d(:,:)=0._wp 
     400         DO jk = 1, jpkm1 
     401            DO jj = 2, jpjm1 
     402               DO ji = fs_2, fs_jpim1   ! vector opt. 
     403                  z2d(ji,jj) = z2d(ji,jj) + rau0 * fse3t(ji,jj,jk) *  tsn(ji,jj,jk,jp_tem) 
     404               END DO 
     405            END DO 
     406         END DO 
     407         CALL lbc_lnk( z2d, 'T', -1. ) 
     408         CALL iom_put( "tosmint", z2d )  
     409      ENDIF 
     410 
     411      ! Vertical integral of salinity 
     412      IF( iom_use("somint") ) THEN 
     413         z2d(:,:)=0._wp 
     414         DO jk = 1, jpkm1 
     415            DO jj = 2, jpjm1 
     416               DO ji = fs_2, fs_jpim1   ! vector opt. 
     417                  z2d(ji,jj) = z2d(ji,jj) + rau0 * fse3t(ji,jj,jk) * tsn(ji,jj,jk,jp_sal) 
     418               END DO 
     419            END DO 
     420         END DO 
     421         CALL lbc_lnk( z2d, 'T', -1. ) 
     422         CALL iom_put( "somint", z2d )  
     423      ENDIF 
     424 
     425      CALL iom_put( "bn2", rn2 )  !Brunt-Vaisala buoyancy frequency (N^2) 
    393426      ! 
    394427      CALL wrk_dealloc( jpi , jpj      , z2d ) 
Note: See TracChangeset for help on using the changeset viewer.