1 |
stephd |
1.1 |
C modified for external_forcing_DIC.F August 1999 |
2 |
|
|
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
3 |
|
|
c |
4 |
|
|
c modified swd Oct 01 and Feb 02, for use as package for c40_patch1 |
5 |
|
|
c modified to use with c44 and ptracers: swd May 2002 |
6 |
|
|
c modified to have carbonate and biological influences: swd June 2002 |
7 |
|
|
c modified for cfc: swd Sep 2003 |
8 |
|
|
C |
9 |
|
|
|
10 |
|
|
#include "CPP_OPTIONS.h" |
11 |
|
|
#include "GCHEM_OPTIONS.h" |
12 |
|
|
|
13 |
|
|
CStartOfInterFace |
14 |
|
|
SUBROUTINE CFC12_FORCING( PTR_CFC12, GCFC12, |
15 |
|
|
& bi,bj,imin,imax,jmin,jmax, |
16 |
|
|
& myIter,myTime,myThid) |
17 |
|
|
|
18 |
|
|
C /==========================================================\ |
19 |
|
|
C | SUBROUTINE CFC12_FORCING | |
20 |
|
|
C | o Calculate the changes to CFC12 through air-sea fluxes | |
21 |
|
|
C |==========================================================| |
22 |
|
|
IMPLICIT NONE |
23 |
|
|
|
24 |
|
|
C == GLobal variables == |
25 |
|
|
#include "SIZE.h" |
26 |
|
|
#include "DYNVARS.h" |
27 |
|
|
#include "EEPARAMS.h" |
28 |
|
|
#include "PARAMS.h" |
29 |
|
|
#include "GRID.h" |
30 |
|
|
#include "CFC.h" |
31 |
|
|
|
32 |
|
|
C == Routine arguments == |
33 |
|
|
INTEGER myIter |
34 |
|
|
_RL myTime |
35 |
|
|
INTEGER myThid |
36 |
|
|
_RL PTR_CFC12(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
37 |
|
|
_RL GCFC12(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
38 |
|
|
INTEGER bi, bj, imin, imax, jmin, jmax |
39 |
|
|
|
40 |
|
|
#ifdef ALLOW_PTRACERS |
41 |
|
|
#ifdef ALLOW_CFC |
42 |
|
|
C == Local variables == |
43 |
|
|
_RL SURCFC12(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
44 |
|
|
INTEGER I,J |
45 |
|
|
INTEGER myYear, lastYear, thisYear |
46 |
|
|
_RL dtinc, aWght, bWght |
47 |
|
|
_RL ACFC12north, ACFC12south |
48 |
|
|
_RL maxYear |
49 |
|
|
_RL a1, a2 |
50 |
|
|
|
51 |
|
|
DO j=1-OLy,sNy+OLy |
52 |
|
|
DO i=1-OLx,sNx+OLx |
53 |
|
|
SURCFC12(i,j)=0.d0 |
54 |
|
|
ENDDO |
55 |
|
|
ENDDO |
56 |
|
|
|
57 |
|
|
c find atmospheric CFC |
58 |
|
|
myYear=float(myIter-nIter0)*deltaTclock |
59 |
|
|
& /(360.d0*24.d0*3600.d0) |
60 |
|
|
lastYear=1+int(myYear+0.5) |
61 |
|
|
thisYear=lastYear+1 |
62 |
|
|
maxYear=cfc_yearend-cfc_yearbeg |
63 |
|
|
if (thisYear.lt.maxYear) then |
64 |
|
|
dtinc=myYear-float(lastYear-1) |
65 |
|
|
aWght=0.5d0+dtinc |
66 |
|
|
bWght=1.d0-aWght |
67 |
|
|
c IF (bi*bj.eq.1) |
68 |
|
|
c &write(0,*) 'myYear = ',myYear,lastYear,dtinc,aWght |
69 |
|
|
ACFC12north = ACFC12(lastYear,1)*bWght |
70 |
|
|
& + ACFC12(thisYear,1)*aWght |
71 |
|
|
ACFC12south = ACFC12(lastYear,2)*bWght |
72 |
|
|
& + ACFC12(thisYear,2)*aWght |
73 |
|
|
else |
74 |
|
|
ACFC12north = ACFC12(thisYear,1) |
75 |
|
|
ACFC12south = ACFC12(thisYear,1) |
76 |
|
|
endif |
77 |
|
|
|
78 |
|
|
DO j=1-OLy,sNy+OLy |
79 |
|
|
DO i=1-OLx,sNx+OLx |
80 |
|
|
if ((j.gt.int(sNy/2)+3.and.j.le.sNy).or.j.lt.1) then |
81 |
|
|
ATMOSCFC12(i,j,bi,bj)=ACFC12north |
82 |
|
|
endif |
83 |
|
|
if (j.ge.int(sNy/2)-3.and.j.le.int(sNy/2)+3) then |
84 |
|
|
a1=(float(j-int(sNy/2)+3)+.5)/7 |
85 |
|
|
a2=1.d0-a1 |
86 |
|
|
ATMOSCFC12(i,j,bi,bj)=a1*ACFC12south + |
87 |
|
|
& a2*ACFC12north |
88 |
|
|
endif |
89 |
|
|
if ((j.lt.int(sNy/2)-3.and.j.gt.0).or.j.gt.sNy) then |
90 |
|
|
ATMOSCFC12(i,j,bi,bj)=ACFC12south |
91 |
|
|
endif |
92 |
|
|
ENDDO |
93 |
|
|
ENDDO |
94 |
|
|
|
95 |
|
|
c cfc12 air-sea interaction |
96 |
|
|
CALL CFC12_SURFFORCING( PTR_CFC12, SURCFC12, |
97 |
|
|
& bi,bj,imin,imax,jmin,jmax, |
98 |
|
|
& myIter,myTime,myThid) |
99 |
|
|
|
100 |
|
|
DO j=1-OLy,sNy+OLy |
101 |
|
|
DO i=1-OLx,sNx+OLx |
102 |
|
|
GCFC12(i,j,1)=GCFC12(i,j,1)+SURCFC12(i,j) |
103 |
|
|
ENDDO |
104 |
|
|
ENDDO |
105 |
|
|
|
106 |
|
|
#endif |
107 |
|
|
#endif |
108 |
|
|
|
109 |
|
|
c |
110 |
|
|
RETURN |
111 |
|
|
END |