This photochemical box model is described in Khattatov et al., Assimilation of photochemically active species and a case analysis of UARS data., J. Geophys. Res., 104, 18,715-18,737, 1999. New chemicals and chemical reactions can be easily added to the model without re-coding. The model is written in Fortran 90 and was shown to run under Tru64 Unix (Digital Unix), AIX, IRIS, and Linux. You have to have netCDF library and gmake on your system in order to run it.
Click on the link below to download zip file containing the code and the data.
Code of the main program (box.f90) is shown below:
|
PROGRAM Box USE PhotoChem IMPLICIT NONE REAL(std), ALLOCATABLE, DIMENSION(:) :: CIn REAL(std), ALLOCATABLE, DIMENSION(:,:) :: C2Out REAL(std), ALLOCATABLE, DIMENSION(:) :: T INTEGER :: Year, Day0, Day1, NT REAL(std) :: td0, td1, TimeStep, Temp, z, M, Lat, Lon !******************************************************************* CALL InitChemistry( SetHessian=.False. ) Year = 1993 Day0 = 1 Day1 = 5 td0 = 12.0 td1 = 12.0 Temp = 205.0 z = 20.0 Lat = 40.0 Lon = 0.0 M = 2.05E18 TimeStep = MaxTimeStep/5. ALLOCATE( C2Out(NSpec,MaxStep) ) ALLOCATE( T(MaxStep) ) ALLOCATE( CIn(NSpec) ) CIn = GetConc( ) CALL Integrate( Year, Day0,td0, Day1,td1, TimeStep, CIn, NT, T, C2Out, Update=-1, T=Temp, M=M, Lat=Lat, Lon=Lon, z=z, CompDiss=True, Quiet=False ) CALL SaveConc( 'output.dat', C2Out(:,NT) ) CALL SaveRun( 'run.dat', NT, T, C2Out ) CALL SaveRunCDF('run.nc', Year, Year, Day0, Day1, td0, td1, NT, T, C2Out ) END PROGRAM Box |