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

source: trunk/NEMO/TOP_SRC/CFC/trcini_cfc.F90 @ 1004

Last change on this file since 1004 was 1004, checked in by cetlod, 16 years ago

Update CFC modules to take into account the re-organization of TOP initialization phase, see ticket 168

File size: 5.8 KB
Line 
1MODULE trcini_cfc
2   !!======================================================================
3   !!                         ***  MODULE trcini_cfc  ***
4   !! TOP :   initialisation of the CFC tracers
5   !!======================================================================
6   !! History :   2.0  !  2007-12  (C. Ethe, G. Madec) from trcini.cfc.h90
7   !!----------------------------------------------------------------------
8#if defined key_cfc
9   !!----------------------------------------------------------------------
10   !!   'key_cfc'                                               CFC tracers
11   !!----------------------------------------------------------------------
12   !! trc_ini_cfc      : CFC model initialisation
13   !!----------------------------------------------------------------------
14   USE oce_trc         ! Ocean variables
15   USE par_trc         ! TOP parameters
16   USE trc             ! TOP variables
17   USE trcsms_cfc          ! CFC sms trends
18
19   IMPLICIT NONE
20   PRIVATE
21
22   PUBLIC   trc_ini_cfc   ! called by trcini.F90 module
23
24   CHARACTER (len=34) ::   clname = 'cfc1112.atm'   ! ???
25
26   INTEGER  ::   inum                   ! unit number
27   REAL(wp) ::   ylats = -10.           ! 10 degrees south
28   REAL(wp) ::   ylatn =  10.           ! 10 degrees north
29
30   !!----------------------------------------------------------------------
31   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007)
32   !! $Id: trcini_cfc.F90 768 2007-12-16 14:46:18Z gm $
33   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
34   !!----------------------------------------------------------------------
35
36CONTAINS
37
38   SUBROUTINE trc_ini_cfc
39      !!----------------------------------------------------------------------
40      !!                     ***  trc_ini_cfc  *** 
41      !!
42      !! ** Purpose :   initialization for cfc model
43      !!
44      !! ** Method  : - Read the namcfc namelist and check the parameter values
45      !!----------------------------------------------------------------------
46      INTEGER  ::   ji, jj, jn, jl, jm
47      REAL(wp) ::   zyy  ,  zyd
48      !!----------------------------------------------------------------------
49
50      IF(lwp) WRITE(numout,*)
51      IF(lwp) WRITE(numout,*) ' trc_ini_cfc: initialisation of CFC chemical model'
52      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~'
53
54
55      ! Initialization of boundaries conditions
56      ! ---------------------------------------
57      qtr   (:,:,:) = 0.e0
58      xphem (:,:)   = 0.e0
59      DO jn = jp_cfc0, jp_cfc1
60         DO jm = 1, jphem
61            DO jl = 1, jpyear
62               p_cfc(jl,jm,jn) = 0.0
63            END DO
64         END DO
65      END DO
66     
67     
68      ! Initialization of qint in case of  no restart
69      !----------------------------------------------
70      IF( .NOT. lrsttr ) THEN   
71         IF(lwp) THEN
72            WRITE(numout,*)
73            WRITE(numout,*) 'Initialization de qint ; No restart : qint equal zero '
74         ENDIF
75         DO jn = jp_cfc0, jp_cfc1
76            trn(:,:,:,jn) = 0.e0
77            qint(:,: ,jn) = 0.e0
78         END DO
79      ENDIF
80
81
82      !   READ CFC partial pressure atmospheric value :
83      !     p11(year,nt) = PCFC11  in northern (1) and southern (2) hemisphere
84      !     p12(year,nt) = PCFC12  in northern (1) and southern (2) hemisphere
85      !--------------------------------------------------------------------
86
87      IF(lwp) WRITE(numout,*) 'read of formatted file cfc1112atm'
88     
89      CALL ctlopn( inum, clname, 'OLD', 'FORMATTED', 'SEQUENTIAL',   &
90         &           1, numout, .FALSE., 1 )
91      REWIND(inum)
92     
93      DO jm = 1, 6        ! Skip over 1st six descriptor lines
94         READ(inum,'(1x)')
95      END DO
96   
97      DO jn = 31, 98      !   Read file
98         READ(inum,*) zyy, p_cfc(jn,1,jp11), p_cfc(jn,1,jp12), &
99            &              p_cfc(jn,2,jp11), p_cfc(jn,2,jp12)
100         WRITE(numout,'(f7.2, 4f8.2)' ) &
101            &         zyy, p_cfc(jn,1,jp11), p_cfc(jn,1,jp12), &
102            &              p_cfc(jn,2,jp11), p_cfc(jn,2,jp12)
103      END DO
104
105      p_cfc(32,1:2,jp11) = 5.e-4      ! modify the values of the first years
106      p_cfc(33,1:2,jp11) = 8.e-4
107      p_cfc(34,1:2,jp11) = 1.e-6
108      p_cfc(35,1:2,jp11) = 2.e-3
109      p_cfc(36,1:2,jp11) = 4.e-3
110      p_cfc(37,1:2,jp11) = 6.e-3
111      p_cfc(38,1:2,jp11) = 8.e-3
112      p_cfc(39,1:2,jp11) = 1.e-2
113     
114      IF(lwp) THEN        ! Control print
115         WRITE(numout,*)
116         WRITE(numout,*) ' Year   p11HN    p11HS    p12HN    p12HS '
117         DO jn = 30, 100
118            WRITE(numout, '( 1I4, 4F9.2)')   &
119               &         jn, p_cfc(jn,1,jp11), p_cfc(jn,2,jp11), &
120               &             p_cfc(jn,1,jp12), p_cfc(jn,2,jp12)
121         END DO
122      ENDIF
123
124
125      ! Interpolation factor of atmospheric partial pressure
126      ! Linear interpolation between 2 hemispheric function of latitud between ylats and ylatn
127      !---------------------------------------------------------------------------------------
128      zyd = ylatn - ylats     
129      DO jj = 1 , jpj
130         DO ji = 1 , jpi
131            IF(     gphit(ji,jj) >= ylatn ) THEN   ;   xphem(ji,jj) = 1.e0
132            ELSEIF( gphit(ji,jj) <= ylats ) THEN   ;   xphem(ji,jj) = 0.e0
133            ELSE                                   ;   xphem(ji,jj) = ( gphit(ji,jj) - ylats) / zyd
134            ENDIF
135         END DO
136      END DO
137      !
138
139      IF(lwp) WRITE(numout,*) 'Initialization of CFC tracers done'
140      IF(lwp) WRITE(numout,*) ' '
141
142   END SUBROUTINE trc_ini_cfc
143   
144#else
145   !!----------------------------------------------------------------------
146   !!   Dummy module                                         No CFC tracers
147   !!----------------------------------------------------------------------
148CONTAINS
149   SUBROUTINE trc_ini_cfc             ! Empty routine
150   END SUBROUTINE trc_ini_cfc
151#endif
152
153   !!======================================================================
154END MODULE trcini_cfc
Note: See TracBrowser for help on using the repository browser.