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.
trcrst_fabm.F90 in branches/UKMO/CO6_KD490_amm7_oper_fabm/NEMOGCM/NEMO/TOP_SRC/FABM – NEMO

source: branches/UKMO/CO6_KD490_amm7_oper_fabm/NEMOGCM/NEMO/TOP_SRC/FABM/trcrst_fabm.F90 @ 8050

Last change on this file since 8050 was 8050, checked in by dford, 7 years ago

Re-clear svn keywords following merge.

File size: 3.7 KB
Line 
1MODULE trcrst_fabm
2   !!======================================================================
3   !!                      ***  MODULE trcrst_fabm  ***
4   !! Read and write additional restart fields used by FABM
5   !!======================================================================
6   !! History :   
7   !!----------------------------------------------------------------------
8#if defined key_fabm
9   !!----------------------------------------------------------------------
10   !!   'key_fabm'   :                                       FABM model
11   !!----------------------------------------------------------------------
12   !! trc_nam_fabm      : FABM initialisation
13   !!----------------------------------------------------------------------
14   USE oce_trc         ! Ocean variables
15   USE par_trc         ! TOP parameters
16   USE trc             ! TOP variables
17   USE iom
18
19   USE par_fabm
20   USE trcsms_fabm
21   USE st2D_fabm
22
23   IMPLICIT NONE
24   PRIVATE
25
26   PUBLIC   trc_rst_read_fabm   ! called by trcrst.F90 module
27   PUBLIC   trc_rst_wri_fabm    ! called by trcrst.F90 module
28
29   !!----------------------------------------------------------------------
30   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
31   !! $Id$
32   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
33   !!----------------------------------------------------------------------
34
35CONTAINS
36
37   SUBROUTINE trc_rst_read_fabm
38      INTEGER :: jn
39
40      DO jn=1,jp_fabm_surface
41         CALL iom_get( numrtr, jpdom_autoglo, 'fabm_st2Db'//TRIM(model%surface_state_variables(jn)%name), fabm_st2Db(:,:,jn) )
42      END DO
43      DO jn=1,jp_fabm_bottom
44         !CALL iom_get( numrtr, jpdom_autoglo, 'fabm_st2Db'//TRIM(model%bottom_state_variables(jn)%name), fabm_st2Db(:,:,jp_fabm_bottom+jn) )
45         CALL iom_get( numrtr, jpdom_autoglo, 'fabm_st2Db'//TRIM(model%bottom_state_variables(jn)%name), fabm_st2Db(:,:,jp_fabm_surface+jn) )
46      END DO
47
48      DO jn=1,jp_fabm_surface
49         CALL iom_get( numrtr, jpdom_autoglo, 'fabm_st2Dn'//TRIM(model%surface_state_variables(jn)%name), fabm_st2Dn(:,:,jn) )
50      END DO
51      DO jn=1,jp_fabm_bottom
52         CALL iom_get( numrtr, jpdom_autoglo, 'fabm_st2Dn'//TRIM(model%bottom_state_variables(jn)%name), fabm_st2Dn(:,:,jp_fabm_surface+jn) )
53      END DO
54   END SUBROUTINE trc_rst_read_fabm
55
56   SUBROUTINE trc_rst_wri_fabm(kt)
57      INTEGER, INTENT( in ) ::   kt    ! ocean time-step index
58
59      INTEGER :: jn
60
61      DO jn=1,jp_fabm_surface
62         CALL iom_rstput( kt, nitrst, numrtw, 'fabm_st2Db'//TRIM(model%surface_state_variables(jn)%name), fabm_st2Db(:,:,jn) )
63      END DO
64      DO jn=1,jp_fabm_bottom
65         CALL iom_rstput( kt, nitrst, numrtw, 'fabm_st2Db'//TRIM(model%bottom_state_variables(jn)%name), fabm_st2Db(:,:,jp_fabm_surface+jn) )
66      END DO
67
68      DO jn=1,jp_fabm_surface
69         CALL iom_rstput( kt, nitrst, numrtw, 'fabm_st2Dn'//TRIM(model%surface_state_variables(jn)%name), fabm_st2Dn(:,:,jn) )
70      END DO
71      DO jn=1,jp_fabm_bottom
72         CALL iom_rstput( kt, nitrst, numrtw, 'fabm_st2Dn'//TRIM(model%bottom_state_variables(jn)%name), fabm_st2Dn(:,:,jp_fabm_surface+jn) )
73      END DO
74
75   END SUBROUTINE trc_rst_wri_fabm
76   
77#else
78   !!----------------------------------------------------------------------
79   !!  Dummy module :                                             No FABM
80   !!----------------------------------------------------------------------
81CONTAINS
82   SUBROUTINE trc_rst_read_fabm
83   END  SUBROUTINE trc_rst_read_fabm
84
85   SUBROUTINE trc_rst_wri_fabm(kt)
86      INTEGER, INTENT( in ) ::   kt    ! ocean time-step index
87   END SUBROUTINE trc_rst_wri_fabm
88#endif 
89
90   !!======================================================================
91END MODULE trcrst_fabm
Note: See TracBrowser for help on using the repository browser.