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 14215 for NEMO/trunk/src/OCE/do_loop_substitute.h90 – NEMO

Ignore:
Timestamp:
2020-12-18T14:49:22+01:00 (3 years ago)
Author:
acc
Message:

trunk changes to swap the order of arguments to the DO LOOP macros. These changes result in a more natural i-j-k ordering as explained in #2595. SETTE is passed before and after these changes and results are unchanged. This fixes #2595

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/do_loop_substitute.h90

    r14072 r14215  
    22! These comments are not intended to be retained during preprocessing; i.e. do not define "show_comments" 
    33!!---------------------------------------------------------------------- 
    4 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     4!! NEMO/OCE 4.x , NEMO Consortium (2020) 
    55!! Software governed by the CeCILL license (see ./LICENSE) 
    66!!---------------------------------------------------------------------- 
     
    2525! Upper limits of jpi, jpim1 or fs_jpim1 (for ji) or jpj, jpjm1 or fs_jpjm1 (for jj) 
    2626! 
    27 ! The macro naming convention takes the form: DO_2D( B, T, L, R) where: 
     27! The macro naming convention takes the form: DO_2D( L, R, B, T) where: 
     28!   L is the Left   offset from the PE's inner domain; 
     29!   R is the Right  offset from the PE's inner domain 
    2830!   B is the Bottom offset from the PE's inner domain; 
    2931!   T is the Top    offset from the PE's inner domain; 
    30 !   L is the Left   offset from the PE's inner domain; 
    31 !   R is the Right  offset from the PE's inner domain 
    3232! 
    3333! So, given an inner domain of 2,jpim1 and 2,jpjm1, a typical example would replace: 
     
    4242! with: 
    4343! 
    44 !   DO_2D( 0, 1, 1, 0 ) 
     44!   DO_2D( 1, 0, 0, 1 ) 
    4545!      . 
    4646!      . 
     
    5959#endif 
    6060 
    61 #define DO_2D(B, T, L, R) DO jj = ntsj-(B), ntej+(T)   ;   DO ji = ntsi-(L), ntei+(R) 
     61#define DO_2D(L, R, B, T) DO jj = ntsj-(B), ntej+(T)   ;   DO ji = ntsi-(L), ntei+(R) 
    6262#define A1Di(H) ntsi-H:ntei+H 
    6363#define A1Dj(H) ntsj-H:ntej+H 
     
    7070#define KJPT  : 
    7171 
    72 #define DO_3D(B, T, L, R, ks, ke) DO jk = ks, ke   ;   DO_2D(B, T, L, R) 
     72#define DO_3D(L, R, B, T, ks, ke) DO jk = ks, ke   ;   DO_2D(L, R, B, T) 
    7373 
    74 #define DO_3DS(B, T, L, R, ks, ke, ki) DO jk = ks, ke, ki   ;   DO_2D(B, T, L, R) 
     74#define DO_3DS(L, R, B, T, ks, ke, ki) DO jk = ks, ke, ki   ;   DO_2D(L, R, B, T) 
    7575 
    7676#define END_2D   END DO   ;   END DO 
Note: See TracChangeset for help on using the changeset viewer.