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.
obs_level_search.h90 in NEMO/trunk/NEMOGCM/NEMO/OCE_SRC/OBS – NEMO

source: NEMO/trunk/NEMOGCM/NEMO/OCE_SRC/OBS/obs_level_search.h90 @ 9594

Last change on this file since 9594 was 9570, checked in by nicolasmartin, 6 years ago

Global renaming for core routines (./NEMO)

  • Folders
    • LIM_SRC_3 -> ICE_SRC
    • OPA_SRC -> OCE_SRC
  • CPP key: key_lim3 -> key_si3
  • Modules, (sub)routines and variables names
    • MPI: mpi_comm_opa -> mpi_comm_oce, MPI_COMM_OPA -> MPI_COMM_OCE, mpi_init_opa -> mpi_init_oce
    • AGRIF: agrif_opa_* -> agrif_oce_*, agrif_lim3_* -> agrif_si3_* and few more
    • TOP-PISCES: p.zlim -> p.zice, namp.zlim -> namp.zice
  • Comments
    • NEMO/OPA -> NEMO/OCE
    • ESIM|LIM3 -> SI3
  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1   !!----------------------------------------------------------------------
2   !! NEMO/OCE 3.3 , NEMO Consortium (2010)
3   !! $Id$
4   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
5   !!----------------------------------------------------------------------
6
7   SUBROUTINE obs_level_search( kgrd, pgrddep, kobs, pobsdep, kobsk )
8      !!----------------------------------------------------------------------
9      !!                    ***  ROUTINE obs_level_search ***
10      !!
11      !! ** Purpose : Search levels to find matching level to observed depth
12      !!
13      !! ** Method  : Straightforward search
14      !!
15      !! ** Action  :
16      !!
17      !! History :
18      !!        !  2001-11  (N. Daget, A. Weaver)
19      !!        !  2006-03  (A. Weaver) NEMOVAR migration.
20      !!        !  2006-05  (K. Mogensen) Moved to to separate routine.
21      !!        !  2006-10  (A. Weaver) Cleanup
22      !!        !  2008-10  (K. Mogensen) Remove assumptions on grid.
23      !!----------------------------------------------------------------------
24
25      !! * Arguments
26      INTEGER, INTENT(IN) :: kgrd     ! Number of gridpoints
27      REAL(KIND=wp), DIMENSION(kgrd), INTENT(INOUT) :: &
28         &   pgrddep  ! Depths of gridpoints
29      INTEGER, INTENT(IN) :: &
30         &   kobs     ! Number of observations
31      REAL(KIND=wp), DIMENSION(kobs), INTENT(INOUT) :: &
32         &   pobsdep  ! Depths of observations
33      INTEGER ,DIMENSION(kobs), INTENT(OUT) :: &
34         &   kobsk    ! Level indices of observations
35 
36      !! * Local declarations
37      INTEGER :: ji
38      INTEGER :: jk
39
40      !------------------------------------------------------------------------
41      ! Search levels for each observations to find matching level
42      !------------------------------------------------------------------------
43      DO ji = 1, kobs
44         kobsk(ji) = 1
45         depk: DO jk = 2, kgrd
46            IF ( pgrddep(jk) >= pobsdep(ji) ) EXIT depk
47         END DO depk
48         kobsk(ji) = jk
49      END DO
50
51   END SUBROUTINE obs_level_search
Note: See TracBrowser for help on using the repository browser.