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/AMM15_v3_6_STABLE_package_collate_utils305/NEMOGCM/NEMO/TOP_SRC/FABM – NEMO

source: branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils305/NEMOGCM/NEMO/TOP_SRC/FABM/trcrst_fabm.F90 @ 11979

Last change on this file since 11979 was 10156, checked in by dford, 6 years ago

Apply patch fabm_patch_e3284ca_889163b.diff from Jim Clark.

File size: 3.5 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_surface+jn) )
45      END DO
46
47      DO jn=1,jp_fabm_surface
48         CALL iom_get( numrtr, jpdom_autoglo, 'fabm_st2Dn'//TRIM(model%surface_state_variables(jn)%name), fabm_st2Dn(:,:,jn) )
49      END DO
50      DO jn=1,jp_fabm_bottom
51         CALL iom_get( numrtr, jpdom_autoglo, 'fabm_st2Dn'//TRIM(model%bottom_state_variables(jn)%name), fabm_st2Dn(:,:,jp_fabm_surface+jn) )
52      END DO
53   END SUBROUTINE trc_rst_read_fabm
54
55   SUBROUTINE trc_rst_wri_fabm(kt)
56      INTEGER, INTENT( in ) ::   kt    ! ocean time-step index
57
58      INTEGER :: jn
59
60      DO jn=1,jp_fabm_surface
61         CALL iom_rstput( kt, nitrst, numrtw, 'fabm_st2Db'//TRIM(model%surface_state_variables(jn)%name), fabm_st2Db(:,:,jn) )
62      END DO
63      DO jn=1,jp_fabm_bottom
64         CALL iom_rstput( kt, nitrst, numrtw, 'fabm_st2Db'//TRIM(model%bottom_state_variables(jn)%name), fabm_st2Db(:,:,jp_fabm_surface+jn) )
65      END DO
66
67      DO jn=1,jp_fabm_surface
68         CALL iom_rstput( kt, nitrst, numrtw, 'fabm_st2Dn'//TRIM(model%surface_state_variables(jn)%name), fabm_st2Dn(:,:,jn) )
69      END DO
70      DO jn=1,jp_fabm_bottom
71         CALL iom_rstput( kt, nitrst, numrtw, 'fabm_st2Dn'//TRIM(model%bottom_state_variables(jn)%name), fabm_st2Dn(:,:,jp_fabm_surface+jn) )
72      END DO
73
74   END SUBROUTINE trc_rst_wri_fabm
75
76#else
77   !!----------------------------------------------------------------------
78   !!  Dummy module :                                             No FABM
79   !!----------------------------------------------------------------------
80CONTAINS
81   SUBROUTINE trc_rst_read_fabm
82   END  SUBROUTINE trc_rst_read_fabm
83
84   SUBROUTINE trc_rst_wri_fabm(kt)
85      INTEGER, INTENT( in ) ::   kt    ! ocean time-step index
86   END SUBROUTINE trc_rst_wri_fabm
87#endif
88
89   !!======================================================================
90END MODULE trcrst_fabm
Note: See TracBrowser for help on using the repository browser.