Files
GEOS-Chem-adjoint-v35-note/code/adjoint/gckpp_adj_Global.f90
2018-08-28 00:33:48 -04:00

129 lines
4.1 KiB
Fortran

! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! Global Data Module File
!
! Generated by KPP-2.2 symbolic chemistry Kinetics PreProcessor
! (http://www.cs.vt.edu/~asandu/Software/KPP)
! KPP is distributed under GPL, the general public licence
! (http://www.gnu.org/copyleft/gpl.html)
! (C) 1995-1997, V. Damian & A. Sandu, CGRER, Univ. Iowa
! (C) 1997-2005, A. Sandu, Michigan Tech, Virginia Tech
! With important contributions from:
! M. Damian, Villanova University, USA
! R. Sander, Max-Planck Institute for Chemistry, Mainz, Germany
!
! File : gckpp_adj_Global.f90
! Time : Tue May 14 19:43:54 2013
! Working directory : /home/daven/kpp-2.2.1/GC_KPP
! Equation file : gckpp_adj.kpp
! Output root filename : gckpp_adj
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MODULE gckpp_adj_Global
USE gckpp_adj_Parameters, ONLY: dp, NSPEC, NVAR, NFIX, NREACT
PUBLIC
SAVE
! Declaration of global variables
! C - Concentration of all species
REAL(kind=dp) :: C(NSPEC)
! VAR - Concentrations of variable species (global)
REAL(kind=dp) :: VAR(NVAR)
! VAR - Concentrations of variable species (global)
REAL(kind=dp) :: VAR_ADJ(NVAR)
! VAR - Concentrations of variable species (global)
REAL(kind=dp) :: V_CSPEC(NVAR)
! VAR - Concentrations of variable species (global)
REAL(kind=dp) :: V_CSPEC_ADJ(NVAR)
! FIX - Concentrations of fixed species (global)
REAL(kind=dp) :: FIX(NFIX)
!! dkh: take this out so that VAR can be threadprivate (dkh, 07/28/09)
! VAR, FIX are chunks of array C
! EQUIVALENCE( C(1),VAR(1) )
! EQUIVALENCE( C(91),FIX(1) )
! RCONST - Rate constants (global)
REAL(kind=dp) :: RCONST(NREACT)
! TIME - Current integration time
REAL(kind=dp) :: TIME
! SUN - Sunlight intensity between [0,1]
REAL(kind=dp) :: SUN
! TEMP - Temperature
REAL(kind=dp) :: TEMP
! RTOLS - (scalar) Relative tolerance
REAL(kind=dp) :: RTOLS
! TSTART - Integration start time
REAL(kind=dp) :: TSTART
! TEND - Integration end time
REAL(kind=dp) :: TEND
! DT - Integration step
REAL(kind=dp) :: DT
! ATOL - Absolute tolerance
REAL(kind=dp) :: ATOL(NVAR)
! RTOL - Relative tolerance
REAL(kind=dp) :: RTOL(NVAR)
! STEPMIN - Lower bound for integration step
REAL(kind=dp) :: STEPMIN
! STEPMAX - Upper bound for integration step
REAL(kind=dp) :: STEPMAX
! CFACTOR - Conversion factor for concentration units
REAL(kind=dp) :: CFACTOR
! DDMTYPE - DDM sensitivity w.r.t.: 0=init.val., 1=params
INTEGER :: DDMTYPE
! INLINED global variable declarations
! Number of cost function being evaluated
INTEGER, PARAMETER :: NJ = 1
! Total number of tropospheric grid cells
INTEGER :: NTT
! Total number of tropospheric grid cells
INTEGER :: JLOOP
! Parameter for insuring positive tracer values, same as in reader.f
REAL*8, PARAMETER :: SMAL2 = 1.0d-99
REAL*8, PARAMETER :: SMALL2 = 1.0d-99
! Modified for reaction rate sensitivity as well as emissions (tww, 05/08/12)
! Number of reaction rate coeff adjoints + O3 dep
INTEGER, PARAMETER :: NCOEFF_EM = 15
INTEGER, PARAMETER :: NCOEFF_RATE = 0 ! Must Match NRRATE - Max 297 (hml, 04/02/13)
INTEGER, PARAMETER :: NCOEFF = NCOEFF_EM + NCOEFF_RATE
! VAR_R_ADJ - Concentrations of reaction rate adjoint (global)
REAL(kind=dp) :: VAR_R_ADJ(NCOEFF)
! Reaction numbers for each (define in INIT_KPP)
INTEGER :: JCOEFF(NCOEFF)
INTEGER :: IND(NREACT)
! INLINED global variable declarations
! Need to declare these THREADPRIVATE for OMP parallelization (dkh, 07/28/09)
!$OMP THREADPRIVATE( JLOOP )
!$OMP THREADPRIVATE( C )
!$OMP THREADPRIVATE( VAR )
!$OMP THREADPRIVATE( VAR_ADJ )
!$OMP THREADPRIVATE( FIX )
!$OMP THREADPRIVATE( V_CSPEC )
!$OMP THREADPRIVATE( V_CSPEC_ADJ )
!$OMP THREADPRIVATE( TIME )
!$OMP THREADPRIVATE( VAR_R_ADJ )
!$OMP THREADPRIVATE( RCONST )
! Move stack_ptr here and make THREADPRIVATE for OMP parallelization (dkh, 07/28/09)
INTEGER :: stack_ptr = 0 ! last written entry
!$OMP THREADPRIVATE( stack_ptr )
INTEGER :: DMAP(NCOEFF)
END MODULE gckpp_adj_Global