Index | Rundeck: E6TomaF40 | Created: Fri May 17 03:30:39 EDT 2024 |
PHOTOLYSIS | File: TRCHEM_fastj2.f |
Author :
Version:
Subroutines:
- blkslv
- BLKSLV Solves the block tri-diagonal system:
A(I)*X(I-1) + B(I)*X(I) + C(I)*X(I+1) = H(I)
- cldsrf
- CLDSRF to set cloud and surface properties
- fastj2_drv
- fastj2_drv driver for photolysis. This subroutine needs to be
standalone, any chemical mechanism-related code should be present in
the chemical mechanism files itself, not here.
- flint
- FLINT Three-point linear interpolation function
- gen
- GEN Generates coefficient matrices for the block tri-diagonal
system: A(I)*X(I-1) + B(I)*X(I) + C(I)*X(I+1) = H(I)
- inphot
- inphot initialise photolysis rate data, called directly from the
cinit routine in ASAD. Currently use to read the JPL spectral data
and standard O3 and T profiles and to set the appropriate reaction
index.
- jratet
- JRATET Calculate and print J-values. Note that the loop in
this routine only covers the jpnl levels actually needed by
the CTM.
- jvalue
- JVALUE Calculate the actinic flux at each level for the current
SZA value.
- legnd0
- LEGND0 Calculates ORDINARY LEGENDRE fns of X (real)
from P[0] = PL(1) = 1, P[1] = X, .... P[N-1] = PL(N)
- matin4
- MATIN4 invert 4x4 matrix A(4,4) in place with L-U decomp
(mjp, old...)
- miesct
- MIESCT This is an adaption of the Prather rad transfer code.
see comments.
- opmie
- OPMIE NEW Mie code for Js, only uses 8-term expansion,
4-Gauss pts.
- photoj
- from jv_trop.f: FAST J-Value code, troposphere only (mjprather
6/96). Uses special wavelength quadrature spectral data
(jv_spec.dat) that includes only 289 nm - 800 nm (later a single
205 nm add-on). Uses special compact Mie code based on
Feautrier/Auer/Prather version.
- phtlst
- phtlst read Photolysis Reactions and parameters
- prtatm
- PRTATM Print out the atmosphere and calculate appropriate columns
- radn9stop
- error handling for the netCDF/Fortran interface reads to RADN9 file
- rd_prof
- rd_prof input T & O3 reference profiles
- rd_tjpl
- RD_TJPL Read wavelength bins, solar fluxes, Rayleigh parameters,
T-dependent cross sections and Rayleigh/aerosol scattering phase
functions with temperature dependences. Current data originates
from JPL'97.
- read_fl
- READ_FL Instead of reading the photon fluxes (FL) once from the
SPECFJ file, this now varyies year-to-year as read from FLTRAN ascii
file witih format like that of the SPECFJ file and data which should
be consistent with the radiation code input RADN9 file. Alternately,
will read directly from the RADN9 file if that is netCDF and
contains the needed variable.
- set_jrate_index
- Dynamically assign photolysis rate indices to variables, for use in
chemistry. The reactions are denoted REAC__PROD1_PROD2, and
the reaction type is rj.
- set_prof
- set_prof to set up atmospheric profiles required by Fast-J2 using
a doubled version of the level scheme used in the CTM. First
pressure and z* altitude are defined, then O3 and T are taken
from the supplied climatology and integrated to the CTM levels
(may be overwritten with values directly from the CTM, if desired)
and then aerosol profiles are constructed.
Oliver Wild (04/07/99)
Modifications by Apostolos Voulgarakis (Feb 2010) to take aerosol
tracers from the model into account.
- sphere
- SPHERE Calculation of spherical geometry; derive tangent
heights, slant path lengths and air mass factor for each
layer. Beyond 90 degrees, include treatment of emergent
beam (where tangent height is below altitude J-value desired at).
- xsec1d
- XSEC1D Quantum yields for O3 --> O2 + O(1D) interpolated across
3 temps
- xseco2
- XSECO2 Cross-sections for O2 interpolated across 3 temps; No
S_R Bands yet!
- xseco3
- XSECO3 O3 Cross-sections for all processes interpolated across
3 temps
Global Variables:
- write_parallel : used from domain_decomp_atm
- po2 : used from constant
- o2x : used from rad_com
- njaero : used from rad_com
- j_prnrts :
logical
- for Shindell chemistry debugging
Used by: | :fastj2_init |
- j_jprn :
integer
- for Shindell chemistry debugging
Used by: | :fastj2_init |
- j_iprn :
integer
- for Shindell chemistry debugging
Used by: | :fastj2_init |
- jppj :
integer
- number of chemical reactions in the currently active chemistry
Used by: | :fastj2_init |
- nlbatm :
integer
- Level of lower photolysis boundary - usually surface ('1')
- nw2 :
integer
- beginning, ending wavelength for wavelength "bins"
- nw1 :
integer
- beginning, ending wavelength for wavelength "bins"
- nwww :
integer
- Number of wavelength bins, from NW1:NW2
- naa :
integer
- Number of categories for scattering phase functions
- nss :
integer
- this is a copy of JPPJ that is read in from a file
- npdep :
integer
- Number of pressure dependencies
- nk :
integer
- Number of wavelengths at which functions are supplied
- rad_fl :
integer
- whether(>0) or not(=0) to have fastj photon flux vary
Initial Value= 0
Used by: | :daily_tracer | :laterinittracermetadata |
- jpnl :
integer
- number of photolysis levels
Used by: | :fastj2_init | :masterchem |
- szamax :
integer, parameter
- max Zenith Angle(98 deg at 63 km;99 degrees at 80 km)
Initial Value= 98.d0
Used by: | :masterchem |
- ncfastj2 :
integer
- number of levels in the fastj2 atmosphere
Used by: | :fastj2_init |
- nbfastj :
integer
- number of boundaries for fastj2 (e.g. jpnl+1...)
Used by: | :fastj2_init | :init_rad |
- n__ :
integer, parameter
- Number of levels in Mie grid: 2*(2*lpar+2+jaddto(1))+3
Initial Value= 5400
- m__ :
integer, parameter
- Number of Gauss points used
Initial Value= 4
Used by: | :fastj2_init |
- nfastj :
integer, parameter
- number of quadrature points in OPMIE
Initial Value= 4
- mfastj :
integer, parameter
- lower limit of mfit?
Initial Value= 1
- mfit :
integer, parameter
- expansion of phase function in OPMIE
Initial Value= 2*M__
- nlfastj :
integer, parameter
- maximum number levels after inserting extra Mie levels
Initial Value= 4200
- njval :
integer, parameter
- Number of species for which to calculate J-values
Initial Value= 27
- nwfastj :
integer, parameter
- maximum number of wavelength bins that can be used
Initial Value= 18
Used by: | :fastj2_init |
- np :
integer, parameter
- maximum aerosol phase functions
Initial Value= 60
- n_bnd3 :
integer, parameter
- maximum number of spectral bands 3
Initial Value= 107
- nlevref :
integer, parameter
- number of reference levels for T/O3 profiles
Initial Value= 51
- maxlqq :
integer, parameter
- Initial Value
= 3
- nlgcm :
integer
- is a replacement of LM for the number of layers of the GCM that
Used by: | :fastj2_init |
- title0 :
character(len=78)
- blank title read in I think
- lpdep :
character(len=7), dimension(3)
- Label for pressure dependence
- titlej :
character(len=7), dimension(3, njval)
- titles read from O2, O3, and other species X-sections
- title_aer_pf :
character(len=20), dimension(np)
- titles read from aerosol phase function file
- jndlev :
integer, allocatable, dimension(:)
- Levels at which we want J-values (centre of CTM levels)
Used by: | :fastj2_init |
- aerosols_affect_photolysis :
integer
- Set to 1 to allow fastj to take into account
Initial Value= 1
Used by: | :fastj2_init |
- miedx2 :
integer, allocatable, dimension(:, :)
- choice of aerosol types for fastj2
Used by: | :init_rad |
- aer2 :
real*8, allocatable, dimension(:, :)
- fastj2 aerosol and cloud optical depth profiles. Aerosols are
Used by: | :init_rad |
- jaddlv :
integer, dimension(nlfastj)
- Additional levels associated with each level
- jadsub :
integer, dimension(nlfastj)
- ?
- jaddto :
integer, dimension(nlfastj+1)
- Cumulative total of new levels to be added
- jpdep :
integer, dimension(njval)
- Index of cross sections requiring P dependence
- masfac :
real*8, parameter
- Conversion factor, pressure to column density (fastj2)
Initial Value= 100.d0*6.022d23/28.97d0/9.8d0/10.d0
- odmax :
real*8, parameter
- Maximum allowed optical depth, above which they're scaled
Initial Value= 200.d0
- dtausub :
real*8, parameter
- # optic. depths at top of cloud requiring subdivision
Initial Value= 1.d0
- dtaumax :
real*8, parameter
- max optical depth above which must instert new level
Initial Value= 1.0d0
- dsubdiv :
real*8, parameter
- additional levels in first dtausub of cloud (fastj2)
Initial Value= 1.d1
- zzht :
real*8, parameter
- Scale height above top of atmosphere (cm)
Initial Value= 5.d5
- wtfastj :
real*8, parameter, dimension(m__)
- ?
Initial Value= (/.17392742256873D0, .32607257743127D0,.32607257743127D0,.17392742256873D0/)
- emu :
real*8, parameter, dimension(m__)
- ?
Initial Value= (/.06943184420297D0, .33000947820757D0,.66999052179243D0,.93056815579703D0/)
- sza :
real*8
- the solar zenith angle (degrees)
Used by: | :cloxfam | :masterchem |
- u0 :
real*8
- cosine of the solar zenith angle
- rflect :
real*8
- Surface albedo (Lamertian) in fastj
- zu0 :
real*8
- ?
- zrefl :
real*8
- ?
- zflux :
real*8
- ?
- sf3_fact :
real*8
- used to alter SF3 in time (see comments in master)
Used by: | :masterchem |
- sf2_fact :
real*8
- used to alter SF2 in time (see comments in master)
Used by: | :masterchem |
- bin4_1988 :
real*8
- fastj2 bin#4 photon flux for year 1988
- bin4_1991 :
real*8
- fastj2 bin#4 photon flux for year 1991
- bin5_1988 :
real*8
- fastj2 bin#5 photon flux for year 1988
- u1 :
real*8, dimension(m__, m__)
- ?
- wfastj :
real*8, dimension(m__, m__)
- ?
- sfastj :
real*8, dimension(m__, m__)
- ?
- cc :
real*8, dimension(m__, m__)
- ?
- aafastj :
real*8, dimension(m__, m__)
- ?
- bfastj :
real*8, dimension(m__, m__)
- ?
- v1 :
real*8, dimension(m__)
- ?
- hfastj :
real*8, dimension(m__)
- ?
- c1 :
real*8, dimension(m__)
- ?
- afastj :
real*8, dimension(m__)
- ?
- fjfastj :
real*8, dimension(n__)
- ?
- fz :
real*8, dimension(n__)
- ?
- ztau :
real*8, dimension(n__)
- ?
- dd :
real*8, dimension(m__, m__, n__)
- ?
- pm0 :
real*8, dimension(2*m__)
- ?
- pm :
real*8, dimension(m__, 2*m__)
- ?
- rr2 :
real*8, dimension(m__, n__)
- former RR from fastj ?
- pomega :
real*8, dimension(2*m__, n__)
- Scattering phase function
- pomegaj :
real*8, allocatable, dimension(:, :)
- Scattering phase function. the 2nd dimension on pomegaj
Used by: | :fastj2_init |
- lqq :
integer, dimension(njval-3)
- number of xsections for this specie
- tqq :
real*8, dimension(maxlqq, njval)
- Temperature for supplied cross sections
- qaafastj :
real*8, dimension(4, np)
- Aerosol scattering phase functions
- waafastj :
real*8, dimension(4, np)
- Wavelengths for the NK supplied phase functions
- wl :
real*8, dimension(nwfastj)
- Centres of wavelength bins - 'effective wavelength'
- fl :
real*8, dimension(nwfastj)
- Solar flux incident on top of atmosphere (cm-2.s-1)
- qrayl :
real*8, dimension(nwfastj)
- Rayleigh scattering ?
- qbc :
real*8, dimension(nwfastj)
- Black Carbon abs. extinct. (specific cross-sect.m2/g)
- fl_dummy :
real*8, dimension(nwfastj)
- placeholder for reading FL if rad_FL>0
- flx :
real*8, dimension(nwfastj)
- temp array for varying FL if rad_FL>0
- fl4 :
real*4, dimension(nwfastj)
- single precision for reading e.g. fl array from netcdf
- wbin :
real*8, dimension(nwfastj+1)
- Boundaries of wavelength bins
- qo2 :
real*8, dimension(nwfastj, 3)
- O2 cross-sections
- qo3 :
real*8, dimension(nwfastj, 3)
- O3 cross-sections
- q1d :
real*8, dimension(nwfastj, 3)
- O3 => O(1D) quantum yield
- zpdep :
real*8, dimension(nwfastj, 3)
- Pressure dependencies by wavelength bin
- qqq :
real*8, dimension(nwfastj, maxlqq, njval-3)
- Supplied cross sections in each wavelength bin (cm2),
- fff :
real*8, allocatable, dimension(:, :)
- Actinic flux at each level for each wavelength bin and level
Used by: | :fastj2_init |
- oref2 :
real*8, dimension(nlevref, 18, 12)
- fastj2 O3 reference profile
- tref2 :
real*8, dimension(nlevref, 18, 12)
- fastj2 temperature reference profile
- amf :
real*8, allocatable, dimension(:, :)
- Air mass factor for slab between level and level above
Used by: | :fastj2_init |
- tj2 :
real*8, allocatable, dimension(:)
- Temperature profile on fastj2 photolysis grid
Used by: | :fastj2_init |
- do32 :
real*8, allocatable, dimension(:)
- fastj2 Ozone number density at each pressure level (")
Used by: | :fastj2_init |
- zfastj2 :
real*8, allocatable, dimension(:)
- Altitude of boundaries of model levels (cm) fastj2
Used by: | :fastj2_init |
- dmfastj2 :
real*8, allocatable, dimension(:)
- fastj2 Air column for each model level (molec/cm2)
Used by: | :fastj2_init |
- tfastj :
real*8, allocatable, dimension(:)
- temperature profile sent to FASTJ
Used by: | :fastj2_init |
- odcol :
real*8, allocatable, dimension(:)
- Optical depth at each model level
Used by: | :fastj2_init |
- pfastj2 :
real*8, allocatable, dimension(:)
- pressure at level boundaries, sent to FASTJ2
Used by: | :fastj2_init |
- o3_fastj :
real*8, allocatable, dimension(:)
- ozone sent to fastj
Used by: | :fastj2_init | :masterchem |
- ssa :
real*8, dimension(4, np)
- single scattering albedo ?
- raa :
real*8, dimension(4, np)
- ?
- paa :
real*8, dimension(8, 4, np)
- Scaling for extinctions
- jlabel :
character(len=7), allocatable, dimension(:)
- Reference label identifying appropriate J-value to use
Used by: | :fastj2_init |
- jind :
integer, allocatable, dimension(:)
- mapping index for jvalues
Used by: | :fastj2_init |
- ks :
integer, allocatable, dimension(:)
- name of species that photolyses, as defined in the MOLEC file.
Used by: | :chemstep | :fastj2_init | :printls | :rates | :reactn |
- kss :
integer, allocatable, dimension(:, :)
- same as ks, for photolysis products. The first index denotes the
Used by: | :chemstep | :fastj2_init | :printls | :reactn |
- jfacta :
real*8, allocatable, dimension(:)
- Quantum yield (or multiplication factor) for photolysis
Used by: | :fastj2_init |
- zj :
real*8, allocatable, dimension(:, :)
- photodissociation coefficient (level,reaction)
Used by: | :fastj2_init | :masterchem |
- rj :
type(rj_index)
Used by: | :broxfam | :chemstep | :cloxfam | :hoxfam | :masterchem | :noxfam | :oxfam |