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

source: branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1_v2/NEMOGCM/NEMO/TOP_SRC/FABM/trcrst_fabm.F90 @ 13489

Last change on this file since 13489 was 13489, checked in by dford, 4 years ago

Merge in previous branch.

File size: 3.6 KB
Line 
1MODULE trcrst_fabm
2   !!======================================================================
3   !!                      ***  MODULE trcrst_fabm  ***
4   !! Read and write additional restart fields used by FABM
5   !!======================================================================
6   !! History :   1.0  !  2015-04  (PML) Original code
7   !! History :   1.1  !  2020-06  (PML) Update to FABM 1.0, improved performance
8   !!----------------------------------------------------------------------
9#if defined key_fabm
10   !!----------------------------------------------------------------------
11   !!   'key_fabm'   :                                       FABM model
12   !!----------------------------------------------------------------------
13   !! trc_nam_fabm      : FABM initialisation
14   !!----------------------------------------------------------------------
15   USE oce_trc         ! Ocean variables
16   USE par_trc         ! TOP parameters
17   USE trc             ! TOP variables
18   USE iom
19
20   USE par_fabm
21   USE trcsms_fabm
22   USE st2D_fabm
23
24   IMPLICIT NONE
25   PRIVATE
26
27   PUBLIC   trc_rst_read_fabm   ! called by trcrst.F90 module
28   PUBLIC   trc_rst_wri_fabm    ! called by trcrst.F90 module
29
30   !!----------------------------------------------------------------------
31   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
32   !! $Id$
33   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
34   !!----------------------------------------------------------------------
35
36CONTAINS
37
38   SUBROUTINE trc_rst_read_fabm
39      INTEGER :: jn
40
41      DO jn=1,jp_fabm_surface
42         CALL iom_get( numrtr, jpdom_autoglo, 'fabm_st2Db'//TRIM(model%surface_state_variables(jn)%name), fabm_st2Db(:,:,jn) )
43      END DO
44      DO jn=1,jp_fabm_bottom
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.