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

Ignore:
Timestamp:
2012-01-28T17:44:18+01:00 (12 years ago)
Author:
rblod
Message:

Merge of 3.4beta into the trunk

File:
1 edited

Legend:

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

    r2715 r3294  
    2828   USE ldftra_oce      ! ocean active tracers: lateral physics 
    2929   USE ldfdyn_oce      ! ocean dynamics: lateral physics 
     30   USE traldf_iso_grif, ONLY : psix_eiv, psiy_eiv 
    3031   USE sol_oce         ! solver variables 
    3132   USE sbc_oce         ! Surface boundary condition: ocean fields 
     
    4647   USE limwri_2  
    4748#endif 
    48    USE dtatem 
    49    USE dtasal 
    5049   USE lib_mpp         ! MPP library 
     50   USE timing          ! preformance summary 
     51   USE wrk_nemo        ! working array 
    5152 
    5253   IMPLICIT NONE 
     
    116117      !! ** Method  :  use iom_put 
    117118      !!---------------------------------------------------------------------- 
    118       USE oce, ONLY :   z3d => ta   ! use ta as 3D workspace 
    119       USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 
    120       USE wrk_nemo, ONLY: z2d => wrk_2d_1 
    121119      !! 
    122120      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index 
     
    124122      INTEGER                      ::   ji, jj, jk              ! dummy loop indices 
    125123      REAL(wp)                     ::   zztmp, zztmpx, zztmpy   !  
     124      !! 
     125      REAL(wp), POINTER, DIMENSION(:,:)   :: z2d       ! 2D workspace 
     126      REAL(wp), POINTER, DIMENSION(:,:,:) :: z3d      ! 3D workspace 
    126127      !!---------------------------------------------------------------------- 
    127128      !  
    128       IF( wrk_in_use(2, 1))THEN 
    129          CALL ctl_stop('dia_wri: ERROR - requested 2D workspace unavailable.') 
    130          RETURN 
    131       END IF 
     129      IF( nn_timing == 1 )   CALL timing_start('dia_wri') 
     130      !  
     131      CALL wrk_alloc( jpi , jpj      , z2d ) 
     132      CALL wrk_alloc( jpi , jpj, jpk , z3d ) 
    132133      ! 
    133134      ! Output the initial state and forcings 
     
    137138      ENDIF 
    138139 
    139       CALL iom_put( "toce"   , tn                    )    ! temperature 
    140       CALL iom_put( "soce"   , sn                    )    ! salinity 
    141       CALL iom_put( "sst"    , tn(:,:,1)             )    ! sea surface temperature 
    142       CALL iom_put( "sst2"   , tn(:,:,1) * tn(:,:,1) )    ! square of sea surface temperature 
    143       CALL iom_put( "sss"    , sn(:,:,1)             )    ! sea surface salinity 
    144       CALL iom_put( "sss2"   , sn(:,:,1) * sn(:,:,1) )    ! square of sea surface salinity 
    145       CALL iom_put( "uoce"   , un                    )    ! i-current       
    146       CALL iom_put( "voce"   , vn                    )    ! j-current 
     140      CALL iom_put( "toce"   , tsn(:,:,:,jp_tem)                     )    ! temperature 
     141      CALL iom_put( "soce"   , tsn(:,:,:,jp_sal)                     )    ! salinity 
     142      CALL iom_put( "sst"    , tsn(:,:,1,jp_tem)                     )    ! sea surface temperature 
     143      CALL iom_put( "sst2"   , tsn(:,:,1,jp_tem) * tsn(:,:,1,jp_tem) )    ! square of sea surface temperature 
     144      CALL iom_put( "sss"    , tsn(:,:,1,jp_sal)                     )    ! sea surface salinity 
     145      CALL iom_put( "sss2"   , tsn(:,:,1,jp_sal) * tsn(:,:,1,jp_sal) )    ! square of sea surface salinity 
     146      CALL iom_put( "uoce"   , un                                    )    ! i-current       
     147      CALL iom_put( "voce"   , vn                                    )    ! j-current 
    147148       
    148       CALL iom_put( "avt"    , avt                   )    ! T vert. eddy diff. coef. 
    149       CALL iom_put( "avm"    , avmu                  )    ! T vert. eddy visc. coef. 
     149      CALL iom_put( "avt"    , avt                                   )    ! T vert. eddy diff. coef. 
     150      CALL iom_put( "avm"    , avmu                                  )    ! T vert. eddy visc. coef. 
    150151      IF( lk_zdfddm ) THEN 
    151          CALL iom_put( "avs" , fsavs(:,:,:)          )    ! S vert. eddy diff. coef. 
     152         CALL iom_put( "avs" , fsavs(:,:,:)                          )    ! S vert. eddy diff. coef. 
    152153      ENDIF 
    153154 
    154155      DO jj = 2, jpjm1                                    ! sst gradient 
    155156         DO ji = fs_2, fs_jpim1   ! vector opt. 
    156             zztmp      = tn(ji,jj,1) 
    157             zztmpx     = ( tn(ji+1,jj  ,1) - zztmp ) / e1u(ji,jj) + ( zztmp - tn(ji-1,jj  ,1) ) / e1u(ji-1,jj  ) 
    158             zztmpy     = ( tn(ji  ,jj+1,1) - zztmp ) / e2v(ji,jj) + ( zztmp - tn(ji  ,jj-1,1) ) / e2v(ji  ,jj-1) 
     157            zztmp      = tsn(ji,jj,1,jp_tem) 
     158            zztmpx     = ( tsn(ji+1,jj  ,1,jp_tem) - zztmp ) / e1u(ji,jj) + ( zztmp - tsn(ji-1,jj  ,1,jp_tem) ) / e1u(ji-1,jj  ) 
     159            zztmpy     = ( tsn(ji  ,jj+1,1,jp_tem) - zztmp ) / e2v(ji,jj) + ( zztmp - tsn(ji  ,jj-1,1,jp_tem) ) / e2v(ji  ,jj-1) 
    159160            z2d(ji,jj) = 0.25 * ( zztmpx * zztmpx + zztmpy * zztmpy )   & 
    160161               &              * umask(ji,jj,1) * umask(ji-1,jj,1) * vmask(ji,jj,1) * umask(ji,jj-1,1) 
     
    178179            DO jj = 2, jpjm1 
    179180               DO ji = fs_2, fs_jpim1   ! vector opt. 
    180                   z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * zztmp * ( tn(ji,jj,jk) + tn(ji+1,jj,jk) ) 
     181                  z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * zztmp * ( tsn(ji,jj,jk,jp_tem) + tsn(ji+1,jj,jk,jp_tem) ) 
    181182               END DO 
    182183            END DO 
     
    192193            DO jj = 2, jpjm1 
    193194               DO ji = fs_2, fs_jpim1   ! vector opt. 
    194                   z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * zztmp * ( tn(ji,jj,jk) + tn(ji,jj+1,jk) ) 
     195                  z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * zztmp * ( tsn(ji,jj,jk,jp_tem) + tsn(ji,jj+1,jk,jp_tem) ) 
    195196               END DO 
    196197            END DO 
     
    200201      ENDIF 
    201202      ! 
    202       IF( wrk_not_released(2, 1))THEN 
    203          CALL ctl_stop('dia_wri: ERROR - failed to release 2D workspace.') 
    204          RETURN 
    205       END IF 
     203      CALL wrk_dealloc( jpi , jpj      , z2d ) 
     204      CALL wrk_dealloc( jpi , jpj, jpk , z3d ) 
     205      ! 
     206      IF( nn_timing == 1 )   CALL timing_stop('dia_wri') 
    206207      ! 
    207208   END SUBROUTINE dia_wri 
     
    224225      !!      Each nwrite time step, output the instantaneous or mean fields 
    225226      !!---------------------------------------------------------------------- 
    226       USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 
    227       USE wrk_nemo, ONLY: zw2d => wrk_2d_1 
    228227      !! 
    229228      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index 
     
    232231      CHARACTER (len=40) ::   clhstnam, clop, clmx           ! local names 
    233232      INTEGER  ::   inum = 11                                ! temporary logical unit 
     233      INTEGER  ::   ji, jj, jk                               ! dummy loop indices 
     234      INTEGER  ::   ierr                                     ! error code return from allocation 
    234235      INTEGER  ::   iimi, iima, ipk, it, itmod, ijmi, ijma   ! local integers 
    235236      REAL(wp) ::   zsto, zout, zmax, zjulian, zdt           ! local scalars 
     237      !! 
     238      REAL(wp), POINTER, DIMENSION(:,:)   :: zw2d       ! 2D workspace 
     239      REAL(wp), POINTER, DIMENSION(:,:,:) :: zw3d       ! 3D workspace 
    236240      !!---------------------------------------------------------------------- 
    237       ! 
    238       IF( wrk_in_use(2, 1))THEN 
    239          CALL ctl_stop('dia_wri: ERROR - requested 2D workspace unavailable.') 
    240          RETURN 
    241       END IF 
     241      !  
     242      IF( nn_timing == 1 )   CALL timing_start('dia_wri') 
     243      ! 
     244      CALL wrk_alloc( jpi , jpj      , zw2d ) 
     245      IF ( ln_traldf_gdia )  call wrk_alloc( jpi , jpj , jpk  , zw3d ) 
    242246      ! 
    243247      ! Output the initial state and forcings 
     
    446450         CALL histdef( nid_U, "vozocrtx", "Zonal Current"                      , "m/s"    ,   &  ! un 
    447451            &          jpi, jpj, nh_U, ipk, 1, ipk, nz_U, 32, clop, zsto, zout ) 
     452         IF( ln_traldf_gdia ) THEN 
     453            CALL histdef( nid_U, "vozoeivu", "Zonal EIV Current"                  , "m/s"    ,   &  ! u_eiv 
     454                 &          jpi, jpj, nh_U, ipk, 1, ipk, nz_U, 32, clop, zsto, zout ) 
     455         ELSE 
    448456#if defined key_diaeiv 
    449          CALL histdef( nid_U, "vozoeivu", "Zonal EIV Current"                  , "m/s"    ,   &  ! u_eiv 
     457            CALL histdef( nid_U, "vozoeivu", "Zonal EIV Current"                  , "m/s"    ,   &  ! u_eiv 
    450458            &          jpi, jpj, nh_U, ipk, 1, ipk, nz_U, 32, clop, zsto, zout ) 
    451459#endif 
     460         END IF 
    452461         !                                                                                      !!! nid_U : 2D 
    453462         CALL histdef( nid_U, "sozotaux", "Wind Stress along i-axis"           , "N/m2"   ,   &  ! utau 
     
    459468         CALL histdef( nid_V, "vomecrty", "Meridional Current"                 , "m/s"    ,   &  ! vn 
    460469            &          jpi, jpj, nh_V, ipk, 1, ipk, nz_V, 32, clop, zsto, zout ) 
     470         IF( ln_traldf_gdia ) THEN 
     471            CALL histdef( nid_V, "vomeeivv", "Meridional EIV Current"             , "m/s"    ,   &  ! v_eiv 
     472                 &          jpi, jpj, nh_V, ipk, 1, ipk, nz_V, 32, clop, zsto, zout ) 
     473         ELSE  
    461474#if defined key_diaeiv 
    462          CALL histdef( nid_V, "vomeeivv", "Meridional EIV Current"             , "m/s"    ,   &  ! v_eiv 
     475            CALL histdef( nid_V, "vomeeivv", "Meridional EIV Current"             , "m/s"    ,   &  ! v_eiv 
    463476            &          jpi, jpj, nh_V, ipk, 1, ipk, nz_V, 32, clop, zsto, zout ) 
    464477#endif 
     478         END IF 
    465479         !                                                                                      !!! nid_V : 2D 
    466480         CALL histdef( nid_V, "sometauy", "Wind Stress along j-axis"           , "N/m2"   ,   &  ! vtau 
     
    472486         CALL histdef( nid_W, "vovecrtz", "Vertical Velocity"                  , "m/s"    ,   &  ! wn 
    473487            &          jpi, jpj, nh_W, ipk, 1, ipk, nz_W, 32, clop, zsto, zout ) 
     488         IF( ln_traldf_gdia ) THEN 
     489            CALL histdef( nid_W, "voveeivw", "Vertical EIV Velocity"              , "m/s"    ,   &  ! w_eiv 
     490                 &          jpi, jpj, nh_W, ipk, 1, ipk, nz_W, 32, clop, zsto, zout ) 
     491         ELSE 
    474492#if defined key_diaeiv 
    475          CALL histdef( nid_W, "voveeivw", "Vertical EIV Velocity"              , "m/s"    ,   &  ! w_eiv 
    476             &          jpi, jpj, nh_W, ipk, 1, ipk, nz_W, 32, clop, zsto, zout ) 
    477 #endif 
     493            CALL histdef( nid_W, "voveeivw", "Vertical EIV Velocity"              , "m/s"    ,   &  ! w_eiv 
     494                 &          jpi, jpj, nh_W, ipk, 1, ipk, nz_W, 32, clop, zsto, zout ) 
     495#endif 
     496         END IF 
    478497         CALL histdef( nid_W, "votkeavt", "Vertical Eddy Diffusivity"          , "m2/s"   ,   &  ! avt 
    479498            &          jpi, jpj, nh_W, ipk, 1, ipk, nz_W, 32, clop, zsto, zout ) 
     
    516535 
    517536      ! Write fields on T grid 
    518       CALL histwrite( nid_T, "votemper", it, tn            , ndim_T , ndex_T  )   ! temperature 
    519       CALL histwrite( nid_T, "vosaline", it, sn            , ndim_T , ndex_T  )   ! salinity 
    520       CALL histwrite( nid_T, "sosstsst", it, tn(:,:,1)     , ndim_hT, ndex_hT )   ! sea surface temperature 
    521       CALL histwrite( nid_T, "sosaline", it, sn(:,:,1)     , ndim_hT, ndex_hT )   ! sea surface salinity 
     537      CALL histwrite( nid_T, "votemper", it, tsn(:,:,:,jp_tem), ndim_T , ndex_T  )   ! temperature 
     538      CALL histwrite( nid_T, "vosaline", it, tsn(:,:,:,jp_sal), ndim_T , ndex_T  )   ! salinity 
     539      CALL histwrite( nid_T, "sosstsst", it, tsn(:,:,1,jp_tem), ndim_hT, ndex_hT )   ! sea surface temperature 
     540      CALL histwrite( nid_T, "sosaline", it, tsn(:,:,1,jp_sal), ndim_hT, ndex_hT )   ! sea surface salinity 
    522541      CALL histwrite( nid_T, "sossheig", it, sshn          , ndim_hT, ndex_hT )   ! sea surface height 
    523542!!$#if  defined key_lim3 || defined key_lim2  
     
    528547!!$      CALL histwrite( nid_T, "sorunoff", it, runoff        , ndim_hT, ndex_hT )   ! runoff 
    529548      CALL histwrite( nid_T, "sowaflcd", it, ( emps-rnf )  , ndim_hT, ndex_hT )   ! c/d water flux 
    530       zw2d(:,:) = ( emps(:,:) - rnf(:,:) ) * sn(:,:,1) * tmask(:,:,1) 
     549      zw2d(:,:) = ( emps(:,:) - rnf(:,:) ) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 
    531550      CALL histwrite( nid_T, "sosalflx", it, zw2d          , ndim_hT, ndex_hT )   ! c/d salt flux 
    532551      CALL histwrite( nid_T, "sohefldo", it, qns + qsr     , ndim_hT, ndex_hT )   ! total heat flux 
     
    539558      CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping 
    540559      CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping 
    541       IF( ln_ssr ) zw2d(:,:) = erp(:,:) * sn(:,:,1) * tmask(:,:,1) 
     560      IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 
    542561      CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping 
    543562#endif 
     
    545564      CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping 
    546565      CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping 
    547          IF( ln_ssr ) zw2d(:,:) = erp(:,:) * sn(:,:,1) * tmask(:,:,1) 
     566         IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 
    548567      CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping 
    549568#endif 
     
    570589         ! Write fields on U grid 
    571590      CALL histwrite( nid_U, "vozocrtx", it, un            , ndim_U , ndex_U )    ! i-current 
     591      IF( ln_traldf_gdia ) THEN 
     592         IF (.not. ALLOCATED(psix_eiv))THEN 
     593            ALLOCATE( psix_eiv(jpi,jpj,jpk) , psiy_eiv(jpi,jpj,jpk) , STAT=ierr ) 
     594            IF( lk_mpp   )   CALL mpp_sum ( ierr ) 
     595            IF( ierr > 0 )   CALL ctl_stop('STOP', 'diawri: unable to allocate psi{x,y}_eiv') 
     596            psix_eiv(:,:,:) = 0.0_wp 
     597            psiy_eiv(:,:,:) = 0.0_wp 
     598         ENDIF 
     599         DO jk=1,jpkm1 
     600            zw3d(:,:,jk) = (psix_eiv(:,:,jk+1) - psix_eiv(:,:,jk))/fse3u(:,:,jk)  ! u_eiv = -dpsix/dz 
     601         END DO 
     602         zw3d(:,:,jpk) = 0._wp 
     603         CALL histwrite( nid_U, "vozoeivu", it, zw3d, ndim_U , ndex_U )           ! i-eiv current 
     604      ELSE 
    572605#if defined key_diaeiv 
    573       CALL histwrite( nid_U, "vozoeivu", it, u_eiv         , ndim_U , ndex_U )    ! i-eiv current 
    574 #endif 
     606         CALL histwrite( nid_U, "vozoeivu", it, u_eiv, ndim_U , ndex_U )          ! i-eiv current 
     607#endif 
     608      ENDIF 
    575609      CALL histwrite( nid_U, "sozotaux", it, utau          , ndim_hU, ndex_hU )   ! i-wind stress 
    576610 
    577611         ! Write fields on V grid 
    578612      CALL histwrite( nid_V, "vomecrty", it, vn            , ndim_V , ndex_V  )   ! j-current 
     613      IF( ln_traldf_gdia ) THEN 
     614         DO jk=1,jpk-1 
     615            zw3d(:,:,jk) = (psiy_eiv(:,:,jk+1) - psiy_eiv(:,:,jk))/fse3v(:,:,jk)  ! v_eiv = -dpsiy/dz 
     616         END DO 
     617         zw3d(:,:,jpk) = 0._wp 
     618         CALL histwrite( nid_V, "vomeeivv", it, zw3d, ndim_V , ndex_V )           ! j-eiv current 
     619      ELSE 
    579620#if defined key_diaeiv 
    580       CALL histwrite( nid_V, "vomeeivv", it, v_eiv         , ndim_V , ndex_V  )   ! j-eiv current 
    581 #endif 
     621         CALL histwrite( nid_V, "vomeeivv", it, v_eiv, ndim_V , ndex_V )          ! j-eiv current 
     622#endif 
     623      ENDIF 
    582624      CALL histwrite( nid_V, "sometauy", it, vtau          , ndim_hV, ndex_hV )   ! j-wind stress 
    583625 
    584626         ! Write fields on W grid 
    585627      CALL histwrite( nid_W, "vovecrtz", it, wn             , ndim_T, ndex_T )    ! vert. current 
     628      IF( ln_traldf_gdia ) THEN 
     629         DO jk=1,jpk-1 
     630            DO jj = 2, jpjm1 
     631               DO ji = fs_2, fs_jpim1  ! vector opt. 
     632                  zw3d(ji,jj,jk) = (psiy_eiv(ji,jj,jk) - psiy_eiv(ji,jj-1,jk))/e2v(ji,jj) + & 
     633                       &    (psix_eiv(ji,jj,jk) - psix_eiv(ji-1,jj,jk))/e1u(ji,jj) ! w_eiv = dpsiy/dy + dpsiy/dx 
     634               END DO 
     635            END DO 
     636         END DO 
     637         zw3d(:,:,jpk) = 0._wp 
     638         CALL histwrite( nid_W, "voveeivw", it, zw3d          , ndim_T, ndex_T )    ! vert. eiv current 
     639      ELSE 
    586640#   if defined key_diaeiv 
    587       CALL histwrite( nid_W, "voveeivw", it, w_eiv          , ndim_T, ndex_T )    ! vert. eiv current 
     641         CALL histwrite( nid_W, "voveeivw", it, w_eiv          , ndim_T, ndex_T )    ! vert. eiv current 
    588642#   endif 
     643      ENDIF 
    589644      CALL histwrite( nid_W, "votkeavt", it, avt            , ndim_T, ndex_T )    ! T vert. eddy diff. coef. 
    590645      CALL histwrite( nid_W, "votkeavm", it, avmu           , ndim_T, ndex_T )    ! T vert. eddy visc. coef. 
     
    608663      ENDIF 
    609664      ! 
    610       IF( wrk_not_released(2, 1))THEN 
    611          CALL ctl_stop('dia_wri: ERROR - failed to release 2D workspace.') 
    612          RETURN 
    613       END IF 
     665      CALL wrk_dealloc( jpi , jpj      , zw2d ) 
     666      IF ( ln_traldf_gdia )  call wrk_dealloc( jpi , jpj , jpk  , zw3d ) 
     667      ! 
     668      IF( nn_timing == 1 )   CALL timing_stop('dia_wri') 
    614669      ! 
    615670   END SUBROUTINE dia_wri 
     
    640695      REAL(wp) ::   zsto, zout, zmax, zjulian, zdt 
    641696      !!---------------------------------------------------------------------- 
     697      !  
     698      IF( nn_timing == 1 )   CALL timing_start('dia_wri_state') 
    642699 
    643700      ! 0. Initialisation 
     
    711768 
    712769      ! Write all fields on T grid 
    713       CALL histwrite( id_i, "votemper", kt, tn      , jpi*jpj*jpk, idex )    ! now temperature 
    714       CALL histwrite( id_i, "vosaline", kt, sn      , jpi*jpj*jpk, idex )    ! now salinity 
    715       CALL histwrite( id_i, "sossheig", kt, sshn     , jpi*jpj    , idex )    ! sea surface height 
    716       CALL histwrite( id_i, "vozocrtx", kt, un       , jpi*jpj*jpk, idex )    ! now i-velocity 
    717       CALL histwrite( id_i, "vomecrty", kt, vn       , jpi*jpj*jpk, idex )    ! now j-velocity 
    718       CALL histwrite( id_i, "vovecrtz", kt, wn       , jpi*jpj*jpk, idex )    ! now k-velocity 
    719       CALL histwrite( id_i, "sowaflup", kt, (emp-rnf), jpi*jpj    , idex )    ! freshwater budget 
    720       CALL histwrite( id_i, "sohefldo", kt, qsr + qns, jpi*jpj    , idex )    ! total heat flux 
    721       CALL histwrite( id_i, "soshfldo", kt, qsr      , jpi*jpj    , idex )    ! solar heat flux 
    722       CALL histwrite( id_i, "soicecov", kt, fr_i     , jpi*jpj    , idex )    ! ice fraction 
    723       CALL histwrite( id_i, "sozotaux", kt, utau     , jpi*jpj    , idex )    ! i-wind stress 
    724       CALL histwrite( id_i, "sometauy", kt, vtau     , jpi*jpj    , idex )    ! j-wind stress 
     770      CALL histwrite( id_i, "votemper", kt, tsn(:,:,:,jp_tem), jpi*jpj*jpk, idex )    ! now temperature 
     771      CALL histwrite( id_i, "vosaline", kt, tsn(:,:,:,jp_sal), jpi*jpj*jpk, idex )    ! now salinity 
     772      CALL histwrite( id_i, "sossheig", kt, sshn             , jpi*jpj    , idex )    ! sea surface height 
     773      CALL histwrite( id_i, "vozocrtx", kt, un               , jpi*jpj*jpk, idex )    ! now i-velocity 
     774      CALL histwrite( id_i, "vomecrty", kt, vn               , jpi*jpj*jpk, idex )    ! now j-velocity 
     775      CALL histwrite( id_i, "vovecrtz", kt, wn               , jpi*jpj*jpk, idex )    ! now k-velocity 
     776      CALL histwrite( id_i, "sowaflup", kt, (emp-rnf )       , jpi*jpj    , idex )    ! freshwater budget 
     777      CALL histwrite( id_i, "sohefldo", kt, qsr + qns        , jpi*jpj    , idex )    ! total heat flux 
     778      CALL histwrite( id_i, "soshfldo", kt, qsr              , jpi*jpj    , idex )    ! solar heat flux 
     779      CALL histwrite( id_i, "soicecov", kt, fr_i             , jpi*jpj    , idex )    ! ice fraction 
     780      CALL histwrite( id_i, "sozotaux", kt, utau             , jpi*jpj    , idex )    ! i-wind stress 
     781      CALL histwrite( id_i, "sometauy", kt, vtau             , jpi*jpj    , idex )    ! j-wind stress 
    725782 
    726783      ! 3. Close the file 
     
    735792      ENDIF 
    736793#endif 
     794        
     795      IF( nn_timing == 1 )   CALL timing_stop('dia_wri_state') 
     796      !  
    737797 
    738798   END SUBROUTINE dia_wri_state 
Note: See TracChangeset for help on using the changeset viewer.