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.
find_obs_proc.h90 in branches/devukmo2010/NEMO/OPA_SRC/OBS – NEMO

source: branches/devukmo2010/NEMO/OPA_SRC/OBS/find_obs_proc.h90 @ 2128

Last change on this file since 2128 was 2128, checked in by rfurner, 14 years ago

merged branches OBS, ASM, Rivers, BDY & mixed_dynldf ready for vn3.3 merge

File size: 2.2 KB
Line 
1   SUBROUTINE find_obs_proc(kldi,klei,kldj,klej,kmyproc,kobsp,kobsi,kobsj,kno)
2      !!----------------------------------------------------------------------
3      !!               ***  ROUTINE find_obs_proc ***
4      !!         
5      !! ** Purpose : From the array kobsp containing the results of the grid
6      !!              grid search on each processor the processor return a
7      !!              decision of which processors should hold the observation.
8      !!
9      !! ** Method : Use i and j and halo regions to decide which processor to
10      !!             put ob in. Intended to avoid the mpp calls required by
11      !!             obs_mpp_find_obs_proc
12      !!
13      !! History :
14      !!! 03-08  (D. Lea)  Original code
15      !!-----------------------------------------------------------------------
16
17      !! * Arguments
18
19      INTEGER, INTENT(IN) :: kldi               ! Start of inner domain in i
20      INTEGER, INTENT(IN) :: klei               ! End of inner domain in i
21      INTEGER, INTENT(IN) :: kldj               ! Start of inner domain in j
22      INTEGER, INTENT(IN) :: klej               ! End of inner domain in j
23
24      INTEGER, INTENT(IN) :: kmyproc
25      INTEGER, INTENT(IN) :: kno
26
27      INTEGER, DIMENSION(kno), INTENT(IN) :: kobsi
28      INTEGER, DIMENSION(kno), INTENT(IN) :: kobsj
29      INTEGER, DIMENSION(kno), INTENT(INOUT) :: kobsp
30     
31      !! * local variables
32      INTEGER :: &
33         & ji
34         
35      ! first and last indoor i- and j-indexes      kldi, klei,   kldj, klej
36      ! exclude any obs in the bottom-left overlap region
37      ! also any obs outside to whole region (defined by nlci and nlcj)
38      ! I am assuming that kobsp does not need to be the correct processor
39      ! number
40     
41      DO ji = 1, kno
42         IF (kobsi(ji) < kldi .OR. kobsj(ji) < kldj &
43            .OR. kobsi(ji) > klei  .OR. kobsj(ji) > klej) THEN
44            IF (lwp .AND. kobsp(ji) /= -1) WRITE(numout,*) &
45               & 'kobs: ',kobsi(ji), kobsj(ji), kobsp(ji)
46            kobsp(ji)=1000000
47         ENDIF
48      END DO
49
50      ! Ensure that observations not in processor are masked
51
52      WHERE(kobsp(:) /= kmyproc) kobsp(:)=1000000
53
54   END SUBROUTINE find_obs_proc
Note: See TracBrowser for help on using the repository browser.