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 12680 for NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE/DIA/diawri.F90 – NEMO

Ignore:
Timestamp:
2020-04-03T18:54:55+02:00 (4 years ago)
Author:
techene
Message:

dynatfQCO.F90, stepLF.F90 : fixed (remove pe3. from dyn_atf_qco input arguments), all : remove e3. tables and include gurvan's feedbacks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE/DIA/diawri.F90

    r12622 r12680  
    121121      REAL(wp)::   zztmp2, zztmpy   !   -      - 
    122122      REAL(wp), DIMENSION(jpi,jpj)     ::   z2d   ! 2D workspace 
    123       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   z3d, ze3t, ze3u, ze3v, ze3w   ! 3D workspace 
     123      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   z3d   ! 3D workspace 
    124124      !!---------------------------------------------------------------------- 
    125125      !  
     
    137137      CALL iom_put("e3v_0", e3v_0(:,:,:) ) 
    138138      ! 
    139       DO jk = 1, jpk 
    140          ze3t(:,:,jk) =  e3t(:,:,jk,Kmm) 
    141          ze3u(:,:,jk) =  e3u(:,:,jk,Kmm) 
    142          ze3v(:,:,jk) =  e3v(:,:,jk,Kmm) 
    143          ze3w(:,:,jk) =  e3w(:,:,jk,Kmm) 
    144       END DO  
    145       ! 
    146       CALL iom_put( "e3t" , ze3t(:,:,:) ) 
    147       CALL iom_put( "e3u" , ze3u(:,:,:) ) 
    148       CALL iom_put( "e3v" , ze3v(:,:,:) ) 
    149       CALL iom_put( "e3w" , ze3w(:,:,:) ) 
    150       IF( iom_use("e3tdef") )   & 
    151          CALL iom_put( "e3tdef"  , ( ( ze3t(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 ) !!st r3t 
    152  
    153       IF( ll_wd ) THEN 
    154          CALL iom_put( "ssh" , (ssh(:,:,Kmm)+ssh_ref)*tmask(:,:,1) )   ! sea surface height (brought back to the reference used for wetting and drying) 
     139      IF ( iom_use("e3t") .OR. iom_use("e3tdef") ) THEN  ! time-varying e3t 
     140         DO jk = 1, jpk 
     141            z3d(:,:,jk) =  e3t(:,:,jk,Kmm) 
     142         END DO 
     143         CALL iom_put( "e3t"     ,     z3d(:,:,:) ) 
     144         CALL iom_put( "e3tdef"  , ( ( z3d(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 ) !!st r3t 
     145      ENDIF  
     146      IF ( iom_use("e3u") ) THEN                         ! time-varying e3u 
     147         DO jk = 1, jpk 
     148            z3d(:,:,jk) =  e3u(:,:,jk,Kmm) 
     149         END DO  
     150         CALL iom_put( "e3u" , z3d(:,:,:) ) 
     151      ENDIF 
     152      IF ( iom_use("e3v") ) THEN                         ! time-varying e3v 
     153         DO jk = 1, jpk 
     154            z3d(:,:,jk) =  e3v(:,:,jk,Kmm) 
     155         END DO  
     156         CALL iom_put( "e3v" , z3d(:,:,:) ) 
     157      ENDIF 
     158      IF ( iom_use("e3w") ) THEN                         ! time-varying e3w 
     159         DO jk = 1, jpk 
     160            z3d(:,:,jk) =  e3w(:,:,jk,Kmm) 
     161         END DO  
     162         CALL iom_put( "e3w" , z3d(:,:,:) ) 
     163      ENDIF 
     164 
     165      IF( ll_wd ) THEN                                   ! sea surface height (brought back to the reference used for wetting and drying) 
     166         CALL iom_put( "ssh" , (ssh(:,:,Kmm)+ssh_ref)*tmask(:,:,1) ) 
    155167      ELSE 
    156168         CALL iom_put( "ssh" , ssh(:,:,Kmm) )              ! sea surface height 
     
    216228 
    217229      IF( ln_zad_Aimp ) ww = ww + wi               ! Recombine explicit and implicit parts of vertical velocity for diagnostic output 
    218       ! 
    219230      CALL iom_put( "woce", ww )                   ! vertical velocity 
     231 
    220232      IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN   ! vertical mass transport & its square value 
    221233         ! Caution: in the VVL case, it only correponds to the baroclinic mass transport. 
     
    777789         CALL histwrite( nid_T, "votemper", it, ts(:,:,:,jp_tem,Kmm) * ze3t(:,:,:) , ndim_T , ndex_T  )   ! heat content 
    778790         CALL histwrite( nid_T, "vosaline", it, ts(:,:,:,jp_sal,Kmm) * ze3t(:,:,:) , ndim_T , ndex_T  )   ! salt content 
    779          CALL histwrite( nid_T, "sosstsst", it, ts(:,:,1,jp_tem,Kmm) * e3t(:,:,1,Kmm) , ndim_hT, ndex_hT )   ! sea surface heat content 
    780          CALL histwrite( nid_T, "sosaline", it, ts(:,:,1,jp_sal,Kmm) * e3t(:,:,1,Kmm) , ndim_hT, ndex_hT )   ! sea surface salinity content 
     791         CALL histwrite( nid_T, "sosstsst", it, ts(:,:,1,jp_tem,Kmm) * ze3t(:,:,1) , ndim_hT, ndex_hT )   ! sea surface heat content 
     792         CALL histwrite( nid_T, "sosaline", it, ts(:,:,1,jp_sal,Kmm) * ze3t(:,:,1) , ndim_hT, ndex_hT )   ! sea surface salinity content 
    781793      ELSE 
    782794         CALL histwrite( nid_T, "votemper", it, ts(:,:,:,jp_tem,Kmm) , ndim_T , ndex_T  )   ! temperature 
     
    930942      !!---------------------------------------------------------------------- 
    931943      !  
    932       IF(lwp) WRITE(numout,*) 
    933       IF(lwp) WRITE(numout,*) 'dia_wri_state : single instantaneous ocean state' 
    934       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~   and forcing fields file created ' 
    935       IF(lwp) WRITE(numout,*) '                and named :', cdfile_name, '...nc' 
    936  
     944      IF(lwp) THEN 
     945         WRITE(numout,*) 
     946         WRITE(numout,*) 'dia_wri_state : single instantaneous ocean state' 
     947         WRITE(numout,*) '~~~~~~~~~~~~~   and forcing fields file created ' 
     948         WRITE(numout,*) '                and named :', cdfile_name, '...nc' 
     949      ENDIF  
     950      ! 
    937951      DO jk = 1, jpk 
    938952         ze3t(:,:,jk) =  e3t(:,:,jk,Kmm) 
    939953      END DO 
    940  
     954      ! 
    941955#if defined key_si3 
    942956     CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE., kdlev = jpl ) 
Note: See TracChangeset for help on using the changeset viewer.