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 5857 for branches – NEMO

Changeset 5857 for branches


Ignore:
Timestamp:
2015-11-02T18:28:38+01:00 (8 years ago)
Author:
jenniewaters
Message:

Removing global arrays when ln_grid_global=.false.

Location:
branches/2015/dev_r5776_UKMO2_OBS_efficiency_improvs/NEMOGCM
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5776_UKMO2_OBS_efficiency_improvs/NEMOGCM/CONFIG/SHARED/namelist_ref

    r5822 r5857  
    12151215   ln_velhradcp = .false.  ! Logical switch for velocity high freq. ADCP 
    12161216   ln_velfb   = .false.    ! Logical switch for feedback velocity data 
    1217    ln_grid_global = .true. ! Global distribtion of observations 
     1217   ln_grid_global = .false. ! Global distribtion of observations 
    12181218   ln_grid_search_lookup = .false. !  Logical switch for obs grid search w/lookup table 
    12191219   grid_search_file = 'grid_search'  !  Grid search lookup file header 
  • branches/2015/dev_r5776_UKMO2_OBS_efficiency_improvs/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90

    r4990 r5857  
    465465 
    466466      CALL obs_typ_init 
    467        
    468       CALL mppmap_init 
     467 
     468      IF ( ln_grid_global ) THEN       
     469         CALL mppmap_init 
     470      ENDIF 
    469471       
    470472      ! Parameter control 
  • branches/2015/dev_r5776_UKMO2_OBS_efficiency_improvs/NEMOGCM/NEMO/OPA_SRC/OBS/obs_grd_bruteforce.h90

    r2358 r5857  
    325325         CALL obs_mpp_max_integer( kobsj, kobs ) 
    326326      ELSE 
    327          CALL obs_mpp_find_obs_proc( kproc, kobsi, kobsj, kobs ) 
     327         CALL obs_mpp_find_obs_proc_local( kproc, kobs ) 
    328328      ENDIF 
    329329 
  • branches/2015/dev_r5776_UKMO2_OBS_efficiency_improvs/NEMOGCM/NEMO/OPA_SRC/OBS/obs_grid.F90

    r4990 r5857  
    2121   USE dom_oce                     ! Ocean space and time domain variables 
    2222   USE obs_mpp, ONLY : &           ! MPP support routines for observation diagnostics 
    23       & obs_mpp_find_obs_proc, & 
     23      & obs_mpp_find_obs_proc_local, & 
    2424      & mpp_global_max,        & 
    2525      & obs_mpp_max_integer 
     
    613613         CALL obs_mpp_max_integer( kobsj, kobs ) 
    614614      ELSE 
    615          CALL obs_mpp_find_obs_proc( kproc, kobsi, kobsj, kobs ) 
     615         CALL obs_mpp_find_obs_proc_local( kproc, kobs ) 
    616616      ENDIF 
    617617 
  • branches/2015/dev_r5776_UKMO2_OBS_efficiency_improvs/NEMOGCM/NEMO/OPA_SRC/OBS/obs_mpp.F90

    r2513 r5857  
    1313   !! obs_mpp_max_integer   : Find maximum on all processors of each value in an integer on all processors 
    1414   !! obs_mpp_find_obs_proc : Find processors which should hold the observations 
     15   !! obs_mpp_find_obs_proc_local : Find processors which should hold the observations, avoiding global arrays 
    1516   !! obs_mpp_sum_integers  : Sum an integer array from all processors 
    1617   !! obs_mpp_sum_integer   : Sum an integer from all processors 
     
    2829      &   obs_mpp_max_integer,   & !: Find maximum across processors in an integer array 
    2930      &   obs_mpp_find_obs_proc, & !: Find processors which should hold the observations 
     31      &   obs_mpp_find_obs_proc_local, & !: Find processors which should hold the observations 
    3032      &   obs_mpp_sum_integers,  & !: Sum an integer array from all processors 
    3133      &   obs_mpp_sum_integer,   & !: Sum an integer from all processors 
     
    227229   END SUBROUTINE obs_mpp_find_obs_proc 
    228230 
     231   SUBROUTINE obs_mpp_find_obs_proc_local( kobsp,kno ) 
     232      !!---------------------------------------------------------------------- 
     233      !!               ***  ROUTINE obs_mpp_find_obs_proc_local *** 
     234      !!          
     235      !! ** Purpose : From the array kobsp containing the results of the grid 
     236      !!              grid search on each processor the processor return a 
     237      !!              decision of which processors should hold the observation. 
     238      !! 
     239      !! ** Method  : Synchronize the processor number for each obs using 
     240      !!              obs_mpp_max_integer. If an observation exists on two  
     241      !!              processors it will be allocated to the lower numbered 
     242      !!              processor. 
     243      !! 
     244      !! ** Action  : This does only work for MPI. 
     245      !!              It does not work for SHMEM. 
     246      !! 
     247      !! References : http://www.mpi-forum.org 
     248      !!---------------------------------------------------------------------- 
     249      INTEGER                , INTENT(in   ) ::   kno 
     250      INTEGER, DIMENSION(kno), INTENT(inout) ::   kobsp 
     251      ! 
     252#if defined key_mpp_mpi 
     253      ! 
     254      ! 
     255      INTEGER :: ji, isum 
     256      INTEGER, DIMENSION(kno) ::   iobsp 
     257INCLUDE 'mpif.h' 
     258      !! 
     259 
     260      iobsp=kobsp 
     261 
     262      WHERE( iobsp(:) == -1 ) 
     263         iobsp(:) = 9999999 
     264      END WHERE 
     265 
     266      iobsp=-1*iobsp 
     267 
     268      CALL obs_mpp_max_integer( iobsp, kno ) 
     269 
     270      kobsp=-1*iobsp 
     271 
     272      isum=0 
     273      DO ji = 1, kno 
     274         IF ( kobsp(ji) == 9999999 ) THEN 
     275            isum=isum+1 
     276            kobsp(ji)=-1 
     277         ENDIF 
     278      ENDDO 
     279 
     280 
     281      IF ( isum > 0 ) THEN 
     282         IF (lwp) WRITE(numout,*) isum, ' observations failed the grid search.' 
     283         IF (lwp) WRITE(numout,*)'If ln_grid_search_lookup=.TRUE., try reducing grid_search_res' 
     284      ENDIF 
     285 
     286#else 
     287      ! no MPI: empty routine 
     288#endif      
     289       
     290   END SUBROUTINE obs_mpp_find_obs_proc_local 
     291 
    229292 
    230293   SUBROUTINE obs_mpp_sum_integers( kvalsin, kvalsout, kno ) 
Note: See TracChangeset for help on using the changeset viewer.