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 11604 for NEMO/branches/2019/ENHANCE-03_domcfg/src/domutl.F90 – NEMO

Ignore:
Timestamp:
2019-09-26T18:48:45+02:00 (5 years ago)
Author:
mathiot
Message:

ENHANCE-03_domcfg: remove useless variable in domclo and domutil + cosmetics changes (ticket #2143)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/ENHANCE-03_domcfg/src/domutl.F90

    r11201 r11604  
    4545      !! 
    4646      !!---------------------------------------------------------------------- 
    47       INTEGER,                          INTENT(in)    :: kiseed, kjseed, kkseed 
    48       REAL(wp),                         INTENT(in)    :: rfill    ! filling value 
    49       REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: rdta     ! input data 
    50       REAL(wp), DIMENSION(jpi,jpj,jpk)                :: rseedmap, rseedmap_b  ! 
    51   
    52       INTEGER :: ip=0                 ! size of the pile 
     47      INTEGER,                          INTENT(in)    :: kiseed, kjseed, kkseed ! seed 
     48      REAL(wp),                         INTENT(in)    :: rfill                  ! filling value 
     49      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: rdta                   ! input data 
     50      REAL(wp), DIMENSION(jpi,jpj,jpk)                :: rseedmap, rseedmap_b   ! map of seed (use for processor communication) 
     51  
    5352      INTEGER :: ii  , ij  , ik   , kii, kjj, jj, kk    ! working integer 
    54       INTEGER :: iip1, ijp1, ikp1 
    55       INTEGER :: iim1, ijm1, ikm1 
    56       INTEGER :: nseed 
     53      INTEGER :: iip1, ijp1, ikp1                       ! working integer 
     54      INTEGER :: iim1, ijm1, ikm1                       ! working integer 
     55      INTEGER :: nseed                                  ! size of the stack 
    5756      TYPE (idx), POINTER :: seed 
    5857      !!----------------------------------------------------------------------  
     
    7574      nseed=SUM(rseedmap); IF( lk_mpp )   CALL mpp_sum('domutil', nseed )  ! nseed =0 means on land => WARNING later on 
    7675      ! 
    77       ! loop until the pile size is 0 or if the pool is larger than the critical size 
     76      ! loop until the stack size is 0 or if the pool is larger than the critical size 
    7877      IF (nseed > 0) THEN 
    7978         ! seed on ocean continue 
    8079         DO WHILE ( nseed /= 0 ) 
    8180            DO WHILE ( ASSOCIATED(seed) ) 
    82                ip=ip+1 
    8381               ii=seed%i; ij=seed%j ; ik=seed%k ; rseedmap(ii,ij,ik)=1. 
    8482               !  
    85                ! update bathy and update pile size 
     83               ! update bathy and update stack size 
    8684               CALL del_head_idx(seed)  
    8785               ! 
     
    143141      !! 
    144142      !!---------------------------------------------------------------------- 
    145       INTEGER,                    INTENT(in)    :: kiseed, kjseed 
    146       REAL(wp),                   INTENT(in)    :: rfill    ! filling value 
    147       REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: rdta     ! input data 
    148       REAL(wp), DIMENSION(jpi,jpj) :: rseedmap, rseedmap_b  
    149   
    150       INTEGER :: ip=0                     ! size of the pile 
     143      INTEGER,                      INTENT(in)    :: kiseed, kjseed ! seed 
     144      REAL(wp),                     INTENT(in)    :: rfill          ! filling value 
     145      REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: rdta           ! input data 
     146      REAL(wp), DIMENSION(jpi,jpj) :: rseedmap, rseedmap_b          ! location of new seed (used for processor exchange) 
     147  
    151148      INTEGER :: ii  , ij  , jj, kii, kjj     ! working integer 
    152       INTEGER :: iip1, ijp1               ! working integer 
    153       INTEGER :: iim1, ijm1 
    154       INTEGER :: nseed 
     149      INTEGER :: iip1, ijp1                   ! working integer 
     150      INTEGER :: iim1, ijm1                   ! working integer 
     151      INTEGER :: nseed                        ! size of the stack 
    155152      TYPE (idx), POINTER :: seed 
    156153      !!---------------------------------------------------------------------- 
     
    173170      nseed=SUM(rseedmap); IF( lk_mpp )   CALL mpp_sum('domutil', nseed )  ! nseed =0 means on land => WARNING later on 
    174171      ! 
    175       ! loop until the pile size is 0 or if the pool is larger than the critical size 
     172      ! loop until the stack size is 0 or if the pool is larger than the critical size 
    176173      IF (nseed > 0) THEN 
    177174         ! seed on ocean continue 
    178175         DO WHILE ( nseed .NE. 0 ) 
    179176            DO WHILE ( ASSOCIATED(seed) ) 
    180                ip=ip+1 
    181177               ii=seed%i; ij=seed%j ; rseedmap(ii,ij)=1. 
    182                ! update pile size 
     178               ! update stack size 
    183179               CALL del_head_idx(seed)  
    184180               !  
     
    226222   ! subroutine to deals with link list 
    227223   ! 
    228    SUBROUTINE create_idx(pt_idx, ki, kj, kk) 
    229       TYPE (idx), POINTER :: pt_idx 
    230       INTEGER, INTENT(in) :: ki, kj, kk 
    231       ! 
    232       ! initialised all field to NULL() 
    233       NULLIFY(pt_idx) 
    234       ! 
    235       ! allocate new element 
    236       ALLOCATE(pt_idx) 
    237       pt_idx%i=ki ; pt_idx%j=kj ; pt_idx%k=kk ; 
    238       pt_idx%next => NULL()   
    239    END SUBROUTINE create_idx 
    240  
    241224   SUBROUTINE add_head_idx(pt_idx, ki, kj, kk) 
     225      !!--------------------------------------------------------------------- 
     226      !!                  ***  ROUTINE add_head_idx  *** 
     227      !! 
     228      !! ** Purpose : add one element in the linked list 
     229      !! 
     230      !! ** Method  :  allocate one element, then point %next to the linked list 
     231      !!---------------------------------------------------------------------- 
    242232      TYPE (idx), POINTER :: pt_idx 
    243233      TYPE (idx), POINTER :: zpt_new 
     
    255245 
    256246   SUBROUTINE del_head_idx(pt_idx) 
     247      !!--------------------------------------------------------------------- 
     248      !!                  ***  ROUTINE del_head_idx  *** 
     249      !! 
     250      !! ** Purpose : delete one element in the linked list 
     251      !! 
     252      !! ** Method  : move the pointer to the next node  
     253      !!---------------------------------------------------------------------- 
    257254      TYPE (idx), POINTER :: pt_idx 
    258255      TYPE (idx), POINTER :: zpt_tmp 
Note: See TracChangeset for help on using the changeset viewer.