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 8884 for branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/LIM_SRC_3 – NEMO

Ignore:
Timestamp:
2017-12-04T10:05:16+01:00 (6 years ago)
Author:
clem
Message:

dev_CNRS_2017: modify outputs for sea-ice

Location:
branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/LIM_SRC_3
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/LIM_SRC_3/icectl.F90

    r8882 r8884  
    126126 
    127127         zt = ( glob_sum( (  SUM( SUM( e_i(:,:,1:nlay_i,:), dim=4 ), dim=3 )   & 
    128             &                + SUM( SUM( e_s(:,:,1:nlay_s,:), dim=4 ), dim=3 ) ) * e1e2t ) * zconv   & 
     128            &              + SUM( SUM( e_s(:,:,1:nlay_s,:), dim=4 ), dim=3 ) ) * e1e2t ) * zconv   & 
    129129            &   - pdiag_t ) * r1_rdtice + zft 
    130130 
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/LIM_SRC_3/icedyn_adv.F90

    r8882 r8884  
    105105      diag_trp_vi(:,:) = SUM(     v_i (:,:,:)          - v_i_b (:,:,:)                  , dim=3 ) * r1_rdtice 
    106106      diag_trp_vs(:,:) = SUM(     v_s (:,:,:)          - v_s_b (:,:,:)                  , dim=3 ) * r1_rdtice 
    107       IF( iom_use('icetrp') )   CALL iom_put( "icetrp" , diag_trp_vi )          ! ice volume transport 
    108       IF( iom_use('snwtrp') )   CALL iom_put( "snwtrp" , diag_trp_vs )          ! snw volume transport 
    109       IF( iom_use('saltrp') )   CALL iom_put( "saltrp" , diag_trp_sv * rhoic )  ! salt content transport 
    110       IF( iom_use('deitrp') )   CALL iom_put( "deitrp" , diag_trp_ei )          ! advected ice enthalpy (W/m2) 
    111       IF( iom_use('destrp') )   CALL iom_put( "destrp" , diag_trp_es )          ! advected snw enthalpy (W/m2) 
     107      IF( iom_use('icemtrp') )   CALL iom_put( "icemtrp" , diag_trp_vi * rhoic          )   ! ice mass transport 
     108      IF( iom_use('snwmtrp') )   CALL iom_put( "snwmtrp" , diag_trp_vs * rhosn          )   ! snw mass transport 
     109      IF( iom_use('salmtrp') )   CALL iom_put( "salmtrp" , diag_trp_sv * rhoic * 1.e-03 )   ! salt mass transport (kg/m2/s) 
     110      IF( iom_use('dihctrp') )   CALL iom_put( "dihctrp" , -diag_trp_ei                 )   ! advected ice heat content (W/m2) 
     111      IF( iom_use('dshctrp') )   CALL iom_put( "dshctrp" , -diag_trp_es                 )   ! advected snw heat content (W/m2) 
    112112 
    113113      ! controls 
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/LIM_SRC_3/icedyn_rhg_evp.F90

    r8882 r8884  
    725725 
    726726      ! --- divergence, shear and strength --- ! 
    727       IF( iom_use('idive')  )   CALL iom_put( "idive"  , pdivu_i(:,:) * zswi(:,:) )   ! divergence 
    728       IF( iom_use('ishear') )   CALL iom_put( "ishear" , pshear_i(:,:) * zswi(:,:) )   ! shear 
     727      IF( iom_use('icediv') )   CALL iom_put( "icediv" , pdivu_i (:,:) * zswi(:,:) )   ! divergence 
     728      IF( iom_use('iceshe') )   CALL iom_put( "iceshe" , pshear_i(:,:) * zswi(:,:) )   ! shear 
    729729      IF( iom_use('icestr') )   CALL iom_put( "icestr" , strength(:,:) * zswi(:,:) )   ! Ice strength 
    730730 
     
    821821            &                  zdiag_ymtrp_snw, 'V', -1., zdiag_yatrp    , 'V', -1.    ) 
    822822          
    823          IF ( iom_use( 'normstr' ) )   CALL iom_put( 'normstr'  ,  zdiag_sig1(:,:)      )   ! Normal stress 
    824          IF ( iom_use( 'sheastr' ) )   CALL iom_put( 'sheastr'  ,  zdiag_sig2(:,:)      )   ! Shear stress 
    825          IF ( iom_use( 'dssh_dx' ) )   CALL iom_put( 'dssh_dx'  ,  zdiag_dssh_dx(:,:)   )   ! Sea-surface tilt term in force balance (x) 
    826          IF ( iom_use( 'dssh_dy' ) )   CALL iom_put( 'dssh_dy'  ,  zdiag_dssh_dy(:,:)   )   ! Sea-surface tilt term in force balance (y) 
    827          IF ( iom_use( 'corstrx' ) )   CALL iom_put( 'corstrx'  ,  zdiag_corstrx(:,:)   )   ! Coriolis force term in force balance (x) 
    828          IF ( iom_use( 'corstry' ) )   CALL iom_put( 'corstry'  ,  zdiag_corstry(:,:)   )   ! Coriolis force term in force balance (y) 
    829          IF ( iom_use( 'intstrx' ) )   CALL iom_put( 'intstrx'  ,  zdiag_intstrx(:,:)   )   ! Internal force term in force balance (x) 
    830          IF ( iom_use( 'intstry' ) )   CALL iom_put( 'intstry'  ,  zdiag_intstry(:,:)   )   ! Internal force term in force balance (y) 
    831          IF ( iom_use( 'utau_oi' ) )   CALL iom_put( 'utau_oi'  ,  zdiag_utau_oi(:,:)   )   ! Ocean stress term in force balance (x) 
    832          IF ( iom_use( 'vtau_oi' ) )   CALL iom_put( 'vtau_oi'  ,  zdiag_vtau_oi(:,:)   )   ! Ocean stress term in force balance (y) 
    833          IF ( iom_use( 'xmtrpice' ) )   CALL iom_put( 'xmtrpice' ,  zdiag_xmtrp_ice(:,:) )   ! X-component of sea-ice mass transport (kg/s) 
    834          IF ( iom_use( 'ymtrpice' ) )   CALL iom_put( 'ymtrpice' ,  zdiag_ymtrp_ice(:,:) )   ! Y-component of sea-ice mass transport  
    835          IF ( iom_use( 'xmtrpsnw' ) )   CALL iom_put( 'xmtrpsnw' ,  zdiag_xmtrp_snw(:,:) )   ! X-component of snow mass transport (kg/s) 
    836          IF ( iom_use( 'ymtrpsnw' ) )   CALL iom_put( 'ymtrpsnw' ,  zdiag_ymtrp_snw(:,:) )   ! Y-component of snow mass transport 
    837          IF ( iom_use( 'xatrp'    ) )   CALL iom_put( 'xatrp'    ,  zdiag_xatrp(:,:)     )   ! X-component of ice area transport 
    838          IF ( iom_use( 'yatrp'    ) )   CALL iom_put( 'yatrp'    ,  zdiag_yatrp(:,:)     )   ! Y-component of ice area transport 
     823         IF( iom_use('normstr' ) )   CALL iom_put( 'normstr'  ,  zdiag_sig1(:,:)      )   ! Normal stress 
     824         IF( iom_use('sheastr' ) )   CALL iom_put( 'sheastr'  ,  zdiag_sig2(:,:)      )   ! Shear stress 
     825         IF( iom_use('dssh_dx' ) )   CALL iom_put( 'dssh_dx'  ,  zdiag_dssh_dx(:,:)   )   ! Sea-surface tilt term in force balance (x) 
     826         IF( iom_use('dssh_dy' ) )   CALL iom_put( 'dssh_dy'  ,  zdiag_dssh_dy(:,:)   )   ! Sea-surface tilt term in force balance (y) 
     827         IF( iom_use('corstrx' ) )   CALL iom_put( 'corstrx'  ,  zdiag_corstrx(:,:)   )   ! Coriolis force term in force balance (x) 
     828         IF( iom_use('corstry' ) )   CALL iom_put( 'corstry'  ,  zdiag_corstry(:,:)   )   ! Coriolis force term in force balance (y) 
     829         IF( iom_use('intstrx' ) )   CALL iom_put( 'intstrx'  ,  zdiag_intstrx(:,:)   )   ! Internal force term in force balance (x) 
     830         IF( iom_use('intstry' ) )   CALL iom_put( 'intstry'  ,  zdiag_intstry(:,:)   )   ! Internal force term in force balance (y) 
     831         IF( iom_use('utau_oi' ) )   CALL iom_put( 'utau_oi'  ,  zdiag_utau_oi(:,:)   )   ! Ocean stress term in force balance (x) 
     832         IF( iom_use('vtau_oi' ) )   CALL iom_put( 'vtau_oi'  ,  zdiag_vtau_oi(:,:)   )   ! Ocean stress term in force balance (y) 
     833         IF( iom_use('xmtrpice') )   CALL iom_put( 'xmtrpice' ,  zdiag_xmtrp_ice(:,:) )   ! X-component of sea-ice mass transport (kg/s) 
     834         IF( iom_use('ymtrpice') )   CALL iom_put( 'ymtrpice' ,  zdiag_ymtrp_ice(:,:) )   ! Y-component of sea-ice mass transport  
     835         IF( iom_use('xmtrpsnw') )   CALL iom_put( 'xmtrpsnw' ,  zdiag_xmtrp_snw(:,:) )   ! X-component of snow mass transport (kg/s) 
     836         IF( iom_use('ymtrpsnw') )   CALL iom_put( 'ymtrpsnw' ,  zdiag_ymtrp_snw(:,:) )   ! Y-component of snow mass transport 
     837         IF( iom_use('xatrp'   ) )   CALL iom_put( 'xatrp'    ,  zdiag_xatrp(:,:)     )   ! X-component of ice area transport 
     838         IF( iom_use('yatrp'   ) )   CALL iom_put( 'yatrp'    ,  zdiag_yatrp(:,:)     )   ! Y-component of ice area transport 
    839839 
    840840         DEALLOCATE( zdiag_sig1      , zdiag_sig2      , zdiag_dssh_dx   , zdiag_dssh_dy   ,  & 
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/LIM_SRC_3/iceforcing.F90

    r8882 r8884  
    1818   USE sbcblk         ! Surface boundary condition: bulk 
    1919   USE sbccpl         ! Surface boundary condition: coupled interface 
    20    USE icealb         ! sae-ice: albedo 
     20   USE icealb         ! sea-ice: albedo 
    2121   ! 
    2222   USE in_out_manager ! I/O manager 
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/LIM_SRC_3/iceupdate.F90

    r8882 r8884  
    207207      ! output all fluxes 
    208208      !------------------ 
    209       IF( iom_use('qsr_oce') )   CALL iom_put( "qsr_oce" , qsr_oce(:,:) * ( 1._wp - at_i_b(:,:) ) )                      !     solar flux at ocean surface 
    210       IF( iom_use('qns_oce') )   CALL iom_put( "qns_oce" , qns_oce(:,:) * ( 1._wp - at_i_b(:,:) ) + qemp_oce(:,:) )      ! non-solar flux at ocean surface 
    211       IF( iom_use('qsr_ice') )   CALL iom_put( "qsr_ice" , SUM( qsr_ice(:,:,:) * a_i_b(:,:,:), dim=3 ) )                 !     solar flux at ice surface 
    212       IF( iom_use('qns_ice') )   CALL iom_put( "qns_ice" , SUM( qns_ice(:,:,:) * a_i_b(:,:,:), dim=3 ) + qemp_ice(:,:) ) ! non-solar flux at ice surface 
    213       IF( iom_use('qtr_ice') )   CALL iom_put( "qtr_ice" , SUM( ftr_ice(:,:,:) * a_i_b(:,:,:), dim=3 ) )                 !     solar flux transmitted thru ice 
    214       IF( iom_use('qt_oce' ) )   CALL iom_put( "qt_oce"  , ( qsr_oce(:,:) + qns_oce(:,:) ) * ( 1._wp - at_i_b(:,:) ) + qemp_oce(:,:) ) 
    215       IF( iom_use('qt_ice' ) )   CALL iom_put( "qt_ice"  , SUM( ( qns_ice(:,:,:) + qsr_ice(:,:,:) )   & 
    216          &                                                      * a_i_b(:,:,:), dim=3 ) + qemp_ice(:,:) ) 
    217 !!gm I don't understand the variable below.... why not multiplied by a_i_b or (1-a_i_b) ???  
    218       IF( iom_use('qemp_oce') )  CALL iom_put( "qemp_oce" , qemp_oce(:,:) )   
    219       IF( iom_use('qemp_ice') )  CALL iom_put( "qemp_ice" , qemp_ice(:,:) )   
    220       IF( iom_use('emp_oce' ) )  CALL iom_put( "emp_oce"  , emp_oce (:,:) )   ! emp over ocean (taking into account the snow blown away from the ice) 
    221       IF( iom_use('emp_ice' ) )  CALL iom_put( "emp_ice"  , emp_ice (:,:) )   ! emp over ice   (taking into account the snow blown away from the ice) 
    222  
    223       CALL iom_put( "snowpre"     , sprecip * 86400.    )        ! snow precipitation [m/day] 
    224  
    225       CALL iom_put( "sfxbog"      , sfx_bog             )        ! salt flux from bottom growth 
    226       CALL iom_put( "sfxbom"      , sfx_bom             )        ! salt flux from bottom melting 
    227       CALL iom_put( "sfxsum"      , sfx_sum             )        ! salt flux from surface melting 
    228       CALL iom_put( "sfxlam"      , sfx_lam             )        ! salt flux from lateral melting 
    229       CALL iom_put( "sfxsni"      , sfx_sni             )        ! salt flux from snow ice formation 
    230       CALL iom_put( "sfxopw"      , sfx_opw             )        ! salt flux from open water formation 
    231       CALL iom_put( "sfxdyn"      , sfx_dyn             )        ! salt flux from ridging rafting 
    232       CALL iom_put( "sfxres"      , sfx_res             )        ! salt flux from corrections (resultant) 
    233       CALL iom_put( "sfxbri"      , sfx_bri             )        ! salt flux from brines 
    234       CALL iom_put( "sfxsub"      , sfx_sub             )        ! salt flux from sublimation 
    235       CALL iom_put( "sfx"         , sfx                 )        ! total salt flux 
    236  
    237       CALL iom_put( "vfxres"     , wfx_res              )        ! prod./melting due to corrections  
    238       CALL iom_put( "vfxopw"     , wfx_opw              )        ! lateral thermodynamic ice production 
    239       CALL iom_put( "vfxsni"     , wfx_sni              )        ! snowice ice production 
    240       CALL iom_put( "vfxbog"     , wfx_bog              )        ! bottom thermodynamic ice production 
    241       CALL iom_put( "vfxdyn"     , wfx_dyn              )        ! dynamic ice production (rid/raft) 
    242       CALL iom_put( "vfxsum"     , wfx_sum              )        ! surface melt  
    243       CALL iom_put( "vfxbom"     , wfx_bom              )        ! bottom melt  
    244       CALL iom_put( "vfxlam"     , wfx_lam              )        ! lateral melt  
    245       CALL iom_put( "vfxice"     , wfx_ice              )        ! total ice growth/melt  
    246       IF ( ln_pnd_fwb )   CALL iom_put( "vfxpnd", wfx_pnd   )        ! melt pond water flux 
    247  
    248       IF ( iom_use( "vfxthin" ) ) THEN   ! ice production for open water + thin ice (<20cm) => comparable to observations   
     209      ! 
     210      ! --- salt fluxes [kg/m2/s] --- ! 
     211      !                           ! sfxice =  sfxbog + sfxbom + sfxsum + sfxsni + sfxopw + sfxres + sfxdyn + sfxbri + sfxsub + sfxlam 
     212      IF( iom_use('sfxice'  ) )   CALL iom_put( "sfxice", sfx     * 1.e-03 )   ! salt flux from total ice growth/melt 
     213      IF( iom_use('sfxbog'  ) )   CALL iom_put( "sfxbog", sfx_bog * 1.e-03 )   ! salt flux from bottom growth 
     214      IF( iom_use('sfxbom'  ) )   CALL iom_put( "sfxbom", sfx_bom * 1.e-03 )   ! salt flux from bottom melting 
     215      IF( iom_use('sfxsum'  ) )   CALL iom_put( "sfxsum", sfx_sum * 1.e-03 )   ! salt flux from surface melting 
     216      IF( iom_use('sfxlam'  ) )   CALL iom_put( "sfxlam", sfx_lam * 1.e-03 )   ! salt flux from lateral melting 
     217      IF( iom_use('sfxsni'  ) )   CALL iom_put( "sfxsni", sfx_sni * 1.e-03 )   ! salt flux from snow ice formation 
     218      IF( iom_use('sfxopw'  ) )   CALL iom_put( "sfxopw", sfx_opw * 1.e-03 )   ! salt flux from open water formation 
     219      IF( iom_use('sfxdyn'  ) )   CALL iom_put( "sfxdyn", sfx_dyn * 1.e-03 )   ! salt flux from ridging rafting 
     220      IF( iom_use('sfxbri'  ) )   CALL iom_put( "sfxbri", sfx_bri * 1.e-03 )   ! salt flux from brines 
     221      IF( iom_use('sfxres'  ) )   CALL iom_put( "sfxres", sfx_res * 1.e-03 )   ! salt flux from undiagnosed processes 
     222      IF( iom_use('sfxsub'  ) )   CALL iom_put( "sfxsub", sfx_sub * 1.e-03 )   ! salt flux from sublimation 
     223 
     224      ! --- mass fluxes [kg/m2/s] --- ! 
     225      IF( iom_use('emp_oce' ) )   CALL iom_put( "emp_oce", emp_oce )   ! emp over ocean (taking into account the snow blown away from the ice) 
     226      IF( iom_use('emp_ice' ) )   CALL iom_put( "emp_ice", emp_ice )   ! emp over ice   (taking into account the snow blown away from the ice) 
     227 
     228      !                           ! vfxice = vfxbog + vfxbom + vfxsum + vfxsni + vfxopw + vfxdyn + vfxres + vfxlam + vfxpnd 
     229      IF( iom_use('vfxice'  ) )   CALL iom_put( "vfxice" , wfx_ice )   ! mass flux from total ice growth/melt 
     230      IF( iom_use('vfxbog'  ) )   CALL iom_put( "vfxbog" , wfx_bog )   ! mass flux from bottom growth 
     231      IF( iom_use('vfxbom'  ) )   CALL iom_put( "vfxbom" , wfx_bom )   ! mass flux from bottom melt  
     232      IF( iom_use('vfxsum'  ) )   CALL iom_put( "vfxsum" , wfx_sum )   ! mass flux from surface melt  
     233      IF( iom_use('vfxlam'  ) )   CALL iom_put( "vfxlam" , wfx_lam )   ! mass flux from lateral melt  
     234      IF( iom_use('vfxsni'  ) )   CALL iom_put( "vfxsni" , wfx_sni )   ! mass flux from snow-ice formation 
     235      IF( iom_use('vfxopw'  ) )   CALL iom_put( "vfxopw" , wfx_opw )   ! mass flux from growth in open water 
     236      IF( iom_use('vfxdyn'  ) )   CALL iom_put( "vfxdyn" , wfx_dyn )   ! mass flux from dynamics (ridging) 
     237      IF( iom_use('vfxres'  ) )   CALL iom_put( "vfxres" , wfx_res )   ! mass flux from undiagnosed processes  
     238      IF( iom_use('vfxpnd'  ) )   CALL iom_put( "vfxpnd" , wfx_pnd )   ! mass flux from melt ponds 
     239      IF( iom_use('vfxsub'  ) )   CALL iom_put( "vfxsub" , wfx_ice_sub )   ! mass flux from ice sublimation (ice-atm.) 
     240      IF( iom_use('vfxsub_err') ) CALL iom_put( "vfxsub_err", wfx_err_sub )   ! "excess" of sublimation sent to ocean       
     241 
     242      IF ( iom_use( "vfxthin" ) ) THEN   ! mass flux from ice growth in open water + thin ice (<20cm) => comparable to observations   
    249243         WHERE( hm_i(:,:) < 0.2 .AND. hm_i(:,:) > 0. ) ; z2d = wfx_bog 
    250244         ELSEWHERE                                     ; z2d = 0._wp 
    251245         END WHERE 
    252          CALL iom_put( "vfxthin", ( wfx_opw + z2d )     ) 
    253       ENDIF 
    254  
    255       CALL iom_put( "vfxspr"     , wfx_spr              )        ! precip (snow) 
    256       CALL iom_put( "vfxsnw"     , wfx_snw              )        ! total snw growth/melt  
    257       CALL iom_put( "vfxsub"     , wfx_sub              )        ! sublimation (snow/ice)  
    258       CALL iom_put( "vfxsub_err" , wfx_err_sub          )        ! "excess" of sublimation sent to ocean       
    259   
    260       CALL iom_put ('hfxthd'     , hfx_thd(:,:)         )   !   
    261       CALL iom_put ('hfxdyn'     , hfx_dyn(:,:)         )   !   
    262       CALL iom_put ('hfxres'     , hfx_res(:,:)         )   !   
    263       CALL iom_put ('hfxout'     , hfx_out(:,:)         )   !   
    264       CALL iom_put ('hfxin'      , hfx_in(:,:)          )   !   
    265       CALL iom_put ('hfxsnw'     , hfx_snw(:,:)         )   !   
    266       CALL iom_put ('hfxsub'     , hfx_sub(:,:)         )   !   
    267       CALL iom_put ('hfxerr'     , hfx_err_dif(:,:)     )   !   
    268       CALL iom_put ('hfxerr_rem' , hfx_err_rem(:,:)     )   !   
    269        
    270       CALL iom_put ('hfxsum'     , hfx_sum(:,:)         )   !   
    271       CALL iom_put ('hfxbom'     , hfx_bom(:,:)         )   !   
    272       CALL iom_put ('hfxbog'     , hfx_bog(:,:)         )   !   
    273       CALL iom_put ('hfxdif'     , hfx_dif(:,:)         )   !   
    274       CALL iom_put ('hfxopw'     , hfx_opw(:,:)         )   !   
    275       CALL iom_put ('hfxtur'     , fhtur(:,:) * at_i_b(:,:) ) ! turbulent heat flux at ice base  
    276       CALL iom_put ('hfxdhc'     , diag_heat(:,:)       )   ! Heat content variation in snow and ice  
    277       CALL iom_put ('hfxspr'     , hfx_spr(:,:)         )   ! Heat content of snow precip  
     246         CALL iom_put( "vfxthin", wfx_opw + z2d ) 
     247      ENDIF 
     248 
     249      !                              ! vfxsnw = vfxsnw_sni + vfxsnw_dyn + vfxsnw_sum 
     250      IF( iom_use('vfxsnw'     ) )   CALL iom_put( "vfxsnw"     , wfx_snw     )   ! mass flux from total snow growth/melt 
     251      IF( iom_use('vfxsnw_sum' ) )   CALL iom_put( "vfxsnw_sum" , wfx_snw_sum )   ! mass flux from snow melt at the surface 
     252      IF( iom_use('vfxsnw_sni' ) )   CALL iom_put( "vfxsnw_sni" , wfx_snw_sni )   ! mass flux from snow melt during snow-ice formation  
     253      IF( iom_use('vfxsnw_dyn' ) )   CALL iom_put( "vfxsnw_dyn" , wfx_snw_dyn )   ! mass flux from dynamics (ridging)  
     254      IF( iom_use('vfxsnw_sub' ) )   CALL iom_put( "vfxsnw_sub" , wfx_snw_sub )   ! mass flux from snow sublimation (ice-atm.)  
     255      IF( iom_use('vfxsnw_pre' ) )   CALL iom_put( "vfxsnw_pre" , wfx_spr     )   ! snow precip 
     256 
     257      ! --- heat fluxes [W/m2] --- ! 
     258      !                              ! qt_atm_oi - qt_oce_ai = hfxdhc - ( dihctrp + dshctrp ) 
     259      IF( iom_use('qsr_oce'    ) )   CALL iom_put( "qsr_oce"    , qsr_oce * ( 1._wp - at_i_b )                               )   !     solar flux at ocean surface 
     260      IF( iom_use('qns_oce'    ) )   CALL iom_put( "qns_oce"    , qns_oce * ( 1._wp - at_i_b ) + qemp_oce                    )   ! non-solar flux at ocean surface 
     261      IF( iom_use('qsr_ice'    ) )   CALL iom_put( "qsr_ice"    , SUM( qsr_ice * a_i_b, dim=3 )                              )   !     solar flux at ice surface 
     262      IF( iom_use('qns_ice'    ) )   CALL iom_put( "qns_ice"    , SUM( qns_ice * a_i_b, dim=3 ) + qemp_ice                   )   ! non-solar flux at ice surface 
     263      IF( iom_use('qtr_ice_bot') )   CALL iom_put( "qtr_ice_bot", SUM( ftr_ice * a_i_b, dim=3 )                              )   !     solar flux transmitted thru ice 
     264      IF( iom_use('qtr_ice_top') )   CALL iom_put( "qtr_ice_top", SUM( qsr_ice_tr * a_i_b, dim=3 )                           )   !     solar flux transmitted thru ice surface 
     265      IF( iom_use('qt_oce'     ) )   CALL iom_put( "qt_oce"     ,      ( qsr_oce + qns_oce ) * ( 1._wp - at_i_b ) + qemp_oce ) 
     266      IF( iom_use('qt_ice'     ) )   CALL iom_put( "qt_ice"     , SUM( ( qns_ice + qsr_ice ) * a_i_b, dim=3 )     + qemp_ice ) 
     267      IF( iom_use('qt_oce_ai'  ) )   CALL iom_put( "qt_oce_ai"  , hfx_out                                                    )   ! total heat flux at the ocean   surface: interface oce-(ice+atm)  
     268      IF( iom_use('qt_atm_oi'  ) )   CALL iom_put( "qt_atm_oi"  , hfx_in                                                     )   ! total heat flux at the oce-ice surface: interface atm-(ice+oce)  
     269      IF( iom_use('qemp_oce'   ) )   CALL iom_put( "qemp_oce"   , qemp_oce                                                   )   ! Downward Heat Flux from E-P over ocean 
     270      IF( iom_use('qemp_ice'   ) )   CALL iom_put( "qemp_ice"   , qemp_ice                                                   )   ! Downward Heat Flux from E-P over ice 
     271 
     272      ! heat fluxes from ice transformations 
     273      !                              ! hfxdhc = hfxbog + hfxbom + hfxsum + hfxopw + hfxdif + hfxsnw - ( hfxthd + hfxdyn + hfxres + hfxsub + hfxspr ) 
     274      IF( iom_use('hfxbog'     ) )   CALL iom_put ("hfxbog"     , hfx_bog             )   ! heat flux used for ice bottom growth  
     275      IF( iom_use('hfxbom'     ) )   CALL iom_put ("hfxbom"     , hfx_bom             )   ! heat flux used for ice bottom melt 
     276      IF( iom_use('hfxsum'     ) )   CALL iom_put ("hfxsum"     , hfx_sum             )   ! heat flux used for ice surface growth 
     277      IF( iom_use('hfxopw'     ) )   CALL iom_put ("hfxopw"     , hfx_opw             )   ! heat flux used for ice formation in open water 
     278      IF( iom_use('hfxdif'     ) )   CALL iom_put ("hfxdif"     , hfx_dif             )   ! heat flux used for ice temperature change 
     279      IF( iom_use('hfxsnw'     ) )   CALL iom_put ("hfxsnw"     , hfx_snw             )   ! heat flux used for snow melt  
     280      IF( iom_use('hfxerr'     ) )   CALL iom_put ("hfxerr"     , hfx_err_dif         )   ! heat flux error after heat diffusion (included in hfx_out) 
     281 
     282      ! heat fluxes associated with mass exchange (freeze/melt/precip...) 
     283      IF( iom_use('hfxthd'     ) )   CALL iom_put ("hfxthd"     , hfx_thd             )   !   
     284      IF( iom_use('hfxdyn'     ) )   CALL iom_put ("hfxdyn"     , hfx_dyn             )   !   
     285      IF( iom_use('hfxres'     ) )   CALL iom_put ("hfxres"     , hfx_res             )   !   
     286      IF( iom_use('hfxsub'     ) )   CALL iom_put ("hfxsub"     , hfx_sub             )   !   
     287      IF( iom_use('hfxspr'     ) )   CALL iom_put ("hfxspr"     , hfx_spr             )   ! Heat flux from snow precip heat content  
     288 
     289      ! other heat fluxes 
     290      IF( iom_use('hfxsensib'  ) )   CALL iom_put( "hfxsensib"  , -fhtur     * at_i_b )   ! Sensible oceanic heat flux 
     291      IF( iom_use('hfxcndbot'  ) )   CALL iom_put( "hfxcndbot"  , diag_fc_bo * at_i_b )   ! Bottom conduction flux 
     292      IF( iom_use('hfxcndtop'  ) )   CALL iom_put( "hfxcndtop"  , diag_fc_su * at_i_b )   ! Surface conduction flux 
     293 
     294      ! diags 
     295      IF( iom_use('hfxdhc'     ) )   CALL iom_put ("hfxdhc"     , diag_heat           )   ! Heat content variation in snow and ice  
    278296      ! 
    279297      ! controls 
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/LIM_SRC_3/icewri.F90

    r8882 r8884  
    4747      INTEGER, INTENT(in) ::   kt   ! time-step 
    4848      ! 
    49       INTEGER  ::  ji, jj, jk, jl  ! dummy loop indices 
    50       REAL(wp) ::  z2da, z2db, zrho1, zrho2, zmiss_val 
    51       REAL(wp), DIMENSION(jpi,jpj)     ::  z2d, zswi, zmiss !  2D workspace 
    52       REAL(wp), DIMENSION(jpi,jpj)     ::  zfb              ! ice freeboard 
    53       REAL(wp), DIMENSION(jpi,jpj)     ::  zmsk05, zmsk15 ! 15% concentration mask 
    54       REAL(wp), DIMENSION(jpi,jpj,jpl) ::  zswi2, zmiss2 
     49      INTEGER  ::   ji, jj, jk, jl  ! dummy loop indices 
     50      REAL(wp) ::   z2da, z2db, zrho1, zrho2 
     51      REAL(wp), DIMENSION(jpi,jpj)     ::   z2d !  2D workspace 
     52      REAL(wp), DIMENSION(jpi,jpj)     ::   zmsk00, zmsk05, zmsk15 ! O%, 5% and 15% concentration mask 
     53      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zmsk00l        ! cat masks 
    5554      ! 
    5655      ! Global ice diagnostics (SIMIP) 
    57       REAL(wp) ::  zdiag_area_nh, zdiag_extt_nh, zdiag_volu_nh   ! area, extent, volume 
    58       REAL(wp) ::  zdiag_area_sh, zdiag_extt_sh, zdiag_volu_sh  
     56      REAL(wp) ::   zdiag_area_nh, zdiag_extt_nh, zdiag_volu_nh   ! area, extent, volume 
     57      REAL(wp) ::   zdiag_area_sh, zdiag_extt_sh, zdiag_volu_sh  
    5958      !!------------------------------------------------------------------- 
    6059 
     
    7069      DO jj = 1, jpj 
    7170         DO ji = 1, jpi 
    72             zswi(ji,jj)      = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice, 0 if no ice 
    73             zmsk05(ji,jj)    = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.05   ) ) ! 1 if 5% ice, 0 if less - required to mask thickness and snow depth 
    74             zmsk15(ji,jj)  = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.15  ) ) ! 1 if 15% ice, 0 if less 
     71            zmsk00(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06  ) ) ! 1 if ice    , 0 if no ice 
     72            zmsk05(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.05_wp ) ) ! 1 if 5% ice , 0 if less 
     73            zmsk15(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.15_wp ) ) ! 1 if 15% ice, 0 if less 
    7574         END DO 
    7675      END DO 
     
    7877         DO jj = 1, jpj 
    7978            DO ji = 1, jpi 
    80                zswi2(ji,jj,jl)  = MAX( 0._wp , SIGN( 1._wp , a_i(ji,jj,jl) - epsi06 ) ) 
     79               zmsk00l(ji,jj,jl)  = MAX( 0._wp , SIGN( 1._wp , a_i(ji,jj,jl) - epsi06 ) ) 
    8180            END DO 
    8281         END DO 
    8382      END DO 
    8483 
    85       zmiss_val     = 1.e20_wp 
    86       zmiss (:,:)   = zmiss_val * ( 1._wp - zswi (:,:) ) 
    87       zmiss2(:,:,:) = zmiss_val * ( 1._wp - zswi2(:,:,:) ) 
    88  
    89       !---------------------------------------- 
     84      !----------------- 
    9085      ! Standard outputs 
    91       !---------------------------------------- 
    92       ! velocity 
    93       IF( iom_use('uice') )  CALL iom_put( "uice" , u_ice         )   ! ice velocity u component 
    94       IF( iom_use('vice') )  CALL iom_put( "vice" , v_ice         )   ! ice velocity v component 
    95  
    96       IF( iom_use('icevel') .OR. iom_use('icevel_mv') ) THEN  
     86      !----------------- 
     87      zrho1 = ( rau0 - rhoic ) * r1_rau0; zrho2 = rhosn * r1_rau0 
     88      ! masks 
     89      IF( iom_use('icemask'  ) )   CALL iom_put( "icemask"  , zmsk00              )   ! ice mask 0% 
     90      IF( iom_use('icemask05') )   CALL iom_put( "icemask05", zmsk05              )   ! ice mask 5% 
     91      IF( iom_use('icemask15') )   CALL iom_put( "icemask15", zmsk15              )   ! ice mask 15% 
     92      ! 
     93      ! general fields 
     94      IF( iom_use('icemass'  ) )   CALL iom_put( "icemass", rhoic * vt_i * zmsk00 )   ! Ice mass per cell area  
     95      IF( iom_use('snwmass'  ) )   CALL iom_put( "snwmass", rhosn * vt_s * zmsk00 )   ! Snow mass per cell area 
     96      IF( iom_use('icepres'  ) )   CALL iom_put( "icepres", zmsk00                )   ! Ice presence (1 or 0)  
     97      IF( iom_use('iceconc'  ) )   CALL iom_put( "iceconc", at_i  * zmsk00        )   ! ice concentration 
     98      IF( iom_use('icevolu'  ) )   CALL iom_put( "icevolu", vt_i  * zmsk00        )   ! ice volume = mean ice thickness over the cell 
     99      IF( iom_use('icethic'  ) )   CALL iom_put( "icethic", hm_i  * zmsk00        )   ! ice thickness 
     100      IF( iom_use('snwthic'  ) )   CALL iom_put( "snwthic", hm_s  * zmsk00        )   ! snw thickness 
     101      IF( iom_use('icebrv'   ) )   CALL iom_put( "icebrv" , bvm_i * zmsk00 * 100. )   ! brine volume 
     102      IF( iom_use('iceage'   ) )   CALL iom_put( "iceage" , om_i  * zmsk00 / rday )   ! ice age 
     103      IF( iom_use('icehnew'  ) )   CALL iom_put( "icehnew", ht_i_new              )   ! new ice thickness formed in the leads 
     104      IF( iom_use('snwvolu'  ) )   CALL iom_put( "snwvolu", vt_s  * zmsk00        )   ! snow volume 
     105      IF( iom_use('icefrb') ) THEN 
     106         z2d(:,:) = ( zrho1 * hm_i(:,:) - zrho2 * hm_s(:,:) )                                          
     107         WHERE( z2d < 0._wp )   z2d = 0._wp 
     108                                   CALL iom_put( "icefrb" , z2d * zmsk00          )   ! Ice freeboard 
     109      ENDIF 
     110      ! 
     111      ! melt ponds 
     112      IF( iom_use('iceapnd'  ) )   CALL iom_put( "iceapnd", at_ip  * zmsk00       )   ! melt pond total fraction 
     113      IF( iom_use('icevpnd'  ) )   CALL iom_put( "icevpnd", vt_ip  * zmsk00       )   ! melt pond total volume per unit area 
     114      ! 
     115      ! salt 
     116      IF( iom_use('icesalt'  ) )   CALL iom_put( "icesalt", sm_i  * zmsk00        )   ! mean ice salinity 
     117      IF( iom_use('icesalm'  ) )   CALL iom_put( "icesalm", SUM( sv_i, DIM = 3 ) * rhoic * 1.0e-3 * zmsk00 )   ! Mass of salt in sea ice per cell area 
     118 
     119      ! heat 
     120      IF( iom_use('icetemp'  ) )   CALL iom_put( "icetemp", ( tm_i  - rt0 ) * zmsk00 )   ! ice mean temperature 
     121      IF( iom_use('icettop'  ) )   CALL iom_put( "icettop", ( tm_su - rt0 ) * zmsk00 )   ! temperature at the ice surface 
     122      IF( iom_use('icetbot'  ) )   CALL iom_put( "icetbot", ( t_bo  - rt0 ) * zmsk00 )   ! temperature at the ice bottom 
     123      IF( iom_use('icetsni'  ) )   CALL iom_put( "icetsni", ( tm_si - rt0 ) * zmsk00 )   ! temperature at the snow-ice interface 
     124      IF( iom_use('icehc'    ) )   CALL iom_put( "icehc"  ,  -et_i          * zmsk00 )   ! ice heat content 
     125      IF( iom_use('snwhc'    ) )   CALL iom_put( "snwhc"  ,  -et_s          * zmsk00 )   ! snow heat content 
     126 
     127      ! momentum 
     128      IF( iom_use('uice'     ) )   CALL iom_put( "uice"   , u_ice                 )   ! ice velocity u component 
     129      IF( iom_use('vice'     ) )   CALL iom_put( "vice"   , v_ice                 )   ! ice velocity v component 
     130      IF( iom_use('utau_ai'  ) )   CALL iom_put( "utau_ai", utau_ice * zmsk00     )   ! Wind stress term in force balance (x) 
     131      IF( iom_use('vtau_ai'  ) )   CALL iom_put( "vtau_ai", vtau_ice * zmsk00     )   ! Wind stress term in force balance (y) 
     132 
     133      IF( iom_use('icevel') ) THEN  
    97134         DO jj = 2 , jpjm1 
    98135            DO ji = 2 , jpim1 
     
    103140         END DO 
    104141         CALL lbc_lnk( z2d, 'T', 1. ) 
    105          IF( iom_use('icevel'   ) )   CALL iom_put( "icevel"       , z2d        )                          ! ice velocity module 
    106          IF( iom_use('icevel_mv') )   CALL iom_put( "icevel_mv"    , z2d(:,:) * zswi(:,:) + zmiss(:,:) )   ! ice velocity module (missing value) 
     142         IF( iom_use('icevel') )   CALL iom_put( "icevel" , z2d                   )   ! ice velocity module 
    107143      ENDIF 
    108       ! 
    109       IF( iom_use('miceage')  )       CALL iom_put( "miceage"     , om_i * zswi * zmsk15 )  ! mean ice age 
    110       IF( iom_use('micet')    )       CALL iom_put( "micet"       , ( tm_i  - rt0 ) * zswi )  ! ice mean    temperature 
    111       IF( iom_use('icest')    )       CALL iom_put( "icest"       , ( tm_su - rt0 ) * zswi )  ! ice surface temperature 
    112       IF( iom_use('icecolf')  )       CALL iom_put( "icecolf"     , ht_i_new               )  ! new ice thickness formed in the leads 
    113       ! 
    114       CALL iom_put( "iceconc"     , at_i  * zswi        )        ! ice concentration 
    115       CALL iom_put( "icevolu"     , vt_i  * zswi        )        ! ice volume = mean ice thickness over the cell 
    116       CALL iom_put( "icethick"    , hm_i  * zswi        )        ! ice thickness 
    117       CALL iom_put( "icehc"       , et_i  * zswi        )        ! ice total heat content 
    118       CALL iom_put( "isnowhc"     , et_s  * zswi        )        ! snow total heat content 
    119       CALL iom_put( "ibrinv"      , bvm_i * zswi * 100. )        ! brine volume 
    120       CALL iom_put( "micesalt"    , sm_i  * zswi      )        ! mean ice salinity 
    121       CALL iom_put( "snowvol"     , vt_s  * zswi      )        ! snow volume 
    122        
    123       CALL iom_put( "iceamp"  , at_ip  * zswi        )   ! melt pond total fraction 
    124       CALL iom_put( "icevmp"  , vt_ip  * zswi        )   ! melt pond total volume per unit area 
    125  
    126       !---------------------------------- 
    127       ! Output category-dependent fields 
    128       !---------------------------------- 
    129       IF ( iom_use('iceconc_cat' ) )  CALL iom_put( "iceconc_cat"      , a_i  * zswi2   )        ! area for categories 
    130       IF ( iom_use('icethic_cat' ) )  CALL iom_put( "icethic_cat"      , h_i  * zswi2   )        ! thickness for categories 
    131       IF ( iom_use('snowthic_cat') )  CALL iom_put( "snowthic_cat"     , h_s  * zswi2   )        ! snow depth for categories 
    132       IF ( iom_use('salinity_cat') )  CALL iom_put( "salinity_cat"     , s_i  * zswi2   )        ! salinity for categories 
    133       IF ( iom_use('icetemp_cat' ) )  CALL iom_put( "icetemp_cat", ( SUM( t_i(:,:,:,:), dim=3 ) * r1_nlay_i - rt0 ) * zswi2 )    ! ice temperature 
    134       IF ( iom_use('snwtemp_cat' ) )  CALL iom_put( "snwtemp_cat", ( SUM( t_s(:,:,:,:), dim=3 ) * r1_nlay_s - rt0 ) * zswi2 )    ! snow temperature 
    135       IF ( iom_use('iceage_cat'  ) )  CALL iom_put( "iceage_cat" , o_i * zswi2 )                   ! ice age 
    136       IF ( iom_use('brinevol_cat') )  CALL iom_put( "brinevol_cat", bv_i * 100. * zswi2 )          ! brine volume 
    137  
    138       IF ( iom_use('iceamp_cat') )  CALL iom_put( "iceamp_cat"     , a_ip       * zswi2   )       ! melt pond frac for categories 
    139       IF ( iom_use('icevmp_cat') )  CALL iom_put( "icevmp_cat"     , v_ip       * zswi2   )       ! melt pond frac for categories 
    140       IF ( iom_use('icehmp_cat') )  CALL iom_put( "icehmp_cat"     , h_ip       * zswi2   )       ! melt pond frac for categories 
    141       IF ( iom_use('iceafp_cat') )  CALL iom_put( "iceafp_cat"     , a_ip_frac  * zswi2   )       ! melt pond frac for categories 
    142  
    143       !-------------------------------- 
     144 
     145      ! --- category-dependent fields --- ! 
     146      IF( iom_use('icemask_cat' ) )   CALL iom_put( "icemask_cat" , zmsk00l                                                    )   ! ice mask 0% 
     147      IF( iom_use('iceconc_cat' ) )   CALL iom_put( "iceconc_cat" , a_i * zmsk00l                                              )   ! area for categories 
     148      IF( iom_use('icethic_cat' ) )   CALL iom_put( "icethic_cat" , h_i * zmsk00l                                              )   ! thickness for categories 
     149      IF( iom_use('snwthic_cat' ) )   CALL iom_put( "snwthic_cat" , h_s * zmsk00l                                              )   ! snow depth for categories 
     150      IF( iom_use('icesalt_cat' ) )   CALL iom_put( "icesalt_cat" , s_i * zmsk00l                                              )   ! salinity for categories 
     151      IF( iom_use('iceage_cat'  ) )   CALL iom_put( "iceage_cat"  , o_i * zmsk00l / rday                                       )   ! ice age 
     152      IF( iom_use('icetemp_cat' ) )   CALL iom_put( "icetemp_cat" , ( SUM( t_i(:,:,:,:), dim=3 ) * r1_nlay_i - rt0 ) * zmsk00l )   ! ice temperature 
     153      IF( iom_use('snwtemp_cat' ) )   CALL iom_put( "snwtemp_cat" , ( SUM( t_s(:,:,:,:), dim=3 ) * r1_nlay_s - rt0 ) * zmsk00l )   ! snow temperature 
     154      IF( iom_use('icebrv_cat'  ) )   CALL iom_put( "icebrv_cat"  , bv_i * 100. * zmsk00l                                      )   ! brine volume 
     155      IF( iom_use('iceapnd_cat' ) )   CALL iom_put( "iceapnd_cat" , a_ip        * zmsk00l                                      )   ! melt pond frac for categories 
     156      IF( iom_use('icehpnd_cat' ) )   CALL iom_put( "icehpnd_cat" , h_ip        * zmsk00l                                      )   ! melt pond frac for categories 
     157      IF( iom_use('iceafpnd_cat') )   CALL iom_put( "iceafpnd_cat", a_ip_frac   * zmsk00l                                      )   ! melt pond frac for categories 
     158 
     159      !------------------ 
    144160      ! Add-ons for SIMIP 
    145       !-------------------------------- 
    146       zrho1 = ( rau0 - rhoic ) * r1_rau0; zrho2 = rhosn * r1_rau0 
    147  
    148       IF ( iom_use( "icepres"  ) ) CALL iom_put( "icepres"     , zswi(:,:)                     )                                ! Ice presence (1 or 0)  
    149       IF ( iom_use( "icemass"  ) ) CALL iom_put( "icemass"     , rhoic * vt_i(:,:) * zswi(:,:) )                                ! Ice mass per cell area  
    150       IF ( iom_use( "icethic"  ) ) CALL iom_put( "icethic"     , hm_i(:,:) * zmsk05(:,:)  + ( 1. - zmsk05(:,:) ) * zmiss_val )     ! Ice thickness  
    151       IF ( iom_use( "snomass"  ) ) CALL iom_put( "snomass"     , rhosn * vt_s(:,:)         * zswi(:,:) + zmiss(:,:) )           ! Snow mass per cell area 
    152       IF ( iom_use( "snothic"  ) ) CALL iom_put( "snothic"     , hm_s(:,:) * zmsk05(:,:)  + ( 1. - zmsk05(:,:) ) * zmiss_val )     ! Snow thickness        
    153  
    154       IF ( iom_use( "iceconc_cat_mv"  ) )  CALL iom_put( "iceconc_cat_mv" , a_i(:,:,:)  * zswi2(:,:,:) + zmiss2(:,:,:) )        ! Area for categories 
    155       IF ( iom_use( "icethic_cat_mv"  ) )  CALL iom_put( "icethic_cat_mv" , h_i(:,:,:) * zswi2(:,:,:) + zmiss2(:,:,:) )        ! Thickness for categories 
    156       IF ( iom_use( "snowthic_cat_mv" ) )  CALL iom_put( "snowthic_cat_mv", h_s(:,:,:) * zswi2(:,:,:) + zmiss2(:,:,:) )        ! Snow depth for categories 
    157  
    158       IF ( iom_use( "icestK"   ) ) CALL iom_put( "icestK"      , tm_su(:,:)                * zswi(:,:) + zmiss(:,:) )           ! Ice surface temperature 
    159       IF ( iom_use( "icesntK"  ) ) CALL iom_put( "icesntK"     , tm_si(:,:)                * zswi(:,:) + zmiss(:,:) )           ! Snow-ice interface temperature 
    160       IF ( iom_use( "icebotK"  ) ) CALL iom_put( "icebotK"     , t_bo(:,:)                 * zswi(:,:) + zmiss(:,:) )           ! Ice bottom temperature 
    161       IF ( iom_use( "iceage"   ) ) CALL iom_put( "iceage"      , om_i(:,:) * zmsk15(:,:) + ( 1. - zmsk15(:,:) ) * zmiss_val )   ! Ice age 
    162       IF ( iom_use( "icesmass" ) ) CALL iom_put( "icesmass"    , SUM( sv_i, DIM = 3 ) * rhoic * 1.0e-3 * zswi(:,:) )           ! Mass of salt in sea ice per cell area 
    163       IF ( iom_use( "icesal"   ) ) CALL iom_put( "icesal"      , sm_i(:,:)                * zswi(:,:) + zmiss(:,:) )           ! Ice salinity 
    164  
    165       IF ( iom_use( "icefb"    ) ) THEN 
    166          zfb(:,:) = ( zrho1 * hm_i(:,:) - zrho2 * hm_s(:,:) )                                          
    167          WHERE( zfb < 0._wp ) ;   zfb = 0._wp ;   END WHERE 
    168                                    CALL iom_put( "icefb"       , zfb(:,:)                  * zswi(:,:) + zmiss(:,:) )           ! Ice freeboard 
     161      !------------------ 
     162      ! trends 
     163      IF( iom_use('dmithd') )   CALL iom_put( "dmithd", - wfx_bog - wfx_bom - wfx_sum - wfx_sni - wfx_opw - wfx_lam - wfx_res ) ! Sea-ice mass change from thermodynamics 
     164      IF( iom_use('dmidyn') )   CALL iom_put( "dmidyn", - wfx_dyn + rhoic * diag_trp_vi     )   ! Sea-ice mass change from dynamics(kg/m2/s) 
     165      IF( iom_use('dmiopw') )   CALL iom_put( "dmiopw", - wfx_opw                           )   ! Sea-ice mass change through growth in open water 
     166      IF( iom_use('dmibog') )   CALL iom_put( "dmibog", - wfx_bog                           )   ! Sea-ice mass change through basal growth 
     167      IF( iom_use('dmisni') )   CALL iom_put( "dmisni", - wfx_sni                           )   ! Sea-ice mass change through snow-to-ice conversion 
     168      IF( iom_use('dmisum') )   CALL iom_put( "dmisum", - wfx_sum                           )   ! Sea-ice mass change through surface melting 
     169      IF( iom_use('dmibom') )   CALL iom_put( "dmibom", - wfx_bom                           )   ! Sea-ice mass change through bottom melting 
     170      IF( iom_use('dmtsub') )   CALL iom_put( "dmtsub", - wfx_sub                           )   ! Sea-ice mass change through evaporation and sublimation 
     171      IF( iom_use('dmssub') )   CALL iom_put( "dmssub", - wfx_snw_sub                       )   ! Snow mass change through sublimation 
     172      IF( iom_use('dmisub') )   CALL iom_put( "dmisub", - wfx_ice_sub                       )   ! Sea-ice mass change through sublimation 
     173      IF( iom_use('dmsspr') )   CALL iom_put( "dmsspr", - wfx_spr                           )   ! Snow mass change through snow fall 
     174      IF( iom_use('dmsssi') )   CALL iom_put( "dmsssi",   wfx_sni*rhosn*r1_rhoic            )   ! Snow mass change through snow-to-ice conversion 
     175      IF( iom_use('dmsmel') )   CALL iom_put( "dmsmel", - wfx_snw_sum                       )   ! Snow mass change through melt 
     176      IF( iom_use('dmsdyn') )   CALL iom_put( "dmsdyn", - wfx_snw_dyn + rhosn * diag_trp_vs )   ! Snow mass change through dynamics(kg/m2/s) 
     177 
     178      ! Global ice diagnostics 
     179      IF( iom_use('NH_icearea') .OR. iom_use('NH_icevolu') .OR. iom_use('NH_iceextt') )   THEN   ! NH diagnostics 
     180         ! 
     181         WHERE( ff_t > 0._wp )   ;   zmsk00(:,:) = 1.0e-12 
     182         ELSEWHERE               ;   zmsk00(:,:) = 0. 
     183         END WHERE  
     184         zdiag_area_nh = glob_sum( at_i(:,:) * zmsk00(:,:) * e1e2t(:,:) ) 
     185         zdiag_volu_nh = glob_sum( vt_i(:,:) * zmsk00(:,:) * e1e2t(:,:) ) 
     186         ! 
     187         WHERE( ff_t > 0._wp .AND. at_i > 0.15 )   ; zmsk00(:,:) = 1.0e-12 
     188         ELSEWHERE                                 ; zmsk00(:,:) = 0. 
     189         END WHERE  
     190         zdiag_extt_nh = glob_sum( zmsk00(:,:) * e1e2t(:,:) ) 
     191         ! 
     192         IF( iom_use('NH_icearea') )   CALL iom_put( "NH_icearea" ,  zdiag_area_nh ) 
     193         IF( iom_use('NH_icevolu') )   CALL iom_put( "NH_icevolu" ,  zdiag_volu_nh ) 
     194         IF( iom_use('NH_iceextt') )   CALL iom_put( "NH_iceextt" ,  zdiag_extt_nh ) 
     195         ! 
    169196      ENDIF 
    170  
    171       IF ( iom_use( "isnhcneg" ) ) CALL iom_put( "isnhcneg"    , - et_s(:,:)               * zswi(:,:) + zmiss(:,:) )           ! Snow total heat content 
    172  
    173       IF ( iom_use( "dmithd"   ) ) CALL iom_put( "dmithd"      , - wfx_bog - wfx_bom - wfx_sum   &                       ! Sea-ice mass change from thermodynamics 
    174               &                                                   - wfx_sni - wfx_opw - wfx_res ) 
    175       IF ( iom_use( "dmidyn"   ) ) CALL iom_put( "dmidyn"      , - wfx_dyn(:,:) + rhoic * diag_trp_vi(:,:) )             ! Sea-ice mass change from dynamics(kg/m2/s) 
    176       IF ( iom_use( "dmiopw"   ) ) CALL iom_put( "dmiopw"      , - wfx_opw                  )                            ! Sea-ice mass change through growth in open water 
    177       IF ( iom_use( "dmibog"   ) ) CALL iom_put( "dmibog"      , - wfx_bog                  )                            ! Sea-ice mass change through basal growth 
    178       IF ( iom_use( "dmisni"   ) ) CALL iom_put( "dmisni"      , - wfx_sni                  )                            ! Sea-ice mass change through snow-to-ice conversion 
    179       IF ( iom_use( "dmisum"   ) ) CALL iom_put( "dmisum"      , - wfx_sum                  )                            ! Sea-ice mass change through surface melting 
    180       IF ( iom_use( "dmibom"   ) ) CALL iom_put( "dmibom"      , - wfx_bom                  )                            ! Sea-ice mass change through bottom melting 
    181  
    182       IF ( iom_use( "dmtsub"   ) ) CALL iom_put( "dmtsub"      , - wfx_sub                  )                            ! Sea-ice mass change through evaporation and sublimation 
    183       IF ( iom_use( "dmssub"   ) ) CALL iom_put( "dmssub"      , - wfx_snw_sub              )                            ! Snow mass change through sublimation 
    184       IF ( iom_use( "dmisub"   ) ) CALL iom_put( "dmisub"      , - wfx_ice_sub              )                            ! Sea-ice mass change through sublimation 
    185  
    186       IF ( iom_use( "dmsspr"   ) ) CALL iom_put( "dmsspr"      , - wfx_spr                  )                            ! Snow mass change through snow fall 
    187       IF ( iom_use( "dmsssi"   ) ) CALL iom_put( "dmsssi"      ,   wfx_sni*rhosn*r1_rhoic   )                            ! Snow mass change through snow-to-ice conversion 
    188  
    189       IF ( iom_use( "dmsmel"   ) ) CALL iom_put( "dmsmel"      , - wfx_snw_sum              )                            ! Snow mass change through melt 
    190       IF ( iom_use( "dmsdyn"   ) ) CALL iom_put( "dmsdyn"      , - wfx_snw_dyn(:,:) + rhosn * diag_trp_vs(:,:) )         ! Snow mass change through dynamics(kg/m2/s) 
    191  
    192       IF ( iom_use( "hfxsenso" ) ) CALL iom_put( "hfxsenso"    ,   -fhtur(:,:)              * zswi(:,:) + zmiss(:,:) )   ! Sensible oceanic heat flux 
    193       IF ( iom_use( "hfxconbo" ) ) CALL iom_put( "hfxconbo"    ,   diag_fc_bo               * zswi(:,:) + zmiss(:,:) )   ! Bottom conduction flux 
    194       IF ( iom_use( "hfxconsu" ) ) CALL iom_put( "hfxconsu"    ,   diag_fc_su               * zswi(:,:) + zmiss(:,:) )   ! Surface conduction flux 
    195  
    196       IF ( iom_use( "wfxtot"   ) ) CALL iom_put( "wfxtot"      ,   wfx_ice(:,:)             * zswi(:,:) + zmiss(:,:) )   ! Total freshwater flux from sea ice 
    197       IF ( iom_use( "wfxsum"   ) ) CALL iom_put( "wfxsum"      ,   wfx_sum(:,:)             * zswi(:,:) + zmiss(:,:) )   ! Freshwater flux from sea-ice surface 
    198       IF ( iom_use( "sfx_mv"   ) ) CALL iom_put( "sfx_mv"      ,   sfx(:,:) * 0.001         * zswi(:,:) + zmiss(:,:) )   ! Total salt flux 
    199  
    200       IF ( iom_use( "uice_mv"  ) ) CALL iom_put( "uice_mv"     ,   u_ice(:,:)               * zswi(:,:) + zmiss(:,:) )   ! ice velocity u component 
    201       IF ( iom_use( "vice_mv"  ) ) CALL iom_put( "vice_mv"     ,   v_ice(:,:)               * zswi(:,:) + zmiss(:,:) )   ! ice velocity v component 
    202        
    203       IF ( iom_use( "utau_ice" ) ) CALL iom_put( "utau_ice"     ,  utau_ice(:,:)            * zswi(:,:) + zmiss(:,:) )   ! Wind stress term in force balance (x) 
    204       IF ( iom_use( "vtau_ice" ) ) CALL iom_put( "vtau_ice"     ,  vtau_ice(:,:)            * zswi(:,:) + zmiss(:,:) )   ! Wind stress term in force balance (y) 
    205  
    206       !-------------------------------- 
    207       ! Global ice diagnostics (SIMIP) 
    208       !-------------------------------- 
    209       ! 
    210       IF ( iom_use( "NH_icearea" ) .OR. iom_use( "NH_icevolu" ) .OR. iom_use( "NH_iceextt" ) )   THEN   ! NH diagnostics 
    211          ! 
    212          WHERE( ff_t > 0._wp )   ;   zswi(:,:) = 1.0e-12 
    213          ELSEWHERE               ;   zswi(:,:) = 0. 
     197      ! 
     198      IF( iom_use('SH_icearea') .OR. iom_use('SH_icevolu') .OR. iom_use('SH_iceextt') )   THEN   ! SH diagnostics 
     199         ! 
     200         WHERE( ff_t < 0._wp ); zmsk00(:,:) = 1.0e-12;  
     201         ELSEWHERE            ; zmsk00(:,:) = 0. 
    214202         END WHERE  
    215          zdiag_area_nh = glob_sum( at_i(:,:) * zswi(:,:) * e1e2t(:,:) ) 
    216          zdiag_volu_nh = glob_sum( vt_i(:,:) * zswi(:,:) * e1e2t(:,:) ) 
    217          ! 
    218          WHERE( ff_t > 0._wp .AND. at_i > 0.15 )   ; zswi(:,:) = 1.0e-12 
    219          ELSEWHERE                                 ; zswi(:,:) = 0. 
     203         zdiag_area_sh = glob_sum( at_i(:,:) * zmsk00(:,:) * e1e2t(:,:) )  
     204         zdiag_volu_sh = glob_sum( vt_i(:,:) * zmsk00(:,:) * e1e2t(:,:) ) 
     205         ! 
     206         WHERE( ff_t < 0._wp .AND. at_i > 0.15 ); zmsk00(:,:) = 1.0e-12 
     207         ELSEWHERE                              ; zmsk00(:,:) = 0. 
    220208         END WHERE  
    221          zdiag_extt_nh = glob_sum( zswi(:,:) * e1e2t(:,:) ) 
    222          ! 
    223          IF ( iom_use( "NH_icearea" ) )   CALL iom_put( "NH_icearea" ,  zdiag_area_nh  ) 
    224          IF ( iom_use( "NH_icevolu" ) )   CALL iom_put( "NH_icevolu" ,  zdiag_volu_nh  ) 
    225          IF ( iom_use( "NH_iceextt" ) )   CALL iom_put( "NH_iceextt" ,  zdiag_extt_nh  ) 
    226          ! 
    227       ENDIF 
    228       ! 
    229       IF ( iom_use( "SH_icearea" ) .OR. iom_use( "SH_icevolu" ) .OR. iom_use( "SH_iceextt" ) )   THEN   ! SH diagnostics 
    230          ! 
    231          WHERE( ff_t < 0._wp ); zswi(:,:) = 1.0e-12;  
    232          ELSEWHERE            ; zswi(:,:) = 0. 
    233          END WHERE  
    234          zdiag_area_sh = glob_sum( at_i(:,:) * zswi(:,:) * e1e2t(:,:) )  
    235          zdiag_volu_sh = glob_sum( vt_i(:,:) * zswi(:,:) * e1e2t(:,:) ) 
    236          ! 
    237          WHERE( ff_t < 0._wp .AND. at_i > 0.15 ); zswi(:,:) = 1.0e-12 
    238          ELSEWHERE                              ; zswi(:,:) = 0. 
    239          END WHERE  
    240          zdiag_extt_sh = glob_sum( zswi(:,:) * e1e2t(:,:) ) 
    241          ! 
    242          IF ( iom_use( "SH_icearea" ) ) CALL iom_put( "SH_icearea", zdiag_area_sh ) 
    243          IF ( iom_use( "SH_icevolu" ) ) CALL iom_put( "SH_icevolu", zdiag_volu_sh ) 
    244          IF ( iom_use( "SH_iceextt" ) ) CALL iom_put( "SH_iceextt", zdiag_extt_sh ) 
     209         zdiag_extt_sh = glob_sum( zmsk00(:,:) * e1e2t(:,:) ) 
     210         ! 
     211         IF( iom_use('SH_icearea') ) CALL iom_put( "SH_icearea", zdiag_area_sh ) 
     212         IF( iom_use('SH_icevolu') ) CALL iom_put( "SH_icevolu", zdiag_volu_sh ) 
     213         IF( iom_use('SH_iceextt') ) CALL iom_put( "SH_iceextt", zdiag_extt_sh ) 
    245214         ! 
    246215      ENDIF  
     
    267236      !! History :   4.0  !  2013-06  (C. Rousset) 
    268237      !!---------------------------------------------------------------------- 
    269       INTEGER, INTENT( in )   ::   kt               ! ocean time-step index 
    270       INTEGER, INTENT( in )   ::   kid , kh_i 
    271       INTEGER                 ::   nz_i, jl 
    272       REAL(wp), DIMENSION(jpl) :: jcat 
     238      INTEGER, INTENT( in ) ::   kt               ! ocean time-step index 
     239      INTEGER, INTENT( in ) ::   kid , kh_i 
     240      INTEGER               ::   nz_i, jl 
     241      REAL(wp), DIMENSION(jpl) ::   jcat 
    273242      !!---------------------------------------------------------------------- 
    274243      ! 
     
    332301      CALL histdef( kid, "sisalcat", "Ice salinity"           , ""      ,   & 
    333302      &      jpi, jpj, kh_i, jpl, 1, jpl, nz_i, 32, "inst(x)", rdt, rdt ) 
    334       CALL histdef( kid, "sitemcat", "Ice temperature"       , "C"      ,   & 
    335       &      jpi, jpj, kh_i, jpl, 1, jpl, nz_i, 32, "inst(x)", rdt, rdt ) 
    336303      CALL histdef( kid, "snthicat", "Snw thickness"         , "m"      ,   & 
    337       &      jpi, jpj, kh_i, jpl, 1, jpl, nz_i, 32, "inst(x)", rdt, rdt ) 
    338       CALL histdef( kid, "sntemcat", "Snw temperature"       , "C"      ,   & 
    339304      &      jpi, jpj, kh_i, jpl, 1, jpl, nz_i, 32, "inst(x)", rdt, rdt ) 
    340305 
     
    370335      CALL histwrite( kid, "siconcat", kt, a_i         , jpi*jpj*jpl, (/1/) )     
    371336      CALL histwrite( kid, "sisalcat", kt, s_i         , jpi*jpj*jpl, (/1/) )     
    372       CALL histwrite( kid, "sitemcat", kt, tm_i - rt0  , jpi*jpj*jpl, (/1/) )     
    373337      CALL histwrite( kid, "snthicat", kt, h_s         , jpi*jpj*jpl, (/1/) )     
    374       CALL histwrite( kid, "sntemcat", kt, tm_su - rt0 , jpi*jpj*jpl, (/1/) )     
    375338 
    376339      !! The file is closed in dia_wri_state (ocean routine) 
Note: See TracChangeset for help on using the changeset viewer.