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

Annotation of /MITgcm/pkg/cfc/cfc12_forcing.F

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


Revision 1.1 - (hide annotations) (download)
Mon Oct 6 20:03:06 2003 UTC (20 years, 7 months ago) by stephd
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint52l_pre, checkpoint52e_pre, hrcube4, checkpoint52n_post, checkpoint52j_post, checkpoint53d_post, checkpoint54a_pre, checkpoint51o_pre, checkpoint55c_post, checkpoint54e_post, checkpoint52e_post, checkpoint51n_pre, checkpoint54a_post, checkpoint53c_post, checkpoint55d_pre, checkpoint57d_post, checkpoint51l_post, checkpoint57g_post, checkpoint51q_post, checkpoint57b_post, checkpoint57c_pre, checkpoint51j_post, checkpoint55j_post, checkpoint56b_post, hrcube_1, checkpoint57e_post, branch-netcdf, checkpoint52d_pre, checkpoint52l_post, checkpoint55h_post, checkpoint51r_post, checkpoint52k_post, checkpoint52b_pre, checkpoint57g_pre, checkpoint54b_post, checkpoint53b_pre, checkpoint55b_post, checkpoint54d_post, checkpoint56c_post, checkpoint52m_post, checkpoint55, checkpoint53a_post, checkpoint57f_pre, checkpoint57a_post, checkpoint54, checkpoint54f_post, checkpoint53b_post, checkpoint55g_post, checkpoint51o_post, checkpoint51p_post, checkpoint52a_pre, checkpoint55f_post, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, checkpoint51i_post, checkpoint53, checkpoint52, checkpoint51f_post, checkpoint52d_post, eckpoint57e_pre, checkpoint52a_post, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, checkpoint52c_post, checkpoint57f_post, checkpoint51h_pre, checkpoint51l_pre, ecco_c52_e35, hrcube5, checkpoint57c_post, checkpoint55e_post, checkpoint52i_post, checkpoint52j_pre, checkpoint53f_post, checkpoint55a_post, checkpoint51t_post, checkpoint53d_pre, checkpoint54c_post, checkpoint51n_post, checkpoint51i_pre, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, hrcube_2, hrcube_3, checkpoint56a_post, checkpoint51m_post, checkpoint51s_post, checkpoint55d_post
Branch point for: branch-nonh, tg2-branch, checkpoint51n_branch, netcdf-sm0
add CFC's for use with gchem package

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

  ViewVC Help
Powered by ViewVC 1.1.22