dxm2d_a_12.f
上传用户:ls4004p
上传日期:2007-08-05
资源大小:2314k
文件大小:2k
- C**********************************************************************
- C D X M 2 D _ A ( adding results to output-field )
- C
- C Joachim Falk , Uni Hamburg , (0049)/(0) - 40 / 4123 5047
- C Institute for Geophysics
- C 11.07.1996
- C email falk@dkrz.de
- C
- C ZA, ZE = first and last grid-row of differentiation
- C SA, SE = first and last grid-column of dIFferentiation
- C**********************************************************************
- SUBROUTINE DXM2D_A(IN,OUT,MF, nx, nz, dx, ZA, ZE, SA, SE)
- IMPLICIT NONE
- INCLUDE 'param.f'
- REAL IN(MAXCOLS,MAXROWS), OUT(MAXCOLS,MAXROWS),
- & MF(MAXCOLS,MAXROWS), G1, G2, G3, G4, G5, G6, F1, dx
- INTEGER nx, nz, r, c, INIT,
- & ZA, ZE, SA, SE
-
- SAVE F1, G1, G2, G3, G4, G5, G6, INIT
- DATA INIT /0/
-
- IF (INIT .eq. 0) THEN
- INIT = 1
- F1 = 1. / dx
- G1 = 1.22133636474609 / dx
- G2 = -0.09693145751953116 / dx
- G3 = 0.01744766235351561 / dx
- G4 = -2.967289515904012E-3 /dx
- G5 = 3.590053982204854E-4 /dx
- G6 = -2.184781161221585E-5 /dx
- ENDIF
- DO r = ZA , ZE
- DO c = SA , SA+5
- OUT(c,r) = MF(c,r)*(OUT(c,r)+F1*(IN(c,r)-IN(c-1,r)))
- ENDDO
- DO c = SA+6 , SE-5
- OUT(c,r) = MF(c,r) * (OUT(c,r) +
- & G1 * (IN(c ,r) - IN(c-1,r)) +
- & G2 * (IN(c+1,r) - IN(c-2,r)) +
- & G3 * (IN(c+2,r) - IN(c-3,r)) +
- & G4 * (IN(c+3,r) - IN(c-4,r)) +
- & G5 * (IN(c+4,r) - IN(c-5,r)) +
- & G6 * (IN(c+5,r) - IN(c-6,r)) )
- ENDDO
- DO c = SE-4 , SE
- OUT(c,r) = MF(c,r)*(OUT(c,r)+F1*(IN(c,r)-IN(c-1,r)))
- ENDDO
- ENDDO
-
- RETURN
- END