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.
off_oper.F90 in branches/2013/dev_r3987_UKMO4_OBS/NEMOGCM/NEMO/OOO_SRC – NEMO

source: branches/2013/dev_r3987_UKMO4_OBS/NEMOGCM/NEMO/OOO_SRC/off_oper.F90 @ 4031

Last change on this file since 4031 was 4031, checked in by djlea, 11 years ago

Updates to fix a reading bug and removal of debug print statements from Andy Ryan.

File size: 3.2 KB
Line 
1MODULE off_oper
2   !!----------------------------------------------------------------------
3   !!                    ***  MODULE off_oper ***
4   !! ** Purpose : Run NEMO observation operator in offline mode
5   !!----------------------------------------------------------------------
6   !! NEMO modules
7   USE diaobs
8   USE nemogcm
9   USE lib_mpp
10   USE in_out_manager
11   USE obs_fbm, ONLY: ln_cl4
12   !! Offline obs_oper modules
13   USE off_data
14   USE off_read
15   CONTAINS
16      SUBROUTINE off_oper_init
17         !!----------------------------------------------------------------------
18         !!                    ***  SUBROUTINE off_oper_init ***
19         !!
20         !! ** Purpose : To initialise the model as if it were running online.
21         !!
22         !!----------------------------------------------------------------------
23         IMPLICIT NONE
24         !! Initialise NEMO
25         CALL nemo_init
26         !! Initialise Offline obs_oper data
27         CALL off_data_init( ln_cl4 )
28      END SUBROUTINE off_oper_init
29
30      SUBROUTINE off_obs_oper
31         !!----------------------------------------------------------------------
32         !!                    ***  SUBROUTINE off_obs_oper ***
33         !!
34         !! ** Purpose : To use NEMO components to interpolate model fields
35         !!              to observation space.
36         !!
37         !!----------------------------------------------------------------------
38         IMPLICIT NONE
39         !! Initialise offline obs_oper
40         CALL off_oper_init
41         !! Loop over various model counterparts
42         DO jimatch = 1, n_match
43            IF (jimatch .GT. 1) THEN
44               !! Initialise obs_oper
45               CALL dia_obs_init
46            END IF
47            !! Read next model counterpart
48            CALL off_rea_dri
49            !! Interpolate to observation space
50            CALL off_oper_interp
51            !! Pipe to output files
52            CALL dia_obs_wri
53            !! Reset the obs_oper
54            CALL dia_obs_dealloc
55         END DO
56         !! Safely stop MPI
57         CALL off_oper_stop
58      END SUBROUTINE off_obs_oper
59
60      SUBROUTINE off_oper_interp
61         !!----------------------------------------------------------------------
62         !!                    ***  SUBROUTINE off_oper_interp ***
63         !!
64         !! ** Purpose : To interpolate the model as if it were running online.
65         !!
66         !!----------------------------------------------------------------------
67         IMPLICIT NONE
68         INTEGER :: istp ! time step index
69         istp = nit000
70         nstop = 0
71         DO WHILE ( istp <= nitend .AND. nstop == 0 )
72            CALL dia_obs(istp)
73            istp = istp + 1
74         END DO
75      END SUBROUTINE off_oper_interp
76
77      SUBROUTINE off_oper_stop
78         !!----------------------------------------------------------------------
79         !!                    ***  SUBROUTINE off_oper_stop ***
80         !!
81         !! ** Purpose : To finalise the model as if it were running online.
82         !!
83         !!----------------------------------------------------------------------
84         IMPLICIT NONE
85         IF(lk_mpp) CALL mppstop  ! end mpp communications
86      END SUBROUTINE off_oper_stop
87
88END MODULE off_oper
Note: See TracBrowser for help on using the repository browser.