Ignore:
Timestamp:
2017-09-12T20:46:13+02:00 (3 years ago)
Author:
clem
Message:

changes in style - part6 - one more round

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icevar.F90

    r8514 r8517  
    104104      ! END MP 2016 
    105105 
    106       DO jj = 1, jpj                         ! open water fraction 
    107          DO ji = 1, jpi 
    108             ato_i(ji,jj) = MAX( 1._wp - at_i(ji,jj), 0._wp )    
    109          END DO 
    110       END DO 
    111 !!gm I think this should do the work : 
    112 !      ato_i(:,:) = MAX( 1._wp - at_i(:,:), 0._wp )   
    113 !!gm end 
     106      ato_i(:,:) = 1._wp - at_i(:,:)    ! open water fraction   
    114107 
    115108      IF( kn > 1 ) THEN 
     
    543536 
    544537      ! to be sure that at_i is the sum of a_i(jl) 
    545       at_i (:,:) = a_i(:,:,1) 
    546       vt_i (:,:) = v_i(:,:,1) 
    547       DO jl = 2, jpl 
    548          at_i(:,:) = at_i(:,:) + a_i(:,:,jl) 
    549          vt_i(:,:) = vt_i(:,:) + v_i(:,:,jl) 
    550       END DO 
    551  
    552       ! open water = 1 if at_i=0 (no re-calculation of ato_i here) 
    553       DO jj = 1, jpj 
    554          DO ji = 1, jpi 
    555             rswitch      = MAX( 0._wp , SIGN( 1._wp, - at_i(ji,jj) ) ) 
    556             ato_i(ji,jj) = rswitch + (1._wp - rswitch ) * ato_i(ji,jj) 
    557          END DO 
    558       END DO 
     538      at_i (:,:) = SUM( a_i(:,:,:), dim=3 ) 
     539      vt_i (:,:) = SUM( v_i(:,:,:), dim=3 ) 
     540 
     541      ! open water = 1 if at_i=0 
     542      WHERE( at_i(:,:) == 0._wp )   ato_i(:,:) = 1._wp 
    559543      ! 
    560544   END SUBROUTINE ice_var_zapsmall 
Note: See TracChangeset for help on using the changeset viewer.