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 13295 for NEMO/trunk/src/ICE/icedyn_adv_pra.F90 – NEMO

Ignore:
Timestamp:
2020-07-10T20:24:21+02:00 (4 years ago)
Author:
acc
Message:

Replace do-loop macros in the trunk with alternative forms with greater flexibility for extra halo applications. This alters a lot of routines but does not change any behaviour or results. do_loop_substitute.h90 is greatly simplified by this change. SETTE results are identical to those with the previous revision

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/ICE/icedyn_adv_pra.F90

    r13286 r13295  
    102102      ! --- Record max of the surrounding 9-pts ice thick. (for call Hbig) --- ! 
    103103      DO jl = 1, jpl 
    104          DO_2D_00_00 
     104         DO_2D( 0, 0, 0, 0 ) 
    105105            zhip_max(ji,jj,jl) = MAX( epsi20, ph_ip(ji,jj,jl), ph_ip(ji+1,jj  ,jl), ph_ip(ji  ,jj+1,jl), & 
    106106               &                                               ph_ip(ji-1,jj  ,jl), ph_ip(ji  ,jj-1,jl), & 
     
    250250         ! derive open water from ice concentration 
    251251         zati2(:,:) = SUM( pa_i(:,:,:), dim=3 ) 
    252          DO_2D_00_00 
     252         DO_2D( 0, 0, 0, 0 ) 
    253253            pato_i(ji,jj) = pato_i(ji,jj) - ( zati2(ji,jj) - zati1(ji,jj) ) &                        !--- open water 
    254254               &                          - ( zudy(ji,jj) - zudy(ji-1,jj) + zvdx(ji,jj) - zvdx(ji,jj-1) ) * r1_e1e2t(ji,jj) * zdt 
     
    305305         ! 
    306306         ! Limitation of moments.                                            
    307          DO_2D_00_11 
     307         DO_2D( 0, 0, 1, 1 ) 
    308308            !  Initialize volumes of boxes  (=area if adv_x first called, =psm otherwise)                                      
    309309            psm (ji,jj,jl) = MAX( pcrh * e1e2t(ji,jj) + ( 1.0 - pcrh ) * psm(ji,jj,jl) , epsi20 ) 
     
    325325 
    326326         !  Calculate fluxes and moments between boxes i<-->i+1               
    327          DO_2D_00_11 
     327         DO_2D( 0, 0, 1, 1 ) 
    328328            zbet(ji,jj)  =  MAX( 0._wp, SIGN( 1._wp, put(ji,jj) ) ) 
    329329            zalf         =  MAX( 0._wp, put(ji,jj) ) * pdt / psm(ji,jj,jl) 
     
    350350         END_2D 
    351351 
    352          DO_2D_00_10 
     352         DO_2D( 0, 0, 1, 0 ) 
    353353            zalf          = MAX( 0._wp, -put(ji,jj) ) * pdt / psm(ji+1,jj,jl)  
    354354            zalg  (ji,jj) = zalf 
     
    369369         END_2D 
    370370 
    371          DO_2D_00_00 
     371         DO_2D( 0, 0, 0, 0 ) 
    372372            zbt  =       zbet(ji-1,jj) 
    373373            zbt1 = 1.0 - zbet(ji-1,jj) 
     
    383383 
    384384         !   Put the temporary moments into appropriate neighboring boxes.     
    385          DO_2D_00_00 
     385         DO_2D( 0, 0, 0, 0 ) 
    386386            zbt  =       zbet(ji-1,jj) 
    387387            zbt1 = 1.0 - zbet(ji-1,jj) 
     
    403403         END_2D 
    404404 
    405          DO_2D_00_00 
     405         DO_2D( 0, 0, 0, 0 ) 
    406406            zbt  =       zbet(ji,jj) 
    407407            zbt1 = 1.0 - zbet(ji,jj) 
     
    462462         ! 
    463463         ! Limitation of moments. 
    464          DO_2D_11_00 
     464         DO_2D( 1, 1, 0, 0 ) 
    465465            !  Initialize volumes of boxes (=area if adv_x first called, =psm otherwise) 
    466466            psm(ji,jj,jl) = MAX(  pcrh * e1e2t(ji,jj) + ( 1.0 - pcrh ) * psm(ji,jj,jl) , epsi20  ) 
     
    482482  
    483483         !  Calculate fluxes and moments between boxes j<-->j+1               
    484          DO_2D_11_00 
     484         DO_2D( 1, 1, 0, 0 ) 
    485485            zbet(ji,jj)  =  MAX( 0._wp, SIGN( 1._wp, pvt(ji,jj) ) ) 
    486486            zalf         =  MAX( 0._wp, pvt(ji,jj) ) * pdt / psm(ji,jj,jl) 
     
    507507         END_2D 
    508508         ! 
    509          DO_2D_10_00 
     509         DO_2D( 1, 0, 0, 0 ) 
    510510            zalf          = MAX( 0._wp, -pvt(ji,jj) ) * pdt / psm(ji,jj+1,jl)  
    511511            zalg  (ji,jj) = zalf 
     
    527527 
    528528         !  Readjust moments remaining in the box.  
    529          DO_2D_00_00 
     529         DO_2D( 0, 0, 0, 0 ) 
    530530            zbt  =         zbet(ji,jj-1) 
    531531            zbt1 = ( 1.0 - zbet(ji,jj-1) ) 
     
    541541 
    542542         !   Put the temporary moments into appropriate neighboring boxes.     
    543          DO_2D_00_00 
     543         DO_2D( 0, 0, 0, 0 ) 
    544544            zbt  =       zbet(ji,jj-1) 
    545545            zbt1 = 1.0 - zbet(ji,jj-1) 
     
    562562         END_2D 
    563563 
    564          DO_2D_00_00 
     564         DO_2D( 0, 0, 0, 0 ) 
    565565            zbt  =       zbet(ji,jj) 
    566566            zbt1 = 1.0 - zbet(ji,jj) 
     
    618618      DO jl = 1, jpl 
    619619 
    620          DO_2D_11_11 
     620         DO_2D( 1, 1, 1, 1 ) 
    621621            IF ( pv_i(ji,jj,jl) > 0._wp ) THEN 
    622622               ! 
     
    684684      ! -- check snow load -- ! 
    685685      DO jl = 1, jpl 
    686          DO_2D_11_11 
     686         DO_2D( 1, 1, 1, 1 ) 
    687687            IF ( pv_i(ji,jj,jl) > 0._wp ) THEN 
    688688               ! 
Note: See TracChangeset for help on using the changeset viewer.