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 15033 for NEMO/trunk/tests/SWG/MY_SRC/usrdef_sbc.F90 – NEMO

Ignore:
Timestamp:
2021-06-21T12:24:45+02:00 (3 years ago)
Author:
smasson
Message:

trunk: suppress jpim1 et jpjm1, #2699

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/tests/SWG/MY_SRC/usrdef_sbc.F90

    r14433 r15033  
    3232   PUBLIC   usrdef_sbc_ice_flx   ! routine called by icestp.F90 for ice thermo 
    3333       
     34   !! * Substitutions 
     35#  include "do_loop_substitute.h90" 
    3436   !!---------------------------------------------------------------------- 
    3537   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    8486      ztauv = - REAL( rn_tau, wp ) * SIN( rn_theta * rad )   ! N.m-2 
    8587       
    86       DO jj = 1, jpj 
    87          DO ji = 1, jpi 
    88            ! length of the domain : 2000km x 2000km  
    89            utau(ji,jj) = - ztauu * COS( rpi * gphiu(ji,jj) / 2000000._wp) 
    90            vtau(ji,jj) = - ztauv * COS( rpi * gphiv(ji,jj) / 2000000._wp) 
    91          END DO 
    92       END DO 
    93       
     88      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     89         ! length of the domain : 2000km x 2000km  
     90         utau(ji,jj) = - ztauu * COS( rpi * gphiu(ji,jj) / 2000000._wp) 
     91         vtau(ji,jj) = - ztauv * COS( rpi * gphiv(ji,jj) / 2000000._wp) 
     92      END_2D 
     93       
    9494      ! module of wind stress and wind speed at T-point 
    9595      zcoef = 1. / ( zrhoa * zcdrag )  
    96       DO jj = 2, jpjm1 
    97          DO ji = 2, jpim1 
    98             ztx = utau(ji-1,jj  ) + utau(ji,jj)  
    99             zty = vtau(ji  ,jj-1) + vtau(ji,jj)  
    100             zmod = 0.5 * SQRT( ztx * ztx + zty * zty ) 
    101             taum(ji,jj) = zmod 
    102             wndm(ji,jj) = SQRT( zmod * zcoef ) 
    103          END DO 
    104       END DO 
    105        
     96      DO_2D( 0, 0, 0, 0 ) 
     97         ztx = utau(ji-1,jj  ) + utau(ji,jj)  
     98         zty = vtau(ji  ,jj-1) + vtau(ji,jj)  
     99         zmod = 0.5 * SQRT( ztx * ztx + zty * zty ) 
     100         taum(ji,jj) = zmod 
     101         wndm(ji,jj) = SQRT( zmod * zcoef ) 
     102      END_2D 
    106103      CALL lbc_lnk( 'usrdef_sbc', taum(:,:), 'T', 1. , wndm(:,:), 'T', 1. ) 
    107104      ! 
Note: See TracChangeset for help on using the changeset viewer.