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_cfc.F90 in trunk/NEMOGCM/NEMO/TOP_SRC/CFC – NEMO

source: trunk/NEMOGCM/NEMO/TOP_SRC/CFC/trcrst_cfc.F90 @ 2715

Last change on this file since 2715 was 2715, checked in by rblod, 13 years ago

First attempt to put dynamic allocation on the trunk

  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1MODULE trcrst_cfc
2   !!======================================================================
3   !!                       ***  MODULE trcrst_cfc  ***
4   !! TOP :   create, write, read the restart files of CFC tracer
5   !!======================================================================
6   !! History :   1.0  !  2010-01 (C. Ethe) Original
7   !!----------------------------------------------------------------------
8#if defined key_cfc
9   !!----------------------------------------------------------------------
10   !!   'key_cfc'                                               CFC tracers
11   !!----------------------------------------------------------------------
12   !!   trc_rst_read_cfc   : read  restart file
13   !!   trc_rst_wri_cfc    : write restart file
14   !!----------------------------------------------------------------------
15   USE oce_trc         ! Ocean variables
16   USE par_trc         ! TOP parameters
17   USE trc             ! TOP variables
18   USE trcsms_cfc          ! CFC sms trends
19   USE iom
20
21   IMPLICIT NONE
22   PRIVATE
23
24   PUBLIC  trc_rst_read_cfc   ! called by trcini.F90 module
25   PUBLIC  trc_rst_wri_cfc   ! called by trcini.F90 module
26
27CONTAINS
28   
29   SUBROUTINE trc_rst_read_cfc( knum ) 
30      !!----------------------------------------------------------------------
31      !!                     ***  trc_rst_read_cfc  *** 
32      !!
33      !! ** Purpose : Read in restart file specific variables from CFC model
34      !!
35      !!----------------------------------------------------------------------
36      INTEGER, INTENT(in)  :: knum  ! unit of the restart file
37      INTEGER              :: jn    ! dummy loop indices
38      !!----------------------------------------------------------------------
39
40      IF(lwp) WRITE(numout,*)
41      IF(lwp) WRITE(numout,*) ' trc_rst_read_cfc : Read specific variables from CFC model '
42      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
43     
44      DO jn = jp_cfc0, jp_cfc1
45         CALL iom_get( knum, jpdom_autoglo, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jn) ) 
46      END DO
47
48   END SUBROUTINE trc_rst_read_cfc
49
50   SUBROUTINE trc_rst_wri_cfc( kt, kitrst, knum )
51      !!----------------------------------------------------------------------
52      !!                     ***  trc_rst_read_cfc  ***
53      !!
54      !! ** Purpose : Read in restart file specific variables from CFC model
55      !!
56      !!----------------------------------------------------------------------
57      INTEGER, INTENT(in)  :: kt      ! time step
58      INTEGER, INTENT(in)  :: kitrst  ! time step of restart write
59      INTEGER, INTENT(in)  :: knum    ! unit of the restart file
60      INTEGER              :: jn      ! dummy loop indices
61      !!----------------------------------------------------------------------
62
63      IF(lwp) WRITE(numout,*)
64      IF(lwp) WRITE(numout,*) ' trc_rst_wri_cfc : Write specific variables from CFC model '
65      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
66
67      DO jn = jp_cfc0, jp_cfc1
68         CALL iom_rstput( kt, kitrst, knum, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jn) )
69      END DO
70
71   END SUBROUTINE trc_rst_wri_cfc
72
73#else
74   !!----------------------------------------------------------------------
75   !!  Dummy module :                                     No passive tracer
76   !!----------------------------------------------------------------------
77CONTAINS
78   SUBROUTINE trc_rst_read_cfc( knum )
79     INTEGER, INTENT(in)  :: knum
80     WRITE(*,*) 'trc_rst_wri_cfc: You should not have seen this print! error?', knum
81   END SUBROUTINE trc_rst_read_cfc
82
83   SUBROUTINE trc_rst_wri_cfc( kt, kitrst, knum )
84     INTEGER, INTENT(in)  :: kt, kitrst, knum
85     WRITE(*,*) 'trc_rst_wri_cfc: You should not have seen this print! error?', kt, kitrst, knum
86   END SUBROUTINE trc_rst_wri_cfc
87#endif
88
89   !!======================================================================
90END MODULE trcrst_cfc
Note: See TracBrowser for help on using the repository browser.