1 |
C $Header: $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "GCHEM_OPTIONS.h" |
5 |
|
6 |
CStartOfInterface |
7 |
SUBROUTINE CFC_ATMOS( myThid ) |
8 |
C *==========================================================* |
9 |
C | SUBROUTINE CFC_ATMOS |
10 |
C | o read in timeseries of atmoshperic CFC |
11 |
C *==========================================================* |
12 |
C *==========================================================* |
13 |
IMPLICIT NONE |
14 |
|
15 |
C === Global variables === |
16 |
#include "SIZE.h" |
17 |
#include "EEPARAMS.h" |
18 |
#include "PARAMS.h" |
19 |
#include "CFC.h" |
20 |
|
21 |
C == Routine arguments == |
22 |
C myThid - Number of this instance of CFC_ATMOS |
23 |
INTEGER myThid |
24 |
CEndOfInterface |
25 |
|
26 |
#ifdef ALLOW_CFC |
27 |
|
28 |
C == Local variables == |
29 |
integer nTimePnts, iUnit, it |
30 |
integer i,j,bi,bj |
31 |
_RL year(100) |
32 |
C msgBuf :: message buffer |
33 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
34 |
|
35 |
C jmc: a better place to initialise those arrays would be in GCHEM_INIT_VARI |
36 |
DO bj = myByLo(myThid), myByHi(myThid) |
37 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
38 |
DO j=1-OLy,sNy+OLy |
39 |
DO i=1-OLx,sNx+OLx |
40 |
AtmosCFC11(i,j,bi,bj)=0. _d 0 |
41 |
AtmosCFC12(i,j,bi,bj)=0. _d 0 |
42 |
ENDDO |
43 |
ENDDO |
44 |
ENDDO |
45 |
ENDDO |
46 |
|
47 |
_BEGIN_MASTER( mythid ) |
48 |
|
49 |
WRITE(msgBuf,'(A)') |
50 |
& 'S/R CFC_ATMOS: reading CFC atmospheric data' |
51 |
CALL PRINT_MESSAGE(msgBuf, standardMessageUnit, |
52 |
& SQUEEZE_RIGHT , myThid) |
53 |
|
54 |
C read in CFC atmospheric timeseries data |
55 |
cfc_yearbeg = 31 |
56 |
cfc_yearend = 98 + 1 |
57 |
nTimePnts=cfc_yearend-cfc_yearbeg |
58 |
C assign a free unit number as the I/O channel for this subroutine |
59 |
CALL MDSFINDUNIT( iUnit, mythid ) |
60 |
OPEN(iUnit,FILE='cfc1112.atm',STATUS='old') |
61 |
C skip 6 descriptor lines |
62 |
DO i =1,6 |
63 |
READ(iUnit,*) |
64 |
ENDDO |
65 |
C Read in CFC11 and CFC12, N and S Hemisphere time histories |
66 |
DO it = 1,nTimePnts |
67 |
READ(iUnit,*) year(it),ACFC11(it,1),ACFC12(it,1), |
68 |
& ACFC11(it,2),ACFC12(it,2) |
69 |
WRITE(msgBuf,'(A,4F8.2)') |
70 |
& 'year,acfc11_n,acfc12_n,acfc11_s,acfc12_s =', |
71 |
& ACFC11(it,1),ACFC12(it,1), |
72 |
& ACFC11(it,2),ACFC12(it,2) |
73 |
CALL PRINT_MESSAGE(msgBuf, standardMessageUnit, |
74 |
& SQUEEZE_RIGHT , myThid) |
75 |
|
76 |
ENDDO |
77 |
CLOSE(iUnit) |
78 |
|
79 |
_END_MASTER(myThid) |
80 |
|
81 |
C-- Everyone else must wait for the parameters to be loaded |
82 |
_BARRIER |
83 |
|
84 |
#endif /* ALLOW_CFC */ |
85 |
|
86 |
RETURN |
87 |
END |