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 6140 for trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90 – NEMO

Ignore:
Timestamp:
2015-12-21T12:35:23+01:00 (8 years ago)
Author:
timgraham
Message:

Merge of branches/2015/dev_merge_2015 back into trunk. Merge excludes NEMOGCM/TOOLS/OBSTOOLS/ for now due to issues with the change of file type. Will sort these manually with further commits.

Branch merged as follows:
In the working copy of branch ran:
svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk@HEAD
Small conflicts due to bug fixes applied to trunk since the dev_merge_2015 was copied. Bug fixes were applied to the branch as well so these were easy to resolve.
Branch committed at this stage

In working copy run:
svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
to switch working copy

Run:
svn merge --reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2015/dev_merge_2015
to merge the branch into the trunk and then commit - no conflicts at this stage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90

    r5930 r6140  
    3030   USE zdf_oce         ! ocean vertical physics 
    3131   USE ldftra          ! lateral physics: eddy diffusivity coef. 
     32   USE ldfdyn          ! lateral physics: eddy viscosity   coef. 
    3233   USE sbc_oce         ! Surface boundary condition: ocean fields 
    3334   USE sbc_ice         ! Surface boundary condition: ice fields 
     
    4041   USE zdfddm          ! vertical  physics: double diffusion 
    4142   USE diahth          ! thermocline diagnostics 
     43   ! 
    4244   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    4345   USE in_out_manager  ! I/O manager 
    44    USE diadimg         ! dimg direct access file format output 
     46   USE diatmb          ! Top,middle,bottom output 
     47   USE dia25h          ! 25h Mean output 
    4548   USE iom 
    4649   USE ioipsl 
     
    5356   USE lib_mpp         ! MPP library 
    5457   USE timing          ! preformance summary 
     58   USE diurnal_bulk    ! diurnal warm layer 
     59   USE cool_skin       ! Cool skin 
    5560   USE wrk_nemo        ! working array 
    5661 
     
    7479   !! * Substitutions 
    7580#  include "zdfddm_substitute.h90" 
    76 #  include "domzgr_substitute.h90" 
    7781#  include "vectopt_loop_substitute.h90" 
    7882   !!---------------------------------------------------------------------- 
     
    97101  END FUNCTION dia_wri_alloc 
    98102 
    99 #if defined key_dimgout 
    100    !!---------------------------------------------------------------------- 
    101    !!   'key_dimgout'                                      DIMG output file 
    102    !!---------------------------------------------------------------------- 
    103 #   include "diawri_dimg.h90" 
    104  
    105 #else 
    106103   !!---------------------------------------------------------------------- 
    107104   !!   Default option                                   NetCDF output file 
    108105   !!---------------------------------------------------------------------- 
    109 # if defined key_iomput 
     106#if defined key_iomput 
    110107   !!---------------------------------------------------------------------- 
    111108   !!   'key_iomput'                                        use IOM library 
     
    143140      ENDIF 
    144141 
    145       IF( .NOT.lk_vvl ) THEN 
    146          CALL iom_put( "e3t" , fse3t_n(:,:,:) ) 
    147          CALL iom_put( "e3u" , fse3u_n(:,:,:) ) 
    148          CALL iom_put( "e3v" , fse3v_n(:,:,:) ) 
    149          CALL iom_put( "e3w" , fse3w_n(:,:,:) ) 
     142      IF( ln_linssh ) THEN 
     143         CALL iom_put( "e3t" , e3t_n(:,:,:) ) 
     144         CALL iom_put( "e3u" , e3u_n(:,:,:) ) 
     145         CALL iom_put( "e3v" , e3v_n(:,:,:) ) 
     146         CALL iom_put( "e3w" , e3w_n(:,:,:) ) 
    150147      ENDIF 
    151148 
     
    204201         CALL iom_put( "sbu", z2d )                ! bottom i-current 
    205202      ENDIF 
    206  
    207       IF ( ln_dynspg_ts ) THEN 
    208          CALL iom_put(  "ubar", un_adv(:,:)      )    ! barotropic i-current 
    209       ELSE 
    210          CALL iom_put(  "ubar", un_b(:,:)        )    ! barotropic i-current 
    211       ENDIF 
    212203       
    213204      CALL iom_put( "voce", vn(:,:,:)         )    ! 3D j-current 
     
    223214      ENDIF 
    224215 
    225       IF ( ln_dynspg_ts ) THEN 
    226          CALL iom_put(  "vbar", vn_adv(:,:)      )    ! barotropic j-current 
    227       ELSE 
    228          CALL iom_put(  "vbar", vn_b(:,:)        )    ! barotropic j-current 
    229       ENDIF 
    230  
    231216      CALL iom_put( "woce", wn )                   ! vertical velocity 
    232217      IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN   ! vertical mass transport & its square value 
     
    266251            DO jj = 1, jpj 
    267252               DO ji = 1, jpi 
    268                   z2d(ji,jj) = z2d(ji,jj) + fse3t(ji,jj,jk) * tsn(ji,jj,jk,jp_tem) * tmask(ji,jj,jk) 
     253                  z2d(ji,jj) = z2d(ji,jj) + e3t_n(ji,jj,jk) * tsn(ji,jj,jk,jp_tem) * tmask(ji,jj,jk) 
    269254               END DO 
    270255            END DO 
     
    278263            DO jj = 1, jpj 
    279264               DO ji = 1, jpi 
    280                   z2d(ji,jj) = z2d(ji,jj) + fse3t(ji,jj,jk) * tsn(ji,jj,jk,jp_sal) * tmask(ji,jj,jk) 
     265                  z2d(ji,jj) = z2d(ji,jj) + e3t_n(ji,jj,jk) * tsn(ji,jj,jk,jp_sal) * tmask(ji,jj,jk) 
    281266               END DO 
    282267            END DO 
     
    290275            DO jj = 2, jpjm1 
    291276               DO ji = fs_2, fs_jpim1   ! vector opt. 
    292                   zztmp   = 1._wp / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) ) 
    293                   zztmpx  = 0.5 * (  un(ji-1,jj,jk) * un(ji-1,jj,jk) * e2u(ji-1,jj) * fse3u(ji-1,jj,jk)    & 
    294                      &             + un(ji  ,jj,jk) * un(ji  ,jj,jk) * e2u(ji  ,jj) * fse3u(ji  ,jj,jk) )  & 
     277                  zztmp   = 1._wp / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) ) 
     278                  zztmpx  = 0.5 * (  un(ji-1,jj,jk) * un(ji-1,jj,jk) * e2u(ji-1,jj) * e3u_n(ji-1,jj,jk)    & 
     279                     &             + un(ji  ,jj,jk) * un(ji  ,jj,jk) * e2u(ji  ,jj) * e3u_n(ji  ,jj,jk) )  & 
    295280                     &          *  zztmp  
    296281                  ! 
    297                   zztmpy  = 0.5 * (  vn(ji,jj-1,jk) * vn(ji,jj-1,jk) * e1v(ji,jj-1) * fse3v(ji,jj-1,jk)    & 
    298                      &             + vn(ji,jj  ,jk) * vn(ji,jj  ,jk) * e1v(ji,jj  ) * fse3v(ji,jj  ,jk) )  & 
     282                  zztmpy  = 0.5 * (  vn(ji,jj-1,jk) * vn(ji,jj-1,jk) * e1v(ji,jj-1) * e3v_n(ji,jj-1,jk)    & 
     283                     &             + vn(ji,jj  ,jk) * vn(ji,jj  ,jk) * e1v(ji,jj  ) * e3v_n(ji,jj  ,jk) )  & 
    299284                     &          *  zztmp  
    300285                  ! 
     
    311296         z3d(:,:,jpk) = 0.e0 
    312297         DO jk = 1, jpkm1 
    313             z3d(:,:,jk) = rau0 * un(:,:,jk) * e2u(:,:) * fse3u(:,:,jk) * umask(:,:,jk) 
     298            z3d(:,:,jk) = rau0 * un(:,:,jk) * e2u(:,:) * e3u_n(:,:,jk) * umask(:,:,jk) 
    314299         END DO 
    315300         CALL iom_put( "u_masstr", z3d )                  ! mass transport in i-direction 
     
    346331         z3d(:,:,jpk) = 0.e0 
    347332         DO jk = 1, jpkm1 
    348             z3d(:,:,jk) = rau0 * vn(:,:,jk) * e1v(:,:) * fse3v(:,:,jk) * vmask(:,:,jk) 
     333            z3d(:,:,jk) = rau0 * vn(:,:,jk) * e1v(:,:) * e3v_n(:,:,jk) * vmask(:,:,jk) 
    349334         END DO 
    350335         CALL iom_put( "v_masstr", z3d )                  ! mass transport in j-direction 
     
    380365      CALL wrk_dealloc( jpi , jpj, jpk , z3d ) 
    381366      ! 
     367      ! If we want tmb values  
     368 
     369      IF (ln_diatmb) THEN 
     370         CALL dia_tmb  
     371      ENDIF  
     372      IF (ln_dia25h) THEN 
     373         CALL dia_25h( kt ) 
     374      ENDIF  
     375 
    382376      IF( nn_timing == 1 )   CALL timing_stop('dia_wri') 
    383377      ! 
     
    410404      INTEGER  ::   iimi, iima, ipk, it, itmod, ijmi, ijma   ! local integers 
    411405      INTEGER  ::   jn, ierror                               ! local integers 
    412       REAL(wp) ::   zsto, zout, zmax, zjulian, zdt           ! local scalars 
     406      REAL(wp) ::   zsto, zout, zmax, zjulian                ! local scalars 
    413407      ! 
    414408      REAL(wp), POINTER, DIMENSION(:,:)   :: zw2d       ! 2D workspace 
     
    418412      IF( nn_timing == 1 )   CALL timing_start('dia_wri') 
    419413      ! 
    420                      CALL wrk_alloc( jpi,jpj      , zw2d ) 
    421       IF( lk_vvl )   CALL wrk_alloc( jpi,jpj,jpk  , zw3d ) 
     414                             CALL wrk_alloc( jpi,jpj      , zw2d ) 
     415      IF( .NOT.ln_linssh )   CALL wrk_alloc( jpi,jpj,jpk  , zw3d ) 
    422416      ! 
    423417      ! Output the initial state and forcings 
     
    435429 
    436430      ! Define frequency of output and means 
    437       zdt = rdt 
    438       IF( nacc == 1 ) zdt = rdtmin 
    439431      clop = "x"         ! no use of the mask value (require less cpu time and otherwise the model crashes) 
    440432#if defined key_diainstant 
    441       zsto = nwrite * zdt 
     433      zsto = nwrite * rdt 
    442434      clop = "inst("//TRIM(clop)//")" 
    443435#else 
    444       zsto=zdt 
     436      zsto=rdt 
    445437      clop = "ave("//TRIM(clop)//")" 
    446438#endif 
    447       zout = nwrite * zdt 
    448       zmax = ( nitend - nit000 + 1 ) * zdt 
     439      zout = nwrite * rdt 
     440      zmax = ( nitend - nit000 + 1 ) * rdt 
    449441 
    450442      ! Define indices of the horizontal output zoom and vertical limit storage 
     
    488480         CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,           &  ! Horizontal grid: glamt and gphit 
    489481            &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,       & 
    490             &          nit000-1, zjulian, zdt, nh_T, nid_T, domain_id=nidom, snc4chunks=snc4set ) 
     482            &          nit000-1, zjulian, rdt, nh_T, nid_T, domain_id=nidom, snc4chunks=snc4set ) 
    491483         CALL histvert( nid_T, "deptht", "Vertical T levels",      &  ! Vertical grid: gdept 
    492484            &           "m", ipk, gdept_1d, nz_T, "down" ) 
     
    524516         CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu,           &  ! Horizontal grid: glamu and gphiu 
    525517            &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,       & 
    526             &          nit000-1, zjulian, zdt, nh_U, nid_U, domain_id=nidom, snc4chunks=snc4set ) 
     518            &          nit000-1, zjulian, rdt, nh_U, nid_U, domain_id=nidom, snc4chunks=snc4set ) 
    527519         CALL histvert( nid_U, "depthu", "Vertical U levels",      &  ! Vertical grid: gdept 
    528520            &           "m", ipk, gdept_1d, nz_U, "down" ) 
     
    537529         CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv,           &  ! Horizontal grid: glamv and gphiv 
    538530            &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,       & 
    539             &          nit000-1, zjulian, zdt, nh_V, nid_V, domain_id=nidom, snc4chunks=snc4set ) 
     531            &          nit000-1, zjulian, rdt, nh_V, nid_V, domain_id=nidom, snc4chunks=snc4set ) 
    540532         CALL histvert( nid_V, "depthv", "Vertical V levels",      &  ! Vertical grid : gdept 
    541533            &          "m", ipk, gdept_1d, nz_V, "down" ) 
     
    550542         CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,           &  ! Horizontal grid: glamt and gphit 
    551543            &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,       & 
    552             &          nit000-1, zjulian, zdt, nh_W, nid_W, domain_id=nidom, snc4chunks=snc4set ) 
     544            &          nit000-1, zjulian, rdt, nh_W, nid_W, domain_id=nidom, snc4chunks=snc4set ) 
    553545         CALL histvert( nid_W, "depthw", "Vertical W levels",      &  ! Vertical grid: gdepw 
    554546            &          "m", ipk, gdepw_1d, nz_W, "down" ) 
     
    562554         CALL histdef( nid_T, "vosaline", "Salinity"                           , "PSU"    ,   &  ! sn 
    563555            &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 
    564          IF(  lk_vvl  ) THEN 
     556         IF(  .NOT.ln_linssh  ) THEN 
    565557            CALL histdef( nid_T, "vovvle3t", "Level thickness"                    , "m"      ,&  ! e3t_n 
    566558            &             jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 
     
    583575         CALL histdef( nid_T, "sosfldow", "downward salt flux"                 , "PSU/m2/s",  &  ! sfx 
    584576            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    585          IF(  .NOT. lk_vvl  ) THEN 
     577         IF(  ln_linssh  ) THEN 
    586578            CALL histdef( nid_T, "sosst_cd", "Concentration/Dilution term on temperature"     &  ! emp * tsn(:,:,1,jp_tem) 
    587579            &                                                                  , "KgC/m2/s",  &  ! sosst_cd 
     
    729721      ENDIF 
    730722 
    731       IF( lk_vvl ) THEN 
    732          CALL histwrite( nid_T, "votemper", it, tsn(:,:,:,jp_tem) * fse3t_n(:,:,:) , ndim_T , ndex_T  )   ! heat content 
    733          CALL histwrite( nid_T, "vosaline", it, tsn(:,:,:,jp_sal) * fse3t_n(:,:,:) , ndim_T , ndex_T  )   ! salt content 
    734          CALL histwrite( nid_T, "sosstsst", it, tsn(:,:,1,jp_tem) * fse3t_n(:,:,1) , ndim_hT, ndex_hT )   ! sea surface heat content 
    735          CALL histwrite( nid_T, "sosaline", it, tsn(:,:,1,jp_sal) * fse3t_n(:,:,1) , ndim_hT, ndex_hT )   ! sea surface salinity content 
     723      IF( .NOT.ln_linssh ) THEN 
     724         CALL histwrite( nid_T, "votemper", it, tsn(:,:,:,jp_tem) * e3t_n(:,:,:) , ndim_T , ndex_T  )   ! heat content 
     725         CALL histwrite( nid_T, "vosaline", it, tsn(:,:,:,jp_sal) * e3t_n(:,:,:) , ndim_T , ndex_T  )   ! salt content 
     726         CALL histwrite( nid_T, "sosstsst", it, tsn(:,:,1,jp_tem) * e3t_n(:,:,1) , ndim_hT, ndex_hT )   ! sea surface heat content 
     727         CALL histwrite( nid_T, "sosaline", it, tsn(:,:,1,jp_sal) * e3t_n(:,:,1) , ndim_hT, ndex_hT )   ! sea surface salinity content 
    736728      ELSE 
    737729         CALL histwrite( nid_T, "votemper", it, tsn(:,:,:,jp_tem) , ndim_T , ndex_T  )   ! temperature 
     
    740732         CALL histwrite( nid_T, "sosaline", it, tsn(:,:,1,jp_sal) , ndim_hT, ndex_hT )   ! sea surface salinity 
    741733      ENDIF 
    742       IF( lk_vvl ) THEN 
    743          zw3d(:,:,:) = ( ( fse3t_n(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 
    744          CALL histwrite( nid_T, "vovvle3t", it, fse3t_n (:,:,:) , ndim_T , ndex_T  )   ! level thickness 
    745          CALL histwrite( nid_T, "vovvldep", it, fsdept_n(:,:,:) , ndim_T , ndex_T  )   ! t-point depth 
     734      IF( .NOT.ln_linssh ) THEN 
     735         zw3d(:,:,:) = ( ( e3t_n(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 
     736         CALL histwrite( nid_T, "vovvle3t", it, e3t_n (:,:,:) , ndim_T , ndex_T  )   ! level thickness 
     737         CALL histwrite( nid_T, "vovvldep", it, gdept_n(:,:,:) , ndim_T , ndex_T  )   ! t-point depth 
    746738         CALL histwrite( nid_T, "vovvldef", it, zw3d             , ndim_T , ndex_T  )   ! level thickness deformation 
    747739      ENDIF 
     
    752744                                                                                  ! (includes virtual salt flux beneath ice  
    753745                                                                                  ! in linear free surface case) 
    754       IF( .NOT. lk_vvl ) THEN 
     746      IF( ln_linssh ) THEN 
    755747         zw2d(:,:) = emp (:,:) * tsn(:,:,1,jp_tem) 
    756748         CALL histwrite( nid_T, "sosst_cd", it, zw2d, ndim_hT, ndex_hT )          ! c/d term on sst 
     
    837829      ENDIF 
    838830      ! 
    839                      CALL wrk_dealloc( jpi , jpj        , zw2d ) 
    840       IF( lk_vvl )   CALL wrk_dealloc( jpi , jpj , jpk  , zw3d ) 
     831                             CALL wrk_dealloc( jpi , jpj        , zw2d ) 
     832      IF( .NOT.ln_linssh )   CALL wrk_dealloc( jpi , jpj , jpk  , zw3d ) 
    841833      ! 
    842834      IF( nn_timing == 1 )   CALL timing_stop('dia_wri') 
    843835      ! 
    844836   END SUBROUTINE dia_wri 
    845 # endif 
    846  
    847837#endif 
    848838 
     
    867857      INTEGER  ::   id_i , nz_i, nh_i        
    868858      INTEGER, DIMENSION(1) ::   idex             ! local workspace 
    869       REAL(wp) ::   zsto, zout, zmax, zjulian, zdt 
     859      REAL(wp) ::   zsto, zout, zmax, zjulian 
    870860      !!---------------------------------------------------------------------- 
    871861      !  
     
    876866      clname = cdfile_name 
    877867      IF( .NOT. Agrif_Root() ) clname = TRIM(Agrif_CFixed())//'_'//TRIM(clname) 
    878       zdt  = rdt 
    879868      zsto = rdt 
    880869      clop = "inst(x)"           ! no use of the mask value (require less cpu time) 
    881870      zout = rdt 
    882       zmax = ( nitend - nit000 + 1 ) * zdt 
     871      zmax = ( nitend - nit000 + 1 ) * rdt 
    883872 
    884873      IF(lwp) WRITE(numout,*) 
     
    895884      zjulian = zjulian - adatrj   !   set calendar origin to the beginning of the experiment 
    896885      CALL histbeg( clname, jpi, glamt, jpj, gphit,   & 
    897           1, jpi, 1, jpj, nit000-1, zjulian, zdt, nh_i, id_i, domain_id=nidom, snc4chunks=snc4set ) ! Horizontal grid : glamt and gphit 
     886          1, jpi, 1, jpj, nit000-1, zjulian, rdt, nh_i, id_i, domain_id=nidom, snc4chunks=snc4set ) ! Horizontal grid : glamt and gphit 
    898887      CALL histvert( id_i, "deptht", "Vertical T levels",   &    ! Vertical grid : gdept 
    899888          "m", jpk, gdept_1d, nz_i, "down") 
     
    913902      CALL histdef( id_i, "vovecrtz", "Vertical Velocity"     , "m/s"    ,   &   ! vertical current 
    914903         &          jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout )  
     904         ! 
     905      CALL histdef( id_i, "ahtu"    , "u-eddy diffusivity"    , "m2/s"    ,   &   ! zonal current 
     906         &          jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout ) 
     907      CALL histdef( id_i, "ahtv"    , "v-eddy diffusivity"    , "m2/s"    ,   &   ! meridonal current 
     908         &          jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout )  
     909      CALL histdef( id_i, "ahmt"    , "t-eddy viscosity"      , "m2/s"    ,   &   ! zonal current 
     910         &          jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout ) 
     911      CALL histdef( id_i, "ahmf"    , "f-eddy viscosity"      , "m2/s"    ,   &   ! meridonal current 
     912         &          jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout )  
     913         ! 
    915914      CALL histdef( id_i, "sowaflup", "Net Upward Water Flux" , "Kg/m2/S",   &   ! net freshwater  
    916915         &          jpi, jpj, nh_i, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     
    925924      CALL histdef( id_i, "sometauy", "Meridional Wind Stress", "N/m2"   ,   &   ! j-wind stress 
    926925         &          jpi, jpj, nh_i, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    927       IF( lk_vvl ) THEN 
    928          CALL histdef( id_i, "vovvldep", "T point depth"         , "m"      ,   &   ! t-point depth 
     926      IF( .NOT.ln_linssh ) THEN 
     927         CALL histdef( id_i, "vovvldep", "T point depth"         , "m"      , &   ! t-point depth 
     928            &          jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout ) 
     929         CALL histdef( id_i, "vovvle3t", "T point thickness"     , "m"      , &   ! t-point depth 
    929930            &          jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout ) 
    930931      ENDIF 
     
    952953      CALL histwrite( id_i, "vomecrty", kt, vn               , jpi*jpj*jpk, idex )    ! now j-velocity 
    953954      CALL histwrite( id_i, "vovecrtz", kt, wn               , jpi*jpj*jpk, idex )    ! now k-velocity 
     955      ! 
     956      CALL histwrite( id_i, "ahtu"    , kt, ahtu             , jpi*jpj*jpk, idex )    ! aht at u-point 
     957      CALL histwrite( id_i, "ahtv"    , kt, ahtv             , jpi*jpj*jpk, idex )    !  -  at v-point 
     958      CALL histwrite( id_i, "ahmt"    , kt, ahmt             , jpi*jpj*jpk, idex )    ! ahm at t-point 
     959      CALL histwrite( id_i, "ahmf"    , kt, ahmf             , jpi*jpj*jpk, idex )    !  -  at f-point 
     960      ! 
    954961      CALL histwrite( id_i, "sowaflup", kt, emp-rnf          , jpi*jpj    , idex )    ! freshwater budget 
    955962      CALL histwrite( id_i, "sohefldo", kt, qsr + qns        , jpi*jpj    , idex )    ! total heat flux 
     
    959966      CALL histwrite( id_i, "sometauy", kt, vtau             , jpi*jpj    , idex )    ! j-wind stress 
    960967 
     968      IF(  .NOT.ln_linssh  ) THEN              
     969         CALL histwrite( id_i, "vovvldep", kt, gdept_n(:,:,:), jpi*jpj*jpk, idex )!  T-cell depth  
     970         CALL histwrite( id_i, "vovvle3t", kt, e3t_n (:,:,:) , jpi*jpj*jpk, idex )!  T-cell thickness   
     971      END IF  
    961972      ! 3. Close the file 
    962973      ! ----------------- 
    963974      CALL histclo( id_i ) 
    964 #if ! defined key_iomput && ! defined key_dimgout 
     975#if ! defined key_iomput 
    965976      IF( ninist /= 1  ) THEN 
    966977         CALL histclo( nid_T ) 
     
    972983      !  
    973984   END SUBROUTINE dia_wri_state 
     985 
    974986   !!====================================================================== 
    975987END MODULE diawri 
Note: See TracChangeset for help on using the changeset viewer.