/[MITgcm]/MITgcm/pkg/cfc/cfc_atmos.F
ViewVC logotype

Contents of /MITgcm/pkg/cfc/cfc_atmos.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download)
Wed Aug 2 22:51:24 2006 UTC (17 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64h, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint58u_post, checkpoint58w_post, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint58r_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58q_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint59, checkpoint58o_post, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint58y_post, checkpoint58v_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.3: +34 -28 lines
fix multi-threaded mode.

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

  ViewVC Help
Powered by ViewVC 1.1.22