22
OPTSIM 1.1 User’s Guide Institut Pierre-Simon Laplace Laboratoire de M´ et´ eorologie Dynamique Youngseob Kim, Stavros Stromatas, Sol` ene Turquety, Laurent Menut www.lmd.polytechnique.fr/optsim Contact: [email protected]

OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

OPTSIM 1.1

User’s Guide

Institut Pierre-Simon LaplaceLaboratoire de Meteorologie Dynamique

Youngseob Kim, Stavros Stromatas,Solene Turquety, Laurent Menut

www.lmd.polytechnique.fr/optsim

Contact: [email protected]

Page 2: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

Contents

1 OPTSIM Overview and last changes 31.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Last changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Installation 4

3 Using OPTSIM 53.1 Preparing Input Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3.1.1 Wavelengths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53.1.2 Aerosol species . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3.2 Preparing the namelist optsim.nml . . . . . . . . . . . . . . . . . . . . . . . . . . 73.3 Lookup table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3.3.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.3.2 Description of the lookup table . . . . . . . . . . . . . . . . . . . . . . . . 93.3.3 Generation the lookup table . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.4 Data extraction for ground stations or along a trajectory of observation . . . . . 123.5 Running the Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4 Checking Results 14

5 Adapting to another CTM 14

6 Source Codes 156.1 OPTAERO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156.2 TRAJECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

A Uncertainties of using LUT on AOD simulation 18

B Download files for a test case 21

2

Page 3: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

1 OPTSIM Overview and last changes

1.1 Overview

OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparisonof aerosol concentration fields simulated by chemistry transport models (CTM) to passive andactive remote sensing observations [Pere et al., 2010; Stromatas et al., 2012]. It calculates aerosoloptical properties (total and fine mode aerosol optical depth (AOD), single scattering albedo,Angstrom exponent, etc.) and lidar observations (Level 1 attenuated backscattered signal, orLevel 2 backscattering or extinction coefficients) at given wavelengths.

OPTSIM has been developed for CTMs using a size distribution of aerosol concentrations.The size distribution is represented by size sections, generally called ‘aerosol bin’. Each bincorresponds to a specific diameter range and the diameters are provided in the simulation resultsof CTMs.

OPTSIM has been optimized to be used with Chimere (http://www.lmd.polytechnique.fr/chimere/), which is a CTM jointly developed by Laboratoire de Meteorologique Dynamique(LMD) and INERIS. However, OPTSIM can be compatible with other CTMs.

OPTSIM consists of a main simulator OPTAERO and a preprocessor TRAJECT whichextracts a subset of the CTM simulation results along an observation trajectory, if required byuser’s applications, as presented in Figure 1. Note that OPTSIM can be used directly on modelsimulation output and the TRAJECT part is only provided for computational efficiency whenonly a subset of times and/or locations need to be considered. The trajectory provided maycorresponds to, for example, satellite track or surface sites coordinates.

Figure 1: Main flowchart of the OPTSIM software

Further details are available in Stromatas et al. [2012]:

Stromatas, S., Turquety, S., Menut, L., Chepfer, H., Pere, J. C., Cesana, G., and Bessagnet,B.: Lidar signal simulation for the evaluation of aerosols in chemistry transport models, Geosci.Model Dev., 5, 1543-1564, doi:10.5194/gmd-5-1543-2012, 2012

The code may be downloaded from the OPTSIM web page: www.lmd.polytechnique.fr/optsim.

3

Page 4: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

1.2 Last changes

OPTSIM 1.1 contains the following improvements compared to previous version (1.0):

• The TRAJECT program is now a subroutine of the main program OPTAERO. It allowseasier input/output interface (unique namelist and run).

• A lookup table can be used in the Mie scattering computation. Using the lookup tableallows to reduce significantly the computation time. Detailed explinations can be foundin Section 3.3 and Appendix A.

• A new algorithm, which is twice faster than the old one, for the Mie scattering computationwas implemented [Mishchenko et al., 2002].

• The Fortran namelist input/output syntax replaces the simple read syntax, which needstext formatted with precision (see Section 3.2).

• The computation of atmospheric visibility (reduced by aerosols) has been added. Thevisibility is computed from the extinction coefficient.

2 Installation

This package may be downloaded using a web browser or directly using the wget command line:

wget www.lmd.polytechnique.fr/optsim/download/optsim.tar

To unpack the archive, type:

tar -xf optsim.tar

A directory called ”OPTSIM-v1.1” is created. Go in this directory and edit the proposedMakefile. OPTSIM has been tested under GNU/Linux. Software required is a Fortran 95compiler and g95 only has been tested. The mandatory library is NetCDF. Only thing that youshould do before the installation is to specify where the headers and libraries of your NetCDFpackage reside in Makefile.hdr.

If the file libnetcdf.a is located at /opt/netcdf-3.5.1-IFORT/lib/libnetcdf.a, thenset NETCDFLIB=/opt/netcdf-3.5.1-IFORT/lib.

If the file netcdf.mod is located at /opt/netcdf-3.5.1-IFORT/include/netcdf.mod, thenset NETCDFINC=/opt/netcdf-3.5.1-IFORT/include.

Note that your NetCDF libraries must have been compiled using the same compiler (hereg95).

For the installation, type the following lines:

cd OPTSIM-v1.1cleancompile

Symbolic link of the executable file optsim.e will be appeared in the current directory.

4

Page 5: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

3 Using OPTSIM

To run a simulation of OPTSIM:

1. Prepare input files:Two input files are required and need to be adapted for each application:

• input-optsim.txt: input data files description (§3.1)

• optsim.nml: simulation namelist (§3.2)

A third input file, station.txt, is necessary if the CTM simulation results are extractedfor ground stations. An example of each file is included in the package.

2. Compile and execute the program using

optsim.e

3.1 Preparing Input Data

3.1.1 Wavelengths

Since the interaction of aerosol with radiation strongly depends on the considered wavelength,OPTSIM has been developed to compute aerosol optical properties and lidar signals at user-defined wavelengths.

The list of the wavelengths used in the simulation should be given in the file input-optsim.txtThe first line in the file is skipped by the program. The wavelengths are given in the second line(in nanometers). Reference wavelengths for the computation of the Angstrom exponent and thecolor ratio also have to be specified. The Angstrom exponent α, which describes the ratio of theaerosol optical thickness at two given wavelengths, is given by

α = −log

τλ1τλ2

log λ1λ2

(1)

where τλ1 is the aerosol optical thickness at λ1 and τλ2 is the aerosol optical thickness at λ2.The color ratio χ, which describes the ratio of backscatter coefficients at two given wave-

lengths, is given by

χ =βλ1

βλ2

(2)

where τλ1 is the backscatter coefficient at λ1 and τλ2 is the backscatter coefficient at λ2.The name of the file is flexible and the right name should be given in a main configuration

of OPTSIM, optsim.nml (see Section 3.2). An example of input-optsim.txt is given below.

# 1st line: number of wavelengths; Next: wavelengths used in calculations (nm)6440 500 532 550 870 1064# Two wavelengths (lambda1, lambda2) to compute Angstrom exponent (lambda2 / lambda1)550 870# Two wavelengths (lambda1, lambda2) to compute lidar color ratio (lambda2 / lambda1)500 870

5

Page 6: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

3.1.2 Aerosol species

Several mixing states can be used in the main configuration (see Section 3.2): a homogeneousmixing and a core-shell mixing.

If the core-shell mixing is used, a couple (or more) aerosol layers are assumed, and aerosolspecies have to be attribute to each layer. The aerosol layers are indicated in next part of thefile input-optsim.txt. The second part of the file contains

• number of aerosol layers

• aerosol species names (used in a simulation for aerosol concentrations with a CTM)

• refractive index

• molar mass

• density

• Hanel size growth coefficient.

The refractive index in opaque media is given as a complex number. Therefore, the real part andimaginary part of the refractive index should be given separately and they should be given foreach user-defined wavelength in the first part above. In OPTSIM, the effect of relative humidityon the size of water-soluble aerosols and, therefore, on the refractive index is accounted for byusing a growth model as described in Hanel [1976].

If the homogeneous mixing is used, you can set the number of aerosol layer to 1.An example of the file is given below. In this example, because you set the first number to

1, the species PPM is supposed to be the core of the aerosol. The following six numbers are thereal parts of the refractive indices depending on the wavelengths (as the number of wavelengths,which has been set to 6 above) and six imaginary parts are followed. The last three numbersare molar mass (g/mol), density (kg/l) and Hanel size growth coefficient.

# layer number, species name, real part of refractive index for the wavelengths, imaginary part, molar mass, density, Hanel size growth coefficient

1 PPM 1.53 1.52 1.52 1.51 1.50 1.50 8.0e-3 8.0e-3 8.0e-3 8.0e-3 8.0e-3 8.0e-3100. 2.3 0. ### density d’Almeida 1991

1 OCAR 1.44 1.45 1.45 1.45 1.46 1.47 1.0e-3 1.0e-3 1.0e-3 1.0e-3 1.0e-3 1.0e-3100. 1.5 0.25 ### krekov 1993, density: Chazette and Liousse for organicmatter

.

.2 WATER 1.35 1.34 1.34 1.33 1.33 1.32 2.0e-9 2.0e-9 1.8e-8 3.4e-8 3.9e-7 1.43e

-6 18. 1.0 0. ### krekov 1993

OPTSIM needs concentrations of the aerosol species with the unit of µg m−3. Because ppbv(part per billion by volume) is used in Chimere for the concentration unit, ppbv is convertedto µg m−3 (see Section 6.1).

6

Page 7: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

3.2 Preparing the namelist optsim.nml

The main configuration is set in the optsim.nml file described below.

&argsdomaintype = 1,calctarget = 2,binsubdiv = 1,mix = 1,nly = 1,inputdir = ‘/directoryname/mydomain/’,inputf = ‘out.20070819_20070823_mydomain.nc’,period = ‘20070820_00-20070820_00’,outputdir = ‘/directoryname/OPTSIM/OUT/Mie_code/’,outputf = ‘LUT_test_lut23.nc’,columnthreshold = 10000.,concmin = 0.001,integ = 1,inputspec = ‘input-optsim.txt’,lut = 1,visib_max = 100./

Detail of each parameter&args: main arguments

• domaintype: it is an integer to select the domain type for the simulation. If you set it to1, the simulation by OPTSIM will be carried out over the whole domain. You can set it to2 when your results of the aerosol simulation are already extracted along an observationtrajectory. It is recommended to check that the netcdf file containing the simulation resultsincludes all the necessary variables depending on the case described in Section 3.5. Youcan set it to 3 when a simulation is performed for some local points. stationfile isneeded.

• calctarget: this is an integer which lets you gain the simulation time depending on yourobjective of the simulation.

– 1: when you need to calculate only AOD. It takes the lowest simulation time

– 2: when you need to calculate the AOD and the lidar signals in Level 1.

• binsubdiv: it is to set the ratio between the numbers of bins. The aerosol size distributioncan be interpolated to a finer resolution to ensure the best integration as possible wherethe aerosol concentration number is optically active. We have tried to set it to between 2and 4.

• mix: it is to select the mixing scenario. As explained in Section 3.1.2, you can select oneof two mixing scenarios: 1 for the homogeneous mixing and 2 for the core-shell mixing.

• nly: it is to set the number of aerosol layers. When you select the homogeneous mixing,it should be set to 1.

• inputdir: absolute path for the directory which contains the input file.

7

Page 8: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

• inputf: file name which contains the input data.

• period: starting hour and ending hour for the OPTSIM simulation. It should be a sub-range of the CTM period.

• outputdir: absolute path for the directory which contains the output file.

• outputf: file name which contains the output data.

• columnthreshold: it is to set the threshold for the column optimization. During a simu-lation, total aerosol mass over a column surface is calculated. If the mass is less than thethreshold, the simulation will be skipped for the corresponding column.

• concmin: it is to set the threshold for the minimum concentration value which allows anoptimization of the simulation. For each grid cell, we check whether the concentrationof an aerosol species in a bin and a layer exceeds the threshold or not. First, if theconcentration in the first bin with the smallest range of aerosol radius is greater than thegiven threshold, minbin is set to 1. Otherwise, minbin increases to take into account onlya part of bins. Then, if the concentration in the last bin with the greatest range of aerosolradius is greater than the given threshold, maxbin is set to the total number of bins (nbin).Otherwise, maxbin decreases to take into account only a part of bins (see Figure 2). TheOPTSIM simulations become faster with this option. In particular, if one is interested ina dense plume and does not wish to carry out the calculations for grid cells with very lowlevel concentrations. If you do not need the optimization, you can set it to 0.

• integ: there are two integration methods to get the lidar signals.

– 1: the integration begins from the top vertical level of simulation to the lowest level.It could be selected for a space lidar.

– 2: the integration begins from a ground to the top vertical level of simulation. Itcould be selected for a ground lidar.

• inputspec: file name for species and wavelength input data. It is detailed in Section 3.1.

• lut: whether OPTSIM will use a lookup table or not. Currently, this option is onlyavailable for the homogeneous mixing (mix=1).

• visib max: this is a real number which defines the maximum initial visibility without itsreduction by aerosols (in km).

3.3 Lookup table

3.3.1 Background

The computation time in the OPTSIM simulation depends on various factors: size of aerosolconcentration data (number of grid cells and period), modeling setup (whole domain or trajectoryonly, number of aerosol bins, core-shell aerosol mixing type or not, number of wavelengths, etc)and, of course, computer performance.

The computation time is mostly consumed in the processing of the Mie scattering compu-tation (more than 95%). Therefore, efforts to reduce the computation time in this processinghave been made in three ways:

• Replace the Mie scattering algorithm with a more efficient algorithm

8

Page 9: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

minbin maxbin

Figure 2: Description of using concmin to reduce the computation time. minbin/maxbin corre-spond to the bin number where the aerosol concentrations are below the given concmin.

• Use a lookup table which contains output data of the Mie scattering algorithm [Tombetteet al., 2008]

• Dichotomy method for a reduced retrieving time of the lookup table

The computation time decreases by about 50 % with the Mishchenko Mie algorithm. Thisdecrease is mainly due to the fact that the number of scattering angles considered to computeaerosol optical properties is lower in the new algorithm than in the old one. The decrease is muchmore significant with the lookup table. The performance of the model with the lookup tablewas evaluated. One-day simulations were done over a regular European domain with/withoutthe lookup table. The computation time with the lookup table reduces by about 150 times.(see Section A). Therefore, using the lookup table is indispensable to reduce substantially thecomputation time and the implementing method of the lookup table into OPTSIM is describedbelow.

3.3.2 Description of the lookup table

The lookup table can be used to replace runtime computation with a simple operation whichretrieves an array. Therefore the runtime computation of the Mie scattering algorithm has beenreplaced with retrieving values from a lookup table. The procedure including the lookup tableretrieval in OPTSIM is described in Figure 3.

The parameters below in the namelist optsim.nml are necessary for the lookup table gener-ator.

&lookuptablelutf = ‘LUT.nc’,nradius = 2400,radmin = 0.001E-6,radmax = 30.E-6,nrerefr = 100,rerefrmin = 1.2,rerefrmax = 2.0,nimrefr = 20,imrefrmin = 1.0E-9,

9

Page 10: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

Figure 3: Lookup table (LUT) making/retrieving procedure in OPTSIM

imrefrmax = 3.0,/

Detail of each parameter&lookuptable

• lutf: file name where the lookup table is written.

• nradius: number of input values for aerosol radius. 2400 is a recommended value for lidarsignal simulation and 100 is recommended for AOD simulation.

• radmin: minimum radius (meter).

• radmax: maximum radius (meter). Recommended value (30.E-6). The computation timecan exponentially increase with a greater radmax.

10

Page 11: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

• nrerefr: number of input values for real part of refractive index. 100 is a recommendedvalue for lidar signal simulation and 20 is recommended for AOD simulation.

• rerefrmin: minimum real part of refractive index.

• rerefrmax: maximum real part of refractive index.

• nimrefr: number of input values for imaginary part of refractive index.

• imrefrmin: minimum imaginary part of refractive index.

• imrefrmax: maximum imaginary part of refractive index. Recommended value (3.0). Agreater value is not allowed in the Mie algorithm because of the memory issue.

3.3.3 Generation the lookup table

There are four input parameters for the Mie algorithm: aerosol radius, real/imaginary parts ofrefractive index and wavelength of light. For each parameter, when the number of the inputdata and two end points are read as given in the namelist (see Section 3.2), the input data at thegiven wavelength are calculated using the arithmetic (real part of refractive index) or logarithmic(radius and imaginary part of refractive index) increase method. Therefore, output data havingfour dimensions are obtained and their lookup tables are written in a netcdf-type file. Theoutput data consist of five variables: extinction/scattering cross section, extinction/scatteringefficiency and backward scattering ratio. The input/output data, which are saved in the netcdffile, are presented in the table below.

Dimensionsnw Dimension for wavelengthnr Dimension for radiusnre Dimension for real part of refractive indexnim Dimension for imaginary part of refractive index

VariablesInput data of the Mie code

w Wavelength (nw)rad Radius (nr)re Real part of refractive index (nre)im Imaginary part of refractive index (nim)

Output data of the Mie codeeff ext Extinction efficiency factor (nr, nim, nre, nw)ext cs Extinction cross section (nr, nim, nre, nw)eff sca Scattering efficiency factor (nr, nim, nre, nw)sca cs Scattering cross section (nr, nim, nre, nw)p pi Backward scattering ratio (nr, nim, nre, nw)

The retrieval time of the lookup table approach decreases if the dichotomy method is usedfor retrieval, instead of a sequential method. In particular, when the resolutions of the inputdata significantly increase, the retrieval time becomes greater. For example, when nr is 10000,and nre and nim are 20, the computation time is lower by four times with the dichotomy methodthan the sequential method.

11

Page 12: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

3.4 Data extraction for ground stations or along a trajectory of observation

In this section, we describe how to use TRAJECT to extract the CTM simulation results for groundstations or along an observation trajectory. The parameters below in the namelist optsim.nmlare necessary for the extraction.

&trajectsensor = 4,switch = 2,trajdir = ’/mydirectory/AERONET_AOD/’,outputfile_traj = ’Traject_output.nc’,stationfile = ’station.txt’/

Detail of each parameter&traject: observation trajectory arguments

• sensor: observation type (1.AERONET AOD, 2.AERONET SDA, 3 AERONET INV2,4.CALIPSO, 5.MODIS, 6.PARASOL). We have tested TRAJECT for four data sets ofobservation: AERONET, CALIPSO, MODIS, and PARASOL. For the AERONET obser-vation, you can find three separated data sets: AOD, SDA, and INV2.

• switch: diurnal switch only for CALIPSO data (1. DAY, 2. NIGHT). CALIPSO trajec-tory data are found in two different files for daytime and nighttime observation.

• trajdir: input directory for the trajectory data. It should be a absolute path for thedirectory containing the trajectory data. The files have to be in ascii and follow a specificformat.

1. The filename must contain the date to extract: example CALIPSO 20080625 night 2.txt.The program will screen all files in the directory and treat those having the date spec-ified in the optsim.nml namelist ascii file.

2. In each ascii trajectory file, the following informations have to be provided, longi-tude, latitude and observation hour in a considered day, respectively.:

3.0917e+01 4.9998e+01 3.3000000e-013.0916e+01 4.9995e+01 3.3000000e-013.0914e+01 4.9992e+01 3.3000000e-013.0913e+01 4.9990e+01 3.3000000e-01...

• outputfile traj: file name where the extracted data are written.

• stationfile: file name where the list of surface coordinates. The extraction can becarried out over the given coordinates in an ascii file, in our example station.txt. Thefollowing informatins have to be provided, name, latitude, and longitude.

# station_name latitude longitudeAbisko 68 18Abracos_Hill -10 -62

12

Page 13: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

ATHENS-NOA 37 23Paris 48 2

Output files of TRAJECT have netcdf format with the name provided in the main configu-ration of TRAJECT. More informations about the output files can be found in Section 3.5.

3.5 Running the Programs

OPTSIM can read only files with the netcdf format. There are some required variables in thenetcdf files to launch OPTSIM. If reading variables fails, the program will stop in giving an errormessage. When your simulation is supposed to be done over a whole domain (see Section 3.2),the required variables are described in the table below.

DimensionsTime Dimension for timeDateStrLen Dimension for date stringwest east Dimension for x-coordinatesouth north Dimension for y-coordinatebottom top Dimension for z-coordinatenumber of cut off diameters Number of aerosol cut-off diameters

Variableslon Longitude (west east, south north)lat Latitude (west east, south north)cut off diameters Cut-off diameters (number of cut off diameters)relh Relative humidity (west east, south north, bottom top, Time)hlay Altitude (west east, south north, bottom top, Time)airm Air density (west east, south north, bottom top, Time)temp Temperature (west east, south north, bottom top, Time)Times Simulation time (DateStrLen, Time)p01DUST∗ Concentration of the aerosol species p01DUST (west east,

south north, bottom top, Time)∗: There should be the concentration data for all species listed in input-optsim.txt.

If you carry out a simulation using an extracted data for surface coordinates or along anobservation trajectory, the output file (outputfile traj) is used instead of the CTM outputfile. The variables have slightly different meaning and described in the below table.

Dimensionswest east Dimension for number of observationsouth north 1nominal time 1

south north and nominal time are unused but necessary to get the same format of theoutput file. It allows not to duplicate similar source files.

13

Page 14: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

4 Checking Results

If your simulation has finished without any error message, a netcdf file containing the simulationresults will be generated in the output directory (path provided in the main configuration fileoptsim.nml).

Typical utilities for netcdf files can be used for the output file:

• ncl script

• ncdump, ncview and chimplot: dataset representation

• nco and cdo: manipulation of files

Variables in output files are described in the table below.

Level 1ATB Total attenuated backscatterATB mol Molecular attenuated backscatterSR Ratio of ATB to ATB molCR Color ratio

Level 2AOD Aerosol optical depth (AOD)FFAOD Fine fraction aerosol optical depthAOD FMF Ratio of FFAOD to AODSSA Single scattering albedoAngstrom Angstrom exponentalpha Extinction Coefficientbeta Scattering CoefficientVisibility Atmospheric visibility

OtherVOL Volume Size DistributionFine bin Bin number to define fine aerosolReff Effective radiusw WavelengthsHeight Center height of vertical layersTimes Simulation hour (in case of a simulation over the whole domain)Hour Observation hour (in case of a simulation over the trajectory )lon Longitudelat Latitude

In Section B, a test case is presented for the first OPTSIM run.

5 Adapting to another CTM

When OPTSIM is used with output of another CTM, some care should be taken.First, OPTSIM recognizes the names of aerosol species provided in input-aero and input-traject

with a prefix pXX. For example, when using DUST in the files, OPTSIM tries to find aerosolspecies of which the names are p01DUST, p02DUST, ..... The numbers following p in the pre-fix mean aerosol bin numbers. If a model with different naming system is used, a source code(read layer properties.F90) should be modified for a succesful reading of input files. The

14

Page 15: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

line below in the source code should be modified as needed.

namecheck=‘p’//binno//trim(aeroname(s))

Second, as mentioned in Section 3.5, the metorological variables are read to compute theaerosol properties. Their names can be different in the another model. In this case, modifi-cations should be done in get model fields.F90 of OPTAERO and get and assign.F90 ofTRAJECT. The text in italic of the line below in the source code should be modified as needed.

ncstat=nf90_inq_varid(ncid_in,‘relh ’,humivarid)

ncstat=nf90_inq_varid(ncid_in,‘hlay ’,hlayvarid)

ncstat=nf90_inq_varid(ncid_in,‘airm ’,airmvarid)

ncstat=nf90_inq_varid(ncid_in,‘temp ’,tempvarid)

6 Source Codes

6.1 OPTAERO

• main/optaero.F90: a main program for OPTAERO.

• main/iteration.F90: time iteration is conducted in this file.

• modules/common model.F90: global variables for reading output of a CTM are declared.

• modules/common optic.F90: global variables for computing aerosol optical properties aredeclared.

• io/alloc model.F90: it allocates variables with respect to CTM output.

• io/alloc optic.F90: it allocates variables with respect to aerosol optical properties.

• io/dealloc input.F90: it deallocates the variables allocated in read layer properties.F90.

• io/dealloc model.F90: it deallocates the variables allocated in alloc model.F90.

• io/dealloc optic.F90: it deallocates the variables allocated in alloc optic.F90.

• io/get model spec.F90: it reads dimensions of the variables in an output file of a CTM.

• io/get model fields.F90: it reads the output of a CTM.

• io/iniread.F90: it reads the namelist optsim.nml.

• io/init model.F90: it initializes CTM output variables.

• io/init optic.F90: it initializes variables for aerosol optical properties.

• io/makedistribf.F90: it makes new aerosol size distribution.

• io/read layer properties.F90: it reads aerosols properties for each layer from input-optsim.txt.

• io/utils.F90: it collects useful functions and subroutines.

15

Page 16: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

• io/write output nc.F90: it writes simulation results in a netcdf file.

• model/check conc.F90: it optimizes a simulation by eliminating columns where maximumvalue of total concentration for all species in a column is less than columnthreshold givenin optsim.nml.

• model/massconv raw.F90: the concentration units, which are read in get model fields.F90or get model fields 3D.F90, are checked in this routine. If the unit is ppbv, there willbe a conversion from ppbv to µg m−3.

• model/interpconc.F90: it interpolates aerosol concentrations on a new discretization.

• model/ipcl.F90: it does log/linear interpolation.

• model/aerovolum.F90: it calculates volume and density of aerosol layers.

• model/optic coreshell.F90: it calculates optical properties using the core-shell mixing.

• model/optic hom.F90: it calculates optical properties using the homogeneous mixing.

• model/aodf.F90: it calculates the aerosol optical depth (AOD). The AOD in a fine modeis calculated as well.

• model/lidar.F90: it calculates lidar calibration constant, backscattering coefficient, ex-tinction coefficient, and optical thickness.

• model/products.F90: it calculates attenuated scattering ratio, color ratio and columnintegration is performed.

• model/make lut nc.F90: it makes a lookup table for the homogenous Mie scatteringvariables.

• model/optic hom lut.F90: it computes aerosols optical properties using an interpolationof values in the lookup table.

• external/DMiLay.f: it computes scattering by a stratified sphere, i.e., the core-shellmixing.

• external/spher.f: it computes scattering by a homegeneous sphere using the Mishchenkocode

6.2 TRAJECT

• main/traject.F90: a main program for TRAJECT.

• modules/common traj.F90: global variables for reading observation trajectory.

• traject/dealloc traj.F90: it deallocates the variables allocated for observation trajec-tory.

• traject/get model spec traj.F90: it reads dimensions of the variables in an output fileof a CTM for the TRAJECT surroutine.

• traject/get station.F90: it is a main program to extract data for the surface stations.

16

Page 17: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

• traject/get and assign.F90: it reads the trajectory informations of the observation andextracts the meteorological data and the concentrations.

• traject/get grid.F90: it finds grid numbers for observation data.

• traject/init traj.F90: it initializes the simulation parameters.

• traject/read obs.F90: it finds input files for observation data.

• traject/read traj.F90: it reads observation coordinate data for a date and extract thedata included in the simulation domain.

• io/write output nc traj.F90: it writes output in a netcdf file.

17

Page 18: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

A Uncertainties of using LUT on AOD simulation

Uncertainties of using LUT in OPTSIM were examined on AOD simulations. Three simulationsof CHIMERE/OPTSIM to compute AOD were performed:

• MIE-calc: the reference simulation in which the Mie scattering variables computed duringthe simulation;

• LUT-100: a simulation in which the Mie scattering variables from a LUT at relatively lowresolution of particle radius and refractive index (see following for detail);

• LUT-2400: a simulation in which the Mie scattering variables from a LUT at high resolu-tion (see following for detail).

The two LUTs are used to further estimate the uncertainties on the LUT approach. Theparameter set with a coarse resolution, LUT-100 in Table A.1, is used for the a first evaluation.

Figure A.1 presents the mean AOD at 532 nm obtained using the MIE-calc simulation andthe difference between the simulations MIE-calc and LUT-100. The mean AOD in the LUT-100 simulation agrees very well with that in the MIE-calc simulation. The mean AOD in theLUT-100 simulation is slightly higher in eastern Europe and lower in the Mediterranean Seaand northern Africa. However, the maximum local difference is less than 1 %.

To examine local and temporal influences of LUT on uncertainties of AOD simulation, theresults with the LUT-100 and MIE-calc simulations were compared at some local sites whichrepresent various locations in the Mediterranean Basin: Blida (Algeria), Lecce and Potenza(Italy), Carpentras (France), Davos (Switzerland), and Granada (Spain).

Figure A.2a shows hourly AOD simulated at 532 nm at the local sites during July 2008. TheLUT-100 and MIE-calc simulations show strongly correlated AOD temporal variations for allexamined sites. High correlation coefficients are obtained (more than 0.99).

For the computation time, the LUT-100 simulation took about 1.5 minutes for one monthsimulation over the local sites excluding data extracting time, 16 minutes in TRAJECT (seeTable A.2). It is 50 times faster than the MIE-calc simulation (73.5 minutes). The benefit fromusing LUT depends also on the number of grid cells in the simulation. The computation speedin the LUT simulation is 10 times faster than that in the Reference simulation for one grid cell.This smaller benefit is due to the higher ratio of the system CPU time to the total elapsed timeduring the simulation. The computaion speed in the LUT-100 simulation becomes 150 timesfaster than the MIE-calc simulation for the domain of 79 × 47.

If OPTSIM is used to compute lidar signals, e.g., attenuated backscattering (ATB) andscattering ratio (SR), more cautions should be needed to define the resolution of the parameters.

Table A.1: Parameters for the generation of LUTLUT-100 for AOD simulation LUT-2400 for lidar signal simulation

nradius 100 2400nrerefr 20 100radmin 0.001E-6 0.001E-6radmax 30.E-6 30.E-6

rerefrmin 1.2 1.2rerefrmax 2.0 2.0nimrefr 20 20imrefrmin 1.0E-9 1.0E-9imrefrmax 3.0 3.0

18

Page 19: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

(a) MIE-calc (b) LUT-100 - MIE-calc (%)

Figure A.1: Mean simulated AOD at 532 nm from July 1 to 5 2008

The local errors in the simulations of ATB and SR can increase to 60 % with the parametersused above. Therefore the resolution of the parameters should be increased to reduce the errorsin the simulations of ATB and SR. A new set of the parameters is given below as an example.

The LUT simulation was repeated using the LUT-2400 parameter set with a fine resolutionin Table A.1 to know their influences on the simulation results including the computation time(named “LUT-2400”). Figure A.2b shows differences of hourly AOD at 532 nm between theLUT-2400 and MIE-calc simulations. The local errors between the MIE-calc and LUT-2400simulations of AOD are significantly reduced (less than 0.01 %) and those of ATB and SR are

(a) LUT-100 (b) LUT-2400

Figure A.2: Local and temporal differences of hourly AOD (a) between the LUT-100 and theMIE-calc simulations and (b) between the LUT-2400 and the MIE-calc simulations. The localsites for the comparison include Blida (2.88 E, 36.51 N), Carpentras (5.06 E, 44.08 N), Davos(9.84 E, 46.81 N), Granada (3.61 W, 37.16 N), Lecce (18.11 E, 40.34 N), and Potenza (15.72E, 40.60 N). AOD is simulated at 532 nm from July 1 to 31 2008

19

Page 20: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

Table A.2: Comparison of the computation time in the MIE-calc, LUT-100, and LUT-2400simulations (unit: minute).

MIE-calc LUT-100 LUT-2400One-month simulation over one local site 12.3* 1.2* 1.2*One-month simulation over 6 local sites 73.5* 1.5* 1.5*

One-day simulation over the whole domain (79 × 47 × 8levels)

1450 9.5 9.5

Generating LUT - 8 1025*: exculding the data extracting time in TRAJECT (6 minutes for one local site and 16 minutesfor 6 local sites).

also reduced to 7 %. The computation times in the LUT-100 and LUT-2400 simulations are notdifferent (see Table A.2). The LUT generation times indicate the differences of the preprocessingtimes in the LUT-100 and LUT-2400 simulations. However they should be excluded in thecomputation times for the simulations.

In conclusion, the uncertainties on AOD modeling do not increase at 532 nm using LUT.Differences between the LUT-100 and the reference MIE-calc simulations are less than 1 % forthe domain-averaged AOD during one week and for the temporal variations over the local sitesduring one month. The computation time is greatly reduced in the LUT simulation. Thereforeusing LUT for AOD modeling with OPTSIM is recommended with the parameters given above asLUT-100. For the lidar signal simulation, using LUT-2400 is strongly recommended instead.The modification of the parameters could significantly influence the model performance andshould be carefully done.

20

Page 21: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

B Download files for a test case

A test case is useful for the first OPTSIM run. To perform this test case, a zip file need to bedownloaded. It can be found on the OPTSIM web site and contains following files:

• optsim.nml: main namelist

• input-optsim-532nm.txt: input file for species.

• results/out.20080701 20080701 HW.nc: Chimere output file.

• results/LUT-532nm-100 20 20.nc: LUT with the resolution of 100 × 20 × 20.

• results/LUT-532nm-2400 100 20.nc: LUT with the resolution of 2400 × 100 × 20.

The chimere output file contains the results for a one-day simulation. Two LUT contains onlythe Mie scattering outputs at 532 nm for the issue of the file size and file reading speed. Thereforethe input file, input-optsim-532nm.txt only includes the input data for 532 nm.

The following steps describe an example of execution.

• Once a working directory is created, the downloaded files should be moved within.

• Then a symbolic link to optsim.e, which should have been compiled, can be made in theworking directory.

• Finally, execute optsim.e

• Output file, optsim 20080701 20080701 HW.nc will be generated.

21

Page 22: OPTSIM 1.1 User’s Guide1 OPTSIM Overview and last changes 1.1 Overview OPTSIM (OPTical properties SIMulation) is a software developed to allow the comparison of aerosol concentration

References

Hanel, G. (1976). The properties of atmospheric aerosol particles as functions of the relative hu-midity at thermodynamic equilibrium with the surrounding moist air. volume 19 of Advancesin Geophysics, pages 73 – 188. Elsevier.

Mishchenko, M. I., Travis, L. D., and Lacis, A. A. (2002). Scattering, Absorption, and Emissionof Light by Small Particles. Cambridge University Press, Cambridge. available at http://www.giss.nasa.gov/~crmim/books.html.

Pere, J., Mallet, M., Pont, V., and Bessagnet, B. (2010). Evaluation of an aerosol optical schemein the chemistry-transport model CHIMERE. Atmospheric Environment, 44(30):3688 – 3699.

Stromatas, S., Turquety, S., Menut, L., Chepfer, H., Pere, J. C., Cesana, G., and Bessagnet, B.(2012). Lidar signal simulation for the evaluation of aerosols in chemistry transport models.Geoscientific Model Development, 5(6):1543–1564.

Tombette, M., Chazette, P., Sportisse, B., and Roustan, Y. (2008). Simulation of aerosol opticalproperties over europe with a 3-d size-resolved aerosol model: comparisons with aeronet data.Atmospheric Chemistry and Physics, 8(23):7115–7132.

22