Add files via upload

This commit is contained in:
Xuesong (Steve)
2018-08-28 00:46:26 -04:00
committed by GitHub
parent e17feeaad3
commit fa691eb0aa
98 changed files with 54210 additions and 0 deletions

34
code/getifsun.f Normal file
View File

@ -0,0 +1,34 @@
! $Id: getifsun.f,v 1.1 2009/06/09 21:51:53 daven Exp $
INTEGER FUNCTION GETIFSUN(SUNCOS)
! References to F90 modules (bmy, 10/19/00)
USE COMODE_MOD, ONLY : IXSAVE, IYSAVE, JLOP
IMPLICIT NONE
# include "CMN_SIZE"
# include "comode.h"
INTEGER I,J,K,JLOOP,IJWINDOW,IX,IY
REAL*8 SUNCOS(MAXIJ)
C
*** see if photolysis should be considered.
c Get the right index for SUNCOS, which is calculated
c outside of chemistry module.
C (This works for LEMBED= .TRUE. or .FALSE.)
K = 0
DO 240 J = 1, NLAT
DO 230 I = 1, NLONG
JLOOP = JLOP(I,J,1)
IF (JLOOP.EQ.0) GOTO 230
IX=IXSAVE(JLOOP)
IY=IYSAVE(JLOOP)
IJWINDOW = (IY-1)*IIPAR + IX
IF(SUNCOS(IJWINDOW).GT.0.D0) K = 1
230 CONTINUE
240 CONTINUE
GETIFSUN = 2 - K
RETURN
END