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 10288 for NEMO/branches/2018/dev_r9866_HPC_03_globcom/src/ICE/icedyn_adv.F90 – NEMO

Ignore:
Timestamp:
2018-11-07T18:25:49+01:00 (5 years ago)
Author:
francesca
Message:

reduce global communications, see #2010

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2018/dev_r9866_HPC_03_globcom/src/ICE/icedyn_adv.F90

    • Property svn:keywords set to Id
    r9604 r10288  
    4848   !!---------------------------------------------------------------------- 
    4949   !! NEMO/ICE 4.0 , NEMO Consortium (2018) 
    50    !! $Id: icedyn_adv.F90 8373 2017-07-25 17:44:54Z clem $ 
    51    !! Software governed by the CeCILL licence     (./LICENSE) 
     50   !! $Id$ 
     51   !! Software governed by the CeCILL license (see ./LICENSE) 
    5252   !!---------------------------------------------------------------------- 
    5353CONTAINS 
     
    6666      !!---------------------------------------------------------------------- 
    6767      INTEGER, INTENT(in) ::   kt   ! number of iteration 
     68      ! 
     69      INTEGER ::   jl   ! dummy loop indice 
     70      REAL(wp), DIMENSION(jpi,jpj) ::   zmask  ! fraction of time step with v_i < 0 
    6871      !!--------------------------------------------------------------------- 
    6972      ! 
     
    9598      END SELECT 
    9699 
     100      !---------------------------- 
     101      ! Debug the advection schemes 
     102      !---------------------------- 
     103      ! clem: At least one advection scheme above is not strictly positive => UM from 3d to 5th order 
     104      !       In Prather, I am not sure if the fields are bounded by 0 or not (it seems not) 
     105      !       In UM3-5  , advected fields are not bounded and negative values can appear. 
     106      !                   These values are usually very small but in some occasions they can also be non-negligible 
     107      !                   Therefore one needs to bound the advected fields by 0 (though this is not a clean fix) 
     108      ! 
     109      ! record the negative values resulting from UMx 
     110      zmask(:,:) = 0._wp ! keep the init to 0 here 
     111      DO jl = 1, jpl 
     112         WHERE( v_i(:,:,jl) < 0._wp )   zmask(:,:) = 1._wp 
     113      END DO 
     114      IF( iom_use('iceneg_pres') )   CALL iom_put("iceneg_pres", zmask                                      )  ! fraction of time step with v_i < 0 
     115      IF( iom_use('iceneg_volu') )   CALL iom_put("iceneg_volu", SUM(MIN( v_i, 0. ), dim=3 )                )  ! negative ice volume (only) 
     116      IF( iom_use('iceneg_hfx' ) )   CALL iom_put("iceneg_hfx" , ( SUM(SUM( MIN( e_i(:,:,1:nlay_i,:), 0. )  &  ! negative ice heat content (only) 
     117         &                                                                  , dim=4 ), dim=3 ) )* r1_rdtice )  ! -- eq. heat flux [W/m2] 
     118      ! 
     119      ! ==> conservation is ensured by calling this routine below, 
     120      !     however the global ice volume is then changed by advection (but errors are very small)  
     121      CALL ice_var_zapneg( ato_i, v_i, v_s, sv_i, oa_i, a_i, a_ip, v_ip, e_s, e_i ) 
     122 
    97123      !------------ 
    98124      ! diagnostics 
     
    103129      diag_trp_vi(:,:) = SUM(     v_i (:,:,:)          - v_i_b (:,:,:)                  , dim=3 ) * r1_rdtice 
    104130      diag_trp_vs(:,:) = SUM(     v_s (:,:,:)          - v_s_b (:,:,:)                  , dim=3 ) * r1_rdtice 
    105       IF( iom_use('icemtrp') )   CALL iom_put( "icemtrp" , diag_trp_vi * rhoic          )   ! ice mass transport 
    106       IF( iom_use('snwmtrp') )   CALL iom_put( "snwmtrp" , diag_trp_vs * rhosn          )   ! snw mass transport 
    107       IF( iom_use('salmtrp') )   CALL iom_put( "salmtrp" , diag_trp_sv * rhoic * 1.e-03 )   ! salt mass transport (kg/m2/s) 
    108       IF( iom_use('dihctrp') )   CALL iom_put( "dihctrp" , -diag_trp_ei                 )   ! advected ice heat content (W/m2) 
    109       IF( iom_use('dshctrp') )   CALL iom_put( "dshctrp" , -diag_trp_es                 )   ! advected snw heat content (W/m2) 
     131      IF( iom_use('icemtrp') )   CALL iom_put( "icemtrp" , diag_trp_vi * rhoi          )   ! ice mass transport 
     132      IF( iom_use('snwmtrp') )   CALL iom_put( "snwmtrp" , diag_trp_vs * rhos          )   ! snw mass transport 
     133      IF( iom_use('salmtrp') )   CALL iom_put( "salmtrp" , diag_trp_sv * rhoi * 1.e-03 )   ! salt mass transport (kg/m2/s) 
     134      IF( iom_use('dihctrp') )   CALL iom_put( "dihctrp" , -diag_trp_ei                )   ! advected ice heat content (W/m2) 
     135      IF( iom_use('dshctrp') )   CALL iom_put( "dshctrp" , -diag_trp_es                )   ! advected snw heat content (W/m2) 
    110136 
    111137      ! controls 
Note: See TracChangeset for help on using the changeset viewer.