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 tags/nemo_v3_2/nemo_v3_2/NEMO/TOP_SRC/CFC – NEMO

source: tags/nemo_v3_2/nemo_v3_2/NEMO/TOP_SRC/CFC/trcini_cfc.F90 @ 1878

Last change on this file since 1878 was 1878, checked in by flavoni, 14 years ago

initial test for nemogcm

File size: 5.7 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   USE in_out_manager  ! I/O manager
19
20   IMPLICIT NONE
21   PRIVATE
22
23   PUBLIC   trc_ini_cfc   ! called by trcini.F90 module
24
25   INTEGER  ::   inum                   ! unit number
26   REAL(wp) ::   ylats = -10.           ! 10 degrees south
27   REAL(wp) ::   ylatn =  10.           ! 10 degrees north
28
29   !!----------------------------------------------------------------------
30   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007)
31   !! $Id: trcini_cfc.F90 1581 2009-08-05 14:53:12Z smasson $
32   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
33   !!----------------------------------------------------------------------
34
35CONTAINS
36
37   SUBROUTINE trc_ini_cfc
38      !!----------------------------------------------------------------------
39      !!                     ***  trc_ini_cfc  *** 
40      !!
41      !! ** Purpose :   initialization for cfc model
42      !!
43      !! ** Method  : - Read the namcfc namelist and check the parameter values
44      !!----------------------------------------------------------------------
45      INTEGER  ::   ji, jj, jn, jl, jm, js
46      REAL(wp) ::   zyy  ,  zyd
47      !!----------------------------------------------------------------------
48
49      IF(lwp) WRITE(numout,*)
50      IF(lwp) WRITE(numout,*) ' trc_ini_cfc: initialisation of CFC chemical model'
51      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~'
52
53
54      ! Initialization of boundaries conditions
55      ! ---------------------------------------
56      xphem (:,:)    = 0.e0
57      DO jl = 1, jp_cfc
58         jn = jp_cfc0 + jl - 1
59         DO jm = 1, jphem
60            DO js = 1, jpyear
61               p_cfc(js,jm,jn) = 0.0
62            END DO
63         END DO
64      END DO
65     
66     
67      ! Initialization of qint in case of  no restart
68      !----------------------------------------------
69      qtr_cfc(:,:,:) = 0.e0
70      IF( .NOT. ln_rsttr ) THEN   
71         IF(lwp) THEN
72            WRITE(numout,*)
73            WRITE(numout,*) 'Initialization de qint ; No restart : qint equal zero '
74         ENDIF
75         DO jl = 1, jp_cfc
76            jn = jp_cfc0 + jl - 1
77            trn     (:,:,:,jn) = 0.e0
78            qint_cfc(:,:  ,jn) = 0.e0
79         END DO
80      ENDIF
81
82
83      !   READ CFC partial pressure atmospheric value :
84      !     p11(year,nt) = PCFC11  in northern (1) and southern (2) hemisphere
85      !     p12(year,nt) = PCFC12  in northern (1) and southern (2) hemisphere
86      !--------------------------------------------------------------------
87
88      IF(lwp) WRITE(numout,*) 'read of formatted file cfc1112atm'
89     
90      CALL ctl_opn( inum, 'cfc1112.atm', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
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,1), p_cfc(jn,1,2), p_cfc(jn,2,1), p_cfc(jn,2,2)
99         WRITE(numout,'(f7.2, 4f8.2)' ) &
100            &         zyy, p_cfc(jn,1,1), p_cfc(jn,1,2), p_cfc(jn,2,1), p_cfc(jn,2,2)
101      END DO
102
103      p_cfc(32,1:2,1) = 5.e-4      ! modify the values of the first years
104      p_cfc(33,1:2,1) = 8.e-4
105      p_cfc(34,1:2,1) = 1.e-6
106      p_cfc(35,1:2,1) = 2.e-3
107      p_cfc(36,1:2,1) = 4.e-3
108      p_cfc(37,1:2,1) = 6.e-3
109      p_cfc(38,1:2,1) = 8.e-3
110      p_cfc(39,1:2,1) = 1.e-2
111     
112      IF(lwp) THEN        ! Control print
113         WRITE(numout,*)
114         WRITE(numout,*) ' Year   p11HN    p11HS    p12HN    p12HS '
115         DO jn = 30, 100
116            WRITE(numout, '( 1I4, 4F9.2)')   &
117               &         jn, p_cfc(jn,1,1), p_cfc(jn,2,1), p_cfc(jn,1,2), p_cfc(jn,2,2)
118         END DO
119      ENDIF
120
121
122      ! Interpolation factor of atmospheric partial pressure
123      ! Linear interpolation between 2 hemispheric function of latitud between ylats and ylatn
124      !---------------------------------------------------------------------------------------
125      zyd = ylatn - ylats     
126      DO jj = 1 , jpj
127         DO ji = 1 , jpi
128            IF(     gphit(ji,jj) >= ylatn ) THEN   ;   xphem(ji,jj) = 1.e0
129            ELSEIF( gphit(ji,jj) <= ylats ) THEN   ;   xphem(ji,jj) = 0.e0
130            ELSE                                   ;   xphem(ji,jj) = ( gphit(ji,jj) - ylats) / zyd
131            ENDIF
132         END DO
133      END DO
134      !
135
136      IF(lwp) WRITE(numout,*) 'Initialization of CFC tracers done'
137      IF(lwp) WRITE(numout,*) ' '
138
139   END SUBROUTINE trc_ini_cfc
140   
141#else
142   !!----------------------------------------------------------------------
143   !!   Dummy module                                         No CFC tracers
144   !!----------------------------------------------------------------------
145CONTAINS
146   SUBROUTINE trc_ini_cfc             ! Empty routine
147   END SUBROUTINE trc_ini_cfc
148#endif
149
150   !!======================================================================
151END MODULE trcini_cfc
Note: See TracBrowser for help on using the repository browser.