Home

Polyphemus 1.8 User's Guide - GForge

image

Contents

1. Figure 7 2 Concentration map obtained with the command contourf In addition functions stat spatial_distribution and stat time_evolution may be very useful gt gt gt d getd disp cfg gt gt gt print d shape 48 1 46 67 gt gt gt d_max stat spatial_distribution d max Takes time maxima gt gt gt print d_max shape 1 46 67 In every cell function stat spatial_distribution takes the maximum concentration over the time If you want to display the time averages 164 CHAPTER 7 POSTPROCESSING gt gt gt dispcf m stat spatial_distribution d mean 0 Function stat time_evolution computes the time evolution of a spatial indicator For instance gt gt gt d_min stat time_evolution d min Spatial minimum as function of time gt gt gt print d_min shape 48 gt gt gt plot d_min label Spatial minimum gt gt gt plot stat time_evolution d max label Spatial maximum To Get Further Help In IPython command line you can get help this way gt gt gt help plot gt gt gt help stat time_evolution In addition all AtmoPy functions are described in a reference documentation generated with epydoc See AtmoPy web page http cerea enpc fr polyphemus atmopy html Other online resources 1 http diveintopython org learning Python most useful chapters 2 3 4 and 6 2 http docs python org documentations about Python 3 http www sci
2. 7 5 2 Sequential Aggregation 2 2 e 7 6 Liquid Water Content Diagnosis 000022 eens 7 6 1 Configuration File waterplume cig s cc 524 6 ee ee ees A Polair3D Test Case A l Preparing the Test Case 2 2 44 522284 be eee ER Re ae A 2 Verifying the General Configuration File 20004 A 3 Computing Ground Data e A 3 L Land Use Cover 224 5h fees dea a a as A B 2 ROUBIDESS lt ca ee eh ea p i aep ee EE ERE HO A 4 Computing Meteorological Data 0 0 0 0200000002 eee ALS Launching the Simulation ocaso isa dsd a be bbe OES 149 149 149 149 149 149 149 150 150 150 150 150 150 153 153 155 156 157 157 157 159 161 164 164 165 166 166 166 166 167 167 167 168 168 170 170 172 173 174 A 5 1 Modifying the Configuration File A 5 2 Modifying the Data File A 5 3 Modifying Saver File ASA Simulation so oo wees eR wR wk ee Rede A 5 5 Checking your results 0000 ee eae A 6 Visualizing Results o 00200204 A 6 1 Modifying Configuration File A 6 2 Using IPytho n cairo 44 24 koima 4 eo Es Gaussian Test Case BA Preprocessing oee a arai pa ba KELE a ee eae B 2 Disgretizati N secs sea a ae a Qe Se a A a a a A Do SIMU ISHORS 410 e se how oaa dr A a A Bes o A beowh t hw hee ee eee we Ee B 3 2 Puff with Aerosol Species 202 B33 Pitt with
3. Elementwise multiplication 22 6488311576 gt gt gt print d 10 25 d_ref 10 25 min Selected time steps 78 5329427719 gt gt gt print d 0 23 34 d_ref 0 23 34 max Selected cell in the middle of the domain 1 01527786255 Python Commands Visualization Using AtmoPy gt gt gt from atmopy import Loads AtmoPy gt gt gt from atmopy display import Loads AtmoPy submodule display gt gt gt from pylab import Matplotlib is needed for figure and plot gt gt gt d getd disp cfg d is a 4D array 7 1 GRAPHICAL OUTPUT 163 gt gt gt m getm disp cfg Loads the background map an empty figure should pop up gt gt gt disp m d 2 0 Displays data at the third time step and first level gt gt gt disp m d 2 1 Next vertical level gt gt gt figure Another figure gt gt gt disp m d 0 0 vmin 0 vmax 200 Data range for the color bar gt gt gt dispcf m d 10 0 With contours gt gt gt dispcf m d 10 0 V 10 With ten contours gt gt gt dispcf m d 10 0 V 0 50 100 150 200 Sets the contours gt gt gt disp m d 10 0 interpolation nearest No interpolation Figure 7 1 shows the result of dispcf with 25 contours Without disp or dispcf in case there is no background map e g at small scale gt gt gt contourf d 10 0 gt gt gt colorbar Figure 7 2 illustrates contourf 0 56
4. blank line blank line input blank line x_min 12 5 Delta_x 0 5 Nx 100 output x_min 12 5 Delta_x 0 5 Nx 100 D 6 Multiple Files Several Polyphemus programs accept two configuration files as input Providing two config uration files is then equivalent to providing a single configuration file that would contain all the lines of both files This is useful to let several programs share a same configuration base For instance the simulation domain whose description is needed by most programs is usually defined in a configuration file that is provided to every program in addition to a file dedicated to the specific configuration of the program For instance emissions general cfg emissions cfg 2001 05 06 launches the program emissions with two configuration files as input 1 the configuration file general cfg shared with other programs and notably defining the domain description 2 a specific configuration file emissions cfg that includes options for emission generation Markups defined in one configuration file can be used in the other file Note however that each section must be defined in one file only D 7 Dates Date formats are YYYY Year YYYY MM With the month YYYY MM DD With the day YYYY MM DD_HH With the hour YYYY MM DD_HH 11 With the minute YYYY MM DD_HH II SS With the second D 8 BOOLEANS 203 Months range from 01 to 12 Days range from 01 to 31 Hours range
5. ExponentiatedGradientDiscounted ExponentiatedGradientAdaptive Prod GradientDescent RidgeRegression and RidgeRegressionDiscounted and RidgeRegressionWindow Mixture Polynomial PolynomialGradient FixedShare FixedShareGradient VariableShareGradient OnlineNewtonStep InternalZink InternalPolynomialGradient InternalExponentiatedGradientDiscounted DynamicLinearRegression Also have a look at the example codes example py oracle py and number_models py 7 6 Liquid Water Content Diagnosis The post processing program postprocessing water_plume water_plume cpp uses meteoro logical data and a concentration field of water liquid and vapor and diagnoses the proportion of liquid water It is launched with two configuration files water_plume cfg and general cfg which can be merged into a single configuration file and a date 174 CHAPTER 7 POSTPROCESSING 7 6 1 Configuration File water_plume cfg simulation Date Simulation first day Delta t Simulation time step in hours PlumeWater File containing the simulation results total water concentration Factor Conversion factor to be applied to the water concentration field to convert it into gm7 meteo Path Path to the meteorological data files Temperature Temperature file Pressure Pressure file SpecificHumidity Specific humidity file LiquidWaterContent Liquid water content file parameters source temperature Liquid water potential tempera
6. Use equal sign between a field and its value if the value is a number Vat and use semi colon if the value is a string Example x_min 12 5 Output_directory home user path D 3 Comments Comment lines may be added They start with or with Path where results are written Output_directory home user path They may also be put at the end of a line Output_directory home user path Path where results are written Recommandation Prefer for comments so as to be consistent with Polyphemus default configuration files D 4 MARKUPS 201 D 4 Markups In order to avoid duplications in a configuration file Polyphemus features a markup management A markup is denoted with surrounding lt and gt e g lt path gt A markup is automatically replaced with its value whenever it is found Its value should be provided somewhere in the configuration file with a proper field for instance lt path gt refers to the field path Here is a complete example Root home user Input_directory lt Root gt input Output_directory lt Root gt output means Input_directory home user input Output_directory home user output The markup can be used before its value is defined Input_directory lt Root gt input Output_directory lt Root gt output Root home user After calls to lt Root gt This is legal Any field may be used as a markup The user may defin
7. wget http euler 1md polytechnique fr chimere downloads MMOUT_EUR2_20030730_20030803 gz gunzip MMOUT_EUR2_20030730_20030803 gz After you have done so execute MM5 meteo castor to process the MM5 file you have down loaded Polyphemus preprocessing meteo MM5 meteo castor config general cfg A config MM5 meteo castor cfg 2003 07 30 5d2h The output on screen will be Reading configuration done Memory allocation for grids done Memory allocation for output data fields done Conversion from sigma levels to altitudes done Converting from latlon to MM5 indices done Computing pressure done Computing surface pressure done Wind rotation done Horizontal interpolations done Vertical diffusion done Computing attenuation done Vertical averages done Writing data done This creates 18 binary files in data meteo C 2 COMPUTING INPUT DATA 193 C 2 3 Anthropogenic Emissions We generate anthropogenic emissions using emission data from Chimere test case Download the raw data from Chimere website in the section with old version of the code and old data and put it in raw_data cd raw_data wget http euler 1md polytechnique fr chimere downloads AemiCONT3 200311 tar gz tar xzvf AemiCONT3 200311 tar gz This creates a directory raw_data AemiCONT3 200311 Launch the generation of emissions with the following command line Polyphemus utils call_dates Polyphemus pre
8. 157 158 CHAPTER 7 POSTPROCESSING But other interactive backends are fine If you have any question about the backends consult Matplotlib website Now we test the installation Launch Python and In 1 from pylab import In 2 plot 5 8 On screen you should get a new window a figure with a line first diagonal from 0 5 to 1 8 And the prompt should still be available In 3 Make another plot In 3 plotC 6 7 You should get a new line in green probably The prompt should still be there In 4 Basemap Basemap extends Matplotlib so that one may display fields with a map in the background World map Europe map If your version of Matplotlib is posterior to 0 98 you can test your Basemap installation with gt gt gt from pylab import gt gt gt from mpl_toolkits basemap import Basemap gt gt gt m Basemap projection cyl gt gt gt m drawcountries gt gt gt m drawcoastlines gt gt gt draw This should show a World map With a Matplotlib s version prior to 0 98 you should replace the second line with gt gt gt from matplotlib toolkits basemap import Basemap Other examples are available on Matplotlib website AtmoPy Recall that extract_configuration cpp must be compiled in atmopy talos see Section 1 3 Then make sure that Python will be able to find the AtmoPy directory in order to load it In the distribution AtmoPy is in direct
9. 18000 15000 12000 9000 6000 3000 b Ground concentration at t 3 s r r r 5600 4800 4000 3200 2400 1600 800 10 20 30 40 50 9 0 u d Ground concentration at t 8 s 10 30 50 and 79 Second meteorological Appendix C Castor Test Case The goal of the following test case is to reproduce Chimere test case for the 2003 Heat Wave in Europe You must have already downloaded and installed Polyphemus to have this test case working First you need to download TestCase 1 2 Castor tar bz2 which also works with version 1 8 1 of Polyphemus from the website To uncompress this file execute the following command tar xjvf TestCase 1 2 Castor tar bz2 This create a directory TestCase Castor containing e a directory raw_data with data necessary for preprocessing e a directory data for the results of preprocessing e a directory config with all configuration files used e a directory results where the results are stored e a program called sum emissions py and its configuration file sum emissions cfg used to sum biogenic and anthropogenic emissions e a file version stating for what version of Polyphemus the test case was made The test case also requires data from Chimere test case e the meteorological file http euler 1md polytechnique fr chimere downloads MMOUT_ EUR2_20030730_20030803 gz e the emission data http euler 1md polytechnique fr chimere downloads
10. 2 Anthropogenic Emissions EMEP emissions Program emissions processes an EMEP emission inventory and generates anthropogenic sur face and volume emissions needed by Castor or Polair3D First you must download the emissions used in EMEP models from http www ceip at emission data webdab emissions used in emep models Download emissions for CO NH3 NMVOC NOx SOx PM2 5 and PMcoarse and make sure to have a file for each pollutant 80 CHAPTER 3 PREPROCESSING called CO dat NH3 dat NMVOC dat NOX dat SOX dat PM2 5 dat and PMcoarse dat Download the files with the following options e for all countries ALL e for the year of your choice e for all activity sectors SNAP All Sectors note that emissions for the eleventh sec tor will be ignored by emissions they are better estimated with program bio see Section 3 6 3 e a single pollutant you must download the emissions for one pollutant at a time so that you should have one file for each pollutant CO dat NH3 dat e in format Grid 50 km x 50 km Semicolon Separated e whatever for entries HTML Table x Axis and HTML Table y Axis e with the footnotes recommended but not mandatory Then click on Show Data and save the data in the right file NOX dat SOX dat The EMEP website is subject to changes so if the explanations provided above are not consistent with EMEP website you may contact Polyp
11. Polyphemus utils gt call_dates Script call_dates calls a program over a range of dates Usage call_dates program arguments first date second date number of days Arguments program program to be launched over the range of dates arguments arguments Any occurence of D is replaced with the date otherwise the date is assumed to be the last argument first date first date of the range of dates second date number of days last date of the range of dates or number of days of this range Below is an example Polyphemus utils gt call_dates echo Current date 20060720 20060722 nice time echo Current date 20060720 Current date 20060720 0 00user 0 00system 0 00 00elapsed 0 CPU Oavgtext 0avgdata Omaxresident k Oinputs 0outputs Omajor 176minor pagefaults Oswaps 2 8 USEFUL TOOLS 49 nice time echo Current date 20060721 Current date 20060721 0 00user 0 00system 0 00 00elapsed OZ CPU Oavgtext 0avgdata Omaxresident k Oinputs 0outputs Omajor 177minor pagefaults Oswaps nice time echo Current date 20060722 Current date 20060722 0 00user 0 00system 0 00 00elapsed 200 CPU Oavgtext 0avgdata Omaxresident k Oinputs 0outputs Omajor 177minor pagefaults Oswaps For each day the command that is launched is shown note that nice time has been prepended and its output is displayed below Please note that call_dates can only process dates given in the format YY Y YMMDD and not any of the other form
12. Seinfeld J H Griffin R J and Pandis S N 2003 Uncertainties in modeling secondary organic aerosols Three dimensional modeling studies in Nashville Western Tennessee Environmental Science amp Technology 37 16 3 647 3 661 Rosenbrock H H 1963 Some general implicit processes for the numerical solution of differ ential equations The Computer Journal 5 329 330 Simpson D Winiwarter W Borjesson G Cinderby S Ferreiro A Guenther A Hewitt C N Janson R Khalil M A K Owen S Pierce T E Puxbaum H Shearer M Skiba U Steinbrecher R Tarras n L and quist M G 1999 Inventorying emissions from nature in Europe Journal of Geophysical Research 104 D7 8 113 8 152 Smith M and Harrison N 1998 The sea spray generation function Journal of Aerosol Science 29 189 190 Stockwell W R Kirchner F Kuhn M and Seefeld S 1997 A new mechanism for regional atmospheric chemistry modeling Journal of Geophysical Research 102 D22 25 847 25 879 Tombette M Chazette P and Sportisse B 2008 Simulation of aerosol optical properties over Europe with a 3 D size resolved aerosol model comparisons with AERONET data Atmospheric Chemistry and Physics Discussions 8 1 321 1 365 Troen I and Mahrt L 1986 A simple model of the atmospheric boundary layer sensitivity to surface evaporation Boundary Layer Meteorology 37 129 148 Vehkamaki H Kulmala M Napar
13. 14a ka portas sn 5 1 5 Meteorological data file gauussian meteo dat 5 1 6 Correction coefficients file correction_coefficients dat 52 a ssianPlumeACE sia aa a a a a ee a 321 Configuration File PIE eE cfg ecce vroce ae ca a 5 2 2 Source Description plume source aer dat o oo a a 5 2 3 Vertical Levels plume level dat aaau o 5 2 4 Species gaussian species aer dat s s s 62546 be ek eee eR ka 5 2 5 Diameters diameter dat o sacc pa map E a Rae p i a p h a 5 2 6 Meteorological data gaussian meteo dat o o A Li i Go ee eo Boe Ak mn Gos Sow A ae BO eee oe Bal we He amp a 103 103 103 103 104 105 105 106 106 107 107 107 108 109 109 110 110 110 110 111 112 112 112 113 113 115 115 116 117 117 117 118 5 4 5 9 5 6 5 7 5 8 5 9 5 10 ad 5 12 5 13 5 14 5 15 CONTENTS 5 3 1 Configuration File purr che ooo ds Sa SH 8 124 5 3 2 Puff Description pufi dat o co ce so massed aatem be ee ye es 126 5 3 3 Vertical Levels Species and Meteorological data 126 Gaussian Pull ger a soror a arets komsi sa do eTa opis wha d Eee a amp be es 127 5 4 1 Configuration File puff aer cfg 64 60a Gea ee wR RO 127 5 1 2 Source Description pufi aer dat cio cerro Ba ee as 127 5 4 3 Vertical Levels Species Meteo and Diameters 127 Polar al Trams port er iodo ee le Be Ae Oa a a a a E aA 128 5 5 1 Main
14. First go to the optics directory For instance if you installed Polyphemus in a directory named Polyphemus you may type cd Polyphemus postprocessing optics Here are the files Optics cxx optics cpp optics cfg SConstruct makefile and the input directory This code uses data from the OPAC package Hess et al 1998 for the indices of species at several wavelengths and tabulations of extinction and absorption efficiencies obtained from the Mie code of W J Wiscombe Wiscombe 1980 7 4 1 OPAC Package The first step is to get the OPAC package Download the package in the tar file opac31a tar gz in the input directory from the web address ftp ftp 1rz muenchen de pub science meteorology aerosol opac index html Untar the file by making cd input tar xzvf opac3la tar gz There are two directories resulting from this command opac31 and optdat Only the files in optdat will be used As the lines in these files all begin with a that Polyphemus does not read you have to remove all by making 168 CHAPTER 7 POSTPROCESSING cd optdat utils replace_string gt 7 4 2 Tabulation of a Mie Code The next step is to tabulate the Mie Code First you will have to download the routines of the Mie Code Type cd include mkdir mie_code_wiscombe cd mie_code_wiscombe Then download the files ErrPack f MIEVO f and RDI1MACHmodule F90 from ftp climatel gsfc nasa gov wiscombe Single_Scat
15. If this option is not ac tivated it is assumed that p is constant and therefore disappears from the previous equations Are initial conditions provided for given species If not initial concentrations are set to zero Are boundary conditions available for given species Is dry deposition taken into account 5 5 POLAIR3DTRANSPORT With_point_emission With surface emission With_additional_surface_emission With volume emission Scavenging model Collect_dry_flux Collect_wet_flux Data_description Horizontal_diffusion Isotropic_diffusion Configuration file 129 Are point emissions provided Are emissions at ground provided Are additional emissions at ground provided Are volume emissions provided Which scavenging model is applied If none the scav enging is not taken into account Otherwise the fol lowing model is applied constant for constant scav enging coefficient belot for the Belot model of the form apo where po is the rain intensity in mmh or microphysical for the scavenging model based on mi crophysical properties of species Are the dry deposition fluxes collected in order to post process them if dry deposition is taken into account Are the wet deposition fluxes collected in order to post process them if wet deposition is taken into account data Path to the configuration file that describes input data Horizontal diffusion coefficient in m s If activated horizontal diffu
16. In addition to the domain definition Section 3 2 2 below is the information required in the configuration for ic see example ic cfg Date_ic Nt Delta t Nx Ny Nz Database_ic Chemical_mechanism Species Molecular_weights Directory_ic ic_input_domain Date for which initial conditions are generated Number of time steps in Mozart 2 files integer Time step of Mozart 2 files in hours Number of grid points along latitude in Mozart 2 files integer Number of grid points along longitude in Mozart 2 files integer Number of vertical levels in Mozart 2 files integer Directory where the Mozart 2 files are available Mozart 2 file names are in form h00xx nc where xx is computed by the program according to the date Date_ic ic_files Chemical mechanism used in your simulation File providing correspondence between the name of species in Mozart 2 files and the name of species in simulation In this file the first column contains Mozart 2 species After each Mozart 2 species name the corresponding output species e g RACM species is put if any If Mozart 2 species gathers two output species put the names of all output species followed by their proportion in Mozart 2 bulk species For instance the line C4H10 HC5 0 4 HC8 0 6 splits Mozart 2 species C4H10 into HC5 40 and HC8 60 Three examples are provided preprocessing bc species_racm dat species_racm2 dat and species_cb05 dat Two other examples are
17. It cannot be more If you want to load all available steps put 0 Nt will be deduced from the file size and other dimensions Nx Ny and Nz If you do so please check the number of steps that are actually read by AtmoPy if the number of steps is surprising check Nx Ny and Nz in your configuration file Abscissa longitude of the center of the lower left cell It is primarily used to load a background map in figures Space step along x longitude It is primarily used to load a background map in figures Number of cells along zx Ordinate latitude of the center of the lower left cell It is primarily used to load a background map in figures Space step along y latitude It is primarily used to load a background map in figures Number of cells along y Number of vertical layers Path to the binary file containing the data Here is an example of such a configuration file where the data to be read is in results 03 bin e g ozone at ground level input Nt 121 x_min y_min Nz 1 10 0 Delta_x 0 5 Nx 67 Delta_y 0 5 Ny 46 file results 03 bin 162 CHAPTER 7 POSTPROCESSING Note that general cfg polair3d cfg contain similar entries You may simply copy and paste these entries The number of time steps and vertical layers might be different For instance polair3d cfg contains the number of model layers not necessary the number of levels in the target file Python Commands Loading and Processing
18. Source_type Source type puff or continuous If the type is puff section puff source is read Section plume source is used when Rate Source rate per unit of length in mass s m of the line source The associated data file reference line emission dat contains the coordinates of line sources to be discretized Each line corresponds to one segment defined by its extremity points The data file contains eight columns corresponding to the data for each of the two extremity points nodes of a segment for each node a unique identifying number integer is given as well as three cartesian coordinates meters Thus the columns are labeled Id1 X1 Y1 Z1 first node and Id2 X2 Y2 Z2 second node If several segments share the same node the same index has to be given to the node every time it appears in the file so that it can be easily identified and taken into account only once by the program This is an example of data file defining a straight line emission Id1 X1 m Y1 m Z1 m Id2 X2 m Y2 m Z2 m 1 100 90 1 2 100 110 1 Alternatively the line source file can define one continuous line made of segments broken line In this case each line contains the coordinates of the broken line nodes X Y Z in meters 3 9 PREPROCESSING FOR GAUSSIAN MODELS 93 and the line extremities are given by the first and last nodes in the file The file must contain at least the coordinates of two points There is no identifyin
19. TERRAIN PROGRAM VERSION NUMBER 6 TERRAIN PROGRAM MINOR REVISION NUMBER O COARSE DOMAIN GRID DIMENSION IN 1 N S DIRECTION 76 COARSE DOMAIN GRID DIMENSION IN J E W DIRECTION 86 MAP PROJECTION 1 LAMBERT CONFORMAL 2 POLAR STEREOGRAPHIC 3 MERCATOR 1 IS COARSE DOMAIN EXPANDED 1 YES 0 NO O EXPANDED COARSE DOMAIN GRID DIMENSION IN I DIRECTION 76 EXPANDED COARSE DOMAIN GRID DIMENSION IN J DIRECTION 86 GRID OFFSET IN I DIR DUE TO COARSE GRID EXPANSION O GRID OFFSET IN J DIR DUE TO COARSE GRID EXPANSION O DOMAIN 1D 1 MOTHER DOMAIN ID 1 NEST LEVEL 0 COARSE MESH O DOMAIN GRID DIMENSION IN I DIRECTION 76 DOMAIN GRID DIMENSION IN J DIRECTION 86 I LOCATION IN THE MOTHER DOMAIN OF THE DOMAIN POINT 1 1 1 J LOCATION IN THE MOTHER DOMAIN OF THE DOMAIN POINT 1 1 1 DOMAIN GRID SIZE RATIO WITH RESPECT TO COARSE DOMAIN 1 1 REGRID Version 3 MM5 System Format Edition Number 2 REGRID Program Version Number 16 REGRID Program Minor Revision Number 1 COARSE DOMAIN GRID DISTANCE m 36000 COARSE DOMAIN CENTER LATITUDE degree 47 COARSE DOMAIN CENTER LONGITUDE degree 6 CONE FACTOR 0 715567 TRUE LATITUDE 1 degree 60 TRUE LATITUDE 2 degree 30 POLE POSITION IN DEGREE LATITUDE 90 APPROX EXPANSION m 360000 GRID DISTANCE m OF THIS DOMAIN 36000 I LOCATION IN THE COARSE DOMAIN OF THE DOMAIN POINT 1 1 1 J LOCATION IN THE COARSE DOMAIN OF THE DOMAIN POINT 1 1 1 I LOCATION IN THE COAR
20. The units of input data e g initial condition boundary condition etc should be given as ug m in using ChemistryRADM module 6 2 3 ChemistryCastor Module ChemistryCastor is the default chemical module for Castor It involves 44 species and 118 reactions It is based on several data files which must be provided Reaction_file Stoichiometry file Photolysis file and Rate file 6 2 4 Decay This chemistry module is used for species gaseous or particulate which have a radioactive or biological decay that is to say a natural decrease in their concentrations over time It requires two more options in the configuration file polair3d cfg options With_time_dependence If set to yes the value of the half life time for each species depend on the time of the day 6 2 CHEMISTRY MODULES 151 With_filiation_matrix If set to yes decay and filiation are represented by a matrix Note that With_time_dependence and With filiation matrix cannot be both set to yes at the same time Use of One Value of Decay The first possibility is that each species has a half life time which is given in species dat In that case With_time_dependence and With filiation matrix are both set to no The variation of concentration due to decay only is described in equation 6 1 where Tijo is the species half life time in days and fo is a reference time If a species has no decay its half life time is set to 0 and this is interpreted by Decay as the fact
21. bc_input_domain x_min Minimum longitude in Gocart resolution y min Minimum latitude in Gocart resolution Delta_x Gocart longitude resolution Delta y Gocart latitude resolution Nx Number of grid cells in the longitude Gocart axe Ny Number of grid cells in the latitude Gocart axe Nz Number of Gocart vertical layers Sigma_levels File where are written the center of Gocart sigma levels Scale height Scale height in meter Surface _pressure Surface pressure in atm Top pressure Pressure at top of Gocart level in atm There are two more sections in configuration file The first one is input_species Each non blank line of this section corresponds to one speciation of Gocart species e g CC is sub divided in CC 1 CC 2 CC 3 CC 4 The range after the delimiter is the aerosol size range in SIum to which this sub species apply Most of the time this is the whole aerosol size range of polair3d model e g 0 1 10 0 but in the case of dust DU each sub species may correspond to a precise part of the polair3d aerosol size range see configuration file bc gocart DU cfg for an illustration The second section is output_species Each non blank line of this section corresponds to one aerosol species of polair3d model The columns after delimiter correspond to the Gocart sub species Therefore the number of line in previous section must equal the number of column after delimiter The numbers in these columns are th
22. done A 4 Computing Meteorological Data No modification to configuration file MM5 meteo cfg should be necessary but make sure to use the version of this file included in directory TestCase and not in directory Polyphemus You can open the file and check that Database_MM5 meteo is the path to the file MM5 2004 08 09 For details about the other options available in the configuration file see Section 3 4 5 Then compile MM5 meteo cd Polyphemus preprocessing meteo utils scons py MM5 meteo and execute it cd TestCase Polyphemus preprocessing meteo MM5 meteo config general cfg config MM5 meteo cfg 2004 08 09 The output on screen will be Reading configuration files done Memory allocation for grids done Memory allocation for output data fields done Conversion from sigma levels to heights done Converting from latlon to MM5 indices done Applying transformation to read fields done Computing pressure done Computing surface pressure done Interpolations done Computing Richardson number done Computing attenuation Computing relative humidity and critical relative humidity done Computing cloud profile done Computing attenuation done Linear interpolations Attenuation 178 APPENDIX A POLAIR3D TEST CASE SpecificHumidity Liquid Water content CloudHeight SurfaceTemperature SkinTemperature SoilWater SensibleHeat Evaporation SolarRadiation Rain FrictionM
23. latitude and altitude During the time integration they are linearly inter polated in all cells Section photolysis_rates Entries Comments Date_min Starting date of photolysis rates Delta_t Time step in days Ndays Number of steps Time_angle_min Starting time angle in hours Delta time angle Time angle step in hours Ntime_angle Number of time angles Latitude min First latitude in degrees Delta latitude Step along latitude in degrees Nlatitude Number of latitude steps Altitudes List of altitudes in meters at which photolysis Fields Filename rates are provided files in which photolysis rates are stored 5 6 3 Vertical Levels and Species Section 5 5 3 is relevant for Polair3DChemistry and in particular the file giving the lev As for species a section molecular weight lists the molecu lar weights in gmol of all species photolysis _reaction_index is required This section provides all reaction names and their indices in the list of reactions Below is an example for RACM els is exactly the same If photolysis reactions are involved the section Photolysis reaction names and the paths to the 134 CHAPTER 5 MODELS photolysis_reaction_index N02 0 0301D 1 0303P 2 HONO 3 HNO3 4 HNO4 5 NO3NO 6 NO3N02 7 H202 8 HCHOmol 9 HCHOrad 10 ALD 11 MHP 12 HOP 13 PAA 14 KETONE 15 GLYform 16 GLYmol 17 MGLY 18 UDC 19 ORGNIT 20 MACR 21 HKET 22 The previous section is quoted from
24. pedantic strict only if G77 or GFortran is used permissive compiles Fortran without restrictive options flag cpp Additional C compilation flags flag_fortran Additional Fortran compilation flags flag link Additional link flags openmp no yes Should the parallelizing library openMP be used for models including modules supporting the openMP parallelization flag_openmp Compilation flag for openMP mpi no yes Should the parallelizing library MPI be used for models includ ing modules supporting the MPI parallelization 2 3 COMPILING THE PROGRAMS 23 chemistry racm racm2 Chemistry mecanism used in the aerosol modules cb05 nacl no yes Should the thermodynamics of the aerosol modules include NaCl for models including an aerosol module Variables in SConstruct More variables may be changed in the SConstruct file itself Note that SConstruct files are Python scripts sensitive to case Have a look at processing photochemistry SConstruct In this SConstruct file several variables are in cluded They can be defined as strings e g cpp_compiler my_compiler or as list of strings e g include_path include Talos include SeldonData or a list of strings embedded in a string e g include_path include Talos include SeldonData or equivalently include_path include Talos include SeldonData If you do not want to define a variable remove the line where it is defined or write linker N
25. please consult directly Section 6 3 2 The launching command does not differ from the one of the serial program You will just have to set the appropriate field in the main configuration file 2 6 Setting Up a Simulation This section is a quick overview of how a simulation should be set up It is not meant to and cannot replace the chapters about preprocessing models modules 2 6 1 Suggested Directory Tree It is advocated not to modify Polyphemus code including the configuration files provided with it The whole Polyphemus directory should not be modified except maybe SConstruct files or makefiles Copy the configuration files you need in a dedicated directory modify the new configuration files in this directory and run Polyphemus programs from this directory Your directory tree may look like Polyphemus version include postprocessing preprocessing processing utils MyStudy config data emissions meteo 7 lesa raw_data results reference new_emissions ees where MyStudy contains Polyphemus configurations files set for the study configuration with general cfg meteo cfg init data generated by preprocessing programs directory data sometimes raw data directory raw_data necessary for preprocessing and finally output results from the simulation directory results with results from different runs Notice that Polyphemus directory includes the version number or the date This is very use
26. prediction Its Type is domain prediction It works in a similar way to 4 9 OUTPUT SAVERS 113 SaverUnitDomain_assimilation except that it is designed for the storage of model predic tions starting from analyzed model state at the end of the assimilation period 4 9 6 SaverUnitNesting and SaverUnitNesting_aer The saver units SaverUnitNesting and SaverUnitNesting aer are used to perform nested simulations That means that the results of a first simulation on a large domain are interpolated and saved at the boundary of a subdomain and are then used as boundary conditions for a second simulation on the subdomain The two simulations are quite normal except that e For the first one additional concentrations have to be saved using SaverUnitNesting and or SaverUnitNesting_aer e For the second one boundary conditions from the first simulation have to be provided the usual way in polair3d data cfg Refer to the files in processing nesting for concrete examples Files ending with nesting are for the first simulation and files ending with nested are for the second one If the saver unit is of Type nesting or nesting_aer the additional parameters needed in the section save are presented in the table below save x_min Origin of the subdomain along zx Delta x Step along x for the subdomain Nx Number of points along x for the subdomain ymin Origin of the subdomain along y Delta_y Step along
27. summary statistics for all stations or results written in a file file list List of files used if multiple file is set to yes legend List of the legends associated to the files in file_list in the same order 7 2 2 Script evaluation py Script evaluation py is meant to assess the performances of a chemistry transport model CTM Results of the CTM are compared to measurements at stations and statistics on the differences are computed The output of the script is presented on screen or can be saved in a 166 file 7 2 3 Script disp py CHAPTER 7 POSTPROCESSING This script written in Python allows to display concentrations and observations at the sta tion station with regard to the time Measurements are displayed with the style defined in meas_style and simulation results with sim_style 7 3 Postprocessing for Aerosols 7 3 1 Configuration File The configuration file simulation_aerosol cfg is the same as simulation cfg Section 7 2 with aerosol parameters added Nbins computed Dmin Dmax file_bounds bin_index_shift primary inorganics organics primary_names inorganics_names output_species with_organics graph_type graphs_at_station i_range j_range log plot directory_list input Number of size bins If yes the bin bounds are computed using a logarithmic law If no they are given in a file If bin bounds are computed the minimum and the maximum di ameters If bin
28. zhang 75 wesely preprocessing is wrong For the perturbations of input data you have to specify the name of the field which will perturbed the uncertainty encompassing 95 of all possible values and the type of distribution For a normal distribution the random choice will be made between the raw field the raw field minus the standard deviation and the raw field plus the standard deviation input_data Name Uncertainty Law wind_velocity 1 3 log normal wind_angle 40 normal temperature 3 normal emissions_NOx 1 5 log normal dep 2 log normal Each randomly built model has its own identity The model identity is a list of integers Each integer represents a physical parameterization a numerical approximation or a perturbed input field The value of each integer represents a parameter value Assume you have this configuration file physic luc usgs glcf preprocessing chemistry racm radm numeric 52 CHAPTER 2 USING POLYPHEMUS time_step 600 1800 vertical_resolution 5 7 9 preprocessing first_layer_height 40 50 preprocessing input_data temperature 3 normal wind_angle 40 normal wind_velocity 1 5 log normal 1 5 emissions_NOx log normal You have nine different parameters The model identity 010210221 represents 0 luc usgs 1 chemistry radm 0 time step 600 s 2 vertical resolution T 1 first layer height 50m 0 temperature raw fi
29. 00 00 MM5 meteo general cfg MM5 meteo cfg 2004 08 09_09 00 00 2004 08 10_09 00 00 MM5 meteo general cfg MM5 meteo cfg 2004 08 09_09 00 00 1d The configuration file MM5 meteo cfg contains several options 3 4 METEOROLOGICAL FIELDS 71 Database_MM5_meteo Directory_meteo File Kz Delta_t Nt x min Delta_x Nx ymin Delta y Ny Nz projection_type Prev_accumulated_rain Type Min_height Min Min_urban Max Apply_vert paths Directory in which MM5 input files may be found If amp D appears in the file name it is replaced by YYYY MM DD where YYYY is the year MM the month and DD the day of the date given in command line Directory where output meteorological files are stored Name of the file where the vertical diffusion coefficients as com puted with the Louis parameterization are stored MM5 Time step in hour of data stored in every MM5 file Number of time steps stored in every MM5 file Index in MM5 coordinates of the center of the lower left cell in MM5 grid This is most likely 0 5 Index MM5 coordinates increase along longitude of MM5 grid This is most likely 1 Number of cells or dot points along longitude integer in MM5 grid Index in MM5 coordinates of the center of the lower left cell in MM5 grid This is most likely 0 5 Index MM5 coordinates increase along latitude of MM5 grid This is most likely 1 Number of cells or dot points along latitude integer in MM5 grid N
30. 1 However as there are four meteorological situations we have here Nt 4 as each situation is similar to a time step for an unstationary simulation It would be the same if it was an unstationary simulation puff model with several meteorological situations If there are 10 time steps and 4 meteorological situations you will put Nt 40 The first ten time steps represent the first situation from 10 to 20 you have the concentration field for the second situation and so on To visualize the concentration over the domain for the first situation and add a colorbar use the following commands gt gt contourf d 0 0 gt gt colorbar You should obtain the Figure B 1 You can visualize the concentration field for the other meteorological situations You should 0 00 Figure B 1 Plume visualization for the first meteorological situation Ground concentration in 3 Hem see that the wind is turning with increasing speed B 4 RESULT VISUALIZATION 189 B 4 2 Gaussian Puff with Aerosol Species You can go into the directory TestCase results puff_aer and launch ipython from there or either change directory from the ipython shell gt gt cd TestCase results puff_aer gt gt By doing that you ensure that you do not have to import atmopy again However when quitting ipython you will be back in the directory from where it was launched To visualize the ground concentration on the domain at time step t
31. 2007b Technical Note The air quality modeling system Polyphemus Atmospheric Chemistry and Physics 7 20 5 479 5 487 Metzger S Dentener F Krol M Jeuken A and Lelieveld J 2002a Gas aerosol parti tioning 2 Global modeling results Journal of Geophysical Research 107 D16 Metzger S Dentener F Pandis S and Lelieveld J 2002b Gas aerosol partitioning 1 A computationally efficient model Journal of Geophysical Research 107 D16 205 206 BIBLIOGRAPHY Monahan E C Spiel D E and Davidson K L 1986 Oceanic Whitecaps and Their Role in Air Sea Exchange Processes chapter A model of marine aerosol generation via whitecaps and wave disruption pages 167 174 Kluwer Academic Nenes A Pandis S N and Pilinis C 1998 ISORROPIA A new thermodynamic equilibrium model for multiphase multicomponent inorganic aerosols Aquatic Geochemistry 4 1 123 152 Njomgang H Mallet V and Musson Genon L 2005 AtmoData scientific documentation Technical Report 2005 10 CEREA Pun B K Griffin R J Seigneur C and Seinfeld J H 2002 Secondary organic aerosol 2 Thermodynamic model for gas particle partitioning of molecular constituents Journal of Geophysical Research 107 D17 Pun B K and Seigneur C 2007 Investigative modeling of new pathways for secondary organic aerosol formation Atmospheric Chemistry and Physics 7 9 2 199 2 216 Pun B K Wu S Y Seigneur C
32. A posteriori least squares ensemble eg ExponentiatedGradient ens A learning algorithm rg RidgeRegression ens Another learning algorithm rg RidgeRegression ens penalization 0 001 With a different parameter rg ComputeStatistics Same as with the print rg stat rmse EnsembleData instances 7 6 LIQUID WATER CONTENT DIAGNOSIS 173 Consult the AtmoPy reference documentation to get a description of all aggregation methods from a technical point of view Read Mallet et al 2007a available at http www dma ens fr edition publis 2007 resu0708 html for a complete scientific description A large number of methods are available for instance the list of aggregation methods available in Polyphemus 1 3 is 1 o Fe o 10 11 12 13 14 15 16 17 18 19 20 BestModel BestModelStep and BestModelStepStation select the best model according to a given statistics measure globally per time step or for each observation that is per time step and per station a posteriori method EnsembleMean ensemble mean EnsembleMedian ensemble median ELS least squares ensemble a posteriori method ELSd least squares ensemble per time round a posteriori method ELSdN least squares ensemble per time round with learning period also known as su perensemble Krishnamurti et al 2000 ExponentiallyWeightedAverage ExponentiatedGradient ExponentiatedGradientWindow and
33. Delta_x Nx ymin Delta y Ny Nz Vertical_levels Cartesian Species With_advection With diffusion With_air_density With_initial_condition With_boundary_condition With_deposition domain Starting date in any legal format see Section D 7 The date can therefore include seconds Time step in seconds Number of iterations of the simulation integer Abscissa of the center of the lower left cell Provide a longitude in degrees or in case Cartesian coordinates are chosen an abscissa in meters Step length along x in degrees longitude or in meters for Cartesian coordinates Number of cells along x integer Ordinate of the center of the lower left cell Provide a latitude in degrees or in case Cartesian coordinates are chosen an ordinate in meters Step length along y in degrees latitude or in meters for Cartesian coordinates Number of cells along y integer Number of vertical levels integer Path to the file that defines vertical levels interfaces If activated coordinates are Cartesian and in meters Otherwise coordinates are latitudes and longitudes in degrees Path to the file that defines involved species and their chemical properties options Are species advected Are species diffused If activated vertical wind is diagnosed from div pV 0 where p is the air density and V the wind and the dif fusion term is div px vs where c is the concentration and K is the diffusion matrix
34. Deposition_factor_NH3 81 File defining monthly factors see below File defining the time zone for various countries Number of cells along longitude integer in EMEP grid Number of cells along latitude integer in EMEP grid Maximum code number of the countries covered by the inventory If a code number in the inventory is greater than or equal to Ncountries an error message is thrown Names of inventory species Number of activity sectors Emission ratio for urban areas see below Emission ratio for forest see below Emission ratio for other areas see below LUC Path to land use cover file Longitude in degrees of the center of the lower left cell in LUC grid Step length in degrees along longitude of LUC grid Number of cells along longitude integer in LUC grid Latitude in degrees of the center of the lower left cell in LUC grid Step length in degrees along latitude of LUC grid Number of cells along latitude integer in LUC grid Species Maximum number of emitted species see below Aggregation matrix file relations of the emitted species to the real chemical species Directory in which for each inventory species XXX a file XXX dat contains the speciation to real chemical species as function of the emission sector columns Part of emitted NH which is deposited right away The program emissions reads EMEP emissions inventory multiplies them by temporal factors and interpolates them on
35. Emissions sea salt Program sea_salt computes the emissions of sea salt aerosols Its options and parameters are given in sea_salt cfg paths Surface_wind_module_file Binary where the wind module at surface is stored Directory_sea_salt Parameterization Threshold_radius Delta_t File Nb_luc Sea_index Section_computed Diameter_min Diameter_max Nsections File_sections Directory where sea salt emissions are stored sea_salt Parameterization used for sea salt emissions Monahan Monahan et al 1986 or Smith Smith and Harrison 1998 Radius above which the parameterization is used in um Time step for sea salt emissions computation LUC File containing land use cover Number of land categories Index of sea in land categories It is 0 for GLCF description and 15 for USGS description PM Should diameter classes bounds be computed Otherwise they are read in File sections Minimum diameter if diameter classes bounds are computed Maximum diameter if diameter classes bounds are computed Number of diameter classes File containing the diameter classes bounds if they are not com puted sea salt_composition NA CL S04 Fraction of NA CL and SO in sea salt 3 7 Initial Conditions ic Climatological concentrations from Mozart 2 Horowitz et al 2003 are used to generate initial concentrations for photochemistry simulation with Polair3D Program ic has been tested with Mozart 2
36. Forest 13 Evergreen Needleleaf Forest 14 Mixed Forest 15 Water Bodies 16 Herbaceous Wetland 17 Wooded Wetland 18 Barren or Sparsely Vegetated 19 Herbaceous Tundra 20 Wooded Tundra 21 Mixed Tundra 22 Bare Ground Tundra 23 Snow or Ice Program luc usgs does not require any date as an input in command line To launch luc usgs just type luc usgs general cfg luc usgs cfg 3 3 3 Conversions luc convert The output of luc glcf or luc usgs are land use cover described with GLCF or USGS cat egories It is often useful to convert these descriptions to another set of land use categories This means for example summing up the contributions of sparsely vegetated and bare ground tundra USGS categories 19 and 22 to estimate the proportion of barren land in Wesely description category 8 An input category may also be split into several output categories In practice one may want to convert in Wesely or Zhang land use cover using luc convert In particular it is necessary to convert land data from USGS or GLCF to Zhang categories before computing deposition velocities with program dep see Section 3 5 1 In addition to the domain definition Section 3 2 2 below is the information required in the configuration file or configuration files for luc convert paths Database_luc convert Directory where the input file input land use categories is located File in Input file name in Database luc con
37. Max Higher threshold for vertical diffusion in m s Apply_vert If set to no the lower threshold is applied only at the top of the first layer otherwise it is applied to all levels This programs mainly computes the vertical diffusion coefficients with a call to ComputeLouiskz Simple corrections are also performed to take into account convective conditions The output is a 3D time dependent field format t z y x of vertical diffusion coefficients in m s Along the vertical the coefficients are defined on the interfaces So the size of the field for each day is 4 x Nt x Nz 1 x Ny x Na It is stored in the path given by entry File Kz To launch the program just type Kz general cfg meteo cfg 2001 04 22 3 4 METEOROLOGICAL FIELDS 69 3 4 4 Program Kz_TM Program Kz_TM overwrites in the boundary layer height the vertical diffusion coefficients com puted with Louis parameterization with coefficients computed according to Troen amp Mahrt pa rameterization Troen and Mahrt 1986 It should be launched either after Kz after MM5 meteo or after WRF meteo The reference configuration files for Kz_TM is Polyphemus preprocessing meteo meteo cfg or Polyphemus preprocessing meteo MM5 meteo cfg or Polyphemus preprocessing meteo WRF meteo cfg together with Polyphemus preprocessing general cfg In addition to the domain definition in general cfg below are the entries for Kz_TM LUC_file Sea_ind
38. Number of vertical levels integer File describing the stations Type of station file Emep Airbase BDQA Pioneer Directory where observations are stored output Name of the station for which concentrations and observations are displayed Dates for which concentrations and observations are displayed What kind of concentrations are displayed hourly daily or peak concentrations Should peak concentrations be paired in time In case daily concentrations are chosen are observations provided on a daily basis If two numbers are provided they define the axis range along y and along x for scatter plots If only one number is provided the axis ranges are automatically set Is there a scatter plot See the configuration file for the various options Style for the display of measurements Style for the display of simulated data Which stations are involved in statistical measures Either set to single for a single station defined in station all for all stations or a couple Field Value for all stations for which Field is equal to Value Statistical measures to be applied to data see configuration file for all measures available All observations below cutoff are discarded All stations for which the ratio between the number of available observations and the total number of time steps is below ratio are discarded For instance if ratio is set to 0 3 stations with over 70 of missing observations are discarded Type of the output
39. One source can emit several species Note that the puff file can contain a list of puffs corresponding to a discretized line source or trajectory In that case it corresponds to the output file of the discretization preprocessing program discretization 5 3 3 Vertical Levels Species and Meteorological data They are exactly the same files as those described in Section 5 1 When using chemistry some additional information are needed e In the species configuration file a section photolysis contains the list of species with photolysis e In the configuration file for meteorological data the pressure in Pa attenuation coeffi cient and specific humidity in kgkg are needed e In the configuration file for meteorological data after the species data for scavenging and deposition the list of photolyis rates and background concentrations are needed The list of photolysis rates must be provided for all species contained in the section photolysis of the species file 23 species for RACM mechanism followed by the rate The background concentrations can be provided only for species for which it is not equal to zero It is the concentration of the species in the atmosphere outside the puff It is supposed to be homogeneous During the simulation the background species concentrations change with chemistry and the species interact with the puff species Here is an example of the additional entries in the meteorological data file wher
40. Polair3D grids EMEP emissions are read with AtmoData function ReadEmep The spatial interpolation is performed with EmepToLatLon LUC file This file gives the land categories in GLCF description in a domain that must contain your simulation domain but this LUC domain should not be too large because of computational costs You can generate this file using program extract glcf see Section 3 3 5 Urban forest and other ratios Ratios Urban_ratio Forest_ratio and Other_ratio enable to distribute emissions of an EMEP cell according to the type of land urban forests and other categories For instance in an EMEP cell emissions are distributed so that the ratio between total urban emissions and total emissions is Urban_ratio on top of the sum of Urban_ratio Forest_ratio and Other_ratio Temporal Factors EMEP emissions are provided as annual values They are multiplied by temporal factors to estimate their time evolution as function of month week day and hour in 82 CHAPTER 3 PREPROCESSING all emission sectors and in all countries Here are examples on how these factors should be provided e monthly factors dat gives the factors for each country index CC each activity sector SNAPsector and each month Formate CC SNAPsector JAN FEB MAR APR MAY JUN JUL 2 1 1 640 1 520 1 236 1 137 0 798 0 459 0 393 e weekdays_factors dat gives the factors for each country index CC each activity sector SNAPsector and each day of th
41. SNOW COVER ALBEDO GROUND HEAT FLUX VEGETATION COVERAGE SEA ICE FLAG SURFACE RUNOFF UNDERGROUND RUNOFF 2 meter Temperature 2 meter Mixing Ratio 10 meter U Component 10 meter V Component SURFACE ALBEDO SURFACE MOISTURE AVAILABILITY SURFACE EMISSIVITY AT 9 um SURFACE ROUGHNESS LENGTH SRA AR RRR BONE BPwWN SURFACE THERMAL INERTIA SOIL HEAT CAPACITY SNOW COVER EFFECT VERTICAL COORDINATE dot points D corner of the grid squares or cross points C center of the grid squares e its dimensions ordering e its unit or DIMENSIONLESS 48 CHAPTER 2 USING POLYPHEMUS e a short description Then you can use the program get_info_MM5 to have statistical data about one of the variables Note that some variables have a blank space in their name so in that case you need to put the name between quotes to use get_info_MM5 If the name has no blank spaces quotes are not necessary but can be used TestCase raw_data MM5 gt get_info_MM5 MM5 2004 08 09 GROUND T Min 271 911 Max 327 747 Mean 294 112 Std dev 6 46779 TestCase raw_data MM5 gt get_info_MM5 MM5 2004 08 09 ALB Min 0 0738 Max 0 8 Mean 0 122658 Std dev 0 0501975 Note that get_info_MM5 only gives information on one field stored in the MM5 file 2 8 4 Script call_dates The script call_dates allows to call a program in particular for preprocessing over several consecutive days Launch it without arguments to get help
42. Species NO NO2 Type continuous Rate 1 1 5 Date_beg 2001 04 22_00 05 Date_end 2001 04 22_00 07 Velocity 0 Temperature 0 Diameter 0 2 5 15 2 Puff emissions The puff emission is described with the following entries Date The date at which the puff is emitted The date must be in a format described in Section D 7 Quantity The list of quantities one per emitted species in mass unit The configuration file for point emissions may contain a section looking like this source Abscissa 10 3 Ordinate 48 Altitude 80 Species S02 Type puff Quantity 1 Date 2001 04 22_00 05 Velocity 0 Temperature 0 Diameter 0 2 5 15 POINT EMISSION MANAGEMENT 147 5 15 3 Temporal emissions The temporal emission is the same as a continuous emission but temporal factors are applied to the emission rate in order to account for temporal variations In addition to the continuous emission entries the following entries are required Date min file Delta_t TemporalFactor The date at which the temporal factor file starts The date must be in a format described in Section D 7 and must be lower than or equal to the emission beginning date The time step in seconds between two temporal factors The name of the binary file where the temporal factors are read At each simulation time step the emission rate is multiplied by the temporal factor read in the file The index of the temporal
43. a single matrix called filiation matrix is specified for all gaseous species and one for all aerosol species which takes into account both decay and the fact that a species can react to form other species As a result the evo lution of the concentration due to decay only is described in equation 6 2 In that case With time dependence is set to no and With filiation matrix to yes C 2 y 2 AC x y z 6 2 cg x y z where A is the s x s filiation matrix and C x y z cr x y z with c x y z the Ca 1 x Y z concentration of species 7 at time step n in point of coordinate x y z and s the number of species involved The parameters are specified as follows in species dat species Spl Sp2 Sp3 Sp4 aerosol_species Aeri Aer2 filiation_matrix 6 3 AEROSOL MODULES 153 File matrix dat filiation_matrix_aerosol File matrix_aer dat The s x s filiation matrix is specified in file matrix dat as below 0 7 0 05 0 0 1 0 0 8 0 1 0 05 0 1 0 1 0 6 0 1 0 15 0 0 1 0 7 The matrix for aerosol species is very similar to the one for gaseous species except that its size is Sa X Sa where Sa is the number of aerosol species 6 3 Aerosol Modules 6 3 1 Aerosol SIREAM SORGAM For Aerosol _SIREAM_SORGAM to work you have to install ISORROPIA see Section 1 3 5 Aerosol SIREAM SORGAM This aerosol module is used for gas and aerosol species for general purposes as air quality modeling and risk assessment Th
44. also provided for RACM species_racm_v1 dat and species_racm_v2 dat File providing the molecular weights of output species Directory where the output initial conditions must be stored The name of the Mozart 2 files must be in the form h00xx nc where xx is computed as shown in Equation 3 1 Nat 6 40 int LL ine 10 3 1 with Na the number of days since the beginning of the year 0 for first January and int x represents the integral part of zx The program Polyphemus preprocessing ic automatically select the file to use with the date given in ic cfg Output results are in ugm In case your Mozart 2 files do not satisfy this format this may happen if Mozart files are updated on the NCAR data portal you may modify the code or contact Polyphemus team at 86 CHAPTER 3 PREPROCESSING polyphemus help lists gforge inria fr 3 8 Boundary Conditions 3 8 1 Boundary Conditions for Polair3D Program bc Boundary condition for gaseous species are generated using Mozart 2 files See Section 3 7 on how to get those files In addition to the domain definition Section 3 2 2 below is the information required in the configuration for bc see example bc cfg Nt Delta_t Nx Ny Nz Directory_bc Species Molecular weights bc input domain Number of time steps in Mozart 2 files Time step of Mozart 2 files in hours Number of grid points along longitude in Mozart 2 files integer Numb
45. bounds are given in a file the name of the file Number of the first bin typically 0 or 1 Names of the primary species in the model Names of the inorganic species in the model Names of the organic species in the model Real names of the primary species to be displayed Real names of the inorganic species to be displayed Aggregated data in output PMj9 PM2 5 total mass for each chemical component total mass and number in each bin If yes total masses will take into account organic species Graphs that will be displayed when launching graph_aerosol py chemical composition mass and number distribution time series If yes the graphs will be displayed for the simulation at a given station If no graphs will be an average over the domain defined by i_range and j_range First and last indices in x direction for the considered domain First and last indices in y direction for the considered domain If yes the mass and number distributions will be displayed with a log scale for diameters List of directories where outputs are the aggregated data will be written in a file in the same directory as the output The file simulation_aerosol cfg is used by scripts init_aerosol py and graph_aerosol py 7 3 2 Script init_aerosol py The outputs of the model for aerosols will be several files lt species gt _ lt number gt bin where lt species gt is an aerosol chemical component in aerosol_species see Section 5 5 3 and lt number
46. cfg WRF meteo cfg 2004 08 09_09 00 00 2004 08 10_09 00 00 WRF meteo general cfg WRF meteo cfg 2004 08 09_09 00 00 1d The configuration file WRF meteo cfg contains several options paths Database WRF_meteo Filename of the WRF input files If amp D appears in the file name it is replaced by YYYY MM DD where YYYY is the year MM the month and DD the day of the date given in command line Directory_meteo Directory where output meteorological files are stored File Kz Name of the file where the vertical diffusion coefficients as com puted with the Louis parameterization are stored MM5 accumulated_rain Prev_accumulated_rain Is the rain accumulated from the previous day attenuation Type Parameterization to be used to compute cloud attenuation Put 1 to use RADM parameterization or put 2 to use ESQUIF parameteri zation clouds Min height Minimum cloud basis height in m Kz Min Lower threshold for vertical diffusion in m s Min_urban Lower threshold for vertical diffusion over urban areas in m s Max Higher threshold for vertical diffusion in m s71 Apply_vert If set to no the lower threshold is applied only at the top of the first layer otherwise it is applied to all levels The program basically reads data in WRF output file and interpolates it in time and space to Polyphemus grid WREF s files grids are described in its attributes and global variables as every NetCDF file and Poly
47. config force 2 3 2 Compiling with make As of make you might have to update the related makefiles by yourself because we don t maintain them anymore Edit the makefiles to change the compiler The main variables are the C compiler CC the Fortran compiler F77 the linker LINK and maybe the libraries LIBS and the include paths INCPATH 2 3 3 Compiling for Parallel Computing The following modules can support an openMP and or an MPI parallelization the chemistry modules Photochemistry and ChemistryRADM the advection module SplitAdvectionDST3 2 3 COMPILING THE PROGRAMS 25 the diffusion module DiffusionROS2 the aerosol modules Aerosol_SIREAM_SORGAM and Aerosol_SIREAM_AEC Among the drivers apart from BaseDriver who supports both the openMP and the MPI parallelization support for MPI is now available with MonteCarloDriver and OptimalInterpolationDriver This list will grow in the versions to come so you had better to stay tuned if you are interested Whatever numerous programs given as examples in processing can already take advantage of this feature if they make use of at least one of these modules see Section 2 5 3 Still depending on your own context see Section 1 2 3 you might want to use openMP alone MPI alone or both openMP and MPI simultaneously Here are the recipes that will get your programs built the way you want OpenMP alone At first let us consider the case where you just want an OpenMP par
48. contains the list of all species followed by their half life time in days for radioactive decay put 0 in the case of non radioactive species Provide only one species per line The section half_life_time contains two values following each species name the first corresponding to its biological half life time in s during daytime and the second to the value during nighttime put 0 in the case of non biological species Here is an example species List of the species Caesium Iodine biol half_life Half life of the species Unit days 0 coresponds to non radioactive species Caesium 1 1e4 Iodine 8 04 biol 0 half_life_time 122 CHAPTER 5 MODELS Half life of the species Unit seconds First value day second value night 0 corresponds to non radioactive species Caesium 0 0 Iodine 0 0 biol 1000 500 In that case we have two radioactive species Caesium and Iodine and one biological species biol If scavenging is taken into account sections scavenging and scavenging constant must be added The section scavenging contains the name of all species for which scavenging occur and scavenging constant their constants in s 5 1 5 Meteorological data file gaussian meteo dat This file contains basic meteorological information needed to run Gaussian models In case there are scavenging and deposition it is the output file of preprocessing program gaussian depositi
49. cutting diameter in um Sulfate_computation Which method is used to solve sulfate condensation equilibrium or dynamic 154 CHAPTER 6 MODULES Redistribution method Which redistribution method is used number conserving or interpolation Nucleation model Which nucleation model is used binary or ternary With fixed density Is aerosol density fixed in the module Wet_diameter_estimation Which method is used to compute aerosol wet diameters Gerber or Isorropia Thermodynamics_module Which thermodynamics module is used in bulk equilib rium isorropia or eqsam see below Number_of_forks Number of CPU to use for more informations consult the section about Multi threading in 6 3 2 The liquid water content threshold is the amount of liquid water in the air above which a cloud is diagnosed in the cell This chemistry module returns the cloud droplet pH this means that With_pH can be set to yes and that microphysical pH scavenging model can be used Otherwise choosing the microphysical pH scavenging model may result in crash or errors Note that options With_pH Lwc_cloud_threshold and Fixed_aerosol_density are used by both model and module That is to say the fixed aerosol density is the same in the model as in the module The fixed cutting diameter has to be given as an aerosol diameter in um Aerosol bins below that diameter are assumed at equilibrium and those above that diameter are not considered at equilib
50. ea 63 Chemistry Modules oo comas 54 aag pe kee eh daa eR BMA As a O21 Photochemistry 4 he be RE Rae RE BP ERE RA 62 2 ChemistryRADM 2242448244655 8653S beta R ERE Ge ES 623 Chemistry LaatOl lt o occa a eed ok a a Ree A G28 o oi RR AA 63 Aerosol Modules ss cidad a a a we o 6 3 1 Aerosol SIREAM _SORGAM e 6 3 2 Aerosol SIREAMAEC e 6 30 Decay io es be awe Re ee eee Db a A a 7 Postprocessing TL Graphical QUO c s ics sa adea a he be Re be See ere Pa eS 7 1 1 Installation and Python Modules gt gt a s see soa poa e dos wa p a 7 1 2 A Very Short Introduction to Python and Matplotlib 7 1 3 Visualization with AtmoPy 2 0000 eee 7 2 Postprocessing for Gaseous Species e Tal Confgurallon Pile cos cir ae e cs A RS e a a a 1 2 2 Script evaluation py e conosca we ewe ee we ee G28 Deript dispspy 2644s 2264 p bE 0s eee eb ee ee oS 7 3 Postprocessing for Aerosols 1 e Teal Conteuration Pile rover ee ee eo a ee Pe Re as 7 9 2 Deript initaerosel py sc Se eR a we Oe eh ee io OCP Eraph Aroso py sac i id nn Ree a ee Ee ee eS 7 4 Computation of Aerosol Optical Parameters 2 0004 TAL OPAC Package 22 45 G 2k GR DR ARG A 7 4 2 Tabulation of a Mie Code 020022 eee eee 7 4 3 Computation of Optical Parameters 000002 ee 7 5 Ensemble Forecasting doaa ika ee 7 5 1 Loading Data Configuration File and EnsembleData
51. ee a E 8 ee ee A 50 2 9 2 Configuration Files 64 e osa a socca ee REE ae See ee 50 29 8 Quick Start e c e eae ee ae eee Be De ee Oe Ok ee ae 53 Preprocessing 57 3 L Remark o cos fi ee a awe ae a Be ek he ee a 57 mee ans sock os ee ee ae hd wee hee et dad dre ee eee e 57 3 2 1 Running Preprocessing Programs e 57 3 22 Configura On ocaso RRS wee a aS 58 SAS Dotes eo ek oe BS eke b ERS A ee bk eh eo 59 Roe Aste Pee ox erg ae Ey ai Ace See A E aoa ee ee ee ete we 60 oo roma Wate o sos p ee ble ek e a ee a ee ee e 60 So Land Use Cover GLOF luesglet 2 5 246 See eee wad we ee ea eS 60 3 3 2 Land Use Covet USGS LUC USES sa ss nasau a A dea 4 61 3 3 3 Conversions Ine Gonvert saco RR a A e 63 334 Rouglinessi TOMEMOS lt lt cerrada a Rw HO 64 3 3 5 LUC for emissions extract gl f cococosonorntrsdrsaes 64 3 4 Meteorological Fields a 65 gA A e III 65 SA2 Program attenuation MP 67 OAS Propra RZ oa coca s Saw a A etd Se a E we 68 aha Program KZ o casa ek ae a A ole a eth we ae 69 qlo Program MISS METEO e s poa eag pa hee Bawa EMS ee 70 3 4 6 Program MM5 meteo castor 000 2 ee eee 72 3 4 7 Program WRF meteo a eee 74 3 5 Deposition Velocities 42654 22854 sas sea aaa 76 godl Propamdep o o a ssn dk yo aol Ge SE ke we a a ew ak RR we i 76 Gane Progra Gep emberson oa e Red ale ew ds ae elo BY 78 36 Ermaissions so s sa cise ea RO Pe a et ee 79 3 6 1 Mappin
52. equal to Value Statistical measures to be computed see configuration file for all measures available All observations below cutoff are discarded for certain statistical measures All stations for which the ratio between the number of available observations and the total number of time steps is below ratio are discarded For instance if ratio is set to 0 3 stations with over 70 of missing observations are discarded file_list List of binary files that store the ensemble simulations one file per simulation The ensemble may then be loaded with lines like from atmopy ensemble import ens EnsembleData all cfg verbose True The statistics for all members can be easily accessed ens ComputeStatistics print ens stat Even statistics per station or per time step ens ComputeStationStatistics print ens stat_station rmse or any other measure ens ComputeStepStatistics print ens stat_step correlation The main attributes of ens are 1 Nsim number of simulations i e members in the ensemble 2 sim list for simulations of list for stations of arrays concentrations at a given station 172 CHAPTER 7 POSTPROCESSING 3 Nstation number of stations 4 station list of Station instances 5 obs observations at stations 6 date dates of observations 7 all_dates list of all dates in the time period starting with the first observation and ending with the last obs
53. for late autumn see below for details Snow Data file for snow see below for details Spring Data file for spring see below for details The data files mentioned above for the five seasons must contain a column for each land use category with 22 parameters in each column You may modify these files or create new files only if you are well aware of deposition parameterizations With Polyphemus a set of 5 files is provided for convenience and any beginner should use them They are suited for land use categories as defined in Zhang et al 2002 A key step is therefore to generate a land use description with these categories referred as Zhang categories The recommended program to generate this file is luc convert which is described in Section 3 3 3 You should use this program to convert GLCF or USGS land cover to Zhang categories Please note that the program dep chooses which land use file to use according to the month of the beginning date only Therefore if you need deposition velocities for a date range during which the season changes make sure to launch different simulations for the different seasons The program may be launched this way dep general cfg dep cfg 2004 08 09 2d4h 3 5 2 Program dep emberson The program dep emberson is used to compute deposition velocities for Castor model using Emberson parameterization paths Altitude File where altitude is stored SurfaceTemperature File where surf
54. from 00 to 23 Minutes and seconds range from 00 to 59 If the month is not specified format YYYY then the month is set to 01 January If the day is not specified formats YYYY and YYYY MM it is set to 01 first day of the month If the hour the minute or the second is not specified it is set to zero 00 Hyphens and underscores may be replaced with any character that is neither a delimiter see Section D 2 nor a cipher They can also be removed Examples 19960413 1996 04 13_20h30 1996 04 1302030 Recommandation Use hyphens around the month and around minutes Use an underscore between the day and the hour YYYY MM DD_HH II SS D 8 Booleans Booleans are supported in configuration files and can be specified in any of the following ways true t yes y false f no n This is not case sensitive e g True or NO are valid 204APPENDIX D LEXICAL REFERENCE OF POLYPHEMUS CONFIGURATION FILES Bibliography Arstila H Korhonen P and Kulmala M 1999 Ternary nucleation kinetics and application to water ammonia hydrochloric acid system Journal of Aerosol Science 30 2 131 138 Debry E Fahey K Sartelet K Sportisse B and Tombette M 2007 Technical Note A new SIze REsolved Aerosol Model SIREAM Atmospheric Chemistry and Physics 7 1 537 1 547 Fahey K M and Pandis S N 2003 Size resolved aqueous phase atmospheric chemistry in a three dimensional chemical transport model Journal of Geo
55. gt is the index of the size bin But often measurements are aggregated data 7 4 COMPUTATION OF AEROSOL OPTICAL PARAMETERS 167 e PMjo and PM are the mass of aerosol with a diameter smaller than 10 um and 2 5 um respectively e Total mass of one chemical component One can also be interested by the number of particles in each size bin granulometry or by the mass distribution along the size bins This will be done by the script graph_aerosol py but before you have to launch init_aerosol py by the command python init_aerosol py simulation_aerosol cfg Then you can launch disp py and evaluation py with species such as PM10 PM2 5 PNA total mass for sodium etc 7 3 3 Script graph_aerosol py You can launch graph_aerosol py by the command python graph_aerosol py simulation_aerosol cfg Then each desired graphs specified in graph type section of the configuration file will be displayed in a different window 7 4 Computation of Aerosol Optical Parameters Aerosol optical parameters such as Aerosol Optical Thickness Depth AOT AOD Single Scat tering Albedo SSA absorption and extinction coefficients Babs Bext can be computed from the output of a suitable chemistry transport model For that purpose concentrations for each aerosol species in each section and for all the vertical layers should be saved while running polair3d siream Details of the equations and the method used are described in Tombette et al 2008
56. in time length number of time steps over which data is cumulated Accumulated_time 4 start optional index of the first complete cycle Default 0 Accumulated_index 1 2 1 In a line everything that comes after is a comment and is then ignored 2 means that for readibility purpose we removed here some useless fields or sections you will find in the actual file example Indeed because meteo cfg serves also as the example configuration file of programs attenuation and kz fields and sections related to these programs are defined But they will be discarded while running meteo 3 The markup lt Directory_ground_data gt is still available even if it was defined in general cfg Indeed configuration files are concateneted before being read Still as markups cross sec tions you might be careful not to create ambiguous markups that is markups that refer to a field name used in several sections 4 The field Date of the section ECMWF is not the same as the field Date of the section domain because the sections they belong to are distinct 5 no is considered as a boolean yes true and false are also boolean supported by Polyphemus see Appendix D for further details You might now be equipped to survive in the jungle of configuration files For further informations about the configuration files you are advised to have a look at the lexical reference given in the Appendix D For i
57. name of the selected point in model domain for sensitivity calculation Point_nx x index of the selected point for sensitivity calcula tion Point_ny y index of the selected point for sensitivity calcula tion Point_nz z index of the selected point for sensitivity calcula tion Norm_perturbation_vector Norm of the initial perturbation vector With_random_perturbation With random directions for the perturbation Decreasing root Decreasing factor of the sequence of perturbation vectors D Start_index Index for the calculation of the first decreasing ratio End_index Index for the calculation of the last decreasing ratio n With_left_finite_difference_checking Checking left side finite difference results 110 CHAPTER 4 DRIVERS Display_sensitivity Display sensitivity results for the decreasing pertur bation sequences Option With_trajectory_management Trajectory_delta_t Trajectory_file are similar to those for 4DVar in Section 4 7 5 4 8 2 GradientDriver The objective function is chosen to be the norm of the difference between model simulations and synthetic observations This driver aims at the verification of the backward integration algorithm of adjoint model for gradient calculations Options Norm_perturbation_vector With_random_perturbation Decreasing root Start_index End_index and With_left_finite_difference_checking in section adjoint have the same meanings as those in Section 4 8 1 Option Display
58. numerical solver for transport used in Castor model It uses piecewise parabolic method PPM for advection but can also use an upwind scheme for some species In the species file associated with castor there are two sections species and ppm_species For all species in species but not in ppm_species an upwind scheme will be used 6 2 Chemistry Modules 6 2 1 Photochemistry Module Photochemistry is the most common photochemical module used with Polair3D It implements three chemical mechanisms RACM Stockwell et al 1997 RACM2 Goliff and Stockwell 2008 and CB05 Yarwood et al 2005 It uses a second order Rosenbrock method for time integration Computations are performed by Fortran routines automatically generated by the chemical preprocessor SPACK and a C program is used as a frame to launch all these calculations It only deals with gaseous species Information about species and reactions is given below Chemical mechanisms no of species no of reactions RACM 72 237 including 23 photolysis RACM2 113 349 including 34 photolysis CBO5 52 155 including 23 photolysis The units of input data e g initial condition boundary condition etc should be given as 1 9 m3 in using Photochemistry module 6 2 2 ChemistryRADM Module ChemistryRADM is quite similar to Photochemistry RACM has actually been derived from RADM RADM manages 61 species 157 reactions involving those species and 21 photolysis reactions
59. of Monte Carlo simulations for every meteorological situa tion Random_seed Seed assignment for NewRan library either a given seed number in JO 1 or the path to the directory that contains NewRan seed files or current_time for a seed that depends on the current CPU time The perturbations and changes in the parameterizations are described by a perturbation configuration file entry File_perturbation of the main configuration file This file contains boolean_option Model Boolean options The probability with which the option should be set to true string_option Model string options A list of possible values say A and B for the string option together with their probabilities possibly in brackets For example A 0 3 B 0 7 numerical _value Model numerical values A PDF description see below source_data Source data A PDF description see below The accepted PDFs probability density functions descriptions are 1 Uniform a b which is for a uniform distribution with support m a m b where m is the model unperturbed value 2 Uniform_relative a b which is for a uniform distribution with support m x a m x b where m is the model unperturbed value 3 Normal s which is for a normal distribution with the model unperturbed value as mean and with s 2 as standard deviation 4 Log normal s which is for a log normal distribution with the model unperturbed value as median and wit
60. or no Dutput_file Path to the file where the output data are written The parameterization type for the scavenging coefficient can be chosen between none the scavenging coefficient is set to 0 for all species constant the scavenging coefficient is constant for one given species and entered in the species file file the scavenging coefficients are read in a file for each species and meteorological situation belot the scavenging coefficient is calculated with a Belot parameterization In that case the input data are a rainfall rate given in the meteorological data file and coefficients a and b given for each species in the species file Concerning the deposition velocity the type can be chosen between none the deposition velocity is set to 0 for all species file the deposition velocities are read in a file for each species and meteorological situation constant the deposition velocity is constant for one given species and is given in the species file Input Files There are two input data files for this program the meteorological data file ref erence meteo dat and the species file reference species dat 1 Meteorological data file it contains as many sections as there are meteorological situations For each situation meteorological data temperature wind are given as described in section 5 1 5 They will be written unchanged in the output file which will be the me teorological data file o
61. other data have been used during preprocessing e gaussian meteo_aer dat gives all meteorological data and data on scavenging and depo sition It was created during preprocessing see Section B 1 e puff source_aer dat contains all the data on gaseous and aerosol sources e puff saver_aer cfg contains the options and paths to save the results Compile the program puff_aer cd Polyphemus processing gaussian utils scons py puff_aer Then execute it from TestCase config cd TestCase config Polyphemus processing gaussian puff_aer puff_aer cfg Results are stored in TestCase results puff_aer You can check the size of your out put files see 2 7 for details and then have a quick look on the values by applying get_info float to for instance Iodine bin You should get something like Minimum O Maximum 4 83636e 07 Mean 620 376 B 4 RESULT VISUALIZATION 187 B 3 3 Puff with Line Source The simulation uses puff which is the program for puffs with gaseous species only and the following data e Gaseous species CO2 e Source 1 line source e Meteorological situations Same four situations e Rural environment The simulation uses the following files e puff cfg gives the simulation domain options and the paths to the other files It also contains the species name e gaussian levels dat gives the vertical levels e meteo dat gives all meteorological data Loss processes are not taken into account so ther
62. particles without deposition nor scavenging LagrangianTransport with its related particle models To set the model just modify the definition of ClassModel typedef MyModel lt Argument s gt ClassModel For instance typedef Polair3DAerosol lt real AdvectionDST3 lt real gt DiffusionROS2 lt real gt Decay lt real gt gt ClassModel If you change a model you may also change the modules a model may need less modules or no module at all remove them if necessary The modules are template arguments of the model AdvectionDST3 lt real gt DiffusionROS2 lt real gt and Decay lt real gt in the previous example The order in which the modules are provided matters it is always advection diffusion and chemistry or transport single module which replaces advection and diffusion and chemistry See Section 2 6 5 for the modules you can use with the model you chose Then in your main C program declare the right driver You may replace BaseDriver with a new driver at this line in processing photochemistry polair3d cpp BaseDriver lt real ClassModel BaseQutputSaver lt real ClassModel gt gt Driver argv 1 See Chapter 4 for the various drivers available and their use Finally make sure to include all models modules drivers and output savers you use at the beginning of the file statements include cxx The SConstruct file or makefile may need changes too If you are not confident with your own changes have a
63. results file should be of size 4 x N x N x Ny x Nz bytes where N and Ny are the space steps along x and y directions respectively N is the number of vertical levels of the field and N is the number of time steps all of them specified in the main configuration file But if you specified the levels and a time interval on which to save you might have to use the above formula with the suitable values of N and N Indeed they could be different from the values N and N specified in the main configuration file 2 7 3 Checking the values You should also check that the fields have reasonable values using the programs from directory utils mainly get_info_float see Section 2 8 1 The command line to use get_info_float is get_info_float results 03 bin And the output looks like Minimum 0 0563521 Maximum 169 219 Mean 91 3722 2 8 Useful Tools A few useful tools are provided in directory Polyphemus utils Here is a brief explanation of their aim and their use 2 8 1 Information about Binary Files Two programs provided in Polyphemus utils are meant to provide information about the content of one or several binary files It is highly recommended to use these programs to check the output files of preprocessing programs and drivers models e g in Section 2 7 These two programs perform the same thing but on binary files with different floating pre cision e get_info float gives the minimum maximum and mean of binary files in
64. single precision e get_info_double gives the minimum maximum and mean of binary files in double preci sion It is assumed that the binary file to be analyzed by get_info_float or get_info_double contains only floating point numbers No extra data such as headers should be in the file Out put binary files from preprocessing programs and from drivers models satisfy this condition and can be properly read by get_info_float or get_info double Note that Polyphemus programs usually generate single precision files it is very likely that one only uses get_info_float Using get_info_float or get_info_double is straightforward 44 CHAPTER 2 USING POLYPHEMUS get_info_float Temperature bin Minimum 257 621 Maximum 300 882 Mean 282 262 get_info_float Temperature bin Pressure bin File Temperature bin Minimum 257 621 Maximum 300 882 Mean 282 262 File Pressure bin Minimum 56369 2 Maximum 102496 Mean 87544 1 2 8 2 Differences between Two Binary Files There are two different types of programs to compute statistics about the differences between two files e get diff precision where precision is float or double returns statistics about the difference between two files The files should only contain floating point numbers without headers e get_partial_diff_precision where precision is float or double returns statis tics about the difference between two files If these two files have the same size get
65. system built to manage several scales local regional and continental scales many pollutants from non reactive species to particulate matter several chemistry transport models a bunch of advanced methods in data assimilation and ensemble forecasting model integration Further details are available in Mallet V Qu lo D Sportisse B Ahmed de Biasi M Debry Korsakissok I Wu L Roustan Y Sartelet K Tombette M and Foudhil H 2007 Technical Note The air qual ity modeling system Polyphemus Atmospheric Chemistry and Physics 7 20 5 479 5 487 This is the main reference for Polyphemus Please cite it if you refer to Polyphemus in a publi cation a talk or so Polyphemus is made of data processing abilities available in libraries a library for physical parameterizations library AtmoData programs to compute input data to chemistry transport models chemistry transport models Eulerian Gaussian and Lagrangian drivers that is object oriented codes responsible for driving models in order to perform for instance simulations and data assimilation automatic generation of large ensembles and uncertainty estimation tools programs to analyze and display output concentrations primarily based on the library AtmoPy 10 CHAPTER 1 INTRODUCTION AND INSTALLATION Its flowchart is shown in Figure 1 1 in which three steps may be identified 1 preprocess ing interpolation
66. that concentration does not vary due to decay 6 1 C t C to exp E T1 2 The parameters needed are provided in species dat as follow species Spl Sp2 Sp3 Sp4 aerosol_species Aer1 Aer2 half_life Half lives in days put O for species without decay Spi 300 Sp2 216 Sp3 0 Sp4 41 half_life_aerosol Half lives in days put O for species without decay Aeri 250 Aer2 120 Use of Two Values of Decay Another option is that each species has two values of T 2 one for the day and one for the night This is in particular the case for species which have a biological effect As before for a species without decay both half life times are set to 0 The equation involved is very similar to equation 6 1 except that the value of T 2 can vary In that case With_time dependence is set to yes and With filiation matrix to no The parameters needed are provided in species dat species Spl Sp2 Sp3 Sp4 152 CHAPTER 6 MODULES aerosol_species Aeri Aer2 half_life_time Half lives in days put O for species without decay First value for day second for night Sp1 300 500 Sp2 216 300 Sp3 0 0 Sp4 41 72 half_life_time_aerosol Half lives in days put O for species without decay First value for day second for night Aer1 250 350 Aer2 120 180 Decay tests whether it is day or night and chooses the value of half life time to use Use of a Filiation Matrix The last solution is that
67. value of the corresponding scavenging coefficient or 3 9 PREPROCESSING FOR GAUSSIAN MODELS 101 deposition velocity The following example corresponds to a case with two gaseous species named gasl and gas2 and three aerosol species named aerl aer2 and aer3 The diameter file is the same as displayed before that is contains two diameters The output file looks like this situation Temperature Celsius degrees Temperature 10 Pressure Pa Pressure 101325 Wind angle degrees Wind_angle 30 Wind speed m s Wind 3 Boundary height m Boundary_height 1000 Stability class Stability D Scavenging coefficient of the gaseous species s 1 Scavenging coefficient gasi 0 0001 gas2 0 0001 Deposition velocity of the gaseous species m s Deposition_velocity gas1 0 0005 gas2 0 005 Scavenging coefficient of the aerosol species s 1 Scavenging _coefficient_aer aer1_0 5 95238e 05 aer1_1 5 95238e 05 aer2_0 5 95238e 05 aer2_1 5 95238e 05 aer3_0 5 95238e 05 aer3_1 5 95238e 05 Deposition velocity of the aerosol species m s Deposition_velocity_aer aer1_O 2 11708 aer1_1 6 69479 aer2_0 1 54404 aer2_1 4 88268 aer3_0 3 42833 aer3_1 10 8413 The value following aer1_0 corresponds to the calculated coefficient for the species aer1 and the diameter of index 0 that is in the case of our diameter file the diameter equal to 0 1 um The value fol
68. with_chemistry is set to yes Specific_humidity if with_chemistry is set to yes Lagrangian Transport MeridionalWind Zonal Wind VerticalDiffusion Horizontal_diffusion not always mandatory depending on the model of particle this value is given in the main configuration file Temperature Pressure For Gaussian models the data are single values read by the models in a configuration file All data for Eulerian and Lagrangian models are 4D fields outputs of meteorological preprocessing programs e meteo Kz attenuation and Kz_TM if you use Troen amp Mahrt parameterization for ver tical diffusion for models of type Polair3D or LagrangianTransport while using raw meteorological data from ECMWF e MM5 meteo and Kz_TM if you use Troen amp Mahrt parameterization for vertical diffusion for models of type Polair3D or LagrangianTransport while using raw meteorological data from model MM5 e MM5 meteo castor and Kz_TM if you use Troen amp Mahrt parameterization for vertical diffusion for models of type Castor while using raw meteorological data from model MM5 Remember that in addition data from programs emissions dep ic can be needed 2 6 5 Models Modules Compatibilities Models of type Polair3D require two transport modules one for advection and one for dif fusion while models of type Castor only require one transport module which deals with
69. y 34 gt gt gt y 7 print y y Combined commands with semicolon y 7 gt gt gt a 1 5 3 a is a list gt gt gt print al0 O is the first index gt gt gt a range 10 print a 160 CHAPTER 7 POSTPROCESSING o 2 3 4 5 6 T 8 9 gt gt gt for i in range 3 print i i i Ne oO In Python blocks are delimited by the indentation For instance without the prompt gt gt gt y 0 x 0 for i in 2 5 15 First loop for j in 1 3 9 Nested loop x ij Inside the inner loop y x Outside the inner loop but still inside the outer loop print y Outside the loops the loops are closed Arrays NumPy gt gt gt from numpy import Loads NumPy gt gt gt a arange 6 dtype d d means double floating point precision gt gt gt print a 0 1 2 3 4 5 gt gt gt a zeros 2 3 dtype d 2D array gt gt gt print a shape 2 3 gt gt gt ali 2 5 gt gt gt a l0 10 Fills the first line gt gt gt al1 0 2 1 From column O to column 1 2 is excluded gt gt gt print a E 10 10 10 Lats Es Bald gt gt gt print a sum a max a min a mean al 0 sum 33 0 10 0 1 0 5 5 9 0 gt gt gt print 2 al 1 2 Calculation without the first column 18 18 1 4 8 Matplotlib gt gt gt from numpy import gt gt gt from pylab import Loads Matplotli
70. 0 1996 1997 26 vertical sigma layers centered at 0 993935 0 971300 0 929925 0 875060 0 812500 0 745000 0 674500 0 604500 0 536500 0 471500 0 410000 0 352500 0 301500 0 257977 0 220273 0 187044 0 157881 0 132807 0 111722 0 0940350 0 0792325 0 0668725 0 0565740 0 0447940 0 0288250 0 00997900 2000 2002 30 vertical sigma layers centered at 0 998547 0 994147 0 986350 0 974300 0 956950 0 933150 0 901750 0 861500 0 811000 0 750600 0 682900 0 610850 0 537050 0 463900 0 393650 0 328275 0 269500 0 218295 0 174820 0 138840 0 109790 0 0866900 0 0684150 0 0539800 0 0425750 0 0335700 0 0239900 0 0136775 0 00501750 0 00053000 Gocart files processing Gocart files are handled by bc gocart program which takes 5 arguments bc gocart general cfg bc gocart CC cfg 200101 CC STD tv15 g day 200101 7 where 90 CHAPTER 3 PREPROCESSING e general cfg is the general configuration file e bc gocart CC cfg is the configuration file for CC Gocart species e 200101 CC STD tv15 g day is the Gocart file e 200101 is the date of Gocart file this file corresponds to daily carbonaceous values during month of January 2001 e 7 is the number of days for which boundary conditions are computed The configuration file bc gocart CC cfg provides all necessary informations to read Gocart fields and to translate them into polair3d species paths Directory_bc Directory where output will be written
71. 1 The only data that may differ are the paths to the input files 124 CHAPTER 5 MODELS 5 2 2 Source Description plume source_aer dat It is the same file as the source file for gaseous species except that obviously some or all emitted species will be particulate species The corresponding sections are named aerosol_source However some lines are different for aerosols e The species is given after the key word Species name instead of Species e Only one species per source can be given 5 2 3 Vertical Levels plume level dat It is the same file as in Section 5 1 5 2 4 Species gaussian species_aer dat The section species lists the gaseous species and the section aerosol species lists the aerosol species In the case of radioactive or biological decay the sections are the same as described in Section 5 1 and contain the half life times of both gaseous and aerosol species 5 2 5 Diameters diameter dat See Section 3 9 2 5 2 6 Meteorological data gaussian meteo dat See Section 5 1 5 5 3 GaussianP uff Model GaussianPuff is the Gaussian puff model for gaseous species only The associated pro gram to be run is puff and it is configured with one configuration file puff cfg and four data files puff dat puff level dat gaussian meteo dat and gaussian species dat The configuration file provides the paths to the four other files Basically given a series of instan taneous puffs emitted at differe
72. 4 CHAPTER 2 USING POLYPHEMUS polyphemus path Path to Polyphemus i e the directory where one finds preprocessing processing utils CREDITS include_path Path s to all dependencies not available in the system directories in CPATH or in CPLUS_INCLUDE_PATH c_compiler Name of the C compiler c cpp compiler Name of the C compiler cpp fortran compiler Name of the Fortran compiler fortran linker Name of the linker link library path Path s to compiled libraries not available in the system directories in LIBRARY PATH or in LD_LIBRARY_PATH exclude_target List of targets to ignore exclude dependency Files to ignore in the directories of include path described by regular expressions you need to know what you are doing flag_cpp Additional C compilation flags flag_cpp flag_fortran Additional Fortran compilation flags flag_fortran flag_link Additional link flags flag_link Note About the Libraries Search SCons does not search all the time for the libraries It caches the results The first time you may read Checking for C library blas yes Checking for C library gslcblas no And the second time Checking for C library blas cached yes Checking for C library gslcblas cached no If you want to force SCons to search again for the compiled libraries because you have just installed one of them or because you logged in another computer with a different installation launch SCons with option
73. 8 BOUNDARY CONDITIONS 89 jmx total number of latitudinal grid 91 Imx total number of vertical layers version dependent nmx total number of species 4 or 5 see species list above ntl yyyymmdd after 2000 year month day e g 20010201 or yymmdd before 2000 e g 970101 nt2 hhmmss hour minute second e g 120000 nn tracer number see species list above Q 3 dimensional concentration of tracer nn nstep total time step e g in 200101 nstep 4 31 for 4 times day nstep 31 for daily average files and nstep 1 for monthly average files Important If you plan to read Gocart data on your own do not forget to translate files from big endian to little endian if necessary The conventions and format of Gocart files may change in the future Fields resolution The horizontal resolution of Gocart fields is 2 degree latitude x 2 5 degree longitude except at the poles where latitudinal resolution is 1 degree In other words the longitude interval is 180 2 5 177 5 144 cells and the latitude one is 89 5 88 2 8889 5 91 cells The vertical resolution is given as a given number of vertical sigma levels The number of vertical levels depends of the year 1980 1995 20 sigma layers centered at 0 993936 0 971300 0 929925 0 874137 0 807833 0 734480 0 657114 0 578390 0 500500 0 424750 0 352000 0 283750 0 222750 0 172150 0 132200 0 100050 0 0730000 0 0449750 0 029000 0 0095000
74. AC species nor mally input species_opac_match dat 7 4 COMPUTATION OF AEROSOL OPTICAL PARAMETERS 169 Directory_efficiency_factor Directory_result Path to the directory containing the efficiency fac tors file normally input Mie_tab Path to the directory where the computed optical fields will be written domain_result Date t_min Delta_t Nt x_min Nx y min Delta y Ny Nz Wavelength Tabulation refractive_index real Tabulation_refractive_index_imaginary Ndiameter N_OPAC_wavelength N_water_wavelength Date of the beginning of the polair3d siream simu lation Starting time in seconds since midnight Simulation time step Simulation number of time steps Abscissa of the center of the lower left cell longitude in degrees Number of cells along x integer Ordinate of the center of the lower left cell latitude in degrees Step length along y usually in degrees latitude Number of cells along y integer Number of vertical levels integer Loptic List of the wavelengths for which the optical param eters are computed in um Dimension of the tabulation efficiency factors for the real part of the refractive index Dimension of the tabulation efficiency factors for the imaginary part of the refractive index Dimension of the tabulation efficiency factors for the aerosol diameters Number of wavelengths for which OPAC data are given do not change Number of wav
75. ATION PSTARCRS 2 76 86 C YX Pa REFERENCE SURFACE PRESSURE MINUS PTOP GROUND T 2 76 86 c YX K GROUND TEMPERATURE RAIN CON 2 76 86 c YX cm ACCUMULATED CONVECTIVE PRECIPITATION RAIN NON 2 76 86 c YX cm ACCUMULATED NONCONVECTIVE PRECIPITATION TERRAIN 2 76 86 c YX m TERRAIN ELEVATION MAPFACCR 2 76 86 c YX DIMENSIONLESS MAP SCALE FACTOR MAPFACDT 2 76 86 D YX DIMENSIONLESS MAP SCALE FACTOR CORIOLIS 2 76 86 D YX 1 s CORIOLIS PARAMETER RES TEMP 2 76 86 c YX K INFINITE RESERVOIR SLAB TEMPERATURE LATITCRS 2 76 86 c YX DEGREES LATITUDE SOUTH NEGATIVE LONGICRS 2 76 86 c YX DEGREES LONGITUDE WEST NEGATIVE LAND USE 2 76 86 C YX category LANDUSE CATEGORY TSEASFC 2 76 86 c YX K SEA SURFACE TEMPERATURE PBL HGT 2 76 86 c YX m PBL HEIGHT REGIME 2 76 86 c YX DIMENSIONLESS PBL REGIME SHFLUX 2 76 86 C YX W m 2 SENSIBLE HEAT FLUX LHFLUX 2 76 86 C YX W m 2 LATENT HEAT FLUX UST 2 76 86 C YX m s FRICTIONAL VELOCITY SWDOWN 2 76 86 C YX W m 2 SURFACE DOWNWARD SHORTWAVE RADIATION LWDOWN 2 76 86 C YX W m 2 SURFACE DOWNWARD LONGWAVE RADIATION SWOUT 2 76 86 C YX W m 2 TOP OUTGOING SHORTWAVE RADIATION LWOUT 2 76 86 C YX W m 2 TOP OUTGOING LONGWAVE 2 8 USEFUL TOOLS SOIL SOIL SOIL SOIL SOIL SOIL SOIL SOIL SOIL SOIL SOIL SOIL CANOPYM WEASD SNOWH SNOWCOVR ALB GRNFLX VEGFRC SEAICE SFCRNOFF UGDRNOFF T2 Q2 U10 V10 ALBD SLMO SFEM SFZO THERIN T R G a ge 8 8H HAAH PWNPPWNPFPPWNEH SFHC SCFX SIGMAH ON
76. AemiCONT3 200311 tar gz e the INCA data http euler 1md polytechnique fr chimere downloads INCA 200501 tar gz Some command lines have been divided by but should be put as one line 191 192 APPENDIX C CASTOR TEST CASE C 1 Modifying the General Configuration File In what follows TestCase refers to the path to TestCase Castor and Polyphemus to the path to version 1 5 of Polyphemus The file config general cfg is used by all preprocessing programs and as such must be the first file you modify when performing preprocessing Make sure to modify and use the file provided in the directory TestCase config You should only need to replace the value of lt Programs gt to have the path to preprocessing in the last version of Polyphemus compatible with the test case you have The domain is defined for a simulation over Europe Make sure that the date is 2003 07 30 C 2 Computing Input Data C 2 1 Land Data A python program is provided among the preprocessing programs to generate land data from Chimere raw data Files LANDPAR and LANDUSE_CONT3 from Chimere V200606B are necessary to generate land data They have been included in the archive python Polyphemus preprocessing ground ground castor py config ground castor cfg This creates two files LUC bin and Roughness bin in data ground C 2 2 Meteorological Data Download the meteorological file for Chimere test case and put it in raw_data then extract it cd raw_data
77. CHAPTER 2 USING POLYPHEMUS 2 9 Ensemble Generation In directory utils ensemble generation the Python module ensemble generation is pro vided It helps generating ensembles of any size 2 9 1 Requirements About dsh dsh is an implementation of a wrapper for executing multiple remote shell com mands Further information about this tool is available on the web site http www netfort gr jp dancer software dsh html en You have to create a directory HOME dsh group and put a file in it with the list of hosts Each line of this file has to contain a host name To check that dsh is working one may for instance check the number of CPUs of each host dsh g all r ssh Mc cat proc cpuinfo grep processor wc 1 where all is the name of the file where you have the hosts list HOME dsh group al1 Installation You do not have to compile anything but you must add the path utils ensemble generation to your environment variable PYTHONPATH Then you can load the module with from ensemble_generation import Note This tools library is written in Python and uses the library AtmoPy The shell Bash is also required 2 9 2 Configuration Files Ensemble Parameters The file parameter cfg is used to design the ensemble It contains four sections general physic numeric and input_data In the section general you have some general information about the simulation like in the configuration file general cfg date_min 2001 04 22 da
78. CHAPTER 5 MODELS 5 8 Polair3DChemistryAssimConc Polair3DChemistryAssimConc is dedicated for a state space formulation of the underlying dy namical model The stochastic modeling is implemented for diverse applications such as data assimilation Polair3DChemistryAssimConc is configured with three configuration files polair3d cfg polair3d data cfg and polair3d saver cfg and two data files levels dat and species dat The four files other than the main configuration file polair3d cfg are the same as those for Polair3DChemistry The main configuration file is an extension of that of Polair3DChemistry The additional parameters are Species Levels Error_covariance_model Background_error_variance Balgovind_scale_background Model_error_variance Balgovind_scale_model state List of species included in model state vector All species must be on the same line List of vertical levels of model domain included in model state vector All levels must be on the same line data_assimilation Stochastic model for model and background error covariance With option set to Balgovind the corresponding error covariance matrix is calculated using Balgovind correlation function with option set to diagonal_constant the corresponding error covari ance matrix is a diagonal matrix of which the diagonal elements are error variances Error variance for background concentrations The unit for the option value is ug m Balgovind s
79. Configuration File polair3d cfg 128 552 Data Description polair3d data cig o coc ee G 129 5 5 3 Vertical Levels and Species e ee eee 131 PolairgDUhemusiry sp s a aa e aa cal a OE A pes dow es 132 56 1 Main Configuration File polaired cig io spo ccs gs eere pke 132 5 6 2 Data Description polair3d data cfg 133 5 6 3 Vertical Levels and Species e e eens 133 PolairsDAetosal lt lt cidcid a a a EES EGS 134 3 1 1 Main Configuration File polair3d cfg saa eu seau wa ada 134 5 1 2 Data Description polair3d data cfg lt c oc o o 135 5 7 3 Vertical Levels and Species ee eee eee 135 PolairsDChemistryAssimConG 2 4 62 ee ee ae Pak OE PE we kw eS 136 Castor lransport a s coyor dro Sea da er a G aa e a 136 5 9 1 Main Configuration File castor cfg 1 046 145 0445 50846445 136 5 9 2 Data Description castor data C 8B o een 137 5 9 3 Vertical Levels and Species eee ee eee 138 CastorChemistry ecc saatma e whoa 48 ee be eee eee eee a es 138 5 10 1 Main Configuration File Castor Cfg 4 4224 05 pH eee eb de 138 5 10 2 Data Description and Species 2a oak 2 209 eae ew Ae a wee 138 510 3 Chemistry Piles s s s ec ek A RR Oe RR eR REO 138 Pluma rd coss ac ee ee eb a Pe we OA a ee ae Be e e 139 5 11 1 Main configuration fle o a s s a a saoe mae E a e 139 5 112 Date description fl lt s so s
80. Data In IPython AtmoPy first reads the configuration file disp cfg gt gt gt from atmopy import Loads AtmoPy gt gt gt from atmopy display import Loads AtmoPy submodule display gt gt gt d getd disp cfg d is a 4D array You may overwrite the entries in disp cfg gt gt gt d getd disp cfg filename results NO bin Loads another file without editing disp cfg gt gt gt d getd disp cfg Nt 0 Overwrites Nt gt gt gt d getd disp cfg filename results NO bin Nt 0 gt gt gt d getd disp cfg filename results NO bin Nt 0 Nz 2 The array d has four dimensions NtxNzxNyxNx Hence d 10 0 2 9 refers to data at the time step 10 11t time step since indices start at 0 in the first level in horizontal cell with indices 2 along y and 9 along x Another example is d 15 0 which is a 2D array dimensions y x of data at 16 time step and in the first layer A few examples show the way data can be manipulated gt gt gt d getd disp cfg filename results 03 bin gt gt gt d_ref getd disp cfg filename results 03 reference bin gt gt gt print d shape Same as d_ref shape Nt 48 Nz 1 Ny 46 Nx 67 48 1 46 67 gt gt gt print d mean 78 5597571528 gt gt gt print abs d d_ref mean 16 99608674 gt gt gt from numpy import Needed for sqrt see below gt gt gt print sqrt d d_ref d d_ref mean
81. If the deposition velocities are user defined type constant or type file is it the total deposition velocity or only the diffusive part the gravitational settling velocity is then added Put total or diffusive The parameterization type for the scavenging coefficient of aerosol species can be chosen between e none the scavenging coefficient is set to 0 for all aerosol species e constant the scavenging species file coefficient is constant for one given diameter and entered in the e file the scavenging coefficients are read in a file for each species diameter and meteo rological situation e slinn the scavenging coefficient is calculated with a Slinn parameterization In that case the only input data that are used are the rainfall rate and the particle diameters Concerning the deposition velocity the type can be chosen between e none the deposition velocity is set to 0 for all aerosol species e constant the deposition species file velocity is constant for one given diameter and entered in the e file the deposition velocities are read in a file for each species diameter and meteoro logical situation In case the entry Velocity part is set to diffusive the gravitational settling velocity is calculated for each particle given the density and the diameter provided in the species file and the pressure and temperature provided in the meteorological data file It is then added to the c
82. KING RESULTS 41 Please note that 4DVar assimilation scheme only works with RACM chemistry module As for drivers BaseDriver is the simplest and the most used of them The other drivers available are e PlumeDriver for Gaussian plume model with or without aerosol species e PuffDriver for Gaussian puff model with or without aerosol species e Data assimilation drivers OptimalInterpolationDriver optimal interpolation EnKFDriver ensemble Kalman filter RRSQRTDriver reduced rank square root filter FourDimVarDriver 4D Var to be associated with Polair3DAssimConc model e Drivers for the verification of adjoint coding in variational assimilation AdjointDriver GradientDriver Gradient4DVarDriver 2 7 Checking Results It is highly recommended to check the fields generated by Polyphemus programs meteorological fields deposition velocities output concentrations First you should check the size of the binary files Be it with preprocessing or processing programs results are saved as floating point numbers with single precision As we will express file size in bytes a factor 4 will appear below 2 7 1 Checking the output file size of preprocessing programs In what follows e take Nz Ny Ny and N from the section domain of the configuration files e Ndays is the number of preprocessed days and e Niotal is the total number of preprocessing time steps Neotar Ne X Naays Here are some indications on what to check d
83. Line Source 2 4 2 6 24 ee ko eS Bid Result Visualization css ss 50 ek a GS B41 Gaussian Plum 2 2 6 2 244 saaressa B 4 2 Gaussian Puff with Aerosol Species B 4 3 Gaussian Puff with Line Source Castor Test Case C 1 Modifying the General Configuration File C 2 Computing Input Data 6 2 1 Land Date oe 2 406244 sa ee C 2 2 Meteorological Data ssa s a aceta aco a caosa hoe aaa C 2 3 Anthropogenic Emissions C24 Biogenic Briissions soos sop pa eee Be ee ae Co Gumming Emissions scs e potone Re e ee Ba oe ee C 2 6 Deposition Velocities 2 0 00 C 2 7 Boundary Conditions 66s daa we es C 3 Launching the Simulation 4 C 3 1 Modifying the Configuration Files G 8 2 Simulstion 22 0220 84482 doe G4 a ee C 3 3 Checking your results 000000 C 4 Visualizing the Results o a Lexical Reference of Polyphemus Configuration Files Di Debnitons cia ap wee Be Se a oe A Seen ee D2 Wlexibiity sn eon a ep RO a Se ee a ia D3 Comments coords bereri rra pia rie RES hasi DA MUP a nace Re we ae rl a 4S DO ONONE atte ee ee ka ee A BR S D6 Multiple Files s s poe ke ee Ae ee rs ee Dr CUATES 2 6 ub we eA a Rhee dh EAS AA eee A 22 he eek ied SRR RES ERR Re OER CONTENTS Chapter 1 Introduction and Installation 1 1 Polyphemus Overview Polyphemus Mallet et al 2007b is an air quality modeling
84. MWE file for the previous day must be available Indeed ECMWF files contain data that is accumulated over several time steps like rain and values from previous steps including from the previous day must be subtracted to get the actual value of the field Here is the list of input data needed in ECMWF files with their Grib code surface temper ature 167 skin temperature 235 surface pressure 152 temperature 130 specific humidity 133 liquid water content 246 medium cloudiness 187 high cloudiness 188 meridional wind 132 zonal wind 131 zonal friction velocity 180 meridional friction velocity 181 solar radiation 169 boundary layer height 159 soil water content 39 sensible heat 146 evaporation 182 The list of output variables is pressure surface pressure temperature surface temperature skin temperature Richardson number surface Richardson number specific humidity liquid wa ter content solar radiation photosynthetically active radiations direct beam diffuse and total zonal wind meridional wind wind module wind friction module boundary layer height soil water content evaporation sensible heat and first level wind module Inside meteo ECMWF variables are read and decumulated in time if necessary Pres sures at ECMWF levels are computed with ComputePressure and altitudes are computed with ComputeInterfHeight and ComputeMiddleHeight Richardson number is then estimated with Comput
85. MeridionalWind ZonalWind and VerticalDiffusion If deposition is activated With deposition 138 CHAPTER 5 MODELS volume_emission Date_min Delta_t Nz If volume emissions are activated Fields Filename With_volume_emission Nz is the num ber of levels in which pollutants are emitted 5 9 3 Vertical Levels and Species A file containing vertical levels similar to the one for Polair3D models is read but is not useful Give any such file Species file has two sections e species which contains all species managed by the simulation e species _ppm which contains all species for which an upwind scheme is not used 5 10 CastorChemistry Model CastorChemistry is derived from CastorTransport and all data presented in Section 5 9 are necessary for this model too In addition some other parameters are needed 5 10 1 Main Configuration File castor cfg options With_chemistry Is chemistry taken into account chemistry Reaction file Data file containing the reactions Stoichiometry_file Data file containing the stoichiometry of the reactions Photolysis_file Data file containing the photolysis reactions Rates_file Data file containing the reaction rates 5 10 2 Data Description and Species Data Description The only difference with what is described in Section 5 9 2 is that more meteorological fields are necessary see Section 2 6 4 Species The species file is exactly the same as the one presen
86. NNNNNNNNNNNNNNNNNNNNNNNNNNNNN RN 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 27 27 27 27 27 27 27 25 aaa aa a qa4aa qa qua14a4Q qac9a 4 OG OGO OTO OONO QO H YX YX YX YX YX YX YX YX YX YX YX YX YX YX YX YX YX YX YX YX YX YX YX YX YX YX CA CA CA CA CA CA CA KANAK m 3 m 3 m 3 m 3 m 3 m 3 m 3 m 3 m 3 m 3 m 3 m 3 m 3 m 3 m 3 m 3 m mm m fraction fraction W m 2 fraction DIMENSIONLESS mm mm K kg kg 1 m s 1 m s 1 PERCENT fraction fraction cm 100 cal cm 2 K 1 s 1 2 J m 3 K 1 fraction sigma Total number of time steps read in the file 97 For each variable is provided e its name e its number of dimensions e its length along dimension 1 if applicable e its length along dimension 2 if applicable e its length along dimension 3 if applicable e its length along dimension 4 if applicable e the position at which the variable is given Stag y gt gt 47 RADIATION SOIL TEMPERATURE IN LAYER SOIL TEMPERATURE IN LAYER SOIL TEMPERATURE IN LAYER SOIL TEMPERATURE IN LAYER TOTAL SOIL MOIS IN LYR 1 TOTAL SOIL MOIS IN LYR 2 TOTAL SOIL MOIS IN LYR 3 TOTAL SOIL MOIS IN LYR 4 SOIL LQD WATER IN LYR SOIL LQD WATER IN LYR SOIL LQD WATER IN LYR SOIL LQD WATER IN LYR CANOPY MOISTUR E CONTENT WATER EQUIVALENT SNOW DEPTH PHYSICAL SNOW DEPTH FRACTIONAL
87. Polyphemus 1 8 User s Guide ENPC INRIA EDF R amp D Meryem Ahmed de Biasi Vivien Mallet Pierre Tran Irene Korsakissok Damien Garaud Edouard Debry Lin Wu Marilyne Tombette Victor Winiarek http cerea enpc fr polyphemus polyphemus help lists gforge inria fr Contents 1 Introduction and Installation 1 1 Polyphemus Overview 25444582548 Fb Dd RR ee eee eS 12 SIA co a bee de eB a e ed ee e 1 2 1 Operating Systems and Compilers o e 1 2 2 External Libraries and Python Modules 12 8 Parallel Computing cocidos a o ee 1 83 Installation o e ev 544 6380 4404 24 54 a a a ee bee a es WO Main metrutHonS bond ek ee ee BH Ace et Boh SP ee a A A o hs ha a dee a Wee he a Be PSR Eee Ba ee eZ RSS A A Re we ge oh a A ees Gas Sa Be BA WE oe 3A ONGRIB o eca ea hot tae Ro DRA a IEEE a 136 ISORROPIA 22420664420 545 be a a Ree ee hae aed es LIE TSORROPTA Ae bn e ee ek ek oe de oe le e 1 3 7 Fortran Subroutines a s sa s oaa a 84 p g ma eed eee EG Se ee 2 Using Polyphemus 21 TEMAS os agro dop dei LR Se bo A e Eke ee ey eee He ee Bees ds A 22 Gude Overview o cli co ade ta ees Soe ee Doe sar eo ee Bole ae amp A 2 0 Compiling the Programs o lt sc s sesasi 588 4 bbe wee a es 2a compiling with SGON s sp e ace Be ele ek ek ee ee a Re aS 23 2 Compilme with make sose a m a m 845 554 4346 BER ee ee 2 3 3 Compiling for Parallel Computing 2 4 Editing your Configurati
88. Polyphemus processing photochemistry species racm dat and is consistent with RACM as implemented in Photochemistry Section 6 2 1 5 7 Polair3DAerosol Polair3DAerosol is configured with three configuration files polair3d cfg polair3d data cfg and polair3d saver cfg and two data files levels dat and species dat The main con figuration file polair3d cfg provides the paths to the four other files A configuration for Polair3DAerosol is an extension of the configuration for Polair3D Chemistry In this section the description is limited to Polair3DAerosol additional parameters See Sec tion 5 6 for the rest of the configuration 5 7 1 Main Configuration File polair3d cfg In addition to fields introduced in Section 5 6 1 the following fields are read by Polair3DAerosol domain The bounds of the diameter classes for aerosol species Note that the classes are the same for each aerosol species Bin_bounds options Are initial conditions provided for given aerosol species If not initial concentrations are set to zero Are boundary conditions available for given aerosol species Does the aerosol module returns cloud droplet pH Liquid water content threshold above which a cloud is diagnosed in the cell With_initial_condition_aerosol With_boundary_condition_aerosol With_pH Lwc_cloud_threshold Fixed_aerosol density With_deposition_aerosol Compute_deposition_aerosol With_point_emission aerosol With_surface_
89. RROPIA ISORROPIA Nenes et al 1998 is an aerosol thermodynamics module which is necessary for aerosol module Aerosol_SIREAM_SORGAM to work It is only needed if there are aerosol species involved In that case you will need sources for ISORROPIA You can obtain them from its home page http nenes eas gatech edu ISORROPIA The version of ISORROPIA that is supported in Polyphemus is 1 7 released on 2009 05 27 After you obtained and extracted the files you have to put the files in directory include isorropia and rename them as follows e ISOCOM FOR as isocom f e ISOFWD FOR as isofwd f e ISOREV FOR as isorev f e ISRPIA INC as isrpia inc If you want to use the module Aerosol_SIREAM_SORGAM parallelized with openMP you should also apply the related patch cd include isorropia patch p1 lt modules aerosol isorropia patch_v1 7_2009 05 27 1 3 INSTALLATION 17 1 3 6 ISORROPIA_AEC Aerosol module Aerosol_SIREAM_AEC requires a modified version of ISORROPIA You are advised if you need it to copy include isorropia created and patched as explained in Section 1 3 5 as include isorropia aec and apply to it the patch include modules aerosol isorropia_aec patch_vXXX where XXX is the supported version of ISORROPIA cd include cp r isorropia isorropia_aec cd isorropia_aec patch p1 lt modules aerosol isorropia_aec patch_v1 7_2009 05 27 If the patch does not work you might have a different release of ISORROPIA 1 7
90. SE DOMAIN OF THE DOMAIN POINT IX JX 76 J LOCATION IN THE COARSE DOMAIN OF THE DOMAIN POINT IX JX 86 TERRAIN DATA RESOLUTION in degree 0 0833333 LANDUSE DATA RESOLUTION in degree 0 0833333 MM5 Version 3 MM5 System Format Edition Number 1 46 CHAPTER 2 USING POLYPHEMUS MM5 Program Version Number 6 MM5 Program Minor Revision Number 1 FOUR DIGIT YEAR OF START TIME 2004 INTEGER MONTH OF START TIME 8 DAY OF THE MONTH OF THE START TIME 9 HOUR OF THE START TIME O MINUTES OF THE START TIME O SECONDS OF THE START TIME 0 TEN THOUSANDTHS OF A SECOND OF THE START TIME O MKX NUMBER OF LAYERS IN MM5 OUTPUT 25 TIMAX SIMULATION END TIME MINUTES 5760 TISTEP COARSE DOMAIN TIME STEP IN SECONDS 100 TAPFRQ TIME INTERVAL MINUTES THAT DATA WERE SAVED FOR GRIN 60 Outputs Name Dim 1 2 3 4 Stag Ord Units Description U 3 76 86 25 D YXS m s U COMPONENT OF HORIZONTAL WIND V 3 76 86 25 D YXS m s V COMPONENT OF HORIZONTAL WIND T 3 76 86 25 c YXS K TEMPERATURE Q 3 76 86 25 c YXS kg kg MIXING RATIO CLW 3 76 86 25 c YXS kg kg CLOUD WATER MIXING RATIO RNW 3 76 86 25 c YXS kg kg RAIN WATER MIXING RATIO ICE 3 76 86 25 c YXS kg kg CLOUD ICE MIXING RATIO SNOW 3 76 86 25 C YXS kg kg SNOW MIXING RATIO GRAUPEL 3 76 86 25 c YXS kg kg GRAUPEL MIXING RATIO RAD TEND 3 76 86 25 c YXS K DAY ATMOSPHERIC RADIATION TENDENCY W 3 76 86 26 C YXW m s VERTICAL WIND COMPONENT PP 3 76 86 25 c YXS Pa PRESSURE PERTURB
91. Then the relative humidity and the critical relative humidity are computed respectively with ComputeRelativeHumidity and ComputeCriticalRelativeHumidity The cloud fraction is computed with ComputeCloudFraction For it the cloudiness and cloud height are diagnosed using ComputeCloudiness and ComputeCloudHeight Finally attenua tion coefficients are computed with ComputeAttenuation LWC RADM parameterization or ComputeAttenuation_ESQUIF ESQUIF parameterization Output files are e the rain intensity Rain bin in mmh e the convective rain intensity ConvectiveRain bin in mmh e the 3D cloud attenuation coefficient in 0 2 e the cloud height in m To launch the program just type attenuation general cfg meteo cfg 2001 04 22 3 4 3 Program Kz Program Kz computes the vertical diffusion coefficients needed in almost all applications using Louis parameterization Louis 1979 It should be launched after attenuation The reference configuration files for Kz is Polyphemus preprocessing meteo meteo cfg together with Polyphemus preprocessing general cfg In addition to the domain definition and to the entries of meteo cfg introduced in Section 3 4 1 and 3 4 2 below are options for Kz paths File Kz Name of the file where the vertical diffusion coefficients output are stored kz Min Lower threshold for vertical diffusion in m s Min urban Lower threshold for vertical diffusion over urban areas in m s
92. You can then try with include modules aerosol isorropia_aec patch_v1 7 that was related to a previous release of ISORROPIA 1 7 It is also possible that the encoding of some of the files in include isorropia_aec is not adapted to your filesystem Check it and modify it if necessary 1 3 7 Fortran Subroutines Before reading further please note that SCons should handle automatically the problem de scribed below If you plan to use make instead of SCons you are advised to read what follows carefully Linking a Fortran code with C may raise a problem when the name of a Fortran subroutine contains an underscore In this case the subroutine identifier in the compiled object may be named with two underscores at the end instead of one as for other Fortran subroutines This is a strange convention that appears in G77 but no more in GFortran which replaces G77 In Polyphemus there are tests to deal with this Most of the time the tests will succeed But if you use untested compilers or if you mix compilers from different packages you may have undefined symbols at link stage that is something like polair3d o gnu linkonce t In function Polyphemus DiffusionROS2 lt double gt undefined reference to diff_x_ In that case Polyphemus tests have failed But there is an easy way to fix that be it with SCons or make you need to slightly change the compilation options With SCons add the option _ 1 on the command line tha
93. _cost indicates whether the values of the objective function are displayed when perturbation decreases accordingly 4 8 3 Gradient4DVarDriver The objective function is chosen to be the observation discrepancy in the 4DVar objective function This driver aims at the verification of the adjoint code of observation operator All the options for this driver are same as those in Section 4 8 2 4 9 Output Savers 4 9 1 BaseOutputSaver The saver BaseQutputSaver is configured with a file that contains one or several sections save Each section is associated with one element of a list of output saver units managed by BaseOutputSaver According to the value of Type in every section different saver units are called Note however that a group attribute can be set in BaseOQutputSaver the default being all and the other choices being forecast and analysis and that only savers with the same group are called Some parameters must be provided for any kind of savers save Species Chemical species to be saved If it is set to all concentrations for all species are saved Date_beg The date from which the concentrations are saved If concen trations are averaged the first step at which concentrations are actually saved if not Date_beg but Date_beg plus the number of steps over which concentrations are averaged If the value 1 is supplied Date_beg is set at the start of the simulation Date_end The last date at which concentrations may be
94. _partial_diff_precision does the same as get_diff_precision If the files do not have the same size only the first values as much as possible are compared Here is an example with get_diff_float launched from processing photochemistry results atils get_diff_float 03 ref bin 03 diff bin File 0 File 1 Minima 0 0145559 0 0181665 Maxima 136 795 175 123 Means 71 578 65 4088 Standard dev 26 958 28 643 Difference Minimum 57 324 Maximum 66 9219 Mean 6 16919 Standard dev 14 4999 Correlation between files 0 and 1 0 865696 2 8 USEFUL TOOLS 45 2 8 3 MM5 Files It can be useful to get information about MM5 files in particular to modify the configuration file MM5 meteo cfg see Section 3 4 5 To do so two programs are provided e MM5_var_list gives a list of all variables stored in a MM5 file It also gives miscellaneous information about the file Information provided can be needed in preprocessing step program MM5 meteo Section 3 4 5 number of space steps time step and projection type e get_info_MM5 gives the minimum maximum mean and standard deviation of a variable stored in a MM5 file use program MM5_var_1ist to know what variables are stored in the file For instance the output of MM5_var_list for the file MM5 2004 08 09 used in Polair3D test case see Appendix A is Metadata 999 means unknown OUTPUT FROM PROGRAM MM5 V3 11 TERRAIN VERSION 3 MM5 SYSTEM FORMAT EDITION NUMBER 1
95. a Time step between two puff emissions can be greater than or equal to the simulation time step deposition Model used to take dry deposition into account Chamberlain for Chamberlain model Overcamp for Overcamp model Number of points to calculate the Chamberlain integral integer Relevant only when dry deposition with Chamberlain model is taken into account output Path to the configuration for the output saver 126 CHAPTER 5 MODELS With_output_plume_mass If yes the total plume mass is saved into a binary file of size Nt X Nepecies only with chemistry File_mass Path to the binary file to save the total plume mass read only if With output plume mass is set to yes 5 3 2 Puff Description puff dat The point emission file used by the Gaussian puff model are described in Section 5 15 There are as many sections as sources and they can be of type puff or continuous In the later case the continuous source is discretized into a series of puffs with the time step given in the main configuration file with field Delta_t_puff If the simulation time step is At the effective time step between two puffs is Ntpug x At where Ntpug max Atpug At 1 Hence it can only be equal to or greater than the simulation time step Every puff time step if the source is still emitting at that time and if the source rate is R in mass unit per second a new puff of quantity Q R x Ntpur x At is emitted
96. a large scale and can integrate various additional phenomena such as photochemical chemistry or deposition Gaussian mod els have been added to perform simulation at a local scale of the effect of a continuous plume or instantaneous puff source of pollutant Lagrangian stochastic models were the last implemented in Polyphemus They allow to compute the passive dispersion of pollutants Scavenging or deposition cannot be taken into account yet As for now Castor models only deal with gaseous species while the other models deal with gaseous or aerosol species 5 1 GaussianPlume Model GaussianPlume is the Gaussian plume model for gaseous species only The associated pro gram to be run is plume and it is configured with one configuration file plume cfg and four data files plume source dat plume level dat gaussian meteo dat and gaussian species dat The configuration file provides the paths to the four other files Basically given a series of con tinuous point sources it calculates the concentration of each species along a specified grid There are several output files one for each species that are binary files The way results are saved is described in an additional configuration file which corresponds to the file described in Section 4 9 reference plume saver cfg In these configuration files there are entries that are not relevant for the Gaussian model but that must be provided anyway In descriptions of configuration files
97. ace temperature is stored SurfaceRelativeHumidity File where surface relative humidity is stored FrictionVelocity File where the friction velocity is stored Attenuation File where the attenuation is stored AerodynamicResistance File where the aerodynamic resistance is stored LUC_file File containing the land use cover Nc Number of land use cover categories Nveg Number of vegetation classes Land data File containing land data in Chimere format Species_data File containing the data for species molecular weight Henry con stant reactivity Directory_dep Directory where the output files are stored Species Ns Number of species for which data are provided The program must be launched with dep emberson general cfg dep emberson cfg 2004 08 09 2004 08 12 3 6 EMISSIONS 79 3 6 Emissions Emissions are generated on the basis of land data anthropogenic emissions and meteorological fields biogenic emissions The programs must be launched after meteorological and ground preprocessing For Gaussian models a preprocessing step may also be required in case line emissions are included see Section 3 9 1 3 6 1 Mapping Two Vertical Distributions distribution Program distribution may be used to define the distribution of emissions along the vertical It reads the vertical distribution of emissions in some input grid and maps this distribution on an output vertical grid Thus it generates a file with the vertical distr
98. advection and diffusion This does not mean that a module could not be shared by both models although there is no common module in current Polyphemus version Table 2 4 and Table 2 5 present a summary of the compatibility between models and modules Note that Gaussian models are not included in these tables because they don t need any module In Table 2 4 Polair3DAssim designates the assimilation model Polair3DChemistryAssimConc In Table 2 5 module names are shortened to be displayed on one line Castor is ac tually ChemistryCastor PhotoChem is Photochemistry RADM is ChemistryRADM SORGAM is Aerosol_SIREAM_SORGAM and AEC is Aerosol_SIREAM_AEC 40 CHAPTER 2 USING POLYPHEMUS Table 2 4 Compatibility between models and transport modules AdvectionDST3 DiffusionROS2 TransportPPM Polair3DTransport Polair3DChemistry Polair3DAerosol Polair3DAssim PlumelnGrid Castor Transport CastorChemistry X Ps Ps PS PS X Pa Ps PS PS X X SplitAdvectionDST3 GlobalAdvectionDST3 GlobalDiffusionROS2 Polair3DTransport Polair3DChemistry Polair3DAerosol Polair3DAssim PlumelnGrid Castor Transport CastorChemistry X Ps PSs PS PS X Pa Pps PS PS X PS PS PS PS Table 2 5 Compatibility between models and chemistry modules Castor PhotoChem RADM SORGAM AEC Decay Polair3DChemistry Polair3DAerosol Polair3DAssim PlumelnGrid CastorChemistry X X X X X X X X X X X 2 7 CHEC
99. allelization for polair3d in processing photochemistry Using SCons from processing photochemistry just type utils scons py openmp yes If you are lucky enough you might be done If not it means perhaps that you are using a compiler whose OpenMP flag is unknown to our SCons script You might then take a look at your compiler s documentation in order to identify the related compilation flag For instance with PGI as the default compiler suite recognized by SCons you should type from processing photochemistry utils scons py openmp yes flag_openmp mp Note 1 As adapting the makefile would be trickier it could be therefore the compelling argument to switch to SCons Note 2 Be warned that the aerosol modules programming style do not fit with the Intel implementation of OpenMP at least in the version 9 1 Even with one core and no parallelizing directives results differ You are then advised not to use the Intel compiler suite with OpenMP if you need the aerosol modules MPI alone We tried to make the building with MPI as simple as the one with OpenMP From processing photochemistry type utils scons py mpi yes How could it be easier No way But you could nevertheless encounter some little difficulties For example if the C compiler associated to mpiCC is g 4 xx or posterior you might get to know it with the command mpiCC showme whereas the Fortran compiler associated to mpif77 is g77 3 xx you wil
100. amp f is replaced by the name of the species and amp c by the direction associated with the boundary condition x y or z For example the concentrations in 03_x bin are interpolated at both ends of the domain along zx for all grid points along y and z 3 8 BOUNDARY CONDITIONS 87 Program bc dates Program bc dates is very similar to bc The main difference is that instead of a Mozart file two dates are given in command line The program computes boundary conditions for all Mozart files between the two dates successfully managing year changes The configuration file for program bc dates see example bc dates cfg is essentially the same as the one for bc with one addition bc_files Directory where the Mozart 2 files are available Mozart 2 file names are in form h00xx nc where xx is computed by the program according to the date see Equation 3 1 Directory_mozart The program must be launched with pc dates general cfg bc dates cfg 2004 07 30 2004 08 12 3 8 2 Boundary Conditions for Castor bc inca Boundary condition for Castor models are generated using INCA files In addition to the domain definition Section 3 2 2 below is the information required in the configuration for bc inca see example bc inca cfg bc_input domain xmin Abscissa of the center of the lower left cell of INCA grid in degrees longitude Delta_x Step length along x in INCA files in degrees longitude Nx Num
101. an time step The number N of iterations for the Gaussian 5 12 STATIONARYMODEL 141 model performed at each iteration of the Eulerian model is therefore computed as A a N max Lp pan 1 5 1 AtGaussian In short it is ensured that Atpuf gt AtGaussian and AtGaussian lt AtEulerian Where AtGaussian iS the time step of the Gaussian model Delta_t in file puff cfg Atpuf is the time step between two puff emissions and Atgulerian is the time step of the Eulerian model given in the main configuration file The plume in grid model needs some other information in file puff cfg it reads all op tions and parameterizations Note that with plume in grid it is advised to set the option With_increasing sigma to yes For plume in grid with chemistry the option With_chemistry has to be set to yes both in the main configuration file and in puff cfg The option With_puff_interaction normally has to be set to yes in order to take into account the chemical interaction between two puffs It can be set to no to save computational time but it is not advised to do so Other information is read but not used Scavenging deposition and radioactive decay can be used in the Gaussian model For scavenging and deposition to be used the option has to be set to yes both in the Gaussian puff model and in the Eulerian model in order to ensure consistency between the two models If deposition in the Gaussian model is used t
102. are chosen an ordinate in meters Step length along y in degrees latitude or in meters for Cartesian coordinates Number of cells along y integer Number of vertical levels integer Path to the file that defines vertical levels interfaces This field is read but is not used Path to the file that defines involved species and their chemical properties options Is transport taken into account Are initial conditions used If set to yes initial conditions are interpolated from boundary conditions otherwise they are read in binary files Are boundary conditions provided Is deposition taken into account Are volume emissions taken into account data Path to the configuration file that describes input data output Path to the configuration for the output saver 5 9 2 Data Description castor data cfg The data description is very similar to that of Polair3DTransport see Section 5 5 1 except that the data can be different Section Entries Comments initial condition boundary_condition meteo deposition Fields Filename Fields Filename Date_min Delta_t Fields Filename Date min Delta t Fields Filename If initial conditions are activated With_initial_condition and not inter polated Interpolated_initial_condition set to no If boundary conditions are activated With boundary condition Required fields are Temperature Pressure Altitude AirDensity
103. art format and conventions Gocart model usually provides files with the following naming convention file name signification yyyymm XX vs g 6 hourly concentrations in gm yyyymm XX vs g day daily averaged concentrations in gm yyyymm XX vs g avg monthly averaged concentrations in gm where yyyymm is the year and month e g 200103 XX is the Gocart species which can be either SU sulfur CC carbonaceous DU dust SS sea salt and vs is the version e g STD tv12 Gocart species may have further speciations e SU sulfur Total 4 1 DMS 2 SO2 3 SO4 4 MSA e CC BC 0C Total 4 1 hydrophobic BC 2 hydrophobic OC 3 hydrophilic BC 4 hydrophilic OC e DU dust Total 5 1 Re 0 1 1 2 Re 1 1 8 3 Re 1 8 3 4 Re 3 6 5 Re 6 10 um The first group 0 1 1 um contains the following subgroups 0 10 0 18 um fraction 0 01053 0 18 0 30 um fraction 0 08421 0 30 0 60 um fraction 0 25263 0 60 1 00 um fraction 0 65263 l e SS sea salt Total 4 1 Re 0 1 0 5 2 Re 0 5 1 5 3 Re 1 5 5 4 Re 5 10 um The data format of Gocart files is direct access binary 32 bits big endian As an example here is how they should be read in Fortran 77 language dimension Q imx jmx 1mx do k 1 nstep do n 1 nmx read unit nti nt2 nn Q end do enddo where e imx total number of longitudinal grid 144 http code916 gsfc nasa gov People Chin gocartinfo html 3
104. at which meteorological data processed by Polyphe mus output from programs meteo MM5 meteo or WRF meteo starts Asa consequence any program that needs to read this meteorological data refers to this date The date must be in a format described in Section D 7 Time step in hour of output meteorological data processed by Polyphemus Abscissa of the center of the lower left cell It is usually in longitude de grees Step length along x usually in degrees longitude Number of cells along x integer Ordinate of the center of the lower left cell It is usually in latitude degrees Step length along y usually in degrees latitude Number of cells along y integer Number of vertical levels integer Path to the file that defines vertical levels interfaces in m 3 2 3 Dates Many preprocessing programs require a starting and end date In that case the starting date must always be provided in command line but there are three possibilities for the end date 1 provide an end date in any valid format see Section D 7 e g dep general cfg dep cfg 2004 08 09_12 00 00 2004 08 11_06 00 00 2 provide a duration in format NdMh or Nd Mh for N days and M hours Alternatively you can put a duration of Mh for M hours or Nd for N days Valid duration can be for instance 3d5h 2d 8h 5d or 14h e g dep general cfg dep cfg 2004 08 09_12 00 00 1d 12h 3 provide no end date nor duration In that case a duration of one day
105. ate are defined In addition markups Directory computed fields Directory ground data and Programs are introduced and may be referred by other configuration files such as meteo cfg Actually most configuration files meteo cfg luc usgs cfg emissions cfg etc pro vided in Polyphemus along with the programs are examples that refer to the markups defined in general cfg Essentially three markups are defined in general cfg e Directory computed fields where output results i e fields computed by preprocessing programs are stored e Directory_ground_data where ground data land use cover roughness is stored e Programs path to Polyphemus preprocessing directory Polyphemus configuration files are written so that mainly changes in general cfg should be needed to perform a reference simulation In general cfg one changes the paths markups to the preprocessing programs Programs and to the output results Directory_computed_fields and Directory ground data and one chooses its simulation domain Other configuration files provide paths to input data meteorological files emissions data etc and fine options 2 5 3 Notes about the Models To launch a simulation you have to compile and execute a C program which is com posed of a driver on top of the model itself a model and its modules if any See Sec tion 1 1 for a short description of the flowchart The program of the simulation looks like processing photochemistry polai
106. ate towards Open MPI Indeed before launching the parallel job you have got to create a LAM universe Don t panic the LAM universe is only a set of processors which can interact using LAM MPI commands Let s have a look on the command that creates it but don t try it now 2 5 RUNNING THE PROGRAMS 33 lamboot v ssi boot_rsh_agent ssh A hostfile Some important remarks about this command option ssi boot_rsh agent ssh A is used to make sure that ssh and not rsh is used to connect to the other machines You also have to use an ssh agent in order to avoid being prompted for your passphrase when connecting Indeed any output from ssh would cause lamboot to fail To check the connections with other nodes it is a good idea to connect once to each machine by hand before using lamboot Your LAM universe is described in a text file called hostfile which gives the name of the machines to use and the number of cores to use on each machine for example node001 cpu 4 node002 cpu 4 node003 cpu 4 node004 cpu 4 node005 cpu 4 node006 cpu 4 Now if your file hostfile is ready you can type the lamboot command If your run ended with an error it is advised to make sure that the system is clean memory has been de allocated no processes are still running To do so launch the command lamclean If you want to shutdown the LAM universe type lamhalt In case lamclean has failed you can use lam
107. ats given in the Section D 7 2 8 5 Other Utilities The program check_observation checks that the content of an observation data file is consis tent with Polyphemus conventions This program can identify several problems in the data files Launch check_observation h to get help Many other utilities to be compiled with scons py or make are provided to manipulate binary and text files Below are short descriptions of these utilities e add_float adds two single precision binary files e add_nb_float adds a number to a single precision binary file e double_to_float converts a double precision binary file to a single precision binary file e float_to_text converts a single precision binary file to a text file e mult_nb_float multiplies a single precision binary file by a given number e reverse switch from big endian to little endian or vice versa e subtraction float subtracts two single precision binary files e text_to_float converts a text file to a single precision binary file To get further help on a program launch this program without arguments It will print help on screen Three Python scripts are provided for convenience e replace string which performs string replacement in one or more files e apply_on_files which applies a given command to a list of files e format which formats a source code to meet certain requirements of Polyphemus coding standards Launch these programs with option h to get help 50
108. b gt gt gt x arange 10 dtype d gt gt gt y x x gt gt gt plot y gt gt gt plot x y gt gt gt figure New figure gt gt gt plot x y k k for black for a solid line gt gt gt figure 1 Comes back to the first figure gt gt gt plot x y k for a discontinuous line gt gt gt close Closes current figure 7 1 GRAPHICAL OUTPUT 161 gt gt gt plot x y k for a dotted line gt gt gt clf Clears the figure gt gt gt plot x y k label Simple label is for the legend gt gt gt plot x 2 gt gt gt legend y k label Double gt gt gt xlabel Abscissa gt gt gt ylabel Ordinate gt gt gt savefig plot_example eps Saves the figure in EPS could be PNG or JPG 7 1 3 Visualization with AtmoPy AtmoPy provides functions to use Basemap easily and to process data mainly statistics It is first used to load binary files generated in preprocessing or output of a model or a driver Configuration File disp cfg In order to load and process data in a binary file it is convenient to use AtmoPy with a small configuration file often called disp cfg This file describes the data to be read Nt x_min Delta_x Nx ymin Delta_y Ny Nz file input optional Number of time steps to be read in the binary file It can be less than the total number of time steps in the file
109. b sourceforge net you may find help for all Matplotlib commands You may also find many useful examples Sections Screenshots and Examples zip a complete tutorial a useful FAQ an interesting cookbook wiki and other resources We highly rec ommend the use of Matplotlib actually imported through module pylab see below together with IPython enhanced Python shell http ipython scipy org to benefit from a powerful interactive mode Once IPython NumPy and Matplotlib installed launch Python with command ipython IPython needs to be launched once to complete its user installation You should get the prompt In 1 If you are aware of Python you can execute Python commands from this prompt Now try to import Matplotlib In 1 from pylab import If no error occurs your installation is mostly complete Quit IPython ctr1 d and RET Now edit Matplotlib configuration file Under Linux or Unix it is located in matplotlib matplotlibrc Under Windows it is in C Documents and Settings yourname matplotlib You should find the entries numerix and interactive Edit them if necessary warning it is case sensitive so that you have numerix numpy numpy Numeric or numarray interactive True see http matplotlib sourceforge net interactive html You may change the backend depending on what is installed on your computer Polyphemus development team mostly uses the backend TkAgg backend TkAgg
110. based on MM5 fields The winds are ro tated this gives meridional and zonal winds The Richardson number is then computed ComputeRichardson The relative humidity and the critical relative humidity are computed respectively with ComputeRelativeHumidity and ComputeCriticalRelativeHumidity The cloud fraction is computed with ComputeCloudFraction For it the cloudiness and cloud height are diagnosed using ComputeCloudiness and ComputeCloudHeight Finally attenua tion coefficients are computed with ComputeAttenuation_LWC RADM parameterization or ComputeAttenuation ESQUIF ESQUIF parameterization The vertical diffusion coefficients are computed with ComputeLouiskz Louis 1979 Finally photosynthetically active radiation are estimated based on solar radiation and zenith angle ZenithAngle Among output files one may find e the pressure and the surface pressure in Pa e the temperature the surface temperature and the skin temperature in K e the meridional and zonal winds MeridionalWind bin and ZonalWind bin in ms e the Richardson number and the surface Richardson number e the boundary layer height in m e the vertical diffusion coefficients time dependent 3D field defined on layer interfaces on the vertical Kz_Louis bin in m s 1 e the specific humidity in kgkg e the liquid water content in kgkg e the cloud attenuation coefficients 3D field Attenuation bin in 0 2 e the solar radiation intensity SolarRad
111. below they are described as irrelevant 5 1 1 Configuration File plume cfg domain Date_min Irrelevant Provide a date Delta_t Irrelevant Provide any number Nt Irrelevant Provide an integer 119 120 x_min Delta x Nx y min Delta_y Ny Nz Vertical_levels Land_category Time Species With_plume_rise With_plume rise _breakup With_radioactive_decay With_biological_decay With_scavenging With_dry_deposition Sigma_parameterization Above_BL With_HPDM CHAPTER 5 MODELS Abscissa in meter of the center of the lower left cell Step length along x in m Number of cells along x integer Ordinate in meter of the center of the lower left cell Step length along y in m Number of cells along y integer Number of vertical levels integer Path to the file that defines vertical levels heights Land category choose between rural and urban Relevant only when standard deviations are computed with Briggs parameteri zation Choose whether it is nighttime night or daytime day Path to the file that defines involved species gaussian Is plume rise taken into account Is unstable and neutral breakup taken into account when comput ing plume rise Is radioactive decay taken into account Is biological decay taken into account Is scavenging taken into account Is dry deposition taken into account Parameterization used to compute standard deviations Briggs for Briggs parameterizati
112. ber of grid points along longitude in INCA files integer ymin Ordinate of the center of the lower left cell of INCA grid in degrees latitude Delta_y Step length along y in INCA files in degrees latitude Ny Number of grid points along latitude in INCA files integer Nz Number of vertical levels in INCA files integer Ns Number of species in the INCA file Species File giving the species in the INCA file bc files Nt Number of time steps necessary for the output in hours Directory_bc Directory where the output boundary conditions must be stored Program bc inca reads the INCA file which is a text file and saves its results for the number of time step given in the configuration file Nt The program must be launched with bc inca general cfg bc inca cfg u cergrene a ahmed dm A raw_data INCA INCA 07 The last argument is the path to the INCA file The number at the end of the file name repre sents the month The results are stored as amp f_kc bin where amp f is replaced by the name of the species and amp c by the direction associated with the boundary condition x y or z 88 CHAPTER 3 PREPROCESSING Note that initial conditions for Castor are interpolated from the boundary conditions and do not need to be computed separately 3 8 3 Boundary Conditions for Aerosol Species bc gocart Boundary conditions for aerosol species are obtained using Gocart model thanks to the program bc gocart Goc
113. bout the land use coverage This is used by the Briggs parameterization it uses the urban formulae when the cell contains more than a given proportion of the urban luc Instead of a binary file the keywords rural or urban can be provided to use the corresponding Briggs formulae ground LUC_file Path to the binary file that describes land use cover or rural or urban Urban_index Index of the urban areas in land categories 0 for usgs and 13 for glcf Urban_proportion Proportion of urban LUC in a cell to use the urban formulae Default 0 25 5 11 3 Puff configuration file puff cfg In addition the Gaussian puff model needs the usual configuration files However few of their information are actually used since most information are directly provided by the plume in grid model The most important information given in puff cfg are the time step Delta_t and the source information File_puff is the path to the source file point sources to be treated by the Gaussian model and Delta_t_puff is the time step between two puff emissions There are two constraints for these time step values 1 Time step of the Gaussian model must not be smaller than time step between two puff emissions The plume in grid model checks this and sets Delta_t_puff equal to the value of Delta_t if necessary 2 Time step of the Gaussian model is used in an inner loop of the Eulerian time loop Hence it must not be greater than Euleri
114. c usgs dep_dir dep usgs Ns 5 wesely Your class ConfigReplacement must contain these four methods and an empty constructor Then you can launch your Polyphemus programs from ensemble_generation import Reads the configuration files epr EnsembleProgram parameter cfg program cfg only_preprocessing True 2 9 ENSEMBLE GENERATION 55 Sets the Polyphemus directory epr SetPolyphemusDirectory home garaud src polyphemus Generates a new ensemble epr parameter GenerateIdEnsemble Sets the ConfigReplacement object config_replacement modules ConfigPolair3D epr SetConfigReplacement config_replacement Gets an instance Polyphemus and creates all directories where you will have the results ens epr GetEnsemble group polyphemus Gets the available hosts from your hosts list in the file gt HOME dsh group polyphemus load_averages ens net GetAvailableHosts You can launch all programs ens RunNetwork 56 CHAPTER 2 USING POLYPHEMUS Chapter 3 Preprocessing This chapter introduces all preprocessing programs It details the input files data files and configuration files of every program and it describes their output files In Section 3 2 config urations and features shared by almost all programs are explained 3 1 Remark In the descriptions of preprocessing programs there are references to functions like ComputePressure Co
115. cale for background error covariance The model grid interval is chosen to be the unit for option values Error variance for model simulations in ug m Balgovind scale for model error covariance The model grid inter val is chosen to be the unit for option values The data file is the same as in Section 5 6 2 the species and levels files are the same as those presented in Section 5 6 3 5 9 CastorTransport 5 9 1 Main Configuration File castor cfg Model CastorTransport is based on IPSL model Chimere Its option are provided in a config uration file Date_min Delta_t Nt x_min domain Starting date in any legal format see Section D 7 The date can therefore include seconds Time step in seconds Number of iterations of the simulation integer Abscissa of the center of the lower left cell Provide a longitude in degrees or in case Cartesian coordinates are chosen an abscissa in meters 5 9 CASTORTRANSPORT Delta_x Nx ymin Delta_y Ny Nz Vertical_levels Species With_transport With_initial_condition Interpolated_initial_condition With_boundary_condition With_deposition With_volume_emission Data_description Configuration_file 137 Step length along x in degrees longitude or in meters for Cartesian coordinates Number of cells along x integer Ordinate of the center of the lower left cell Provide a latitude in degrees or in case Cartesian coordinates
116. cessing or simu lation jobs you will have to edit and perhaps modify some configuration files to adapt them to your needs We thougt about it next to each Polyphemus program you will find at least one example of suitable configuration files It shall be a good starting point as you could adapt this example to your own case with minor changes Let s take an example located in preprocessing meteo to illustrate the configuration files of meteo As you will see in 3 4 1 there are two of them that we will comment successively in what follows n where n is a number refers to the comment written after the verbatim of the file The first one that defines the considered domain with its space and time discretization is general cfg and is located in preprocessing general 1 Home u cergrene a ahmed dm 2 Directory_computed_fields lt Home gt data Directory_ground_data lt Directory_computed_fields gt ground Programs lt Home gt src polyphemus core trunk preprocessing domain 1 2 4 EDITING YOUR CONFIGURATION FILES 27 Date 2004 08 09_03 00 3 Delta_t 3 0 4 x_min 10 0 Delta_x 0 5 Nx 65 y_min 40 5 Delta_y 0 5 Ny 33 Nz 5 Vertical_levels lt Programs gt levels dat 5 1 A configuration file is organized with sections like general and domain Here general is used to define paths that will be referred later on and domain contains the domain definition along with its space and time discret
117. d Cropland Bare Ground Urban and Built Program luc glcf does not require any date as an input in command line To launch luc glcf just type luc glcf general cfg luc glcf cfg 3 3 2 Land Use Cover USGS luc usgs For a simulation over Europe program luc usgs requires two files found at http edcsns17 cr usgs gov glcc 62 CHAPTER 3 PREPROCESSING e USGS Land Use Land Cover Scheme for Eurasia in Lambert Azimuthal Equal Area Projec tion optimized for Europe available at http edcftp cr usgs gov pub data glcc ea lamberte eausgs2_0le img gz in compressed format e USGS Land Use Land Cover Scheme for Africa in Lambert Azimuthal Equal Area Projec tion available at http edcftp cr usgs gov pub data glcc af lambert afusgs2_01 img gz in compressed format The configuration file luc usgs cfg requires Database_luc usgs LUC_in_ea LUC_in_af Directory_luc usgs LUC_out Step lon_ origin ea lat_origin ea lon_origin_af lat_origin af lon_upper_left_ea lat_upper left_ea lon_upper_left_af lat_upper_left_af Nx_ea Nx_af Ny_ea Ny_af Nc Sea_index paths Directory where the raw data from USGS can be found Input file containing raw data for Eurasia eausgs2 Ole img Input file containing raw data for Africa afusgs2_0l img Output directory Output file name The default filename LUC usgs bin is recom mended for clarity USGS Space step in meters Longitude of the cent
118. d 143 e Snowfall convective stratiform accumulated 144 e Surface sensible heat flux accumulated 146 e Surface latent heat flux accumulated 147 e Logarithm of surface pressure 152 e Boundary layer height 159 e Total cloud cover 164 e 2 meter temperature 167 e Surface solar radiation downwards accumulated 169 e Surface solar radiation accumulated 176 e East West surface stress accumulated 180 e North South surface stress accumulated 181 e Evaporation accumulated 182 e Low cloud cover 186 e Medium cloud cover 187 e High cloud cover 188 e Skin temperature 235 e Forecast albedo 243 e Cloud liquid water content 3D 246 e Cloud ice water content 3D 247 e Cloud cover 3D 248 Not all data may be required depending on the programs you actually run 38 CHAPTER 2 USING POLYPHEMUS 2 6 4 Mandatory Data for Models Table 2 3 presents all variables needed by various models and the name under which they appear in the data configuration files Note that additional data can be necessary to add initial conditions boundary conditions source terms volume emissions surface emissions or loss terms deposition velocities scavenging Table 2 3 Mandatory data for each models Model Data necessary CastorTransport Temperature Pressure Altitude AirDensity MeridionalWind Zonal Wind VerticalDiffusion CastorC
119. date for the simulation is 2003 07 30 date from which the preprocessing starts Then check the paths and dates in config data cfg In particular if the dates in any section are not right you can have an error message ERROR An input output operation failed in FormatBinary lt T gt Read ifstreamg FileStream Array lt TA N gt amp A Unable to read 42900 byte s The input stream is empty Indeed input data can be computed for several days so the program will discard the data for the days between Date_min in a section of polair3d data and Date min for the simulation Also remember that volume emissions given for NO APINEN and C5H8 are the sum of anthropogenic and biogenic emissions C 3 2 Simulation Launch the simulation with Polyphemus processing castor castor config castor cfg The output on screen will be Current date 2003 07 30 00 00 Current date 2003 07 30 00 10 Current date 2003 07 30 00 20 Current date 2003 07 30 00 30 C 4 VISUALIZING THE RESULTS 197 peace Current date 2003 08 03 23 10 Current date 2003 08 03 23 20 Current date 2003 08 03 23 30 Current date 2003 08 03 23 40 Current date 2003 08 03 23 50 C 3 3 Checking your results First check the size of your output files see 2 7 for details You can also have a quick look on the values by applying get_info float to for instance 03 bin You should get something like Minimum 0 000103238 Maximum 134 057 Mean 52 8842 C 4 Visualizi
120. ded after the entry Filename This is the case for VerticalDiffusion in the previous example Note that 1 entries Fields Filename and additional paths must be at the end of the section and in this order 2 at least one element possibly not a required field must be provided to Fields and at least one element possibly not a path to Filename for instance Fields Filename means no generic path but Fields Illegal one element required Filename Illegal one element required In most sections Fields is used to specify all chemical species involved in the process e g deposition Date_min 2001 01 02 Delta_t 10800 Fields 03 NO N02 H202 HCHO PAN HONO S02 HNO3 OP1 PAA ORA1 Filename u cergrene A mallet 2001 data dep 2005 01 19 f bin ALD u cergrene A mallet 2001 data dep 2005 01 19 ALD modified bin CO 0 002 Notice that CO is not associated with a path but with a numerical value This is a feature a binary file may be replaced with a numerical value In this case the field in the example CO deposition velocity is set to a constant value in every cell and at every time step This works with any field including meteorological fields section meteo This feature is often used to set constant boundary conditions In polair3d data cfg several sections are required Several sections have to be included only if given options are activated In the following table all possible sections are list
121. diffusion matrix If this option is not ac tivated it is assumed that p is constant and therefore disappears from the previous equations Are point emissions provided Should be set to yes be cause there is now no other way to introduce particles in a Lagrangian simulation data Path to the configuration file that describes input data Horizontal diffusion coefficient in m s Gaussian_kernel_horizontal_diffusion Horizontal diffusion coefficient used in the computation Configuration_file 2 1 of the gaussian kernel distribution in m s output Path to the configuration for the output saver 5 13 2 Data Description lagrangian stochastic data cfg The data configuration file is very simple because the model LagrangianTransport takes into account very few parameterizations Date min Delta_t Fields Filename VerticalDiffusion meteo Starting time of the meteo data files see dates formats in Section D 7 Timestep of the meteo data files in seconds Required fields are MeridionalWind and ZonalWind and Temperature and Pressure in case air density is taken into account Generic path where the shortcut amp f refers to a field name defined in Fields File name for VerticalDiffusion 144 CHAPTER 5 MODELS point_emission file Path to the file which defines the point emissions de scribed below Delta t_particle emission Time interval between the emission of two part
122. dine 0 5e 2 In addition if the chosen type is file for scavenging or deposition the path to a file con taining all values for each species and meteorological situation is given entry File The file containing the scavenging coefficients named for example scavenging dat contains as mainy sections situation as the meteorological datafile In each section the species names are fol lowed by the value of their scavenging coefficient for the given situation The file for deposition velocities deposition dat is in the same form It looks like situation Caesium 0 0 Iodine 0 0 situation Caesium 0 00006 Iodine 0 0002 Output File The output data file contains as many sections as there are meteorological situ ations Each section situation contains the temperature wind angle wind speed boundary 3 9 PREPROCESSING FOR GAUSSIAN MODELS 97 height and stability class that are provided In addition it contains the list of all species followed by their scavenging coefficient and the list of all species followed by their deposition velocity It looks like this situation Temperature Celsius degrees Temperature 10 Wind angle degrees Wind_angle 30 Wind speed m s Wind 3 Boundary height m Boundary_height 1000 Stability class Stability D Scavenging coefficient of the species s 1 Scavenging coefficient Caesium 6 36257e 05 Iodine 0 000212514 Deposition velocity of t
123. ding trajectory data done Length of the trajectory 48 0278 Number of points on the trajectory 49 Writing source data done The file puff discretized dat has been created in the directory TestCase config It contains a series of puffs representing the discretized line source B 3 Simulations B 3 1 Plume This simulation uses the program plume which is the program for the Gaussian plume model It uses the following data e Gaseous species Caesium Iodine e Sources 2 point sources for Iodine one point source for Caesium e Sources 2 line sources for Iodine and Biological e Meteorological situations 4 situations rotating wind with an increasing speed 0 1 ms 2ms 5ms and 10 ms e Urban environment B 3 SIMULATIONS 185 The simulation uses the following files e plume cfg gives the simulation domain the options and the paths to the other files e gaussian levels dat gives the vertical levels e gaussian species_aer dat gives the species data species names and radioactive half lives are used here e meteo dat gives all meteorological data It does not contain scavenging coefficients or de position velocities since the simulation will not take these processes into account There fore it was not necessary to use the preprocessing program gaussian deposition to create this file e plume source dat contains all the data on stationary sources e plume saver cfg contains the options and pat
124. e any new markup that is a new field Moreover several markup substitutions can be performed in a single value and nested markups are properly handled Home home user Root lt Home gt Polyphemus work Number 7 Input_directory lt Root gt input lt Number gt is accepted and means Input_directory home user Polyphemus work input 7 Notice that markups may also replace numbers and may be based on preexisting fields 0 5 Nx 100 1 Ny lt Nx gt x_min 12 5 Delta_x y_min lt x_min gt Delta_y D 5 Sections Fields and values may be protected inside sections Assume that two domains are defined one for input data and another for output data Instead of x_min_in 12 5 Delta_x_in 0 5 Nx_in 100 x_min_out 35 8 Delta_x_out 0 3 Nx_out 400 one may prefer input x_min 12 5 Delta_x 0 5 Nx 100 output x_min 35 8 Delta_x 0 3 Nx 400 202APPENDIX D LEXICAL REFERENCE OF POLYPHEMUS CONFIGURATION FILES Conflicts are avoided and the syntax is clear This is why most Polyphemus configuration files have sections Sections are enclosed by square brackets and Markups are not bound to any section Do not create a markup with a field which is defined in several section such as z_min in the previous example Indeed there is no convention on which value of the field to use for markup substitution Recommandation Put two blank lines before each section and one blank line after
125. e can be set to observation cfg if you use GroundObservationManager see Section 4 10 1 and to observation sim cfg if you use SimObservationManager see Section 4 10 2 The data assimilation experiments are controlled by the following options domain Nt Number of time steps for the whole simulation assimi lation and prediction 4 7 DATA ASSIMILATION DRIVERS 107 data_assimilation With_positivity_requirement Is positivity of the assimilated species concentrations re quired Nt_assimilation Number of time steps for the assimilation period Nt is supposed to be greater than or equal to Nt_assimilation From time step 0 to time step Nt_assimilation 1 assimilation is performed and from step Nt_assimilation to step Nt 1 prediction is performed In many cases such as data assimilation and ensemble prediction perturbed model simu lations are needed Perturbations are managed by PerturbationManager see Section 4 11 reading an additional section perturbation management Configuration file Name of the file that contains perturbation configurations 4 7 2 OptimalInterpolationDriver It is the driver dedicated to data assimilation applications using optimal interpolation algorithm The optimal interpolation algorithm estimates model state status by minimizing the error vari ance of the estimation called analysis in data assimilation terminology It searches for a linear combination between background sta
126. e fraction between 0 0 1 0 of given Gocart sub species that will contribute to given model species As an example in bc gocart CC cfg the first line PBC 1 O 1 O means that sub species CC 1 and CC 3 will fall into PBC Polair3D species and nowhere else In the same way the following line PPOA O 0 4 O 0 4 means that PPOA species is composed of 40 of CC 2 and 40 of CC 4 3 9 PREPROCESSING FOR GAUSSIAN MODELS 91 Important The Gocart files are proceeded month by month e The beginning date of computation is the one provided in general cfg if the beginning month is equal to the Gocart month the beginning of Gocart month otherwise e An end date is deduced from the number of days given in argument If this end date is after the end of Gocart month the end date is set to the end of Gocart month e If some boundary files already exist the program bc gocart will not overwrite them but append its result to each For example if you want to compute boundary conditions between 15th of April to 15th of June 2001 you would launch bc gocart three times bc gocart general cfg bc gocart CC cfg 200104 CC STD tv15 g day 200104 15 bc gocart general cfg bc gocart CC cfg 200105 CC STD tv15 g day 200105 31 bc gocart general cfg bc gocart CC cfg 200106 CC STD tv15 g day 200106 15 The python script bc gocart py provides a much easier way to compute boundary condi tions In particular you do need to worry about how ma
127. e gas chemistry is solved with one of three chemical mechanisms the RACM Stockwell et al 1997 the RACM2 Goliff and Stockwell 2008 and the CB05 Yarwood et al 2005 The aerosol dynamics is solved by the SIREAM model Debry et al 2007 When a cloud is diagnosed in one cell of the domain then instantaneous aerosol activation is assumed and the SIREAM model is replaced by the VSRM cloud chemistry model Fahey and Pandis 2003 The number of aerosol bins is directly inferred from the number of bounds provided by the Bin_bounds option in main configuration file polair3d cfg Further options are required in this configuration file options With_pH Does the aerosol module returns cloud droplet pH Scavenging_model Which below cloud scavenging model is used Lwc_cloud_threshold Liquid water content threshold for clouds With_coagulation Is coagulation taken into account With_condensation Is condensation taken into account With_nucleation Is nucleation taken into account Fixed aerosol density Fixed aerosol density in kg m used in the module aqueous_module Which aqueous module is used none simple or VSRM With in cloud scavenging Is in cloud scavenging taken into account With_heterogeneous_reactions Are heterogeneous reactions taken into account With kelvin effect Is Kelvin effect taken into account Dynamic_condensation_solver Which solver is used for dynamic condensation etr ros2 or ebi Fixed_cutting diameter Fixed
128. e input files 5 4 2 Source Description puff_aer dat It is the same file as the puff file for gaseous species described in Section 5 3 except that obviously some or all emitted species will be particulate species The corresponding sections are named aerosol_source However some lines are different for aerosols e The species is given after the key word Species_name instead of Species and only one species per source can be given e The dates are not read only the time in seconds after the beginning of the simulation when the puff is released after the word Release_time e Only puff sources can be treated not continuous sources 5 4 3 Vertical Levels Species Meteo and Diameters Vertical level file and gaussian meteo file have been described in Section 5 1 and diameter files is the same as in Section 3 9 2 Species file is the same file as described for the plume model for aerosol species Section 5 2 4 128 CHAPTER 5 MODELS 5 5 Polair3DTransport The model Polair3DTransport is configured with three configuration files polair3d cfg polair3d data cfg and polair3d saver cfg and two data files levels dat and species dat The main configuration file polair3d cfg provides the paths to the four other files 5 5 1 Main Configuration File polair3d cfg The configuration file polair3d cfg gives information on the domain definition and the options of the simulation Date_min Delta_t Nt x_min
129. e is no need to have scavenging coefficients or deposition velocities e puff discretized dat gives data on the discretized source It has been created using program discretization see Section B 2 e puff saver cfg gives the options and paths to save the results Compile the program puff cd Polyphemus processing gaussian utils scons py puff Then execute it from TestCase config cd TestCase config Polyphemus processing gaussian puff puff cfg Results are stored in TestCase results puff_line You can check the size of the file C02 bin see 2 7 for details and then have a quick look on the values by applying get_info_float to C02 bin You should get something like Minimum O Maximum 6 5739e 07 Mean 634 202 B 4 Result Visualization To visualize the results of a simulation use the interactive python interpreter IPython launched with the command ipython For details see Section 7 1 3 188 APPENDIX B GAUSSIAN TEST CASE B 4 1 Gaussian Plume Launch Python from the plume results directory cd TestCase results plume ipython Import the modules that are needed for results visualization with the command gt gt import atmopy gt gt from atmopy display import Then import the concentration field you want to visualize gt gt d getd filename Iodine bin Nt 4 Nz 2 Ny 200 Nx 200 Nt is normally the number of time steps Here as it is a stationary simulation it should be equal to
130. e method or the convergence criterion Both models StationaryModel and the underlying model are built with the same con figuration file s Except for a few points described below the configuration file must be the 142 CHAPTER 5 MODELS one for the underlying model see the Section describing it The differences are only in section domain and two additional sections stationary and convergence Nt Delta_t Nt Delta_t Norm Method Epsilon domain Maximum number of iterations of the underlying model This is different from what is normally defined here Time step of the internal loop internal time step This is different from what is normally defined here stationary Number of time steps for the simulation Time step of the simulation in seconds convergence Norm used to check convergence one two or infinity Method used to normalize the norm mean or max Convergence criterion for instance 1 e 4 5 13 LagrangianTransport The LagrangianTransport model was implemented according to Wendum 1998 The imple mentation is still primary and does not take into account such phenomenon as the scavenging the wet or dry deposition the boundary layer effect etc It has successfully been tested and evaluated with the ETEX dispersion case where these parameterizations are not significant Its use is illustrated in processing lagrangian stochastic It is there configured with three c
131. e objective function is calculated efficiently using adjoint model of the underlying model The algorithm parameters are set in section 4DVar 4DVar Display precision Display precision for optimization results Jb_file Name of the file that saves background departure during op timization Jo file Name of the file that saves observation discrepancy during optimization Gradient_norm file Name of the file that saves gradient norms during optimiza tion With_trajectory_management If the trajectory of model integration is saved to disk for ad joint integration Trajectory_delta_t Trajectory time step in seconds Trajectory file Name of the file that saves model trajectory With_background_item If the background term is taken into account in the cost func tion Read_inverse_background matrix Should the inverse of background error covariance matrix be read from disk File _background_inverse matrix Name of the file that stores the inverse of the background error covariance matrix File_background matrix Name of the file that stores the background error covariance matrix The parameters for numerical optimization algorithm are set in section optimizer 4 8 DRIVERS FOR THE VERIFICATION OF ADJOINT CODING 109 optimizer Type Type of optimization solver only BFGS is supported Maximal_iteration The number of the maximal iteration for numerical optimiza tion Display_iterations If the optimization results du
132. e only the ozone background concentration is different from zero Pressure Pa Pressure 101325 Attenuation Attenuation 0 99 Specific humidity 5 4 GAUSSIANPUFF_AER 127 Specific_humidity 0 011 Photolysis rates of the species Photolysis_rate ALD 2 74581e 06 GLYform 4 58622e 05 GLYmol 4 63453e 05 H202 5 04327e 06 HCHOmol 2 95972e 05 HCHOrad 1 90028e 05 HKET 4 91193e 07 HNO3 2 13667e 07 HNO4 3 87569e 06 HONO 0 00131391 HOP 4 96263e 06 KETONE 4 91193e 07 MACR 0 000358261 MGLY 0 00013251 MHP 4 96263e 06 N02 0 00731999 NO3NO 0 0193996 NO3NO02 0 157498 0301D 1 06414e 05 0303P 0 0004013 ORGNIT 6 41837e 07 PAA 1 41212e 06 UDC 0 000397305 Background concentrations of the species Background_concentration 03 40 5 4 GaussianPuff_aer It is the Gaussian puff model for aerosol species It can be run when there are aerosol species only or both aerosol and gaseous species It takes the same input files as the Gaussian puff model except that they contain in addition some sections dedicated to aerosol species It takes in addition another input file that describes the diameters of particles file diameter dat already described in the Section 3 9 2 The output files are binary files one for each gaseous species and one for each couple species diameter 5 4 1 Configuration File puff_aer cfg It is exactly the same file as the configuration file described in Section 5 3 The only data that may differ are the paths to th
133. e the configuration file clearer D 2 Flexibility The fields and values can be introduced in many ways First many delimiters are supported e blank space e tabulation e line break e equal sign e colon e semicolon 199 200APPENDIX D LEXICAL REFERENCE OF POLYPHEMUS CONFIGURATION FILES e coma and e vertical bar For example x_min 12 5 Delta_x 0 5 Nx 100 is equivalent to x_min 12 5 Delta_x 0 5 Nx 100 Recall that delimiters can only be used to delimit words and are discarded otherwise It means that a field or a value cannot contain a delimiter The fact that the colon is a delimiter may raise a problem under Windows where drives are called C D In the current version of Polyphemus full paths that is with the drive name should not be used under Windows If you need a workaround please contact the Polyphemus teams at polyphemus help lists gforge inria fr Fields and values go by pair but they can be placed anywhere In particular several fields may be put on a single line x_min 12 5 Delta_x 0 5 Nx 100 y_min 6 2 Delta_y 1 Ny 230 The order in which the fields are placed may or may not be important In most Polyphemus configuration files the order does not matter Then x_min 12 5 Delta_x 0 5 Nx 100 y_min 6 2 Delta_y 1 Ny 230 is the same as y_min 6 2 Delta_y 1 Ny 230 Nx 100 x_min 12 5 Delta_x 0 5 Recommandation
134. e week Formate CC SNAPsector MON TUE WED THU 2 1 1 0159 1 0348 1 0399 1 0299 e hourly_factors dat gives the factor for each activity sector SNAPsector and each hour The hours are local time and they must range from 1 to 24 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 01 0 1 01 0 In addition to these factors a file called time_zones dat is necessary It gives the various countries in EMEP inventories and their time zone offset to GMT Please note that the list of countries in the inventories may vary without warnings If it happens the code should raise an error and tell you which country code in time_zones dat is unknown Number of emitted species N should be greater or equal to the sum of species number of each type of emissions There are seven types in EMEP inventory CO NMVOC NOX SOX NH3 PM2 5 and PMcoarse Chemical mechanism Total CO NMVOC NOX SOX NH3 PM2 5 PMcoarse RACM 42 1 14 3 2 1 19 2 RACM2 65 1 37 3 2 1 19 2 CBO05 43 1 15 3 2 1 19 2 The program automatically takes into account summer and winter time The output emis sions start at 00 00 UTC 3 6 3 Biogenic Emissions for Polair3D Models bio Program bio computes biogenic emissions on the basis of meteorological fields and land use cover In addition to the domain definition Section 3 2 2 below is the information required in the configuration for bio see example bio cfg path
135. eRichardson All input fields are then interpolated on the vertical Finally photosynthet ically active radiation are estimated based on solar radiation and zenith angle ZenithAngle To get the complete set of input meteorological data for a transport model one should then launch attenuation Kz and maybe Kz_TM 3 4 2 Program attenuation Program Polyphemus preprocessing attenuation should be launched after program meteo It computes cloud attenuation for photolysis rates It also computes cloud related data such as cloud height Even for passive simulations this program should be launched The reference configuration files for attenuation is preprocessing meteo meteo cfg to gether with preprocessing general cfg In addition to the domain definition and to the entries of meteo cfg introduced in Section 3 4 1 below are options for attenuation paths Directory_attenuation Directory where the output of program attenuation is stored attenuation Type Parameterization to be used to compute cloud attenuation Put 1 to use RADM parameterization or put 2 to use ESQUIF parameteri zation Critical_relative humidity Parameterization to compute critical relative humidity Put 1 to compute CRH with respect to o recommended or put 2 to have a constant CRH in two distinct layers 68 CHAPTER 3 PREPROCESSING clouds Min height Minimum cloud basis height in m Just like in program meteo ECMWF data is read and interpolated
136. eci oa ri a ee ee oe a ee ee 139 S110 Pul conhguration Me puff OE is iom roae ae eee Ree 4G 140 Stationary Model eirati a mp 8 how a a a Re A A RR ed ge So 141 Lagrangian Transport oos aora aon wg Ga a a a a 142 5 13 1 Main Configuration File lagrangian stochastic cfg 142 5 13 2 Data Description lagrangian stochastic data cfg 143 5 13 3 Vertical Levels and Point Emission e 144 5 13 4 Noteworthy Remarks about Output Saving 144 Lagrangian Particles cse si somet bn HR doi aoro aib iao hea E ee a ee 144 5 14 1 ParticleDIFPAR_Horker lt s o s s cs s 25 ooa woa eee ee Ee 145 5 14 2 ParticleDIFPAR FokkerPlanck noaa 0004 145 Point Emission Management sos pose e aipa a maia aa h epee eee ee eee 145 515 1 Continuous emnsSi nS a s ce aoe wa eee a a Eee oe 145 piga Puf emissions ek a Ee ki RI eR d 146 5 15 3 Temporal emissions kong oe e aa a ea a 147 5 164 Continuons line mission 66 604 i eiee a ap a e A i ap e G 147 CONTENTS 6 Modules 6 1 Transport Module cyp si acca E foo A ee kee ad ee PO dod Berge 611 AdvectionDST sas cake eR ee we EE ee ee OR ee 6 1 2 SplipkdvectionOSl cs deie ka 4k he Pea a a BESTE SESS 6 1 3 GlobalAdvectionDSTS 4 22 44 05 2 ee ee bee eke eae a e 614A DiausoaROSZ o reri a e koe ee ee Bate et Pe AS ee ee le oe e i 61 5 GlobalDitlisionROS2 s a e 6244 4 peck eid ee eda eee he ee 6 16 TramsportPPM caos sos e 44 2G RR RR ole eels
137. ed Program bio takes from one to four arguments Below are four possible calls bio 2001 04 22 bio bio cfg 2001 04 22 bio bio cfg 2001 04 22 2001 04 23 bio general cfg bio cfg 2001 04 22 The first three calls are equivalent The fourth one involves two configuration files The program bio behaves as if these two configuration files were merged It means that the fields required by the program may be put in any of these two files Markups defined in one file can be expanded in the other file The only constraint is that each section should appear in a single file only 2 5 2 Sharing Configuration The command line bio general cfg bio cfg 2001 04 22 1d with the two configuration files general cfg and bio cfg is the advocated line The configuration file general cfg gathers information that may be needed by several programs in the preprocessing directory meteo attenuation luc usgs etc Such a configuration file is provided with Polyphemus preprocessing general cfg general Home u cergrene 0 bordas Directory_computed_fields lt Home gt B data Directory_ground_data lt Directory_computed_fields gt ground Programs lt Home gt codes Polyphemus HEAD 30 CHAPTER 2 USING POLYPHEMUS domain Date 2001 01 02_00 00 00 Delta_t 3 0 x_min 10 0 Delta_x 0 5 Nx 65 y_min 40 5 Delta_y 0 5 Ny 33 Nz 5 Vertical_levels lt Programs gt levels dat The simulation domain and the simulation d
138. ed with their entries Fields Filename Section Entries Comments initial_condition Fields Filename If initial conditions are activated With_initial_condition boundary_condition Date_min If boundary conditions are activated Delta t Fields With_boundary_condition Filename meteo Date min Deltat Required fields are MeridionalWind and ZonalWind if advection is activated VerticalDiffusion if diffusion is activated and Temperature and Pressure in case air density is taken into account 5 5 POLAIR3DTRANSPORT 131 deposition Date_min Delta_t If deposition is activated With_deposition Fields Filename point_emission file Path to the file which defines the point emis sions described below If point emissions are activated With_point_emissions surface_emission Date min Deltat If surface emissions are activated Fields Filename With_surface_emission additional_surfa Date_min Delta_t If surface additional emissions are activated Fields Filename With_additional_surface_emission This is mostly useful for biogenic emissions Note that a species with additional surface emissions must have emissions in surface_emission You might need to add the given species say ISO in section surface_emission with zero emissions a line like ISO 0 volume_emission Date_min Delta_t Nz If volume emissions are activated Fields Filename With volume emission Nz is the num ber of le
139. ed source The output data is a list of point sources whose coordinates have been calculated given the line coordinates and the number of points to discretize the line or the source velocity in the case of a moving source for puff sources only 92 CHAPTER 3 PREPROCESSING The program discretization is launched with one configuration file The reference config uration file is discretization cfg It contains the following information trajectory Trajectory file Path to the data file that contains the line coordinates Np Number of points per segment used to discretize the trajectory Used only when the source is not moving moving source source the type is continuous Species List of names of the species emitted by the source Velocity Velocity of the gas or aerosol emitted by the source in ms Temperature Temperature of the gas or aerosol emitted by the source Celsius degrees Diameter Diameter of the source in m Date_beg Beginning date of the emission plume source one per species Date_end Ending date of the emission puff source Quantity Total mass per unit of length in mass m released on the line source one per species Source_velocity Source velocity in kmh 0 for non mobile sources output With_comment Are comments written Source file Path to the data file where the list of sources will be written Deltat Time step to calculate the discretized trajectory in the case of a
140. ed with ComputeLMO Then the boundary layer height may be diagnosed with ComputePBLH_TM Troen amp Mahrt parameterization or ComputePBLH Richardson critical Richardson number Finally the vertical diffusion coefficients are computed with ComputeTM_Kz The main output is a 3D time dependent field format t z y x of vertical diffusion co efficients in m s Along the vertical the coefficients are defined on the interfaces So the size of the field for each day is Nt x Nz 1 x Ny x Na It is stored in Kz_TM bin in the directory given by entry Directory_Kz_TM The surface relative humidity is saved in SurfaceRelativeHumidity bin Depending on the options additional fields may be saved such as the Monin Obukhov length in file LMO bin 3 4 5 Program MM5 meteo Program Polyphemus preprocessing meteo MM5 meteo processes MM5 data and generates meteorological fields required by chemistry transport models Most fields are interpolated from MM5 grid to a regular grid latitude longitude in the horizontal altitudes in meters in the vertical Note that MM5 meteo needs as input data the land use cover which can be built using pro grams in preprocessing ground Note for ECMWF users program MM5 meteo is equivalent to what is performed by meteo attenuation and Kz successively Similarly to ECMWF files Kz_TM can be used after wards Program MM5 meteo can be launched as follows MM5 meteo general cfg MM5 meteo cfg 2004 08 09_09
141. eld 2 wind angle raw field 20 degrees 2 wind velocity raw field 1 24 1 NO emissions raw field 0 82 Ensemble Programs The configuration file program cfg contains the names of the pro grams their dependencies and an integer which gives the group index A list of programs with a group index equal to 0 will be launched before an other list of program with a group index equal to 1 The dependencies are the names of physical parameterizations or numerical approxima tions which are going to change the preprocessing results For example the deposition velocities from the program dep depend on the LUC the vertical resolution the first layer height and a physical parameterization zhang or wesely The results will depend on the values of each parameter Each program belongs to a specific section The section general must contain the path to the directory where all generic configuration files are In the other sections before each programs list you have to specify the directory that contains the generic configuration files general home home garaud generic_cfg lt home gt src ensemble_generation example configuration ground config_directory lt generic_cfg gt preprocessing ground luc luc 0 roughness luc 10 meteo 2 9 ENSEMBLE GENERATION 53 config_directory lt generic_cfg gt preprocessing meteo meteo vertical_resolution first_layer_height 20 attenuation vertical_resolution first_layer_height cloud_att
142. elengths for which water refractive indices are given aerosol Nbins min diameter max_diameter aerosol_water_name Nspecies Number of size bins The minimum and the maximum diameters Name of aerosol water content in output Number of aerosol species in the model corresponds to the file_species_match file Options Dry_diameter_option Wet_computation option Option to compute the aerosol wet diameter from the dry diameter Put 1 to use H nel s relation 2 for Gerber s formula or 3 to use aerosol water computed in the model Option to compute the aerosol wet refractive index from the dry refractive index Put 1 to use H nel s relation or 2 to use aerosol water computed in the model 170 CHAPTER 7 POSTPROCESSING Well_mixed_computation_option Option to compute the index of an internally well mixed mixture Put 1 to use the chemical formula or 2 for Lorentz Lorenz formula Black_carbon_treatment Put 2 to consider black carbon as a core or 1 other wise To launch the optics program type optics preprocessing general cfg optics cfg 20010101 7 5 Ensemble Forecasting Based on an ensemble of simulations generated with Polyphemus ensemble capabilities or gen erated with other air quality systems AtmoPy provides methods to produce ensemble forecasts Assume that at station s and time round t the model m predicts z and that the correspond ing observation is yf One may try to forecast t
143. emission_aerosol With_volume emission aerosol With_scavenging aerosol With_in_cloud_scavenging Collect_dry_flux_aerosol Fixed aerosol density in kg m used in the model Is dry deposition taken into account for aerosol species If set to yes deposition velocities for aerosol species are computed with land data otherwise they are read in files Only needed if dry deposition is taken into account Are point emissions provided for aerosol species Are emissions at ground provided for aerosol species Are volume emissions provided for aerosol species Is there scavenging for aerosol species Is there in cloud scavenging for aerosol species Are the dry deposition fluxes are collected in order to postprocess them if dry deposition is taken into account 5 7 POLAIR3DAEROSOL 135 Collect_wet_flux_aerosol Are the wet deposition fluxes are collected in order to postprocess them if wet deposition is taken into account The bin bounds are presented as follow Bin_bounds diameter of the particle classes in micrometers 0 00 1 11 525 Note that these values are the bounds of the various diameter classes and that therefore there is one more value than there are classes 5 7 2 Data Description polair3d data cfg In addition to the sections described in Section 5 6 2 some parameters may be necessary Section Entries Comments With_initial_condition_aerosol Fields Filename With_boundary_condition_aerosol With_depo
144. emissions py sum emissions cfg The output on screen will be Summing anthropogenic and biogenic emissions Anthropogenic species NO Biogenic species NO Computing total emissions for NO Anthropogenic species C5H8 Biogenic species Isoprene Computing total emissions for C5H8 Anthropogenic species APINEN Biogenic species Terpenes Computing total emissions for APINEN This creates three binary files in data emissions APINEN total bin C5H8 total bin and NO total bin C 2 6 Deposition Velocities Deposition velocities using Emberson parameterization are computed with program dep emberson Launch it with Polyphemus preprocessing dep dep emberson config general cfg config dep emberson cfg 2003 07 30 5d2h The output on screen will be C 2 COMPUTING INPUT DATA 195 Reading configuration files done Memory allocation for data fields done Extracting input data done Computing deposition velocities done Writing output data done This computes deposition velocities for 23 species C 2 7 Boundary Conditions Download and put in raw_data the INCA files from Chimere test case cd raw_data wget http euler 1md polytechnique fr chimere downloads INCA 200501 tar gz tar xzvf INCA 200501 tar gz This creates a data directory named raw_data INCA First you need to modify the configuration file config bc inca cfg Indeed you have to put the number of time steps for which you want boundar
145. en tation The algorithm parameters are set in section RRSQRT 108 CHAPTER 4 DRIVERS RRSQRT Number_analysis_mode The expected rank number column number of the square root mode matrix of forecast error covariance matrix Number_model_mode The number of the columns of the square root of model error covariance matrix to be added to the mode matrix Number_observation_mode The number of the columns of the square root of observa tion error covariance matrix to be added to the analyzed mode matrix Propagation_option The option for the forecast of the columns of mode ma trix Only finite difference is supported Finite difference perturbation Perturbation coefficient for mode forecast using finite dif ference method set to 1 Model perturbations are employed to generate the columns of the square root of model error covariance matrix see PerturbationManager configurations in Section 4 11 4 7 5 FourDimVarDriver It is the driver dedicated to data assimilation applications using four dimensional variational as similation algorithm 4D Var The assimilation period is from time step 0 to Nt_assimilation 1 The optimal model state at initial time step is obtained by minimizing an objective function which is the background departure plus discrepancy between model simulations and observations during the assimilation period The model is supposed to be perfect thus no model error terms are considered The gradient of th
146. entries than needed by EnsembleData it may also be used with disp py and evaluation py see Section 7 2 The entries needed by EnsembleData are shown below input t_min Initial date of the binary files in format Polyphemus standard format see Section D 7 Delta t Time step in hours Nt Number of time step in the binary files x min Abscissa of the center of the lower left cell longitude in degrees Delta_x Step length along x in degrees longitude Nx Number of cells along x integer 7 5 ENSEMBLE FORECASTING 171 ymin Delta_y Ny Nz station_file station file type obs dir t_range concentrations paired select_station measure cutoff ratio Ordinate of the center of the lower left cell latitude in degrees Step length along y usually in degrees latitude Number of cells along y integer Number of vertical levels integer File describing the stations Type of station file Emep Airbase BDQA Pioneer Directory where observations are stored output Range of dates standard format see Section D 7 over which con centrations and observations should be considered What kind of concentrations are considered hourly or peak con centrations Should peak concentrations be paired in time Which stations are involved in statistical measures Either set to single for a single station defined in station all for all stations or a couple Field Value for all stations for which Field is
147. enuation 30 Kz luc vertical_resolution first_layer_height min_kz 40 Kz_TM luc vertical_resolution first_layer_height min_kz apply_vert 50 dep config directory lt generic_cfg gt preprocessing dep dep luc vertical_resolution first_layer_height deposition_velocity 40 Each dependency has to match a physical parameterization or a numerical approximation de scribed in the configuration file parameter cfg In the generic configuration files you have a lot of variables between which will be replaced by certain values according to the model identity For example the generic configuration file meteo cfg contains paths LUC_file lt Directory_ground_data gt luc_dir LUC lt LUC_origin gt bin Directory_meteo lt Directory_computed_fields gt meteo fmeteo_dir Directory_attenuation lt Directory_computed_fields gt meteo hattenuation_dir Kz Min min_kz Apply_vert happly_vert The preprocessing results will be stored in different directories named after the values of the parameters For example the program Kz may output results in home garaud results data meteo Kz usgs Nz 5 f1h 40 min 0 2 2 9 3 Quick Start Ensemble Generation You can quickly build an ensemble of models with these three Python lines from ensemble_generation import p EnsembleParameter parameter cfg p GenerateldEnsemble You can save your ensemble identities in a file or load them from a file with these two
148. ep dep emberson preprocessing ic ic preprocessing bc bc inca processing castor castor Roadmaps with Gaussian Models In short the main steps to set up a Gaussian simulation are 1 generation of meteorological data no program is available to do it but as only little information is required this should be quite easy Examples of me teorological files are provided in processing gaussian gaussian meteo dat and processing gaussian gaussian meteo_aer dat 2 preprocessing discretization to generate source files for line emission and gaussian deposition or gaussian deposition_aer to compute deposition velocities and scavenging coefficients without or with aerosol species respectively For more details see Section 3 9 3 compiling the right combination of model GaussianPlume GaussianPlume_aer GaussianPuff GaussianPuff_aer and driver PlumeDriver or PuffDriver 2 6 3 Mandatory Data in Preprocessing ECMWF Fields In ECMWF files it is recommended to have the following fields with their Grib codes e Volumetric soil water layer 1 39 e Volumetric soil water layer 2 40 e Volumetric soil water layer 3 41 2 6 SETTING UP A SIMULATION 37 e Volumetric soil water layer 4 42 e Temperature 3D 130 e U velocity 3D 131 e V velocity 3D 132 e Specific humidity 3D 133 e Snow depth 141 e Stratiform precipitation Large scale precipitation accumulated 142 e Convective precipitation accumulate
149. epending on the program Ground Data As there are 14 categories in the GLCF description the size of the binary file obtained from luc glcf should be N x Ny x 4 x 14 As of luc usgs it should be N x Ny x 4 x 24 Meteorological fields For programs meteo attenuation Kz MM5 meteo WRF meteo and Kz_TM related file size e for 2D fields is Niotar X Ny x Na x 4 e for 3D fields is Neotaz x Nz x Ny x Nz X 4 e except for the fields Kz and Kz_TM Ntotal X Nz 1 x Ny x Ny x 4 e for the field MeridionalWind Niotal X Nz x Ny 1 x Nz x 4 e and for the field ZonalWind Niotaz X Nz x Ny x Nz 1 x 4 42 CHAPTER 2 USING POLYPHEMUS Deposition Velocities For program dep the size of output files should be Notai X Ny X Nz x 4 Anthropogenic Emissions EMEP For program emissions the time step is of 1 hour so there are 24 time steps per day Related file size for surface emissions will then be of Ngays X 24 x Ny x Ng x 4 Things are a little bit trickier for volume emissions as we do not know the number of vertical levels where emissions occur This number could be lower than N as for instance there are no EMEP emissions above 1106 meters The only thing we know is then that the file size should be a multiple of Ngays x 24 x Ny X Nz x 4 Biogenic Emissions The time step for biogenic emissions is not the one given in the section domain of general cfg but the one specified in the section biogenic of bio cfg 1 hour is a popu
150. er of grid points along latitude in Mozart 2 files integer Number of vertical levels in Mozart 2 files integer bc files Directory where the output boundary conditions must be stored File providing correspondence between the name of species in Mozart 2 files and the name of species in simulation In this file the first column contains Mozart 2 species After each Mozart 2 species name the corresponding output species e g RACM species is put if any If Mozart 2 species gathers two output species put the names of all output species followed by their proportion in Mozart 2 bulk species For instance the line C4H10 HC5 0 4 HC8 0 6 splits Mozart 2 species C4H10 into HC5 40 and HC8 60 Three examples are provided preprocessing bc species_racm dat species_racm2 dat and species_cb05 dat Two other examples are also provided for RACM species_racm_vi dat and species_racm_v2 dat File providing the molecular weights of output species Program bc processes an entire Mozart 2 output file If this file contains concentrations for 10 days the program generates boundary conditions for 10 days with a time step of 24 hours The program must be launched with bc general cfg bc cfg net libre adjoint mallet mozart h0067 nc The last argument is the path to the Mozart 2 file You have to select the file to use according to date as shown in Equation 3 1 The results are in ug m They are stored as amp f_ amp c bin where
151. er of lower right cell for Eurasia Latitude of the center of the lower right cell for Eurasia Longitude of the center of the lower right cell for Africa Latitude of the center of the lower right cell for Africa Longitude of the center of the upper left cell for Eurasia Latitude of the center of the upper left cell for Eurasia Longitude of the center of the upper left cell for Africa Latitude of the center of the upper left cell for Africa Number of cells along longitude in the input file for Eurasia Number of cells along longitude in the input file for Africa Number of cells along latitude in the input file for Eurasia Number of cells along latitude in the input file for Africa Number of land categories Index of the sea in land categories normally 15 The output land cover file is in format c y x where c stands for land use category Table 3 5 presents land use categories as they are computed with luc usgs that is to say with indices starting at 0 Table 3 5 Land use categories in USGS description Value Label aoorwWNnNnr Urban and Built Up Land Dryland Cropland and Pasture Irrigated Cropland and Pasture Mixed Dryland Irrigated Cropland and Pasture Cropland Grassland Mosaic Cropland Woodland Mosaic Grassland 3 3 GROUND DATA 63 7 Shrubland 8 Mixed Shrubland Grassland 9 Savanna 10 Deciduous Broadleaf Forest 11 Deciduous Needleleaf Forest 12 Evergreen Broadleaf
152. er of steps along the longitude y max Maximum latitude of the GLCF domain whole world Ny Number of steps along the latitude Step Space step in degrees of the input GLCF file The output file will have the same resolution subdomain x_min Minimum longitude of the subdomain Nx Number of steps along the longitude y min Minimum latitude of the subdomain Ny Number of steps along the latitude The program may be launched with extract glcf general cfg extract glcf cfg Note that the file general cfg is not compulsory providing no markup from it is used in extract glcf cfg The output is a binary file of integers between 0 and 13 3 4 Meteorological Fields 3 4 1 Program meteo Program Polyphemus preprocessing meteo meteo reads ECMWF Grib files and generates meteorological fields required by chemistry transport models Most fields are interpolated from ECMWF grid to a regular grid latitude longitude in the horizontal altitudes in meters in the vertical It is assumed that ECMWF input data are stored in daily Grib files That is why this program as well as attenuation and Kz only processes data daily and requires only one date as an input in command line To extract Grib files Polyphemus uses the WGRIB package whose a compatible version should now be included in our distribution package as explained in Section 1 3 4 Note that meteo needs as input data the land use cover which can be built using programs in
153. eridional wind zonal wind convective velocity and wind module at 10 m MeridionalWind bin ZonalWind bin ConvectiveVelocity bin and WindModule_10m bin 1 inms the boundary layer height in m PBLH bin the vertical diffusion coefficients using Troen and Mahrt parameterization Kz bin in 2 1 m s the specific humidity in ke kg SpecificHumidity bin the surface relative humidity SurfaceRelativeHumidity bin the liquid water content in kgkg LiquidWaterContent bin the cloud attenuation coefficients Attenuation bin the soil moisture SoilMoisture bin the aerodynamic resistance AerodynamicResistance bin the friction velocity in ms FrictionModule bin 3 4 7 Program WRF meteo Program Polyphemus preprocessing meteo WRF meteo processes WRF data and generates meteorological fields required by chemistry transport models Most fields are interpolated from WRF grid to a regular grid latitude longitude in the horizontal altitudes in meters in the vertical Note that WRF meteo needs as input data the land use cover which can be built using pro grams in preprocessing ground Note for ECMWF users program WRF meteo is equivalent to what is performed by meteo attenuation and Kz successively Similarly to ECMWF files Kz_TM can be used after wards Program WRF meteo can be launched as follows 3 4 METEOROLOGICAL FIELDS 75 WRF meteo general cfg WRF meteo cfg 2004 08 09_09 00 00 WRF meteo general
154. ers is set to 0 scavenging constant This section is needed when the type of parameterization chosen for the scavenging is constant It contains the name of a species followed by the value of its scavenging coefficient in s71 Only one species per line must be provided All species listed in the section scavenging must be present the order is not important the others will be ignored scavenging belot This section is needed when the type of parameterization cho sen for the scavenging is belot It contains the name of a species followed by two values corresponding to the coefficients a and b respectively in the Belot parameteri zation Only one species per line must be provided All species listed in the section scavenging must be present the others will be ignored deposition constant This section is needed when the type of parameterization chosen for the deposition is constant It contains the name of a species followed by the value of its deposition velocity in ms Only one species per line must be provided All species listed in the section deposition must be present the others will be ignored A species file might look like this species 96 CHAPTER 3 PREPROCESSING Caesium Iodine scavenging Iodine Caesium deposition Caesium Iodine scavenging_constant Caesium 1 e 4 Iodine 1 e 4 scavenging_belot Caesium 2 8e 05 0 51 Iodine 7e 05 0 69 deposition_constant Caesium 0 05e 2 Io
155. erturbation management Configuration_file Name of the file that contains perturbations configuration see Section 4 11 about PerturbationManager 4 6 PerturbationDriver This driver can replace BaseDriver see Section 4 1 and allows to perturb some input fields like the temperature or the deposition velocities The perturbations are described by a perturbation configuration file entry Perturbation_file in the section data of the main configuration file This file should contain general Field_list The fields relating to species which will be perturbed Then the perturbations must be defined AdditionalField Field_name Name of the field usually independent of the species which will be per turbed followed of perturbation type add or multiply and the perturba tion value Field Species Species name followed of perturbation type add or multiply and the per turbation value The name of the section Field must appear in Field_list For example 106 CHAPTER 4 DRIVERS general Field_list DepositionVelocity SurfaceEmission AdditionalField Temperature add 2 0 DepositionVelocity 03 multiply 1 2 NO2 multiply 1 2 SurfaceEmission NO multiply 1 5 ETH multiply 1 5 4 7 Data Assimilation Drivers 4 7 1 AssimilationDriver It is the base driver from which all data assimilation drivers are derived Data assimilation is the concept and methods that estimate model state
156. ervation 8 stat possibly global statistics 9 stat_step possibly statistics per time step 10 stat_station possibly statistics per station Hence a EnsembleData instance gathers all useful information to process an ensemble of simu lations and the corresponding observations Read AtmoPy reference documentation to get a description of all methods and attributes of a EnsembleData instance 7 5 2 Sequential Aggregation The sequential aggregation methods which linearly combine the predictions of an ensemble are implemented in classes derived from EnsembleMethod also in AtmoPy The interface of a EnsembleMethod derived class is similar to that of EnsembleData except that only one member is provided the linear combination The attributes are usually 1 all_dates dates in the covered period 2 date the list per station of dates 3 sim the ensemble combination 4 obs corresponding observations 5 weight if relevant model weights indexed by time step if the weights are time dependent also indexed by stations if needed weight _date if relevant the list per station of dates for weights XA 0 stat possibly global statistics 00 stat_step possibly statistics per time step 9 stat_station possibly statistics per station Applying the sequential aggregation on an instance ens of EnsembleData is straightforward em EnsembleMean ens Trivial combination els ELS ens
157. es so that there are more chances one will fit your specific needs MPI is a must have if you want to perform your parallel job on a cluster of processors that don t share their memory But it can do more Indeed it can also take advantage of multi core processors that is processors made of multiple cores that do share their memory It is therefore our most versatile alternative for parallel computing Its main drawbacks when comparing with the OpenMP alternative are its increased need for memory each core might duplicate the whole memory of the job and its application that is a little less direct and simple If your compiler supports OpenMP and your computing platform is limited to a unique multi core machine then OpenMP could be your best pick It is indeed as simple to compile and run an OpenMP parallelized program than its serial counterpart Nevertheless it is limited to shared memory architectures for instance it could not run on more than one node of a standard cluster The so called hybrid OpenMP MPI alternative looks advantageous as it combines the strengths of shared and distributed parallel models it is not limited to a unique multi core processor as OpenMP is and it does not need as much as memory as MPI do You 14 CHAPTER 1 INTRODUCTION AND INSTALLATION can then give it a try if you are lucky enough to get both installed in your environment and you feel too limited with the memory available in your hardware Per
158. etails Photochemistry Below is a possible sequence of programs to be launched to perform a pho tochemistry simulation preprocessing ground luc glcf preprocessing ground roughness preprocessing meteo MM5 meteo preprocessing meteo Kz_TM preprocessing emissions emissions preprocessing bio bio preprocessing dep dep preprocessing ic ic preprocessing bc bc processing photochemistry polair3d Aerosol Below is a possible sequence of programs to be launched to perform a simulation with aerosol species preprocessing ground luc glcf preprocessing ground roughness preprocessing ground luc convert preprocessing meteo MM5 meteo preprocessing meteo Kz_TM preprocessing emissions emissions preprocessing emissions sea_salt 36 CHAPTER 2 USING POLYPHEMUS preprocessing bio bio preprocessing dep dep preprocessing ic ic preprocessing bc bc preprocessing bc bc gocart 4 times in a row preprocessing bc bc nh4 processing siream sorgam polair3d siream racm Roadmap with Castor Models The roadmap with Castor models is very similar to the one with Polair3D models except that raw data and preprocessing programs used to modify them are often different Below is a possible sequence of programs to be launched to perform a photochemistry sim ulation with Castor model preprocessing ground ground castor py preprocessing meteo MM5 meteo castor preprocessing emissions chimere_to_castor preprocessing bio bio castor preprocessing d
159. ex Urban_index Roughness_file Directory_meteo File Kz Directory _Kz_TM Min Min_urban Max Apply_vert P C SBL Ric Fluxes_diagnosed path Path to the binary file that describes land use cover over the output grid described in section domain This file must be in format l y x Lis the land category and it must contain proportions in 0 1 of each land category in every grid cell Index of sea in land categories It is 0 for GLCF description and 15 for USGS description Index of cities in land categories It is 13 for GLCF description and 0 for USGS description Path to the binary file that describes roughness heights in meters in output grid cells Its format is y x It is needed only if option Flux_diagnosed is activated Directory where output meteorological files are stored Name of the file where the vertical diffusion coefficients as com puted with the Louis parameterization are stored Name of the directory where the vertical diffusion coefficients out put are stored the filename being Kz_TM bin kz Lower threshold for vertical diffusion in m s7 Lower threshold for vertical diffusion over urban areas in m Higher threshold for vertical diffusion in m s 2 1 q s If set to no the lower threshold is applied only at the top of the first layer otherwise it is applied to all levels Coefficient used in Troen and Mahrt parameterization see Troen and Mahrt 1986 Coefficient used
160. ext you have to edit include newran include h and uncomment the line define use_namespace define name spaces 16 CHAPTER 1 INTRODUCTION AND INSTALLATION That is remove the first two slashes define use_namespace define name spaces Compile the library here with GNU C compiler make f nr_gnu mak libnewran a This should create include newran libnewran a To complete the installation you have to create a directory where the seed values are stored for instance mkdir newran cp fm txt lgm txt lgm_mix txt mother txt mt19937 txt multwc txt wh txt newran Recall the path to your seed directory since this is an entry of a configuration file processing assimilation perturbation cfg 1 3 4 WGRIB WGRIB is a library used to decode GRIB first edition files It is only necessary if you use ECMWF meteorological fields so for programs meteo cpp and attenuation cpp If you use meteorological data from MM5 or WRF you do not need this library WGRIB homepage can be found at http www cpc ncep noaa gov products wesley wgrib html As of version 1 7 of Polyphemus the source code of WGRIB is directly included in the distribution package so that you shouldn t need to download and install it anymore Please notice that we just included the version v1 8 0 120 You might find more recent versions of WGRIB at ftp ftp cpc ncep noaa gov wd51we wgrib wgrib tar but they might not be compatible with Polyphemus 1 3 5 ISO
161. f objects from which it is derived At this point the parts of section 2 6 you have not read yet become a must read 2 3 COMPILING THE PROGRAMS 21 How to run a program For preprocessing or postprocessing programs examples of command line are usually given in their related sections For preprocessing sections 2 5 and 3 2 should provide you with additional details As for processing programs you will understand it quickly through an example Let s suppose you adopted the directory tree of 2 6 1 and you want to launch a simulation with processing photochemistry polair3d From the directory MyStudy if you did not change the name of the main configuration file racm cfg just type Polyphemus version processing photochemistry polair3d config racm cfg And then Once done section 2 7 will suggest some ways to check your results and chapter 7 will guide you through the postprocessing tasks 2 3 Compiling the Programs Polyphemus programs are supposed to be compiled with SCons or second choice with make SCons is the recommended way to compile the programs it is more portable and autonomous it has much more options and if you intend to write new programs it should ease your experience Take notice that as of version 1 6 of Polyphemus makefiles are no longer supported They are provided as is and you should check them and might have to correct them before using them 2 3 1 Compiling with SCons Where is SCons Polyphemus i
162. f the main program Other meteorological data might be needed depending on the chosen parameterization to compute scavenging coefficients and deposi tion velocities Currently the only parameterization that needs other information is the Belot parameterization If the type belot is chosen for the calculation of the scavenging coefficient a rainfall rate must be provided in mmh If the chosen type is constant or none the rainfall rate or other information can be provided but will be ignored by the program So the meteorological data file finally looks like this situation Temperature Celsius degrees 3 9 PREPROCESSING FOR GAUSSIAN MODELS 95 Temperature 10 Wind angle degrees Wind_angle 30 Wind speed m s Wind 3 0 Boundary height m Boundary_height 1000 Stability class Stability D Rainfall rate mm hr Rainfall_rate 1 In this example there is only one meteorological situation described Others can be added simply by adding similar sections situation at the end of the file 2 Species data file it contains several sections but not all are needed for the preprocessing The needed sections are species Contains the list of all species scavenging Contains the list of the species for which scavenging occurs The scavenging coefficient of the others is set to 0 deposition Contains the list of the species for which deposition occurs The deposition velocity of the oth
163. factor is given by the file beginning date and time step as well as the date at the current simulation time step The temporal factor file is a binary file containing the list of factors from the beginning date in float type The configuration file for point emissions may contain a section looking like this source Abscissa 10 3 Ordinate 48 Altitude 80 Species S02 Type temporal Rate 1 Date_beg 2001 04 22_00 05 Date_end 2001 04 23_00 00 TemporalFactor hourly_factor bin Date_min_file 2001 04 01 Delta_t 3600 5 15 4 Continuous line emission The continuous_line emission is described with the following entries Date_beg Date_end Rate Coordinate_file The date at which the emission starts The date must be in a format de scribed in Section D 7 The date at which the emission ends The date must be in a format described in Section D 7 The list of rates one per emitted species in mass unit per second per meter Path of the coordinate file which replaces the Abscissa Ordinate and Alti tude entries of the continuous point emission described in Section 5 15 1 It has the same syntax as the data file line emission dat described in Section 3 9 1 The configuration file for point emissions may contain a section looking like this source 148 Species Iodine Caesium Type continuous_line Date_beg 2001 01 01_01 00 00 Date_end 2001 01 01_04 00 00 Rate 56 5 27 2 Coordinate_
164. file line emission dat CHAPTER 5 MODELS Chapter 6 Modules 6 1 Transport Modules 6 1 1 AdvectionDST3 Module AdvectionDST3 is the transport module associated to advection for Polair3D It is based on a third order direct space time scheme with a Koren Sweby flux limiter The data needed are the wind components and boundary conditions if they are available Please note that Courant Friedrichs Lewy CFL condition is not verified and that the user should choose the mesh dimensions and the time step of simulations very carefully In order to enforce the CFL you may use module SplitAdvectionDST3 instead 6 1 2 SplitAdvectionDST3 Module SplitAdvectionDST3 is the same as AdvectionDST3 except that e it uses directional splitting e it performs automatic subcycling in order to satisfy the CFL It is the advection module used in every program driver cpp except the ones for data assimilation 6 1 3 GlobalAdvectionDST3 Module GlobalAdvectionDST3 is the same as AdvectionDST3 for global scale boundary con ditions are not used 6 1 4 DiffusionROS2 Module DiffusionROS2 is the transport module associated to diffusion for Polair3D It is based on a second order Rosenbrock method Fortran routines are used to perform all numerical computations 6 1 5 GlobalDiffusionROS2 Module GlobalDiffusionROS2 is the same as DiffusionROS2 for global scale 149 150 CHAPTER 6 MODULES 6 1 6 TransportPPM Module TransportPPM is the
165. file there is a new section named gaussian where the name of the configuration file for the puff model has to be provided field file_gaussian 5 11 2 Data description file In the data configuration file there is a new section gaussian_meteo that provides more meteorological fields than the ones used for Eulerian model 1 Fields LowCloudiness MediumCloudiness HighCloudiness and SolarRadiation will be used to compute stability class It is used only with Briggs parameterization for standard deviations In other cases put whatever value you want for those fields they are still read but not used 2 Fields FirstLevelWindModule FrictionModule BoundaryHeight and LMO provide re spectively the friction velocity the boundary layer height and the Monin Obukhov length They are always read but used only in case similarity theory is used to compute standard deviations In other cases put any value for those fields In addition there is a new section plume in grid that provides several information de tailed below plume in grid size by default 4 by default 4 reinjection criterion is based on the puff horizontal size or interpolated at the puff center yes Horizontal_coefficient Coefficient by which to multiply oy to obtain the puff horizontal Vertical_coefficient Coefficient by which to multiply a to obtain the puff vertical size With_reinjection_time Is puff reinjection forced after a given time
166. filename NO bin Nt 22 Nz 5 Ny 33 Nx 65 disp m d2 5 0 A 6 VISUALIZING RESULTS 181 160 140 120 100 Figure A 1 Figure obtained using Python and AtmoPy unit is ug m 182 APPENDIX A POLAIR3D TEST CASE Appendix B Gaussian Test Case This document explains how to proceed to perform simulations using the test case for Gaussian models provided with Polyphemus When the archive TestCase Gaussian 1 8 tar bz2 is extracted a directory TestCase Gaussian is created It is referred to below as TestCase tar xjvf TestCase Gaussian 1 8 tar bz2 The subdirectory config holds all configuration files necessary and the subdirectory results is meant to store the results of simulations It is divided in three subdirectories one for each pos sible simulation puff_line for the Gaussian puff model and a gaseous line source puff_aer for the puff model with point sources of gaseous and aerosol species and plume for the Gaus sian plume model with gaseous species only To launch the test cases you do not need to modify the configuration files In the following commands Polyphemus and TestCase have to be replaced by the paths to the Polyphemus directory and test case directory respectively B 1 Preprocessing Prior to use Gaussian models you need to compute scavenging coefficients and deposition ve locities for the various species This is achieved by using gaussian deposition_aer First compile i
167. for meteorological situ ation i you have to visualize the index i 1 x N t where N is the total number of time steps for one situation here N 80 For example the simulation time step 10 for the first situation corresponds to the index 10 for the second situation to the index 90 for the fourth situation to the index 250 To visualize the results at index i use the command gt gt d getd filename aer1_0 bin Nt 320 Nz 2 Ny 30 Nx 55 gt gt contourf d i 0 If you want to clear the figure use the command clf Figure B 2 gives an example of what you can obtain f LS 25 4 2 3 6 20 3 0 15 2 4 1 8 10 1 2 5 0 6 a 10 20 30 40 50 0 9 Figure B 2 Puff visualization at time step 30 for species aerl and first diameter Third meteo rological situation Ground concentration in y g m 3 B 4 3 Gaussian Puff with Line Source To visualize results go to the directory TestCase results puff_line and use the com mands getd and contourf Figure B 3 provides examples of what you can obtain 190 280000 240000 200000 160000 120000 80000 40000 a Ground concentration at t 1 s r r r 12000 10500 9000 7500 6000 4500 3000 1500 o 10 20 30 40 50 o 0 c Ground concentration at t 5 s Figure B 3 Puff line visualization at time steps situation Ground concentration in yg m APPENDIX B GAUSSIAN TEST CASE 24000 21000
168. formance gains On our computing platform both three alternatives gave performances quite equivalent At least performance depends on your compilers and your hardware but it depends also on the job you are submitting You have then to be aware of two things in Polyphemus to better exploit parallelism parallelism operates below the timestep level The shorter the computation of a timestep is the more the overhead induced by parallelism will weight then the least parallelism will offer speed up the computation domain is primarily partitionned along the X axis sometimes along the Y axis Therefore the number of core processing unit you use should not be larger than the number of cells along the X axis 1 3 Installation 1 3 1 Main instructions As soon as libraries and compilers are available Polyphemus is almost installed First extract Polyphemus sources to a given directory Polyphemus is usually distributed in a tar tgz tar gz or tar bz2 file These files are extracted with one of these commands tar xvf Polyphemus tar tar zxvf Polyphemus tgz tar zxvf Polyphemus tar gz tar jxvf Polyphemus tar bz2 Polyphemus programs must be compiled by the user when needed SConstruct files as well as make files makefile are provided so that program compilation should be easy SCons is a seductive and powerful alternative to make based on the Python language http www scons org You may not install it on your system as it is l
169. from diverse available sources e g model simulations observations and statistics information aiming at and validated by a better pre diction Data assimilation methods can roughly be catalogued into variational and sequential ones For the former the variational principle applies The objective can be defined by the dis crepancy between model simulation and a block of observations usually combined with a priori background knowledge This can be theorized and solved efficiently by optimal control theory FourDimVarDriver The sequential methods make use of observations instantaneously This is a filtering process and filter theory linear or nonlinear applies OQptimalInterpolationDriver EnKFDriver and RRSQRTDriver A typical data assimilation system consists of three components model physics data ob servation and assimilation algorithm The data assimilation drivers organize model and data to perform assimilations The associated configuration file is an extension of that of the model configuration file exem plified in Section 5 8 For data part it has an additional section observation management observation management Configuration file Path to the file containing the configuration of the ob servation management In the distribution directory processing assimilation choose between observation cfg to use observations and observation sim cfg to use simulated observations The value of Configuration fil
170. ful in order to properly track simulations In directory MyStudy you should add a file called version which should contain Polyphemus version and maybe the version of other tools You may also want to copy configuration files in your output directory For instance you may copy meteo cfg in directory MyStudy data meteo so as to know with which configuration your meteorological data were generated 2 6 SETTING UP A SIMULATION 35 2 6 2 Roadmaps Roadmaps with Polair3D Models In short the main steps to set up an Eulerian simulation with model Polair3D are 1 generation of ground data land use cover roughness height preprocessing ground 2 preprocessing of meteorological fields preprocessing meteo 3 other preprocessing steps if relevant deposition velocities emissions 4 compiling the right combination of model module s and driver see Sections 2 6 5 and 2 5 3 Passive tracer Below is a possible sequence of programs to be launched to perform a basic passive simulation preprocessing ground luc glcf preprocessing ground roughness preprocessing meteo MM5 meteo preprocessing meteo Kz_TM processing transport polair3d transport Program polair3d transport is not provided with Polyphemus subdirectory processing transport should also be created It should be built with Polyphemus compo nents BaseDriver driver Polair3DTransport model AdvectionDST3 module DiffusionROS2 module See Section 2 5 3 for d
171. g Two Vertical Distributions distribution 79 3 6 2 Anthropogenic Emissions EMEP emissions 79 3 6 3 Biogenic Emissions for Polair3D Models bio 82 3 6 4 Biogenic Emissions for Castor Models bio castor 83 3 6 5 Sea Salt Emissions searsalt 000000000 84 air Iaitial Conditions die a se soe ao a a aok da a ee a a ee a a 84 oe Bo ndary CONQILONS seose raeas k pema HO a E e ee a 86 3 8 1 Boundary Conditions for Polair8D aooaa a e 86 3 8 2 Boundary Conditions for Castor bc inca saoao ea e 87 3 8 3 Boundary Conditions for Aerosol Species be gocart 88 3 9 Preprocessing for Gaussian Models 2 0 91 3 9 1 Programdiscretization cx RE ERR Eee 91 3 9 2 Programs gaussian deposition and gaussian deposition_aer 93 CONTENTS 4 Drivers 4 BaseDriver ostias 0663 See oe A Ee ee we el ae aS 17 PICAS sopra bu ke ae a a eS we Re fod oa me Be doe gs h dd PUEDAS coses ee a ae ee a eRe ek e ae da d 4 4 PlumeMonteCarloDriver e 4 5 MonteCarloDriver lt s sa s 244 4 6 Bea RRR Ee a es 446 PerturbationDriver sa sa ores Be eee a a a Re ie oe Ree Re i 4 1 Data Assimilation Drivers ecos s ia a be 4 7 1 AssimilationDriv er ce een aaa es 4 7 2 OptimallnterpolationDriver e e e Ama BORRIS o a ara BA Sw a a dd ee Ra e 414 RRSORT rivet decos mada era A ee a OR A 4 7 5 FourDimVarDri
172. g number here since each node is assumed to appear only once in the file Please note that only one way of describing line sources must be used within the data file either the list of segments eight columns for all lines in the file or the broken line three columns for all lines in the file This is an example of data file defining a straight line emission between two points X m Y m Z m O O 30 20 O 30 The output data file contains a list of point sources It is presented as a list of sections named source each section containing the coordinates and other data for one point source All points coordinates have been calculated by the program The emission rate is the same for all points except at both extremities of each line source Indeed to correct side effects the emission rate is divided by two at extremities but the total emission rate on each line source remain unchanged The program discretization_aer is the same except that the output is a point emission file formatted for aerosol species to be used with GaussianPlume_aer or GaussianPuff_ aer In discretization cfg the name Species is replaced by Species_name there can be only one species and one bin per source and the rate is in mass s instead of mass s m 3 9 2 Programs gaussian deposition and gaussian deposition_aer The aim of these programs is to calculate the scavenging coefficient and the deposition velocity of the species The program gaussian depositio
173. g program that fits your needs How to set up a simulation Section 2 6 4 on mandatory data for models along with the sections devoted to the related preprocessing programs of chapter 3 should help you figure out where to find the raw data you need and how to preprocess them It will then be time to compile the programs you have to use see section 2 3 For instance in processing photochemistry to compile polair3d cpp type atils scons py polair3d Afterwards you will have to edit their related configuration files In the directory of the program you should find an example of configuration files from where to start e pre or postprocessing program have usually two configuration files For instance program preprocessing meteo uses general cfg and meteo cfg e Processing programs have three of them For instance processing photochemistry polair3d uses racm cfg racm data cfg and racm saver cfg Section 2 4 might be very helpful along with appendix D for the lexical references As for the description of the fields that control configuration look at e the section documenting the program if it is a pre or postprocessing program e the sections documenting the objects of the programs be it a driver an ouptut saver a model or a module as previously described Indeed all the fields that are specific to control the behaviour of a given object should be provided in the section it is related to and possibly in sections o
174. h regard to software requirements below is a list of possible requirements depending on the programs to be run the C library Blitz http www oonumerics org blitz versions 0 6 0 7 0 8 and 0 9 are supported Note that your compiler may exclude a few versions Blas Lapack compiled libraries any recent version NewRan C library for generation of random numbers from version 2 0 For installa tion of NewRan see Section 1 3 3 NetCDF compiled libraries and headers C library any version from series 3 x should work NumPy any recent version Make sure that your versions of NumPy and Matplotlib see below are compatible Matplotlib any recent version and corresponding pylab version usually pylab is included in Matplotlib package It is recommended to install the corresponding version of Basemap in order to benefit from AtmoPy map visualizations Basemap is a toolkit available on Matplotlib website http matplotlib sourceforge net but usually not included in Matplotlib package SciPy any recent version WGRIB see Section 1 3 4 All of them are open source software Requirements are shown in Table 1 1 NewRan is not included in Table 1 1 because it is only needed if one performs data assimi lation or stochastic Lagrangian simulations Similarly WGRIB is only needed for preprocessing programs preprocessing meteo meteo and preprocessing meteo attenuation to work and has not been inc
175. h s 2 as standard deviation of the logarithm of the variable With the Polyphemus GaussianPlume and GaussianPlume_aer models the available options and data that may be listed in the perturbation file are 1 boolean_option gillani hpdm rural day scavenging dry_deposition plume_rise breakup 4 6 PERTURBATIONDRIVER 105 2 string_option option parameterization_std with possible values Briggs Doury and similarity theory option deposition model with possible values Chamberlain and Overcamp 3 numerical_valuel temperature wind_angle wind inversion height friction velocity convective_velocity boundary_height lmo coriolis 4 source_data rate velocity temperature z y x diameter Note that the driver makes the model read all input data the model may require Indeed any parameterization or option of the model may be selected a priori even if it does not eventually appear in the perturbations configuration so the model must read all possible input data in order to run with any possible parameterization or option 4 5 MonteCarloDriver The Monte Carlo driver performs several simulations with perturbed input data The input data are perturbed by the PerturbationManager see Section 4 11 The simulation outputs are saved with the unit saver of type domain_ensemble_forecast see Section 4 9 2 The configuration file for this driver should contain MonteCarlo Number_ensemble The number of samples p
176. he Chamberlain deposition has to be used instead of the Overcamp model There is no need to provide a meteorological file since these data are fed to the puff model by the plume in grid model The species file is still read It is advised to use the same as the species file for Eulerian model The names of the levels file and saver file are still read but the files are not used 5 12 StationaryModel This model is used to perform a simulation at local scale with an Eulerian model The model mostly creates an interface between the driver normally BaseDriver and an underlying Eule rian model such as Polair3DChemistry At each time step of StationaryModel simulation time step iterations of the underlying model are performed with a much smaller time step internal time step until convergence is reached The driver moves StationaryModel from one simulation time step to the next one Convergence is checked by computing the norm of the difference between the concentrations before and after the iteration 1 norm 2 norm or infinity norm see below normalizing it with the mean or the maximum of the concentration before and by comparing it to a convergence criterion The output on screen for each iteration gives whether or not the inner loop converged and if it did after how many iterations If the number of iterations is too small or too big this means that the way to check convergence is not adapted Try changing the norm used th
177. he Python library AtmoPy This library makes calls to a C program in order to parse configuration files Follow the steps below to have AtmoPy fully installed cd Polyphemus include atmopy talos atils scons py Instead of SCons you can also perform the compiling job manually g I Talos o extract_configuration extract_configuration cpp You may replace g with any supported compiler see Section 1 2 1 3 3 NewRan The library NewRan is required for Kalman algorithms RRSQRT and ensemble for Monte Carlo simulations for adjoint model validation to generate random numbers and for the La grangian stochastic model It should be installed in include newran But if you decided to use SCons you just can skip this section and install it by typing from include newran atils scons py f SConstruct_newran If you are still loyal to make please go on Download NewRan from http www robertnz net download html or type NewRan in search engine At the time these lines are written NewRan 3 0 beta is available at http www robertnz net ftp newran03 tar gz The following commands work with NewRan 3 0 beta released 22 April 2006 there may be slight changes with other versions Go to directory include newran expand NewRan in it cd Polyphemus include newran wget http www robertnz net ftp newran03 tar gz tar zxvf newran03 tar gz If everything is fine you should have a file called include newran newran h N
178. he species m s Deposition_velocity Caesium 0 0005 Iodine 0 005 Program gaussian deposition_aer The program gaussian depositionaer works the same way as the program gaussian deposition except that there are some more information specific to the aerosol species The input and output files are the same as described in the section about gaussian deposition so in this section we will only describe the data that are added to the files described previously One input file is needed in addition to the meteorological data and species data files It is the diameter file reference diameter dat which contains the diameters of the aerosol particles Configuration File In the configuration file the following information are added data Diameter Path to the data file that contains the particle diameters scavenging Type_aer Parameterization to be used to calculate the scavenging coefficients for aerosol species File_aer Path to the file that contains the scavenging coefficients for aerosol species Read only if Type_aer is set to file 98 Value Type_aer File_aer Velocity_part CHAPTER 3 PREPROCESSING Values to be used for a Slinn parameterization choose between best_estimate and conservative deposition Parameterization to be used to calculate the deposition velocities for aerosol species Path to the file that contains the deposition velocities for aerosol species Read only if Type_aer is set to file
179. he time round T 1 with a linear combination of the models predictions Yi w ee Um T 1 ThT re The weights vm r 1 Of the ensemble forecast Yp are computed with all xh and yf t lt T The procedure is repeated for all time rounds and is called sequential aggregation For further details it recommended to read Mallet et al 2007a available at http www dma ens fr edition publis 2007 resu0708 html This is done in two steps 1 the ensemble and the observations are loaded in an in stance of EnsembleData and 2 the sequential aggregation is carried out by a derived class of EnsembleMethod such as ExponentiatedGradient or RidgeRegression Examples are given in postprocessing ensemble You should find the files 1 all cfg a configuration file 2 example py an example in which the ensemble data is loaded and a few sequential ag gregations are performed including with a meta learning approach i e the ensemble members used in the linear combination already include aggregated predictions 3 number_models py tests the performances of an aggregation method against the number of models in the ensemble 4 oracle py shows the performances of a posteriori combinations 7 5 1 Loading Data Configuration File and EnsembleData EnsembleData is a class defined in AtmoPy that loads the outputs of an ensemble of models and the corresponding observations It requires a configuration file like all cfg Actually all cfg includes more
180. hemistry Same as CastorTransport and SpecificHumidity Liquid WaterContent Attenuation Polair3DTransport MeridionalWind for advection ZonalWind for advection VerticalDiffusion for diffusion Horizontal_diffusion if Isotropic_diffusion is set to no this value is given in the main configuration file Temperature if With_air_density is set to yes or for microphysical scavenging model Pressure if With_air_density is set to yes or for micro physical scavenging model Polair3DChemistry Same as Polair3DTransport and SpecificHumidity Attenuation Polair3DChemistryAssimConc Same as Polair3DChemistry Polair3DAerosol Same as Polair3DChemistry and Liquid WaterContent SnowHeight PlumelnGrid Same as Polair3DChemistry and LowCloudiness MediumCloudiness HighCloudiness SolarRadiation First LevelWindModule FrictionModule BoundaryHeight LMO Monin Obukhov length GaussianPlume or GaussianPlume_aer Temperature Wind_angle Wind wind module 2 6 SETTING UP A SIMULATION 39 Boundary _height Stability if Briggs or Doury are used Friction_velocity if similarity_theory is used Convective velocity if similarity theory is used LMO if similarity_theory is used Coriolis Coriolis parameter if similarity theory is used GaussianPuff or GaussianPuff_aer Same as Gaussian and Attenuation if with chemistry is set to yes Pressure if
181. hemus team polyphemus help lists gforge inria fr In addition to the domain definition Section 3 2 2 program emissions reads a configuration file such as emissions cfg Directory_surface_emissions Directory_volume_emissions Chemical_mechanism Molecular_weights Polair_vertical_distribution Input_directory Hourly_factors Weekdays_factors paths Directory where the computed surface emissions are stored Directory where the computed volume emis sions are stored This should be different from Directory_surface_emissions since files for surface emissions and volume emissions have the same names species names options Chemical mechanism used in your simulation You can choose among racm racm2 cb05 and cb05 siream File containing molecular weights of species EMEP File where the vertical distribution of emissions is stored This file should contain one line per emission sector Each line contains the percentage of emissions at ground level first column and the percentage of emissions in each vertical level Nz following columns Directory containing EMEP emissions inventory File defining hourly factors see below File defining weekdays factors see below 3 6 EMISSIONS Monthly_factors Time_zones Nx_emep Ny_emep Ncountries Species Nsectors Urban_ratio Forest_ratio Other_ratio File x min Delta_x Nx ymin Delta_y Ny N Aggregation Speciation_directory
182. her paths needed for the simulation depend on these ones so modifying them should be sufficient The domain is defined for a simulation over Europe Make sure that the date is 2004 08 09 date for which meteorological raw data is provided A 3 Computing Ground Data Ground data are not necessary to perform the simulation but they are needed to compute the vertical diffusion using Troen and Mahrt parameterization If you wish to use Louis parameter ization this step is not necessary and you can go to Section A 4 A 3 1 Land Use Cover Compile and execute luc usgs from your Polyphemus directory cd Polyphemus preprocessing ground utils scons py luc usgs cd TestCase Polyphemus preprocessing ground lus usgs config general cfg config luc usgs cfg The output on screen will be Reading configuration files done Memory allocation for data fields done Reading LUC data done Building LUC data on output grid done Writing output data done A 4 COMPUTING METEOROLOGICAL DATA 177 A 3 2 Roughness The preprocessing program roughness needs as input data the result of luc usgs Compile and execute roughness cd Polyphemus preprocessing ground utils scons py roughness cd TestCase Polyphemus preprocessing ground roughness config general cfg config roughness cfg The output on screen will be Reading configuration files done Reading roughness data done Writing roughness binary
183. hotolysis see below are not right you can have an error message ERROR An input output operation failed in FormatBinary lt T gt Read ifstream amp FileStream Array lt TA N gt amp A Unable to read 42900 byte s The input stream is empty Indeed input data can be computed for several days so the program will discard the data for the days between Date_min in a section of polair3d data and Date _min for the simulation Here as the data has been computed for one day only it would be as if the data files were empty hence this error Remark In the case of photolysis data are provided for a whole year and Date_min must be 2004 01 01_12 A 5 3 Modifying Saver File The file polair3d saver cfg should be ready to use You can modify the species to save you are advised against saving concentrations for all species You can choose to save instantaneous concentrations or concentrations averaged over Interval_length by setting Averaged to no or yes respectively A 5 4 Simulation Compile the driver cd Polyphemus processing photochemistry utils scons py polair3d Launch the simulation from TestCase cd TestCase Polyphemus processing racm polair3d config polair3d cfg A 5 5 Checking your results First check the size of your output files see 2 7 for details You can also have a quick look on the values by applying get_info_float to for instance NO bin You should get something like if you used Kz_TM in your simu
184. hs to save the results e correction coefficient dat contains correction coefficient for the line source Gaussian formula e line emission dat contains the coordinates of the line sources Compile the program plume cd Polyphemus processing gaussian utils scons py plume Then execute it from TestCase config cd TestCase config Polyphemus processing gaussian plume plume cfg The output on screen will be Temperature Wind angle Wind velocity Stability Case 0 10 30 3 A Case 1 15 100 2 B Results are stored in TestCase results plume You can check the size of the file Iodine bin see 2 7 for details and then have a quick look on the values by applying get_info_float to Todine bin You should get something like Minimum O Maximum 3 3259 Mean 0 0236683 186 APPENDIX B GAUSSIAN TEST CASE B 3 2 Puff with Aerosol Species The simulation uses puff_aer which is the program for puffs with aerosol species and the following data e Gaseous species Iodine e Aerosol species aerl aer2 e Sources 1 point source per species e Meteorological situation same 4 situations e Rural environment The simulation uses the following files e puff_aer cfg gives the simulation domain options and the paths to the other files e diameter dat gives the aerosol diameters e gaussian levels dat gives the vertical levels e gaussian species_aer dat gives the species data only species names are used since all
185. hybrid parallelization is now available for this module one should not need old forks anymore Nevertheless it is still available in Polyphemus and should therefore properly documented The following option enables to use several processors within one machine options Number_of_CPU Number of processors to use see below The whole computation domain will be divided in Number_of_CPU sub domains which will be each solved in parallel by physical processors You can specify any integer value suitable to your machine as Number_of_CPU You can even put a value greater than the number of processors some of them will just be overloaded You may put a negative integer value to let the module auto detect the number of processor on your machine By default then all available processors will be used Take notice that The implementation of this feature slightly differs from what is usually referred as multi threading as we do not use threads but real processes which communicate by shared memory segments 156 CHAPTER 6 MODULES using this multithreading solution in combination with MPI or OpenMP results in an un defined behaviour When unused we recommand users to set the value of Number_of_CPU to 1 e Organic module All physical data needed for organics have been moved from include Fortran files to the aerosol species dat configuration file The following option lets you the possibility to account for oligomer
186. i I Lehtinen K E J Timmreck C Noppel M and Laaksonen A 2002 An improved parameterization for sulfuric acid water nucleation rates for tropospheric and stratospheric conditions Journal of Geophysical Research 107 D22 Wendum D 1998 Three long range transport models compared to the ETEX experiment a performance study Atmospheric Environment 32 24 4 297 4 305 Wesely M L 1989 Parameterization of surface resistances to gaseous dry deposition in regional scale numerical models Atmospheric Environment 23 1 293 1 304 Wiscombe W J 1980 Improved Mie scattering algorithms Applied Optics 19 9 1 505 1 509 BIBLIOGRAPHY 207 Yarwood G Rao S Yocke M and Whitten G 2005 Updates to the carbon bond chemical mechanism CBO5 final report to the US EPA RT 0400675 available at http www camx com publ pdfs CB05_Final_Report_120805 pdf Zhang L Brook J R and Vet R 2003 A revised parameterization for gaseous dry depo sition in air quality models Atmospheric Chemistry and Physics 3 2 067 2 082 Zhang L Moran M D Makar P A Brook J R and Gong S 2002 Modelling gaseous dry deposition in AURAMS a unified regional air quality modelling system Atmospheric Environment 36 537 560
187. iation bin in Wm e the rain intensity Rain bin in mmh e the convective rain intensity ConvectiveRain bin in mmh e the cloud height in m 3 4 6 Program MM5 meteo castor Program MM5 meteo castor processes MM5 data and generates meteorological fields required by chemistry transport model Castor 3 4 METEOROLOGICAL FIELDS 73 Vertical_levels Database_MM5_meteo Roughness_file Directory_meteo Delta_t Nt xmin Delta_x Nx ymin Delta_y Ny Nz projection_type Horizontal_interpolation Dot_coordinates Relative_humidity_threshold Low_cloud_top_max domain File containing the parameters alpha and beta used to compute the pressure at various levels and the altitudes Note that for most prepro cessing programs this field designates file preprocessing levels dat but not for this spe cific application for which you can use file preprocessing meteo hybrid_coefficients dat paths Directory in which MM5 input files may be found If amp D appears in the file name it is replaced by YYYY MM DD where YYYY is the year MM the month and DD the day Path to the binary file that describes roughness heights in meters per month in output grid cells Note that this file is not the output of program roughness Directory where output meteorological files are stored MM5 Time step in hour of data stored in every MM5 file Number of time steps stored in every MM5 file Index in MM5 coo
188. ibution of emissions in the output grid It is based on AtmoData function ComputeVerticalDistribution Running this program is not compulsory Even if the vertical distribution of emissions is required to compute anthropogenic emissions program emissions the vertical distribution can be generated by other means including by hand In addition to the domain definition Section 3 2 2 program distribution reads a config uration file such as emissions cfg domain Nz Number of output vertical levels Vertical_levels Path to the text file that stores the altitudes in m of output level interfaces hence Nz 1 values are read EMEP Nz_in Number of input vertical levels Ve Ve Po Ns rtical_levels Path to the text file that stores the altitudes in m of input level interfaces hence Nz_in 1 values are read rtical distribution Path to the file with the input vertical distribution of emissions This file should contain one line per emission sector Each line contains the percentage of emissions at ground level first column and the percentage of emis sions in each vertical level Nz_in following columns lair_vertical distribution Path to the output file where the output vertical distri bution of emissions should be stored The format is the same as in file Vertical_distribution ectors Number of activity sectors The program must be launched with distribution general cfg emissions cfg 3 6
189. icles in seconds 5 13 3 Vertical Levels and Point Emission Vertical levels are defined the same way as in 5 5 3 As for point emission its related file is of the general type described in Section 5 15 5 13 4 Noteworthy Remarks about Output Saving The simulation outputs can be saved with the unit saver types related to the SaverUnitDomain see 4 9 2 or SaverUnitPoint see 4 9 7 The following types should therefore be avail able domain domain ensemble forecast domain ensemble analysis indices list and coordinates_list Take notice that the option Averaged is not supported it should then always be set to no When using SaverUnitDomain you might be surprised by the time needed to complete the saving of a given timestep This deserves some further explanations Unlike Eulerian models Lagrangian models do not compute the concentration in every cells of the domain at each timestep This calculation has to be performed besides the Lagrangian algorithm as an explicit projection from the Lagrangian particles onto the domain mesh Such a projection can be very expensive in CPU time depending on the particle type and the mesh size The particles that are now implemented in Polyphemus are Gaussian kernels whose projection is particularly costful because each particle is considered to contribute to each cell concentra tion This was inherited from the DIFPAR algorithm so it is reasonable to expect significant improvement in versions to c
190. ies file containing the sections dedicated to aerosol species laerosol_species aerl aer2 aer3 scavenging_constant_aer Scavenging coefficient for aerosol species Unit seconds 1 Depends on the diameter first value diameter index in file diameter dat Only one diameter per line 0 1 e 4 100 CHAPTER 3 PREPROCESSING 1 2 e 4 deposition_constant_aer Dry deposition velocity diffusive part of the species Unit m s Depends on the diameter Only one diameter per line 5e 2 O 0 1 5e 2 O O density_aer Particle density aerosol species kg m 3 Only one species per line aeri 1 88 aer2 1 aer3 4 93 In case the Type_aer is set to file an additional file is needed for deposition velocities or scavenging coefficients It is in the same form as for the gaseous species except that a value is required for each species and diameter It may look like this situation aer1_0 0 03 aer1_1 0 012 aer1_2 0 01 aer2_0 0 022 aer2_1 0 011 aer2_2 0 01 situation aer1_0 0 098 aer1_1 0 071 aer1_2 0 058 aer2_0 0 091 aer2_1 0 07 aer2_2 0 058 Output File The output file is the same file as the one for gaussian deposition except that the scavenging coefficients and deposition velocities of aerosol species are also written One coefficient corresponds to a given species of a given diameter It is written as species name diameter index followed by the
191. if set to no the With_interpolation Are meteorological data taken at the center of the puff cell no 140 CHAPTER 5 MODELS Reinjection_time Reinjection time in seconds after the puff emission used only if With reinjection time is set to yes Injection method Puff feedback method into the Eulerian model column for an injection on one column of cells integrated for an injection pro portional to the puff quantity in all neighboring cells With chemistry feedback Is there some feedback of the chemical products in the Eulerian cell at each time step yes or does everything stay in the puff until reinjection no Note The option With_chemistry_feedback allows to save some computational time since the chemical interaction between the background species in a cell and all puffs within this cell is computed only once and not for each puff separately However it is not advised to use this option for the time being since its stability is not guaranteed Note that there is no point emission for the Eulerian model since the source file is directly read by the Gaussian puff model it is provided in the Gaussian puff configuration file Hence if you set the option With_point_emission to yes and provide the same configuration file for point source the source file will be read twice and taken into account by both models Finally a section ground provides some information a
192. in Troen and Mahrt parameterization see Troen and Mahrt 1986 Ratio between the surface layer and the atmospheric boundary layer 0 1 in Troen and Mahrt 1986 Critical Richardson number used to estimate the atmospheric boundary layer height in case BL_diag is set to 2 Should the friction module the evaporation and the sensible heat be diagnosed If not they are read in input data which is recom mended 70 CHAPTER 3 PREPROCESSING BL_diag What kind of diagnosis is used to estimate the boundary layer height Put 1 to use Troen and Mahrt diagnosis Troen and Mahrt 1986 put 2 to rely on a critical Richardson number and put 3 to use ECMWF or MM5 or WRF boundary layer height so there is no diagnosis this option is more robust and it is recommended Perturbed_BL Multiplication factor for the boundary layer height in the Troen amp Mahrt parameterization TM_stable The vertical diffusion as computed by Troen and Mahrt parame terization is applied only within the boundary layer It is possible to further restrict its application if TM_stable is set to no the parameterization is not applied in stable conditions In this case the Troen and Mahrt parameterization is only applied in unstable boundary layer Several meteorological fields are computed with ComputePotentialTemperature ComputeSaturationHumidity and ComputeSurfaceHumidity_diag If fluxes are not di agnosed the Monin Obukhov length is comput
193. is used e g dep general cfg dep cfg 2004 08 09_12 00 00 Please note that in all three cases the end date is excluded The advantage of it is that if for whatever reason you want to use the preprocessing program several times in a row you can use the end date as the starting date for the next time The number of iterations is computed from the interval between the starting and end dates and from the time step you provided in the general configuration file The first date given in command line is the date at which the preprocessing starts this time It might differ from the date given in general cfg if the preprocessing program is launched several times in a row for example because the meteorological data file does not cover the whole time span of the simulation 60 CHAPTER 3 PREPROCESSING 3 2 4 Data Files Polyphemus reads ECMWF Grib files MM5 files NetCDF files for WRF files or Mozart 2 text files and binary files All files generated by Polyphemus are text files or binary files Unless specified otherwise all binary files store single precision floating point numbers They do not contain any header Each binary file only stores the values of a single field Four dimensional fields are stored this way Loop on time t Loop on z Loop on y Loop on x Let this storage be symbolized by t z y x Dimensions t z y and x always appear in this order For instance three dimensional fields may be stored in formats z y x
194. ise read only if With_plume_rise is set to yes Is radioactive decay taken into account Is biological decay taken into account Is scavenging taken into account Is dry deposition taken into account Option to force standard deviations to increase in time in case me teorological data are not stationary This is useful when coupling the puff model with the plume in grid model Is there chemistry within the pufts Is there chemical interaction between two overlapping puffs read only if With chemistry is set to yes Parameterization used to compute standard deviations Briggs for Briggs parameterization Doury for Doury parameterization and similarity_theory for a parameterization based on similarity theory Is a special formula used for the standard deviation above the boundary layer Currently only Gillani can be entered to pro vide a special formula Otherwise provide none Only relevant when similarity theory parameterization is used It uses alternative formulae from the HPDM model to compute the standard deviations It is recommended in the case of elevated sources Plume_rise_parameterizatioWParameterization used to compute the plume rise HPDM Holland File_meteo File_puff Delta_t_puff Deposition_model Nchamberlain Configuration_file or Concawe read only if With_plume_rise is set to yes Path to the file containing the meteorological data Path to the file that contains the puff dat
195. issions main configuration file secondary configuration file date emissions main configuration file date emissions date Arguments main configuration file optional main configuration file Default emissions cfg secondary configuration file optional secondary configuration file date date in any valid format 3 2 2 Configuration Almost all programs require the description of the domain over which computations should be performed Since this configuration is shared by many programs it is put in a common configuration file called general cfg An example of such a file is Polyphemus preprocessing general cfg whose content is quoted below general Home u cergrene 0 bordas Directory_computed_fields lt Home gt B data Directory_ground_data lt Directory_computed_fields gt ground Programs lt Home gt codes Polyphemus HEAD domain Date 2001 01 02 Delta_t 3 0 x_min 10 0 Delta_x y_min 40 5 Delta_y Nz 5 Vertical_levels lt Programs gt levels dat Nx 65 Ny 33 0 5 0 5 Entries in section general are markups provided for convenience See Section 2 5 2 for further explanations 3 2 INTRODUCTION 59 The section domain contains the domain in space and time description Date Delta_t x_min Delta_x Nx ymin Delta_y Ny Nz Vertical_levels domain The date at which the simulation of the chemistry transport model is start ing It is also the date
196. itial_concentration Should initial concentrations be saved This option is only avail able if concentrations are not averaged If Species is set to all the deposition fluxes will be saved for all scavenged or dry deposited species 4 9 9 SaverUnitWetDeposition aer and SaverUnitDry Deposition aer The output savers SaverUnitWetDeposition_aer and SaverUnitDryDeposition_aer define output saver units when Type is set to wet_deposition_aer or dry_deposition_aer The sec tion save is very similar to the one for gaseous species except that you have to specify for which diameters the deposition fluxes are saved Hence the list of species to be saved looks like this Species aer1_ 0 aer 1_ 2 aer2_ 0 1 In that case the species named aerl is to be saved for the diameter of indices 0 and 2 and aer2 for the diameters of indices 0 and 1 In Output_file amp f will be replaced by the species name and amp n by the bin index You can use any symbol which is not a delimiter or even nothing to separate the species name from the bin index even though amp f_ amp n bin is the advised form 116 CHAPTER 4 DRIVERS If Species is set to all the deposition fluxes will be saved for all aerosol species and for all scavenged or dry deposited diameters 4 9 10 SaverUnitBackup and SaverUnitBackup_aer The output savers SaverUnitBackup and SaverUnitBackup_aer are respectively similar to SaverUnitDomain and SaverUni
197. ization 2 Within each section are defined fields like Home Home u cergrene a ahmed dm indi cates that the field Home takes the string u cergrene a ahmed dm as value 3 Here is one possible date format with minutes YYYY MM DD_HH II see Appendix D for further informations 4 Delta t 3 0 indicates that the field Delta_t takes the floating point number 3 0 as value We recommend use for numerical values and otherwise 5 lt Programs gt is a markup to the field Programs It will be replaced by its actual value u cergrene a ahmed dm src polyphemus core trunk preprocessing when the pro gram will read the configuration files The second one is meteo cfg to be found in preprocessing meteo paths Inputs 1 Database_meteo u cergrene B quelo Meteo_ECMWF 2001 2 Roughness heights on the input ECMWF domain Only needed if 1 Richardson_with_roughness is set to true Roughness_in lt Directory_ground_data gt Roughness_in bin 3 Outputs Directory_meteo lt Directory_computed_fields gt meteo 2 ECMWF Date amp D 4 t_min 0 Delta_t 3 0 Nt 9 x_min 15 12 Delta_x 0 36 Nx 168 y_min 32 76 Delta_y 0 36 Ny 113 Nz 31 28 CHAPTER 2 USING POLYPHEMUS meteo Should the surface Richardson number be computed taking into account roughness height Richardson_with_roughness no 5 accumulated_data For data storing values cumulated
198. ization Pun and Seigneur 2007 of some organic species Currently only BiA0D an aldehyde is con cerned options With_oligomerization Is oligomerization taken into account e Equilibrium Dynamic computation This aerosol module can only be run in equilibrium mode that is to say all bins must be at equilibrium which means that the Fixed_cutting diameter must always be superior to the upper bound of the aerosol size spectrum Nevertheless one can still choose the dynamic computation but the AEC organic module will be skipped e Missing options Some options of Aerosol SIREAM_SORGAM have not yet been reported to this module Thermodynamics_module only isorropia is available With_cloud_chemistry it replaces the previous option Put yes to take into account cloud chemistry The units of input data e g initial condition boundary condition etc should be given as 1 9 m3 in using Aerosol_SIREAM_AEC module 6 3 3 Decay Module Decay also supports aerosols See Section 6 2 4 Chapter 7 Postprocessing 7 1 Graphical Output 7 1 1 Installation and Python Modules In Polyphemus we advocate the use of Matplotlib with NumPy Basemap and AtmoPy Please refer to Sections 1 2 and 1 3 for system wide installation notes Below are installation notes for the user IPython and Matplotlib Matplotlib is a Python 2D plotting library which produces high quality figures On its website http matplotli
199. l have to deal with the GCC underscore problem for further details see 1 3 7 The command line shall be modified to 26 CHAPTER 2 USING POLYPHEMUS utils scons py mpi yes _ 2 If you use make you will have to edit the related makefile gcc 4 and change the vari ables CC CFLAGS F77 FFLAGS and LINK Depending on your version of mpiCC it is possible that you might need to add fno second underscore to FFLAGS and even replace in LIBS lgfortran by 1g2c if version of mpiCC is 3 xx Both OpenMP and MPI That could be as easy as typing utils scons py mpi yes openmp yes But the same difficulties encountered with the OpenMP and MPI buildings see previous subsections might pile up here with the same solutions The Good Old Way You don t want to bother with all this parallelizing stuff No time No thrill Prefer old shool style But you still would like to shorten your aerosol simulation Life is short after all Whatever your reasons are we did not forget you if you are running Polyphemus on a POSIX multi core platform Indeed the aerosol modules Aerosol_SIREAM_SORGAM and AerosolRACM_SIREAM_AEC were also parallelized independantly from OpenMP and MPI using the good old fork and a shared memory segment What are you required to do Just compile your program normally and consult Section 6 3 2 2 4 Editing your Configuration Files Now that you are done with compiling and before you launch your own prepro
200. lar value for it In this case the size of bio output files should be 24 x Ngays x Ny x Ng x 4 Initial Conditions Initial conditions generated by program ic should produce files of Nz x Ny x Nz x 4 bytes Boundary conditions To compute boundary conditions programs bc and bc dates use Mozart files that generally cover a period of 10 days with a timestep of 24 hours Take notice that this is not the case for the beginning of January whose Mozart file provides data for the first 5 days of the month As bc and bc dates generate boundary conditions for the whole period covered by the Mozart files they use regardless of the period that is actually of interest for your simulation you should figure out how many days they indeed preprocess It will give you the Ndays to use For example the command bc general cfg bc cfg h0067 nc preprocesses one Mozart file Then Naays 10 But with the command bc dates general cfg bc dates cfg 2004 07 30 2004 08 12 you will deal with the files hc0061 nc and hc0062 nc see 3 7 for details that is two 10 days Mozart files Then Ngays 20 Finally the size of output files for boundary conditions along e z should be Naays x Ny x Nz X 4 e y should be Naays x Nz Xx Nz x 2 x 4 e x should be Ndays X Nz X Ny X 2 x 4 2 8 USEFUL TOOLS 43 2 7 2 Checking the output file size of processing programs If you set up to save the concentrations for each vertical level and at each time step
201. lation chain Minimum 3 47425e 09 Maximum 100 513 Mean 0 58594 A 6 Visualizing Results A 6 1 Modifying Configuration File Modify results disp cfg if necessary in particular if you have modified polair3d saver cfg 180 APPENDIX A POLAIR3D TEST CASE input Number of time steps for which concentrations are saved Nt 22 Domain description for x and y x_min 10 0 Delta_x 0 5 Nx 65 y_min 40 5 Delta_y 0 5 Ny 33 Number of levels for which concentration are saved Nz 5 file 03 bin A 6 2 Using IPython For details see Section 7 1 3 Remember that the directory atmopy should be in your PYTHONPATH Launch IPython and then type in command line comments starting with have been added to explain the meaning of each line cd results ipython dispc m d 5 0 Display the data for the 8th time step and the first vertical level remember that indices start at 0 from atmopy display import Import to the interactive session all functions from the module display of atmopy m getm disp cfg Create the map d getd disp cfg Create a data with the results The image obtained is Figure A 1 You can create other data if you like to visualize concentrations for other species In that case the map has already been created and less information is needed to create the data In particular it is not necessary to provide a file disp cfg d2 getd
202. look at the examples it is likely that you find a close combination there In case you try an unusual combination you may contact polyphemus help lists gforge inria fr The directory named processing provides examples of configuration and data files to use with the programs For instance processing photochemistry provides an example for a for ward eulerian simulation combining advection diffusion with chemistry It should be launched in processing photochemistry Outputs will then be stored in the subdirectory processing photochemistry results so make sure that this directory exists before you start the simulation indeed Polyphemus programs do not create directories before saving results 2 5 4 Running a parallelized program Given you have compiled your program appropriately to make it parallel see 2 3 3 let s see how to launch a parallel job 32 CHAPTER 2 USING POLYPHEMUS The OpenMP way The OpenMP way is without any doubt the easiest one You can use it if you built your paral lelized program with OpenMP alone see 2 3 3 and if the field Number_of_threads_openmp is set to the desired value in the section computing of the main configuration file For instance in processing photochemistry racm cfg computing Number of threads if openMP parallelization is used Number_of_threads_openmp 4 Then launching command for the related processing photochemistry polair3d remains unchanged From processing photochemistry
203. lowing aer1_1 corresponds to the coefficient for the species aer1 and the diameter of index 1 that is equal to 1 um and so on 102 CHAPTER 3 PREPROCESSING Chapter 4 Drivers 4 1 BaseDriver BaseDriver is configured with a file which contains the displaying options for the simulation display Show_iterations If activated each iteration is displayed on screen Show_date If activated the starting date of each iteration is displayed on screen in format YYYY MM DD HH II notations from Section D 7 4 2 PlumeDriver It is the driver dedicated to the Gaussian plume model The associated configuration file is the same as the one for the BaseDriver and it is usually part of the model configuration file described in Section 5 1 The associated input data file describes the meteorological data ref erence gaussian meteo dat for gaseous species and gaussian meteo_aer dat for aerosol and or gaseous species The meteorological data file contains the meteorological data that are needed It can be the output file of the preprocessing program gaussian deposition The meteorological data file describes one or several meteorological situations For each situ ation the driver calls the model to calculate the concentrations that is the stationary solution for the given meteorological situation It is associated with two models the GaussianPlume model for gaseous species only described in Section 5 1 and the GaussianP
204. luded in Table 1 1 1 2 3 Parallel Computing The main Polyphemus modules have been parallelized and support the following parallel com puter memory architectures shared memory with the specification OpenMP 2 5 distributed memory with the standard MPI 1 1 hybrid distributed shared memory with both openMP and MPI They correspond to different use cases 1 2 REQUIREMENTS 13 Table 1 1 Polyphemus requirements Blitz Blas Lapack NetCDF NumPy Matplotlib SciPy preprocessing be bio dep emissions ground ic meteo processing postprocessing X X X water_plume optics X include atmopy X X X X PS PS PS PS PS PS PS PS Ps parallelized modules of advection with a splitting method diffusion chemistry RACM and aerosol can run on a cluster of multi core nodes where an MPI library is installed for instance LAM MPI or Open MPI the same modules can be parallelized with OpenMP if your compiler supports it for instance GNU GCC posterior to 4 2 and Intel compiler 9 1 if you can not install on your system any MPI library or any compiler suite supporting openMP you might still exploit some parallelism within the aerosol modules Indeed they supports kind of multi threading features taking advantage of multi core POSIX platforms see Section 6 3 2 for details Which parallelization do fit to your needs We decided to give you the choice between several parallel computing alternativ
205. lume_aer model which is the same model for aerosol and or gaseous species see Section 5 2 4 3 PuffDriver It is the driver dedicated to the Gaussian puff model The associated configuration file is the same as the one for the BaseDriver and it is usually part of the model configuration file described in Section 5 3 The associated input data file describes the meteorological data It is the same file as for the plume model For each meteorological situation the driver calculates the concentrations that depend on time That is for a given situation it makes a loop on time and calls the model at each time step to calculate the current concentrations It is associated with two models the GaussianPuff model for gaseous species only described in Section 5 3 and the GaussianPuff_aer model which is the same model for aerosol and or gaseous species see Section 5 4 103 104 CHAPTER 4 DRIVERS 4 4 PlumeMonteCarloDriver The plume Monte Carlo driver is similar to the PlumeDriver except that it performs several simulations with perturbed input data and with different parameterizations for every meteoro logical situation The simulation outputs are saved with the unit saver of type domain_ensemble_forecast see Section 4 9 2 The configuration file for this driver is the same as for PlumeDriver plus this additional content uncertainty File_perturbation Path to the perturbations configuration see below Number_samples Number
206. methods p WriteldEnsembleFile id_ensemble dat p ReadIdEnsembleFile id_ensemble dat copy True 54 CHAPTER 2 USING POLYPHEMUS Programs Launching You can launch several Polyphemus programs with the class EnsembleProgram First you can implement an object based on ConfigReplacement in the file modules ConfigReplacement py This class contains four different methods which return dic tionaries e GetConfigVariable keys The variables between in the generic configuration files values The names of the parameters values and the directories where the prepro cessing results will be stored These values depend on the model identity e GetDefaultDict keys The names of the parameters in the configuration file parameter cfg values The default values of parameters which would not appear in the configura tion file e GeBinaryFile keys The names of the programs values The names of the binary files generated by the programs e GetPerturbedFieldList keys The variables between in the generic configuration file perturbation cfg values The name of the perturbed fields the uncertainties and the types of distri bution normal or log normal For example In 1 d ConfiReplacement GetConfigVariable model_index 0 ensemble_program In 2 d Out 2 gt Date 20010422 gt Nx 216 NE TAL fbue hiz usgs dep wesely fluc_dir lu
207. min Latitude in degrees of the center of the lower left cell in ECMWF grid Delta_y Step length in degrees along latitude of ECMWF grid Ny Number of cells along latitude integer in ECMWF grid Nz Number of vertical layers integer in ECMWF grid Richardson_with_roughness Accumulated_time Accumulated_index meteo Should the surface Richardson number be computed taking into account roughness height accumulated_data For data storing values cumulated in time e g solar radiation length number of time steps over which data is cumulated Start index of the first complete cycle of cumulated data Data is then cumulated from t_min plus Accumulated_index times Delta_t To launch the program just type meteo general cfg meteo cfg 2001 04 22 The program basically reads data in the ECMWF Grib file and interpolates it in time and space to Polyphemus grid ECMWF data is described in meteo cfg and Polyphemus grid is described in general cfg For the sake of simplicity it is recommended to work with ECMWF files containing data for one day Program meteo should be called for each day preferably from 3 4 METEOROLOGICAL FIELDS 67 Oh to 24h that is for each available ECMWF file except the first one see below If ECMWF files are not provided on a daily basis it is recommended to contact the Polyphemus team at polyphemus help lists gforge inria fr In order to process the ECMWF file for a given day the EC
208. mmand Line Options A command line option say cpp is introduced this way scons cpp my_compiler meteo which tells SCons to compile meteo with the C compiler my_compiler instead of the default C compiler which SCons finds automatically on our system Of course if you want to compile all your programs with my_compiler you launch scons cpp my_compiler Below is a list of all supported command line options in the column of all possible values the first value is the default value Option Possible Explanations values debug 0 1 1 2 Debug level 1 for no option related to the debug level O default for optimization with 02 1 for debugging mode with g 2 for optimized debugging mode with g 02 debug_cpp 0 1 1 2 Same as debug but only for C It overwrites debug debug fortran 0 1 1 2 Same as debug but only for Fortran It overwrites debug line no yes Should the compilation lines be shown c The C compiler cpp The C compiler fortran The Fortran compiler link The linker E 1 0 2 Number of underscores at the end of the symbols of compiled For tran routines whose names contain at least one underscore If set to 0 Polyphemus tries to guess from the C compiler version mode_cpp strict strict compiles C with options Wall ansi pedantic permissive only if G is used permissive compiles C without restrictive options mode_fortran permissive strict compiles Fortran with options Wall
209. mpared to that of other output savers Furthermore the backup time must overlap the save time of other output savers For example if a simulation makes averaged savings every six time steps the backup Interval_length has to be a multiple of six and at least six How to restart Open the date file pick up the backup date and replace the beginning date of polair3d cfg main configuration file with it Then go into polair3d data cfg and change the initial_condition and initial_condition_aer sections so that they points to the backup files Modify the save sections in order to keep previous output files Remark A restart must give exactly the same results as if the simulation had not stopped Nevertheless vector concentrations are stored in memory in double precision whereas backups are 4 10 OBSERVATION MANAGERS 117 written on disk in simple precision so that on restart you cannot avoid roundoff errors between simple and double precision 4 10 Observation Managers The observation managers deal with available observational data at different locations and dates These managers are designed to prepare for applications related to observation treatments especially for data assimilation The observation operator are implemented for the mapping from observation space into model space For a given date these managers retrieve observation data values and the corresponding statistical information e g observational error covariances 4 10 1 Gro
210. mputeAttenuation_LWC etc These functions are part of AtmoData and are described in AtmoData scientific documentation Njomgang et al 2005 3 2 Introduction 3 2 1 Running Preprocessing Programs Most preprocessing programs e accept one or two configuration files as arguments e append their results at the end of binary files if they already exist or create them Note that they cannot create the directory so you have to make sure it exists before launching a preprocessing program For instance program meteo processes meteorological data over one day To generate data from day 2001 05 19 to day 2001 05 21 one should launch meteo general cfg meteo cfg 2001 05 19 meteo general cfg meteo cfg 2001 05 20 meteo general cfg meteo cfg 2001 05 21 Another option is to use the script call_dates see Section 2 8 4 In that case to generate data from day 2005 05 19 to day 2005 05 21 one should launch atils call_dates meteo general cfg meteo cfg 20050519 20050521 or atils call_dates meteo general cfg meteo cfg 20050519 3 57 58 CHAPTER 3 PREPROCESSING Remember that the results are appended at the end of the output files if they already exist If you decide to recompute your fields from the first day you have to first remove old output binary files In order to know what are the arguments of a program you may launch it without arguments For instance emissions gt emissions Usage em
211. mum_spread times the standard deviation Observation maximum_spread Every random number for observation perturbations cannot exceed the mean plus or minus Observation_maximum_spread times the standard deviation For fields listed in section AdditionalField e g Attenuation and VerticalDiffusionCoefficient the perturbations do not depend on species For each additional field or each species of species dependent fields the perturbation is performed according to lognormal LN law with given standard deviation For normal law N the relative standard deviation is given e g 0 01 for Temperature except for the field WindAngle in degrees The probability distribution types are listed in the PDF column and the standard deviations are listed in the Parameter column Sometimes there are two additional columns for species dependent fields indicating correlated species and correlation coefficient The correlation coefficients can only be set to 1 Chapter 5 Models There are four major types of models Gaussian models see Section 5 1 5 2 5 3 and 5 4 Polair3D models see Section 5 5 5 6 and 5 7 Castor models see Section 5 9 and Lagrangian models see Section 5 13 All variants of a model have the same principles but can deal with various applications and phenomena Polair3D models were the first implemented in Polyphemus They allow as well as Castor models to compute the advection and diffusion of pollutants at
212. n 5 5 for the rest of the configuration 5 6 1 Main Configuration File polair3d cfg In addition to fields introduced in Section 5 5 1 the following fields are read by Polair3DChemistry 5 6 POLAIR3DCHEMISTRY 133 With_chemistry With_photolysis With_forced_concentrations Source_splitting options Should chemistry occur Should photolysis occur If activated the concentrations of a few species are set to values read in files If activated source splitting is used within chemistry in tegration Advection and diffusion fluxes are included in the chemistry integration as sources This slightly in creases the memory requirements but is recommended for numerical stability With_adaptive_time_step_for_gas_chemistry Adaptive_time_step_tolerance Min_adaptive_time_step Photolysis_option Option_chemistry With adaptive time stepping for gaseous chemistry Tolerance for the adaptive time step Minimum for the adaptive time step If 1 photolysis rates are computed from tabulations If 2 they are read from binary files created by preprocess ing tools JProc FastJ Chemistry mechanism used in the simulation You can choose among RACM RACM2 and CBO5 5 6 2 Data Description polair3d data cfg In addition to the configuration described in Section 5 5 2 a section photolysis_rates may be required if the chemical mechanism includes photolysis reactions Photolysis rates depend on days time angle
213. n Pa e the temperature the surface temperature and the skin temperature in K e the meridional and zonal winds MeridionalWind bin and ZonalWind bin in ms e the Richardson number and the surface Richardson number e the boundary layer height in m e the vertical diffusion coefficients time dependent 3D field defined on layer interfaces on the vertical Kz_Louis bin in m s e the specific humidity in kgkg e the liquid water content in kgkg e the cloud attenuation coefficients 3D field Attenuation bin in 0 2 e the solar radiation intensity SolarRadiation bin in Wm e the rain intensity Rain bin in mmh e the convective rain intensity ConvectiveRain bin in mmh e the cloud height in m 3 5 Deposition Velocities Deposition velocities are generated on the basis of meteorological fields and land data The programs must be launched after meteorological and ground preprocessing The computation of deposition velocities for Gaussian models is presented in Section 3 9 2 3 5 1 Program dep The program dep computes deposition velocities according to Wesely 1989 or Zhang et al 2003 In addition to general cfg the program reads the configuration in dep cfg In this file paths to several files generated by programs meteo MM5 meteo or WRF meteo are given paths SurfaceTemperature File where surface temperature is stored SurfaceRichardson File where surface Richardson number is s
214. n Polyphemus dates and string processing SeldonData C library to perform data processing interpolations input output operations 1 2 REQUIREMENTS 11 AtmoData C and Fortran library for physical parameterizations and atmospheric data processing atmopy AtmoPy is a Python library for statistical analysis and visualization common mostly functions used to parse and manage the arguments of preprocessing programs models chemistry transport Gaussian and Lagrangian models to be used by the drivers modules common base modules from which transport chemistry and aerosol modules derive transport numerical schemes for advection and diffusion chemistry chemical mechanisms aerosol chemical mechanisms for aerosol species driver assimilation drivers for data assimilation common a base driver from which all drivers are derived observation observation managers for data assimilation ground observa tions and simulated observations optimization optimization algorithms output_saver modules to save the results of a simulation perturbation management of model perturbations Monte Carlo local drivers for local scale applications uncertainty drivers that generate perturbed input data utils useful tools mostly to get information on binary files ensemble generation tools useful to ensemble generation Polyphemus is an open source software distributed under the GNU General Public Li cense It is available a
215. n is used when all species are gaseous species and gaussian deposition_aer is used when some or all species are aerosol species The input data are meteorological data and species data and the output file is a file containing meteorological data and the scavenging coefficients and deposition velocities of all species This file can be used as input meteorological file for the programs plume and puff for gaseous species or plume_aer and puff_aer in the case of aerosol species Program gaussian deposition Configuration File The program gaussian deposition is launched with one configuration file and two input files The configuration file contains the path to the two input files and to the output file The reference configuration file is gaussian deposition cfg It contains the following information data Species Path to the data file that contains the species data Meteo Path to the data file that contains the meteorological data scavenging Type Parameterization to be used to calculate the scavenging coeffi cients File Path to the file that contains the scavenging coefficients for all species Read only if Type is set to file deposition 94 CHAPTER 3 PREPROCESSING Type Parameterization to be used to calculate the deposition velocities File Path to the file that contains the scavenging coefficients for all species Read only if Type is set to file output With_comment Are comments written in the output file put yes
216. ncludes a version of SCons in utils the command is utils scons py So you can use this version of SCons or you can install SCons on your system which is easy and which may be more convenient in the long term Version 0 98 5 or greater is required In the sequel it is assumed that SCons is launched with the command scons which you may replace with Polyphemus utils scons py if you rely on the version distributed with Polyphemus Compiling In most Polyphemus directories you should be able to compile simply by calling SCons scons or to build a given program say meteo scons meteo This is relevant for any directory where there is a C program to compile processing decay processing siream sorgam preprocessing meteo postprocessing optics SCons is supposed to find the compilers and to properly determine all dependencies on any platform If you experience anyway problems the course of action is 1 try to help SCons with command line options or by filling the SConstruct file see below 2 contact the Polyphemus mailing list polyphemus help lists gforge inria fr 22 CHAPTER 2 USING POLYPHEMUS Options In Polyphemus SCons compilation comes with many enjoyable options which may increase your productivity especially if you are developing and which can help you solve some problems There are two ways to activate the options through the command line or through some variables set in the local SConstruct file Co
217. nformations about specific configuration files you should read the section related to the program the driver the model or the module you would like to use 2 5 Running the Programs 2 5 1 Running a Program from Command Line Most programs require one or two input configuration files and sometimes one or two dates beginning and end dates see Section 3 2 3 Most programs provide help when launched without any input file Here is an example with the program bio Further details about specific programs are provided in chapter 3 2 5 RUNNING THE PROGRAMS 29 Polyphemus preprocessing bio gt bio Usage bio main configuration file secondary config file first date second date interval bio main configuration file first date second date interval bio main configuration file secondary config file first date bio first date second date interval bio first date Arguments main configuration file optional main configuration file Default bio cfg secondary configuration file optional secondary configuration file Default first date beginning date in any valid format second date end date in any valid format interval optional Interval in format NdMh or Nd Mh or Nd or Mh where N is the number of days and M the number of hours Default 1d Note The end date whether it is given directly or computed by adding the time interval to the beginning date is always considered as exclud
218. ng for aerosol species is constant In that case the scavenging coefficient is assumed to be constant for one particle diameter So the section contains the index of one diameter followed by the corresponding value of the scavenging coefficient in s71 Only one diameter per line must be provided e deposition_constant_aer This section is needed when the type of parameteriza tion chosen for the deposition of aerosol species is constant It contains the index of a diameter followed by the value of its deposition velocity in ms Only one diameter per line must be provided e density_aer It contains the density of the aerosol species That is the name of each aerosol species followed by the corresponding density in kgm Only one species per line must be provided This section is needed in order to calculate the gravitational settling velocity of a particle The calculated deposition velocity of one species of a given diameter is therefore a combination of the diffusive part given in the section deposition_constant_aer and the gravitational settling velocity calculated by the program Note that while some gaseous species might not be concerned by scavenging or deposition the loss processes are assumed to occur for all aerosol species Therefore there is no need of a section containing the species for which scavenging or deposition occur in the case of aerosol species as it is the case for gaseous species Here is an example of spec
219. ng the Results To visualize the results you have to put the path to Polyphemus include in your PYTHONPATH Then go to the directory results and launch IPython cd results ipython gt gt gt from atmopy display import gt gt gt m getm disp cfg gt gt gt d getd disp cfg gt gt gt dispcf m d 40 0 You will obtain the result shown in Figure C 1 198 APPENDIX C CASTOR TEST CASE Figure C 1 Figure obtained using Python and AtmoPy unit is ug m7 Appendix D Lexical Reference of Polyphemus Configuration Files D 1 Definitions All Polyphemus programs rely on flexible configuration files These configuration files define simulation domains input and output paths options etc Configurations files are text files preferably with extension cfg They primarily contain fields that is entries associated with values provided by the user In a configuration file a line usually reads field value A practical example is a discretization definition x_min 12 5 Delta_x 0 5 Nx 100 The fields xmin Delta_x and Nx are associated with proper values specified by the user The characters put between a field and its value are delimiters In the previous example the delimiters are blank spaces and equal signs Delimiters are discarded characters They may be put anywhere in a configuration file but they are always ignored Their aims are to delimit words i e fields and values and to mak
220. nt times it calculates the concentration of each species along a specified grid There are several output files one for each species that are binary files same as in the Gaussian plume model and fully described in Section 4 9 5 3 1 Configuration File puff cfg display Show_date Irrelevant Provide any Boolean domain Date min Provide the simulation starting date see Section D 7 Delta_t Time step of the simulation in seconds Nt Number of time steps integer x_min Abscissa in meter of the center of the lower left cell Delta_x Step length along x in m Nx Number of cells along x integer y min Ordinate in meter of the center of the lower left cell 5 3 GAUSSIANPUFF Delta_y Ny Nz Vertical_levels Land_category Time Species With_plume_rise With_plume_rise_breakup With_radioactive_decay With_biological_decay With_scavenging With_dry_deposition With_increasing sigma With_chemistry With_puff_interaction Sigma_parameterization Above_BL With_HPDM 125 Step length along y in m Number of cells along y integer Number of vertical levels integer Path to the file that defines vertical levels heights Land category choose between rural and urban Choose whether it is nighttime night or daytime day Path to the file that defines involved species gaussian Is plume rise taken into account Is unstable and neutral breakup taken into account when comput ing plume r
221. ny times to launch be gocart In the last example one should simply launch bc gocart py general cfg 2001 04 15 61 where 2001 04 15 is the beginning date of the simulation it must be the same as in general cfg and 61 is the number of days to process Pay attention that some paths must be supplied inside this script paths of Gocart configuration and data files for it to work You are strongly advised to use script bc gocart py as the computation of Gocart months to use and the number of days to use for each month is performed automatically Remark Gocart does not provide any boundary conditions for nitrate and ammonia you have to com pute them on your own Nevertheless a quick way to compute boundary conditions for ammonia is to apply electroneutrality to already computed aerosol boundary conditions from Gocart or whatever else in fact This can be done by bc nh4 program which takes two arguments bc nh4 general cfg bc nh4 cfg The electroneutrality equation is set in configuration file bc nh4 cfg You can also compute it with script bc gocart py using the option nh4 bc gocart py nh4 general cfg 2001 04 15 61 3 9 Preprocessing for Gaussian Models 3 9 1 Program discretization The aim of this program is to discretize a line emission in the case of a continuous source plume source or an instantaneous one puff source It reads a line source given by two points or more and gives in return the discretiz
222. ocally installed within the Polyphemus package you downloaded Depending on the paths to the libraries and maybe your compilers you might need to slightly modify the SConstruct files or make files Note that SCons should detect by itself the suitable compilers available on your platform Then one may compile the program meteo cpp in this way cd Polyphemus preprocessing meteo utils scons py meteo Indeed SCons is installed in Polyphemus utils It could be interesting to install SCons on your system or locally so that you would just launch scons meteo A simple way to achieve such a local installation if you work on a GNU Linux platform is to modify the configuration file of your shell program For example with bash you could edit your bashrc to define scons as an alias for scons py and add the path to Polyphemus utils in the PATH environment variable 1 3 INSTALLATION 15 alias scons scons py PATH Polyphemus utils PATH If you still prefer to work with make although SCons is recommended instead and the GNU compiler suite is available on your computer make f makefile gcc meteo Then the program meteo is compiled and can be run Launch scons py or make in order to compile all programs in a given directory Further explanations about the compilation are shown in Section 2 3 It is highly recom mended to read them at least if you experience any problem 1 3 2 AtmoPy A special step is required with t
223. odule BoundaryHeight done Computing Kz done Computing PAR done Writing data done t t tt t Note that in that case meteorological data has been generated for 23 hours but emissions data are only available for this length of time so it is not necessary to generate more meteoro logical data If you want to compute vertical diffusion using Troen and Mahrt parameterization compile and execute Kz_TM cd Polyphemus preprocessing meteo utils scons py Kz_TM cd TestCase Polyphemus preprocessing meteo Kz_TM config general cfg config MM5 meteo cfg 2004 08 09 The output on screen will be Reading configuration files done Memory allocation for data fields done Extracting fields done Computing Kz done Writing output files done A 5 Launching the Simulation A 5 1 Modifying the Configuration File You should check and modify polair3d cfg if necessary You have to check the paths in particular check that the data and saver files are config polair3d data cfg and config polair3d saver cfg and to make sure that the date for the simulation is 2004 08 09 A 5 2 Modifying the Data File Check config polair3d data cfg If you decided to use Louis parameterization for vertical diffusion modify the file associated to VerticalDiffusion in the section meteo A 6 VISUALIZING RESULTS 179 As before check the paths and dates In particular if the dates in any section except for p
224. ol species To save concentrations only for an horizontal subdomain The same as subdomain but for aerosol species To save at a list of points given by their indices To save at a list of points given by their indices but for aerosol species To save at a list of points given by their coordinates To save at a list of points given by their coordinates but for aerosol species To save entire wet deposition fluxes To save entire dry deposition fluxes The same as wet_deposition but for aerosol species The same as dry_deposition but for aerosol species The backup gas species in order to restart The same as backup but for aerosol species 4 9 2 SaverUnitDomain and Saver UnitDomain_aer The output saver SaverUnitDomain defines an output saver unit when Type is set to either domain or domain ensemble forecast and domain_ensemble_analysis in case of ensemble applications This output saver requires additional parameters presented in the table below Levels Averaged Initial_concentration save A list of integers that determines the vertical layers to be saved Note that 0 is the first layer Remember that the heights you specified in the file levels dat are those of the level interfaces while concentration are saved in the middle of each levels Should concentrations be averaged over Interval_length If not instantaneous concentrations are saved Should initial concentrations be saved This opti
225. ome As a consequence you are invited to consider saving the results over the whole domain as a scarce ressource whereas saving results at a list of points has to be favoured whenever it makes sense Of course the number of saved levels is also to be decided carefully 5 14 Lagrangian Particles The LagrangianTransport model can transport different types of particles who might differ for instance by the way their displacement is computed given meteorological velocity fields or by the way their mass distribution is modelled You can change the type of particle you want in processing lagrangian stochastic lagrangian stochastic cpp when declaring your model typedef LagrangianTransport lt real ParticleDIFPAR_Horker lt real gt gt ClassModel ParticleDIFPAR_Horker was set up above This particle model is implemented in the related files you should easily find in include models You can also decide to develop your own particle model In such a case derive it from the BaseParticle class or from other existing classes They are all located in include models Up to now following Wendum 1998 we implemented two types of particles both using the Gaussian kernel model for mass distribution 5 15 POINT EMISSION MANAGEMENT 145 5 14 1 ParticleDIFPAR_Horker The Horker formulation is so simple that there are no parameter to be set Notice that the fields Horizontal diffusion and Gaussian kernel horizontal diffusion defined in processing lag
226. on Doury for Doury parameterization and similarity_theory for a parameterization based on similarity theory Is a special formula used for the standard deviation above the boundary layer Currently only Gillani can be entered to pro vide a special formula Otherwise provide none Only relevant when similarity theory parameterization is used It uses alternative formulae from the HPDM model to compute the standard deviations It is recommended in the case of elevated sources about 200 meters Plume_rise_parameterizatioWarameterization used to compute the plume rise HPDM Holland File_meteo File _ source File correction Deposition model Nchamberlain or Concawe Path to the file containing the meteorological data Path to the file that describes the sources File containing the correction coefficients used with line sources and gaseous species only deposition Model used to take dry deposition into account Chamberlain for Chamberlain model Overcamp for Overcamp model Number of points to calculate the Chamberlain integral integer Relevant only when dry deposition with Chamberlain model is taken into account output 5 1 GAUSSIANPLUME 121 Configuration_file Path to the configuration for the output saver Note The Chamberlain integral for the calculation of dry deposition is discretized and approx imated as a sum The integer that is provided corresponds to the number of terms of the
227. on described in Section 3 9 2 Information that are always needed are e Temperature C e Wind angle from x axis e Wind speed ms e Boundary layer height m These information are provided inside a section situation and the meteorological data file contains as many sections are there are situations The boundary height is always needed during daytime reflections on the inversion layer are performed It is also used to computed the standard deviations in the case of the parameterization based on similarity theory situation Temperature Celsius degrees Temperature 15 Wind angle degrees Wind_angle 100 Wind speed m s Wind 0 5 Boundary layer height m Boundary_height 500 0 In case the Briggs parameterization for standard deviation is used a stability class between A very unstable and F very stable has to be provided Stability class Stability A 5 2 GAUSSIANPLUME_AER 123 In case the standard deviations are computed with similarity theory more information have to be provided e Friction velocity ms e Convective velocity ms e Monin Obukhov length m e Coriolis parameter s7 If not known the Coriolis parameter can be set to 107 s Note that in the case there is plume rise and With_plume_rise_breakup is set to yes the convective velocity and friction velocity are also needed for plume rise computation with HPDM or Concawe formulae wha
228. on Files s a e a toea ce sae sarea ea ea ae na 2 39 Bunnie the Programs lso e ada a BSA a a a a ae a da ee 251 Running a Program from Command Line 2 5 2 Sharing Configuration s s a sa ura aa a ee ee 2 5 3 Notes about the Models s 2 24 2 cea ee ban dee eden ep ae 2 5 4 Running a parallelized program 2 00 0004 2 6 Setting Upa Simulation se e e sde p au eode a ena aa ee 26 1 Suggested Directory Tree gt o ss ap sice sa eca Da ee ee Re als 26 2 ROadM pPS lt e aa airi a ee BE a a ee a a aS 2 6 3 Mandatory Data in Preprocessing o 2 6 4 Mandatory Data for Models s se s aos cacep oe 2 6 5 Models Modules Compatibilities 0 o e 2 Checking Resales ce soci o a a k e a a 2 7 1 Checking the output file size of preprocessing programs 2 7 2 Checking the output file size of processing programs 2 1 3 Checking the values anr asa ee ee eee ee 11 11 12 12 14 14 15 15 16 16 17 17 CONTENTS 28 Usefull Tools 4 fa is a ds ae ee 43 2 8 1 Information about Binary Files o 43 2 8 2 Differences between Two Binary Files 44 283 MM5 BUE s ss csc wesa da ra a Re 45 286A periph Call ates o ok p A a Oe Be SG Se 48 2 8 5 Other Utilities o cs 24464824468 used ee a ee 49 2 9 Ensemble Generation oso sceso ak aar a ao Re De a ee 50 29d Reguitemens e eee eb
229. on is only avail able if concentrations are not averaged For aerosol species the saver should be SaverUnitDomain_aer and the Type domain_aer The section save is very similar to the one for gaseous species except that you have to specify for which diameters the concentrations are saved Hence the list of species to be saved looks like this 112 CHAPTER 4 DRIVERS Species aer1_10 aer 1_ 2 aer2_ 0 1 In that case the species named aerl is to be saved for the diameter of indices 0 and 2 and aer2 for the diameters of indices 0 and 1 In Output_file amp f will be replaced by the species name and amp n by the bin index You can use any symbol which is not a delimiter or even nothing to separate the species name from the bin index even though amp f_ amp n bin is the advised form If Species is set to all the concentrations will be saved for all aerosol species and for all diameters 4 9 3 SaverUnitSubdomain and SaverUnitSubdomain aer These saver units allow the user to save concentrations only over an horizontal subdomain for example if they perform a simulation over the whole of Europe but only want the concentrations over one country or region Their Type is subdomain and subdomain_aer respectively The user must provide between which indices for x and y they want to save concentrations The specific parameters for these saver units are save Levels A list of integers
230. one You must at least have the variables polyphemus_path and include_path set polyphemus_path is the relative or absolute path to Polyphemus e g home user src Polyphemus do not for get the last slash include_path is a list of paths where the dependencies that are not installed in the system directories not in the environment variables CPATH and CPLUS_INCLUDE_PATH lie So if you install a library yourself you may need to put the path to the library in this variable For instance if you install Blitz from the sources and not to the system directories because you have not the root privileges you have two options recommended 1 put the path to Blitz directory in the environment variable CPATH or CPLUS_INCLUDE_PATH and put the path to the compiled Blitz library in the variable LD_LIBRARY_PATH or LIBRARY_PATH alternatively 2 put the path to Blitz directory in include_path and put the path to the compiled Blitz library in the variable library_path See below the list of supported variables All variables but polyphemus_path and include_path are optional which means that these variables may be omitted from the file or may be set to None The last column Command line shows the name of the corresponding command line option if any In case both a command line option and a variable are set the command line option overwrites the variable in the SConstruct file Variable Content Command line 2
231. onfiguration files e lagrangian stochastic cfg e lagrangian stochastic data cfg e lagrangian stochastic saver cfg and two data files e levels dat e point _emission dat 5 13 1 Main Configuration File lagrangian stochastic cfg The main configuration file lagrangian stochastic cfg gives information on the domain def inition and the options of the simulation Date min Delta_t Nt x min domain Starting date in any legal format see Section D 7 The date can therefore include seconds Time step in seconds Number of timesteps integer Abscissa of the center of the lower left cell Provide a longitude in degrees 5 13 LAGRANGIANTRANSPORT Delta_x Nx ymin Delta_y Ny Nz Vertical_levels Species With_air_density With_point_emission Data_description Horizontal_diffusion 143 Step length along x in degrees longitude Number of cells along x integer Ordinate of the center of the lower left cell Provide a latitude in degrees Step length along y in degrees latitude Number of cells along y integer Number of vertical levels integer Path to the file that defines vertical levels interfaces Path to the file that defines involved species species List of species options If activated vertical wind is diagnosed from div pV 0 where p is the air density and V the wind and the dif fusion term is div px vs where c is the concentration and K is the
232. onstant values provided by the Input Files 1 Meteorological data file it user is the same as the one for gaussian deposition Ifthe param eterization type for the deposition velocity calculation is constant and the Velocity_part is diffusive the pressure must be provided in Pa 2 Diameter file it contains the list of particle diameters in um The first number is the diameter of index 0 the second of index 1 and so on This is an example of diameter file Diameter micrometer diameter 0 1 t 3 9 PREPROCESSING FOR GAUSSIAN MODELS 99 The diameter of index 0 corresponds to the value 0 1 um the diameter of index 1 to the value 1 um and so on When referring to a given diameter in the other data files one has to give the corresponding index Note that there is only one diameter file for all aerosol species Therefore all particulate species are assumed to have the same diameter distribution The diameter file can also be the main configuration file In that case the section diameter is simply added to the main configuration file 3 Species file it is the same as described before but the sections described for gaussian deposition concern only gaseous species All data concerning aerosol species are added in the following sections e aerosol_species Contains the list of all aerosol species e scavenging constant_aer This section is needed when the type of parameteri zation chosen for the scavengi
233. ood et al 2005 put TERP Distribution of terpenes emissions among species entry Terpenes For RACM and RACM2 put 0 67 0 33 for API and LIM respectively For CB05 put 1 0 for TERP Biogenic emissions are computed according to Simpson et al 1999 Meteorological data is first interpolated in time so that its time step is Delta_t section biogenic Emission rates are then computed using AtmoData function ComputeBiogenicRates and emissions using ComputeBiogenicEmissions 3 6 4 Biogenic Emissions for Castor Models bio castor Program bio castor is slightly different from bio in particular regarding the data provided Its configuration file e g Polyphemus preprocessing bio bio castor cfg defines SurfaceTemperature WindModule_10m Attenuation SoilMoisture ConvectiveVelocity Land_data Directory_bio Minimum_wind_velocity Terpenes Terpenes_ratios paths Binary file where the surface temperature is stored Binary file where the wind module at 10 m is stored Binary file where attenuation data are stored Binary file where the moisture of the ground is stored Binary file where the convective velocity is stored Land data in Chimere format Directory where output biogenic emissions are stored biogenic Minimum value of WindModule_10m Species between which terpene emissions are distributed Ratio of the terpene emissions for each of the above species 84 CHAPTER 3 PREPROCESSING 3 6 5 Sea Salt
234. or t y x t z x or t z y 3 3 Ground Data Computing ground data is the first step of a preprocessing as they are necessary to pro cess meteorological fields All programs related to ground data generation are available in Polyphemus preprocessing ground The first step should be program luc usgs or luc glcf depending on what raw data you have Land use data may come from the US Geological Survey USGS or from the Global Land Cover Facility GLCF 3 3 1 Land Use Cover GLCF luc glcf In order to prepare land use cover from GLCF one should use program luc glcf It is rec ommended to download the global land use cover file at 1 km resolution provided in latitude longitude coordinates and with extension bsq At the time this documentation is written the file is available at ftp ftp glcf umiacs umd edu glcf Global_Land_Cover Global gl latlong 1km landcover gl latlong 1km landcover bsq gz single line no white space you may use wget to download it or copy and paste the URL in your favorite browser You need to uncompress this file e g gunzip gl latlong 1km landcover bsq gz In case the file has been moved try to find it from http glcfapp glcf umd edu 8080 esdi index jsp Select Product Search then AVHRR Global Land Cover Product and finally use e Region Global e Projection Lat Long e Resolution 1 km Click on Download and select the file gl 1latlong 1km landcover bsq gz Finall
235. ory Polyphemus include atmopy When you load AtmoPy under Python from atmopy import in a program or in IPython Python searches for the directory atmopy in the local directory that is atmopy If atmopy is not in the current directory Python searches for atmopy in all paths of PYTHONPATH under Linux and Unix Hence you have two options 1 copy directory atmopy from Polyphemus include into the current directory or create a symbolic link to it In s path to Polyphemus include atmopy or 7 1 GRAPHICAL OUTPUT 159 2 update PYTHONPATH so that it includes the path to atmopy e g in Bash export PYTHONPATH PYTHONPATH path to Polyphemus include atmopy which you may put in bashrc If Matplotlib and Basemap are properly installed then AtmoPy should work A test function is provided with AtmoPy to check gt gt gt from atmopy import gt gt gt atmopy_test If you get Figure 7 1 AtmoPy is properly installed Figure 7 1 Output of function atmopy_test If you get this figure AtmoPy is properly installed 7 1 2 A Very Short Introduction to Python and Matplotlib In this section several examples are meant to introduce to Python and Matplotlib The following commands are sometimes given with comments after character You can execute them under IPython if you wish Base and Lists gt gt gt x 5 gt gt gt y 2x x 7 gt gt gt print 2 y Under IPython print is useless just type 2
236. output files downloaded on NCAR data portal at http cdp ucar edu To download any data from the NCAR Community Data Portal you need to register This is quite easy and fast but there is a second step You also have to ask for an access to Mozart data specifically This takes longer as the application has to be reviewed by someone but it should go without problems if you say that you need Mozart data to generate initial and boundary conditions for a CTM The data can be found in ACD Atmospheric Chemistry Models Data Set and Visualization Tools If you registered in this section of the site you should be able to access MOZART Model for OZone And Related chemical Tracers This opens a page with various informations about Mozart and in particular in Nested Collections a link named MOZART 2 MACCM3 Standard Simulation v2 1 Click on this link 3 7 INITIAL CONDITIONS Ic 85 Currently the direct link is http cdp ucar edu browse browse htm uri http dataportal ucar edu metadata acd mozart mozart2 mozart_v2_1_maccm3 thredds xm1l but if this changes a search for MOZART MACCM3 should lead you to the right page There are 38 files available in NCAR Community Data Portal from hc0040 nc to hc0077 nc One file gathers data for ten consecutive days File hc0040 nc start at 26 December Data in those files have been generated for a typical year which means they can be use to generate initial conditions for any year
237. phemus grid is described in general cfg Note that each time a field is loaded by WRF meteo all time steps are loaded in memory Note that the fields are released from memory when unused but you may still need a lot of memory for big WRF output files The program first computes the altitude of WRF layers and converts the Polyphe mus grid coordinates latitude longitude to WRF grid coordinates Lambert Mercator or stereographic for interpolations Interpolations on the horizontal are performed in WRF grid for efficiency The pressure is computed based on WRF fields The winds are ro tated this gives meridional and zonal winds The Richardson number is then computed ComputeRichardson The relative humidity and the critical relative humidity are computed respectively with ComputeRelativeHumidity and ComputeCriticalRelativeHumidity The cloud fraction is computed with ComputeCloudFraction For it the cloudiness and cloud height are diagnosed using ComputeCloudiness and ComputeCloudHeight Finally attenua tion coefficients are computed with ComputeAttenuation_LWC RADM parameterization or 76 CHAPTER 3 PREPROCESSING ComputeAttenuation_ESQUIF ESQUIF parameterization The vertical diffusion coefficients are computed with ComputeLouiskz Louis 1979 Finally photosynthetically active radiation are estimated based on solar radiation and zenith angle ZenithAngle Among output files one may find e the pressure and the surface pressure i
238. physical Research 108 D22 Goliff W S and Stockwell W R 10 12 December 2008 The Regional Atmospheric Chemistry Mechanism version 2 an update University of California at Davis International conference on Atmospheric Chemical Mechanisms Hess M Koepke P and Schult I 1998 Optical properties of aerosols and clouds the software package OPAC Bulletin of the American Meteorological Society 79 5 831 844 Horowitz L W Walters S Mauzerall D L Emmons L K Rasch P J Granier C Tie X Lamarque J F Schultz M G Tyndall G S Orlando J J and Brasseur G P 2003 A global simulation of tropospheric ozone and related tracers description and evaluation of MOZART version 2 Journal of Geophysical Research 108 D24 Krishnamurti T N Kishtawal C M Zhang Z T LaRow D B and Williford E 2000 Multimodel ensemble forecasts for weather and seasonal climate Journal of Climate 13 4 196 4 216 Louis J F 1979 A parametric model of vertical eddy fluxes in the atmosphere Boundary Layer Meteorology 17 187 202 Mallet V Mauricette B and Stoltz G 2007a Description of sequential aggregation methods and their performances for ozone ensemble forecasting Technical Report DMA 07 08 Ecole normale sup rieure de Paris Mallet V Qu lo D Sportisse B Ahmed de Biasi M Debry Korsakissok I Wu L Roustan Y Sartelet K Tombette M and Foudhil H
239. preprocessing ground The reference configuration files for meteo is Polyphemus preprocessing meteo meteo cfg together with Polyphemus preprocessing general cfg 66 CHAPTER 3 PREPROCESSING In addition to the domain definition below are options of meteo Database_meteo Roughness_in paths Directory in which ECMWF input files may be found It is as sumed that ECMWF file names are in format ECMWF YYYYMMDD where YYYY is the year MM the month and DD the day If program meteo is launched for a day D ECMWF data files for days D 1 and D must be available Data for day D 1 are needed to process cumulated data e g solar radiation Path to the binary file that describes roughness heights in meters in ECMWF grid cells Its format is y x It is needed only if option Richardson _with_roughness is activated Directory meteo Directory where output meteorological files are stored ECMWF Date Date at which the meteorological file begins It is referred as amp D which is the date given in command line because it is supposed that ECMWF Grib files store data daily tmin First hour stored in the Grib file Delta_t Time step in hour of data stored in every ECMWF file Nt Number of time steps stored in every ECMWF file x min Longitude in degrees of the center of the lower left cell in ECMWF grid Delta_x Step length in degrees along longitude of ECMWF grid Nx Number of cells along longitude integer in ECMWF grid y
240. processing emissions chimere_to_castor config general cfg config chimere_to_castor cfg 20030730 6 We use utility program call_dates because chimere_to_castor can only be launched for one day at a time The output for the first day will be nice time Polyphemus preprocessing emissions chimere_to_castor config general cfg config chimere_to_castor cfg 20030730 Reading configuration done Reading input emissions done Converting to Castor and Polair3D emissions PPM_big PPM_coa PPM_fin NO N02 HONO co S02 NH3 CH4 C2H6 NC4H10 C2H4 C3H6 APINEN C5H8 OXYL HCHO CH3CHO CH3COE done 4 The program creates 20 binary files in data emissions 194 APPENDIX C CASTOR TEST CASE C 2 4 Biogenic Emissions Biogenic emissions are generated from meteorological data using program bio castor Launch the program with Polyphemus preprocessing bio bio castor config general cfg config bio castor cfg 2003 07 30 5d2h The output on screen will be Reading configuration Reading meteorological data done Computing biogenic emissions done Writing output emissions done This creates three binary files in data bio Isoprene bin NO bin and Terpenes bin C 2 5 Summing Emissions Anthropogenic and biogenic emissions have to be summed They can be generated for different periods of time which is why a script has been provided to perform the sum Launch it with python sum
241. ption Thermodynamics_module but only in a full equilibrium configuration Fixed_cutting diameter is the maximum diameter generally 101m The alternative model is EQSAM Metzger et al 2002b a version v03d To obtain the source code of EQSAM you have to ask Swen Metzger by email metzger mpch mainz mpg de EQSAM consists in only one file eqsam_v03d f 90 written in Fortran 90 language To use EQSAM you have to put the source code in the directory include eqsam and compile Polyphemus with makefile eqsam intel which only works with the intel compiler The units of input data e g initial condition boundary condition etc should be given as ug m in using Aerosol_SIREAM_SORGAM module 6 3 2 Aerosol SIREAM_AEC This aerosol module has been developed on the basis of Aerosol_SIREAM_SORGAM module and shares with it most of its characteristics and options The main difference lies in the replacement of SORGAM organic module by AEC organic module Pun et al 2002 2003 It also requires a modified version of ISORROPIA as explained in Section 1 3 6 Aerosol SIREAM_AEC We list below the changes between Aerosol_SIREAM_SORGAM and Aerosol_SIREAM_AEC e Multi threading This item about multi threading in the Aerosol_SIREAM_AEC module is rather depre cated now Firstly because it has also been implemented in Aerosol SIREAM_SORGAM So it should not be enlisted as a difference between the two modules Secondly as a sophisticated
242. py org Tentative_NumPy_Tutorial introduction to NumPy 4 http matplotlib sourceforge net Matplotlib website see Sections Tutorial and Screen shots 5 http www scipy org SciPy library which includes many scientific modules linear algebra optimization etc 7 2 Postprocessing for Gaseous Species 7 2 1 Configuration File The configuration file simulation cfg is needed for disp py and evaluation py Here is a brief explanation of the various options provided in simulation cfg but more details can be found in the file itself for some options input file Binary file with the results to postprocess multiple file Boolean stating whether several files are used tmin Initial date of the binary file s in format YYYYMMDD or YYYYMMDDHH Delta_t Time step in hours Nt Number of time step in the binary file s x_min Abscissa of the center of the lower left cell longitude in degrees Delta_x Step length along x in degrees longitude Nx Number of cells along x integer y min Ordinate of the center of the lower left cell latitude in degrees 7 2 POSTPROCESSING FOR GASEOUS SPECIES 165 Delta_y Ny Nz station_file station_file_type obs_dir station t_range concentrations paired daily_basis y range scatter meas_style sim_style select_station measure cutoff ratio output Step length along y usually in degrees latitude Number of cells along y integer
243. r instance belot Coefficients a and b for the Belot parameterization a p_0 b where po is the rain intensity mm h species a b all 1 e 05 0 8 e In case the microphysical model is used Henry constants in molL atm and gas phase diffusivities in cm s should be provided Henry constants are listed in section henry for instance henry Henry constant mol L atm 03 1 e 2 NO 2 e 3 N02 1 e 2 H202 1 e5 HCHO 6 e3 ALD 15 PAN 3 6 HONO 1 e5 S02 1 e5 HNO3 1 e14 OP1 2 4e2 PAA 5 4e2 ORA1 4 e6 CO 1 e3 N205 1 e14 Gas phase diffusivities are provided in the same way in section diffusivity 5 6 Polair3DChemistry Model Polair3DChemistry is configured with three configuration files e Main configuration file polair3d cfg for RADM racm cfg for RACM racm2 cfg for RACM2 and cb05 cfg for CB05 e Data description file polair3d data cfg for RADM racm data cfg for RACM racm2 data cfg for RACM2 and cb05 data cfg for CB5 e Output saver file polair3d saver cfg for RADM racm saver cfg for RACM racm2 saver cfg for RACM2 and cb05 saver cfg for CB05 and two data files levels dat and species racm dat for RACM The main configuration files polair3d cfg provide the paths to the four other files A configuration for Polair3DChemistry is an extension of the configuration for Po lair3DTransport In this section the description is limited to Polair3DChemistry additional configuration See Sectio
244. r3d cpp it is a short C code that declares the driver the model and the modules You may have to modify this program in case you change the model the driver or a module In that case duplicate processing photochemistry polair3d cpp or another example and modify it according to the notes below Actually it is likely that the model driver combination is already in use in one of the examples have a look in processing cpp First determine which model you need depending on your simulation target e for a passive simulation Polair3DTransport or CastorTransport e for a simulation with chemistry for gaseous species Polair3DChemistry or CastorChemistry e for a simulation with aerosol species Polair3DAerosol e for asimulation with gaseous species and data assimilation Polair3DChemistryAssimConc e for a simulation at local scale using an Eulerian model StationaryModel with another Eulerian model as the underlying model for instance Polair3DChemistry 2 5 RUNNING THE PROGRAMS 31 e for a simulation with a Gaussian plume model GaussianPlume or GaussianPlume_aer if there are aerosol species e for a non stationary simulation at local scale with a Gaussian model GaussianPuff or GaussianPuff_aer if there are aerosol species e for a simulation with point sources you can use the model PlumeInGrid in order to improve the way the dispersion of the pollutants inside a cell is modelled e to simulate the dispersion of passive
245. rangian stochastic lagrangian stochastic cfg are irrelevant for this particle model 5 14 2 ParticleDIFPAR_FokkerPlanck Like Wendum 1998 we considered the horizontal diffusion splits between the horizontal tur bulence used in the displacement computation named simply Horizontal_diffusion and the horizontal diffusion used in the mass distribution named Gaussian_kernel_horizontal_diffusion In the ETEX case of Wendum 1998 the first field was set to 25000m s71 whereas the the second one was assigned 50000m s 5 15 Point Emission Management The management of point emissions for gaseous species is common to several models In partic ular Polair3D GaussianPlume Section 5 1 2 GaussianPuff Section 5 3 2 PlumeInGrid and LagrangianTransport Section 5 13 use the common point emission manager The configura tion file needed for these emissions as well as the various types of point emissions available are described in this section Important note The common point emission manager is only available for gaseous species for the time being The aerosol species are still managed by each model separately For point emission files used with GaussianPlume_aer and GaussianPuff aer please refer to the Sections 5 2 2 and 5 4 2 respectively For point emission files used with Polair3DAerosol please refer to the Section 5 7 2 The file for gaseous point emissions has to contain a section source for each point emission with the follo
246. raw_data which contains all data used for preprocessing After preprocessing the results are stored in data to be used directly during the simulation e config where configuration files are provided e results where the results of the simulation are stored MM5 2004 08 09 should be extracted and then placed in raw_data cd TestCase raw_data MM5 wget http cerea enpc fr polyphemus test_case MM5 2004 08 09 tar bz2 tar xjvf MM5 2004 08 09 tar bz2 Now you have all data necessary to perform preprocessing for the ground and for meteorological data All other data emissions deposition velocities are provided and ready to use In what follows TestCase refers to the path to TestCase Polair3D and Polyphemus to the Polyphemus directory path http cerea enpc fr polyphemus 175 176 APPENDIX A POLAIR3D TEST CASE A 2 Verifying the General Configuration File The file general cfg is used by all preprocessing programs and gives a description of the domain and the dates considered Here is a copy of this file general Directory_raw_data raw_data Directory_computed_fields data Directory_ground_data lt Directory_computed_fields gt ground domain Date 2004 08 09 Delta_t 1 0 x_min 10 0 Delta_x 0 5 Nx 65 y_min 40 5 Delta_y 0 5 Ny 33 Nz 5 Vertical_levels config levels dat Normally this file is written in a way that no modification should be necessary but you are advised to check it Ot
247. rdinates of the center of the lower left cell in MM5 grid This is most likely 0 5 Index MM5 coordinates increase along longitude of MM5 grid This is most likely 1 Number of cells or dot points along longitude integer in MM5 grid Index in MM5 coordinates of the center of the lower left cell in MM5 grid This is most likely 0 5 Index MM5 coordinates increase along latitude of MM5 grid This is most likely 1 Number of cells or dot points along latitude integer in MM5 grid Number of vertical layers integer in MM5 grid Type of projection 1 corresponds to Lambert conformal conic 2 to Mercator and 3 to stereographic Type of horizontal interpolation used MM5 corresponds to MM5 coordinates and latlon to latitude longitude coordinates File containing coordinates of dot points Horizontal_interpolation is set to latlon Used if meteo Minimum relative humidity above which cloud are formed Low clouds maximum height in m Kz 74 CHAPTER 3 PREPROCESSING Min_dry Minimum value of Kz in PBLH for dry conditions in ms Min wet Minimum value of Kz in PBLH for cloudy conditions in ms Min_above_PBLH Minimum value of Kz above PBLH in ms Max Maximum value for Kz in ms Among output files one may find the altitude in meters the air density AirDensity bin the pressure in Pa Pressure bin the temperature and temperature at 2 m in K Temperature bin and Temperature_2m bin the m
248. re provided This should be the number of columns in the file containing the data for species for example preprocessing dep input species_data_racm txt Options If this option is set to yes the roughness height used in calculations only depends on the model cell and not on the land use category In this case it uses the data file whose path is given in entry RoughnessHeight section paths If the options is set to no recommended the roughness height depends on the land use category see entry Type Parameterization used to compute the aerodynamic resistance You can choose between fh heat flux fm momentum flux or diag diagnostic Parameterization used to compute the quasi laminar sublayer re sistance You can choose between friction and diag Parameterization used to compute the canopy resistance Zhang et al 2003 or Wesely 1989 Should Ra Rb and Re be saved This may take a lot of storage space put no if you do not work on the deposition parameteriza tions Entry Type is the path to a configuration file whose entries should be File Midsummer Path to the file describing the land use cover The number of cate gories in the file is deduced from its size but it must be consistent with the data provided in the following entries Midsummer etc Data file for midsummer see below for details 78 CHAPTER 3 PREPROCESSING Autumn Data file for autumn see below for details Late_autumn Data file
249. ring iteration are displayed 4 8 Drivers for the Verification of Adjoint Coding The three drivers AdjointDriver GradientDriver Gradient4DVarDriver are dedicated to the verifications of adjoint model The gradient of a given objective function calculated by adjoint model is compared with the gradient calculated by finite difference The following ratio is checked He ah J x PZA ad ha where J is the objective function x is the control variable h is the perturbation direction a is the perturbation coefficient and V J is the gradient calculated by adjoint model lt gt denotes inner product With a 0 the ratio p is supposed to approach to 1 with high precision then becomes unstable due to round off errors In practice a D i m m 1 n where D is the decreasing factor typical values are 2 and 10 m is the integer for largest perturbation typical value is 0 and n is the integer for smallest perturbation 4 8 1 AdjointDriver The objective function is chosen to be the model output of a given grid point in model domain with respect to initial model status The corresponding gradient can therefore be interpreted as the sensitivity This driver aims at the verification of adjoint code obtained by automatic differentiation of underlying model code using Odyss e version 1 7 The following options in section adjoint provide flexible control of the verification adjoint Point_species_name Species
250. rium The criteria is the comparison between the fixed cutting diameter and the bin bounds The aerosol bin whose bounds are surrounding the fixed cutting diameter is included in the equilibrium bins Dynamic condensation is intended for aerosol bins which are not at equilibrium and therefore time resolved mass transfer has to be computed for them The solver for dynamic condensation may be set to either etr or ros2 or ebi The etr solver is an Explicit Trapezoidal Rule second order algorithm the ros2 solver is the Rosenbrock implicit second order scheme Rosenbrock 1963 and ebi is an Euler Backward Iterative scheme Each of these solvers usually needs some numerical parameters these are gathered in the Fortran include file paraero inc Option With_kelvin_effect only affects dynamic bins Among aerosol species sulfate condensation may have a different treatment If Sulfate_computation is set to equilibrium then its treatment is equivalent to other species for both equilibrium and dynamic bins But if it is set to dynamic then sulfate condensation is time resolved for all bins using an analytic solution of mass transfer equations This method is implemented in the sulfdyn f Fortran routine As dynamic condensation is solved with a Lagrangian scheme a redistribution process over the fixed aerosol size grid has to be performed at the end of condensation Two methods are possible number conserving or interpolation The former conserves the relation
251. s SurfaceTemperature Binary file where the surface temperature is stored PAR Binary file where the photosynthetically active radiation is stored LUC_file Binary file where the land use cover is stored 3 6 EMISSIONS Land_data Directory_bio Delta_t Rates Terpenes Terpenes_ratios 83 Data file giving emission factors for isoprene terpenes and NO for all land categories defined in LUC_file In this file each line which is not empty or does not start with provides data for one land use category For such a line the first 55 characters are discarded you may put the category number and description for convenience Then four columns are read with the biomass density gm and the emission factors for isoprene terpenes and NO in this order Two examples are provided with land_data_glcf dat and land data usgs dat to be used in combination with land use cover generated by luc glcf or luc usgs respectively Directory where output biogenic emissions are stored biogenic Time step in hours for the output biogenic emissions For simu lations with Polair3D anthropogenic emissions and biogenic emis sions must have the same time step that is usually one hour Should emission rates be saved These rates are not needed by chemistry transport models Names of the species included in terpenes emissions For RACM Stockwell et al 1997 and RACM2 Goliff and Stockwell 2008 put API and LIM For CB05 Yarw
252. s physical parameterizations 2 model computations possibly with data assimilation or any other method implemented in a driver 3 postprocessing comparisons to measurements statistics visualization Polyphemus Database Data processing libraries AtmoData SeldonData ees ee Input data processing Files Numerical Statistics integration AtmoPy Computes physical fields Polair3D parameterizations AtmoData i Libraries with physical i Figure 1 1 Polyphemus flowchart preprocessing model computations postprocessing As a consequence Polyphemus code is organized with the following directories tree preprocessing bc boundary conditions Mozart 2 Gocart INCA bio biogenic emissions dep deposition velocities emissions pollutant emissions EMEP ground ground data land use cover roughness ic initial conditions Mozart 2 meteo meteorological data ECMWF WRF and MM5 including cloud attenuation and vertical diffusion processing subdirectories where to find programs for simulations and data assimilation with related examples of configuration and data files postprocessing programs for comparisons to measurements water plume liquid water diagnosis in a plume optics computation of aerosol optical parameters ensemble ensemble forecasting include Talos C library to manage configuration files used everywhere i
253. saved If the value 1 is supplied Date_end is set at the end of the simulation Interval_length The number of steps between saves Type The type of saver see Table 4 16 for details Output file The full path of output files in which amp f will be replaced by the name of the chemical species Note that the directory in which the files are written must exist before the simulation is started 4 9 OUTPUT SAVERS 111 Note that Species Date_beg Date_end Interval_length must appear before Type After Type put additional options relevant for the chosen output saver Here is a list of all types of saver units available at the moment Table 4 16 Types of saver domain domain_aer domain_assimilation domain_prediction domain_ensemble_forecast domain_ensemble_analysis nesting nesting aer subdomain subdomain_aer indices_list indices_list_aer coordinates_list coordinates_list_aer wet_deposition dry_deposition wet_deposition_aer dry_deposition_aer backup backup_aer To save entire vertical layers The same as domain but for aerosol species The same as domain but for data assimilation applications The same as domain_assimilation but for model predictions based on model state at the end of the assimilation period The same as domain but for ensemble forecast applications The same as domain but for ensemble analysis applications To perform nested simulations The same as nesting but for aeros
254. ship between mass and number concentration in each bin the latter relaxes this relationship Available nucleation models are either binary nucleation H SO H O Vehkamaki et al 2002 or ternary nucleation H SO H O NH Arstila et al 1999 In the aerosol module the aerosol density can be either fixed or recomputed at run time according to option With_fixed_density If set to yes the aerosol density will always be equal to the fixed aerosol density mentioned above if set to no the module will recompute one density for each aerosol bins according to their chemical compositions given by the thermodynamic model Two parameterizations are available to compute wet diameters depending on the option Wet_diameter_estimation If set to Isorropia the aerosol liquid water content computed by 6 3 AEROSOL MODULES 155 the thermodynamic model for instance ISORROPIA is used If set to Gerber a simpler but faster method the Gerber formula is used Note that when Gerber option is used the aerosol density is fixed for all aerosol processes except condensation even if option With fixed density is set to no In other words if run time computation of density is chosen it will only affect condensation Indeed when using the Gerber formula for fastness purpose there is little interest in recomputing density Then the fixed density is that specified with Fixed_aerosol_density option It is possible to use another thermodynamic model instead of ISORROPIA o
255. simply type polair3d racm cfg The MPI and OpenMP MPI way Whether you chose MPI alone or both MPI and OpenMP to build your parallel program the procedure is the same We will illustrate it supposing you have installed the Open MPI environment First you should create a text file containing the hostname of your targeted machines For example let s call it hostfile node001 node002 node003 Then you are almost done Just launch your parallel job with the following command mpirun np 8 hostfile hostfile polair3d polair3d cfg where np indicates the number of nodes you want to use If you are running your job on a single hexacore with MPI alone np value has to be set to 6 In this case there should be only one hostname in your hostfile If you are running it on 10 different monocore nodes then you have to use MPI alone the hostfile will contain 10 hostnames and np will be set to 10 Using both MPI and OpenMP won t change the basics of the command line For example a job targeting 3 quadcore nodes might be launched with mpirun np 3 hostfile hostfile polair3d polair3d cfg given hostfile indicates the 3 related nodes and the field Number_of_threads_openmp has been set to 4 in the configuration file polair3d cfg Note 1 That was the Open MPI case but if you are still stuck with an old LAM MPI environment you will be asked for additional efforts Finally the following guidelines might convince you to migr
256. sion is set equal to vertical diffusion output Path to the configuration for the output saver 5 5 2 Data Description polair3d data cfg This configuration file describes input data files binary files Tt is divided into sections for deposition for meteorological fields etc A section roughly looks like this meteo Date_min 2004 08 09 Delta_t 10800 Fields MeridionalWind ZonalWind Temperature Pressure Rain CloudHeight Attenuation SpecificHumidity Filename u cergrene a ahmed dm TestCase 1 0 data meteo amp f bin VerticalDiffusion u cergrene a ahmed dm TestCase 1 0 data meteo Kz_TM bin It is assumed that all binary files start at the same date and this date is Date_min see dates formats in Section D 7 The time step is Delta_t in seconds Then a list of fields is provided after Fields These are fields that the model needs and their names are determined by the model Below all fields required by the model depending on its options are listed A generic path full file name is then provided entry Filename In this path the shortcut amp f refers to a field name In the previous example the full path to the temperature is u cergrene a ahmed dm TestCase 1 0 data Temperature bin In the specific case of boundary conditions the shortcut amp c is replaced by x y and z 130 CHAPTER 5 MODELS If a few fields are not stored in a file with a generic path their specific paths can be provi
257. sition_aerosol and With_point_emissions_aerosol surface_emission_ aerosol Date min Delta t If surface emissions are activated Fields Filename With_surface_emission_aerosol volume_emission_aerosol Date min Deltat If volume emissions are activated Nz Fields With_volume_emission_aerosol are emitted initial condition aerosol Fields Filename If initial conditions are activated boundary_condition_aerosol Date min Delta_t If boundary conditions are activated deposition_velocity_aerosol Fields Filename If deposition is activated position velocities are not computed Compute deposition aerosol set to no point_emission_aerosol file Path to the file which defines the point emissions If point emissions are activated Filename is the number of levels in which pollutants The point emissions if needed are given in files very similar to the point files described in Section 5 15 for gaseous species except that there is only one species and one bin in each section source The species and bin are given after the entry Species in the form species_bin for example PNO3_0 Only the types continuous and puff can be used 5 7 3 Vertical Levels and Species Section 5 6 3 is relevant for Polair3DAerosol In addition there is at least a section added in the file species dat aerosol_species PMD PBC PNA PS04 PNH4 PNO3 PHCL PARO PARO2 PALK1 POLE1 PAPI1 PAPI2 PLIM1 PLIM2 PPOA PH20 136
258. source files can be recognized thanks to their file extension cpp What are they doing You can get an idea of what a processing program does by looking at its content so that you can identify the model with its related driver and modules For instance edit processing photochemistry polair3d cpp int main int argc char argv typedef Polair3DChemistry lt real SplitAdvectionDST3 lt real gt DiffusionROS2 lt real gt Photochemistry lt real gt gt ClassModel 1 BaseDriver lt real ClassModel BaseQutputSaver lt real ClassModel gt gt Driver argv 1 2 Driver Run 19 CHAPTER 2 USING POLYPHEMUS This gives you precious informations about the objects used in the program 1 tells you the model used is Polair3DChemistry It includes the following terms or mod ules SplitAdvectionDST3 DiffusionROS2 and Photochemistry 2 indicates that the driver of the model is BaseDriver and that the output will be managed according to BaseOutputSaver In order to know how all these objects work read their description in the related sections of the guide For the example given above e section 5 6 Polair3DChemistry of chapter 5 Models e sections 6 1 2 SplitAdvectionDST3 6 1 4 DiffusionROS2 6 2 1 Photochemistry of chapter 6 Modules e section 4 1 BaseDriver of chapter 4 Drivers e subsection 4 9 1 BaseOutputSaver of section 4 9 Output Savers You now have all the elements you need to choose the processin
259. sum in the plume model In the puff model it is incremented at each time step so as to have a number of points consistent with the range of the integral that is not to have too many points to discretize an integral whose range is very small 5 1 2 Source Description plume source dat The point emission file used by the Gaussian plume model are described in Section 5 15 There are as many sections as sources and they can be only of type continuous One source can emit several species The beginning and ending date are read but not used since this is a stationary model The source file can contain a list of point sources provided by the user or a discretized line source In that case it corresponds to the output file of the discretization preprocessing program discretization 5 1 3 Vertical Levels plume level dat Vertical levels are defined in a single data file They are defined by their interfaces This means that the file contains Nz 1 heights where Nz is the number of levels specified in the main configuration file The concentrations are computed at layers mid points 5 1 4 Species gaussian species dat Species are listed in the section species of a data file the same as the species data file used in the preprocessing program gaussian deposition see Section 3 9 2 When radioactive or biological decay is taken into account a section containing the half life times of the species has to be provided The section half_life
260. t cd Polyphemus preprocessing dep utils scons py gaussian deposition_aer Then run it from the test case directory cd TestCase config Polyphemus preprocessing dep gaussian deposition_aer gaussian deposition_aer cfg The output on screen will be Reading configuration file done Reading meteorological data done Reading species done Reading diameter done 183 184 APPENDIX B GAUSSIAN TEST CASE Computation of the scavenging coefficients done Computation of the deposition velocities done Writing data done The file gaussian meteo_aer dat has been created in the directory TestCase config It will be used for puff simulations with aerosol species and with line source Note that if your simulation only involves gaseous species you can use the preprocessing program gaussian deposition Here we use gaussian deposition_aer because its output can be used for simulations with or without aerosol species B 2 Discretization This step is only necessary for the simulation with a line source Its aim is to discretize this source into a series of puffs To do so compile the preprocessing program discretization cd Polyphemus preprocessing emissions utils scons py discretization Then run it from the test case directory cd TestCase config Polyphemus preprocessing emissions discretization discretization cfg The output on screen will be Reading configuration file done Rea
261. t Homogen_Sphere Exact_Mie and put them in mie_code_wiscombe Then go back in the optics postprocessing to compile and execute the tabulation you may have to change the compiler name in the makefile to fit your platform cd postprocessing optics input Mie_tab make compute_tab Warning the tabulation of the efficiency factors will then be done at the wavelength 550 nm unless you change the value of lambdaO in compute_tab f Two files are then created Grid_Mie dat and efficiency factors tab_550 dat 7 4 3 Computation of Optical Parameters To compute the optical parameters go to the optics directory and compile utils scons py or make The optics program generated needs two configuration files the general cfg from the preprocessing and the optics cfg described hereafter paths Directory_simulation result Path to the results of the polair3d siream simula tion File_temperature Path to the temperature field file general domain File pressure Path to the pressure field file general domain File specific humidity Path to the specific humidity field file general do main Directory_OPAC Path to the directory containing the OPAC data normally input optdat File_index_water Path to the file containing the water refrac tive indices at several wavelengths normally input index_water_tab dat File_species_match Path to the file containing the correspondence be tween the model species and the OP
262. t calls SCons If it does not work try the other option _ 2 utils scons py _ 2 polair3d In the makefile add to the compiler flag CCFLAGS the option DPOLYPHEMUS_SINGLE_UNDERSCORE If this does not work then add instead DPOLYPHEMUS_DOUBLE_UNDERSCORE If you change compilation options you should use make cleanall before compiling so that each part of the code is compiled with the same options If this still does not work it is likely that your problem is elsewhere Contact Polyphemus development team polyphemus help lists gforge inria fr if you need help 18 CHAPTER 1 INTRODUCTION AND INSTALLATION Chapter 2 Using Polyphemus 2 1 Remark In configurations files in output logs and so on indices start at 0 as in C and Python not at 1 as in Fortran 2 2 Guide Overview Now that you managed to complete the intallation of Polyphemus you should be eager to know what you finally got and how you could use it Here are some guidelines that might help you finding your way in this document and save your time You are also warmly advised to take advantage of the test cases or training sessions we keep up to date on the Polyphemus website Nothing will replace practical training Where are the programs First of all you might want to select the processing program that is of interest for your own work We hope you will find it among off the shelf programs we provided in one of the subdirectory of processing Program
263. t http cerea enpc fr polyphemus or at http gforge inria fr projects polyphemus Polyphemus development and support team can be contacted at polyphemus help lists gforge inria fr 1 2 Requirements 1 2 1 Operating Systems and Compilers Polyphemus is designed to run under Unix or Linux based systems It should be able to run under Windows AtmoPy has been tested under Windows and the Eulerian model Polair3D has been compiled with Microsoft Visual Studio NET 2003 There is no obvious reason why other parts of Polyphemus should not work under Windows Polyphemus is based on three computer languages C Fortran 77 and Python There are also a very few lines of C Supported C compilers are GNU GCC G 3 2 3 3 3 4 4 1 4 2 4 3 and 4 4 GNU GCC 2 x series is too old to compile Polyphemus Intel C compiler ICC versions 7 1 8 0 and 9 1 should work Any other decent C compiler compliant with the standard should compile Polyphemus If not please report to polyphemus help lists gforge inria fr 12 CHAPTER 1 INTRODUCTION AND INSTALLATION Corresponding Fortran compilers are acceptable GNU G77 3 2 3 3 and 3 4 and GNU GFor tran 4 0 4 1 4 2 4 3 and 4 4 take care GFortran 4 0 and 4 1 are rather slow according to our tests you had better to install more recent versions and Intel Fortran compilers IFC 7 1 IFORT 8 0 and IFORT 9 1 Python versions 2 3 to 2 5 are supported 1 2 2 External Libraries and Python Modules Wit
264. tDomain_aer output savers they save gas and aerosol con centrations over the entire domain The difference is that latter output savers are intended for post treatment whereas formers for eventually be able to restart a simulation as if it had not stopped Therefore all gas and aerosol concentrations are saved and not averaged only one simulation time step is saved and each backup overwrites the latter one A date file stores the current date and iteration of backup files All backup files are buffered in files with extension buf These buffers are only intended for the case the simulation breaks during the backup saving In this case the date file will contain the message BACKUP SAVING NOT FINISHED which means that buffer files have to be used instead of backup ones These buffer files are only needed at run time and are removed at the end of simulation The output savers SaverUnitBackup and SaverUnitBackup_aer are configured with a save section save Type backup Interval_length 10 Output_file backup amp f bin Date_file backup date_backup save Type backup_aer Interval_length 10 Output_file backup amp f_ amp n bin Date_file backup date_backup_aer The backup output savers are selected by setting type to backup or backup_aer The number of time steps between two backups is set in Interval_length In order to be able to correctly restart a simulation this number has to be large enough co
265. ta files Levels Levels for the simulated data in files Simulation option Specifies how observations are provided The current version deals Input file Files containing the observation data They usually are generated by certain reference run of Polair3D amp s in path names is replaced 118 CHAPTER 4 DRIVERS Initial_concentration Flag that indicates whether initial concentrations are included in data file 4 11 Perturbation Manager The PerturbationManager is dedicated to perturbation managements It reads the perturbation configurations and performs perturbations The concerning fields are then updated according to perturbation results for new model simulations in diverse applications such as data assimilation and ensemble predictions Library NewRan is needed for random number generations The perturbation fields are defined in configuration file of which the name can be read from section perturbation_management in the driver configuration file general Fields Perturbation field list that depends on species e g Deposition Ve locity PhotolysisRate SurfaceEmission and BoundaryCondition Rand_seed Seed assignment for NewRan library either a given seed number in JO 1 or the path to the directory that contains NewRan seed files or current_time for a seed that depends on the current CPU time Field maximum_spread Every random number for field perturbations cannot exceed the mean plus or minus Field_maxi
266. te model simulations and the background departures The background departures are defined as the discrepancies between observations and background state It involves with observation managements described in Section 4 10 and storage man agements of forecast and analysis results see for instance Section 4 9 4 The background error covariance matrix can be either diagonal or generated by Balgovind correlation functions see Section 5 8 4 7 3 EnkKFDriver It is the driver dedicated to data assimilation applications using ensemble Kalman filter algo rithm It consists of two steps forecast and analysis It differs from optimal interpolation in that the background error covariance is flow dependent and approximated by an ensemble of perturbed model forecast The algorithm parameters are set in section EnKF EnkF Number_ensemble The number of samples in the ensemble With_observation_perturbation If observations are perturbed for consistent statistics for analyzed ensemble With_ensemble_prediction If ensemble prediction is supported The generation of the ensemble is detailed in PerturbationManager configurations see Sec tion 4 11 4 7 4 RRSQRTDriver It is the driver dedicated to data assimilation applications using reduced rank square root Kalman filter algorithm RRSQRT It consists of two steps forecast and analysis The back ground error covariance is flow dependent and approximated by an explicit low rank repres
267. te_max 2001 04 30 10 Delta_x 2 Nx 16 36 Delta_y 2 Ny 11 x_min y_min Moreover you have to specify the number of models in your ensemble and two directories where the preprocessing results data_dir and the models results model_dir will be stored Nmodel 25 data_dir nfs polyphemus user work ensemble 2001 data model_dir nfs polyphemus user work 2001 ensemble For the sections physics and numerics you have to specify the name of the physical pa rameterizations and the numerical approximations In the both sections you have to specify the multiple choices for each parameter Moreover it is possible to give the occurrence frequency for each choice You may add the keyword preprocessing to indicate that this parameter takes part to preprocessing 2 9 ENSEMBLE GENERATION 51 physics luc usgs 50 glcf 50 preprocessing chemistry racm 60 radm 40 deposition_velocity zhang wesely preprocessing kz tm louis preprocessing numerics time_step 600 90 1800 10 vertical_resolution 5 70 9 30 preprocessing with_air_density yes no You must specify the occurrence frequency between brackets just after a parameter value You can separate the values by a coma or a dash You do not have to specify the occurrence frequency every time In this case the random choice will be uniform Nevertheless you can not specify the occurrence frequency just for one value For example deposition_velocity
268. ted in Section 5 9 3 5 10 3 Chemistry Files When model CastorChemistry is used four files are necessary to describe the chemistry e Reaction file which gives the reactions between the species managed in the format 2 CO OH 2 H02 C02 The first column gives n the number of species reacting the n following columns give the name of the species reacting the following columns are the number and names of the species resulting from the reaction e Stoichiometry_file 5 11 PLUMEINGRID 139 e Photolysis_file e Rates_file 5 11 PlumelnGrid The base files for plume in grid model are PlumeInGrid hxx and PlumeInGrid cxx Basically it is a model but it can be used as a driver The plume in grid model uses both an Eulerian model and a Gaussian Puff model It processes major point emissions first with the Puff model then feeds the puffs back to the Eulerian model when their size is large enough Apart from this special treatment of point sources the Eulerian simulation is performed as if BaseDriver were used The Eulerian model can be for example Polair3DAerosol Polair3DChemistry or CastorChemistry For the time being only Polair3DChemistry with RACM mechanism can be used for reactive cases The plume in grid model uses basic configuration files for the Eulerian model with some changes that are described below and the file puff cfg for options for the Gaussian puff model 5 11 1 Main configuration file In the main configuration
269. tever the standard deviation parameterization is situation Friction velocity m s Friction_velocity 0 37 Convective velocity m s Convective_velocity 0 81 Monin Obukhov Length m LMO 120 0 Coriolis parameter s Coriolis 1 4e 04 5 1 6 Correction coefficients file correction_coefficients dat The correction coefficient file is used for line sources and gaseous species only It contains coefficients for each stability classes and land categories of Briggs parameterization These coefficients are used to reduce the error induced by the Gaussian line source analytical formula 5 2 GaussianPlume aer It is the Gaussian plume model for aerosol species The corresponding program is plume aer It can be run when there are aerosol species only or both aerosol and gaseous species It takes the same input files as the Gaussian plume model except that they contain in addition some sections dedicated to aerosol species It takes in addition another input file that describes the diameters of particles file diameter dat already described in Section 3 9 2 The output files are binary files one for each gaseous species and one for each couple aerosol species diameter The way results are saved is described in an additional configuration file reference plume saver_aer cfg described in Section 4 9 5 2 1 Configuration File plume_aer cfg It is exactly the same file as the configuration file described in Section 5
270. that determines the vertical layers to be saved Note that 0 is the first layer Remember that the heights you specified in the file levels dat are those of the level interfaces while concentration are saved in the middle of each levels Averaged Should concentrations be averaged over Interval_length If not instantaneous concentrations are saved Initial_concentration Should initial concentrations be saved This option is only avail able if concentrations are not averaged imin Minimum longitude index of the subdomain i max Maximum longitude index of the subdomain j min Minimum latitude index of the subdomain j max Maximum latitude index of the subdomain 4 9 4 SaverUnitDomain_assimilation The output saver SaverUnitDomain assimilation defines an output saver unit similar to SaverUnitDomain except that it requires additional parameters presented in the table below save Date_file The full path name of the file that stores the date sequences of the assimilation results The group attribute of the output saver SaverUnitDomain assimilation is set to analy sis whereas the group attributes of other saver units are set to forecast by default Its Type is domain_assimilation 4 9 5 SaverUnitDomain prediction The output saver SaverUnitDomain prediction defines an output saver unit similar to SaverUnitDomain The group attribute of the output saver SaverUnitDomain prediction is set to
271. tored SolarRadiation File where solar radiation is stored WindModule File where wind module is stored PAR File where photosynthetically active radiation is stored PARdiff File where the diffuse part of the photosynthetically active radia tion is stored 3 5 DEPOSITION VELOCITIES TT PARdir SpecificHumidity SurfacePressure FrictionVelocity CanopyWetness Rain RoughnessHeight Type ChemicalMechanism Data Directory dep Ns CellRoughness Ra Rb Rc Save_resistance File where the direct beam part of photosynthetically active radi ation is stored File where 3D specific humidity is stored File where surface pressure is stored File where friction velocity is stored File where canopy wetness is stored File where rain is stored File where roughness height is stored Configuration file that describes land use cover see below for de tails about this file Chemical mechanism used in your simulation You can choose among racm racm2 and cb05 File containing the data for species This file should contain the species name the molecular weight g molt Henry con stant diffusivity reactivity alpha Zhang et al 2003 beta Zhang et al 2003 Rm An example for RACM RADM is available in preprocessing dep input species_data_racm txt Similar ex amples for RACM2 and CB05 mechanisms are also found Directory where the output files are stored Species Number of species for which data a
272. trations are saved is to be written during the simulation This looks like 114 CHAPTER 4 DRIVERS Type indices_list Levels 0 2 Output_file lt Results gt amp f bin Indices 0 0 5 15 20 25 30 30 Point_file lt Results gt point txt One line corresponds to one point There can be either two or three indices In case there are two indices on the line the first one corresponds to index along y the second one to the index along x and concentrations are saved at this point for each vertical level specified in the field Levels In the previous example the file lt Results gt point txt will be created during the simulation and look like tz y x o 0 0 2 0 0 0o 5 15 2 5 15 0 20 25 2 20 25 0 30 30 2 30 30 In case there are three indices on a line concentrations are saved only at the specified point no matter what the field Levels contains The first value on the line corresponds to index along z the second to index along y and the third to index along x Note that lines containing two or three values can be entered in any order The output binary file containing concentrations will simply follow the order given in the file lt Results gt point txt for each time step It means that the resulting binary file will be of size Ny x Npoint where N is the number of time steps to be saved and Npoint is the number of points where concentrations are saved To save coordinates instead of indices one simply has to change the t
273. ture in K at source source_water_content Total water content at the source mass fraction output Option Should the liquid water content in the plume only option plume or in the plume and the ambient air option total be computed Unit Unit of the output Put a for gkg and b for gm LiquidWaterContent Output file name file containing the field of liquid water mass fraction The water content diagnosis is done at each simulation time step for the whole domain The domain description is contained in general cfg Note that you may have to change the number of vertical levels in general cfg in case not all levels where saved during the simulation Appendix A Polair3D Test Case The test case is available on Polyphemus site In order to use the test case you should download e The meteorological data file MM5 2004 08 09 tar bz2 The file is not included in the test case so that it can be used for various applications and has not to be downloaded each time e The archive TestCase Polair3D 1 6 tar bz2 Note that you should have Polyphemus installed and working in order to use the test case A 1 Preparing the Test Case The first step is to extract the archive TestCase 1 5 Polair3D tar bz2 tar xjvf TestCase Polair3D 1 6 tar bz2 The directory TestCase Polair3D referred to as TestCase in what follows will be created It is divided in four subdirectories e data which contains all precomputed data e
274. uc usgs Directory where the output file will be stored Output file name data Path to the file giving the roughness of land categories This file should be a text file with three columns the land category in dex starting at 0 the roughness height in m and the cate gory name Two examples are provided roughness glcf dat and roughness usgs dat A field named LUC_origin is also defined It is used for markup substitution in the various filenames The value of this field must be glcf or usgs The program may be launched with roughness general cfg roughness cfg Section domain is in general cfg and the other sections are read in roughness cfg 3 3 5 LUC for emissions extract glcf This program is only necessary in order to generate anthropogenic emissions from EMEP in ventories see Section 3 6 2 The output is the land category read from GLCF global land use classification gl 1atlong 1km landcover bsq over a subdomain Make sure that the out put domain described in section subdomain of the configuration file entirely contains your simulation domain The configuration file should contain see example extract glcf cfg 3 4 METEOROLOGICAL FIELDS 65 paths File _GLCF GLCF input file global It is the same as the one used for luc glcf File_out Output file That is the file given in section LUC of emissions cfg GLCF x_ min Minimum longitude of the GLCF domain whole world Nx Numb
275. umber of vertical layers integer in MM5 grid Type of projection 1 corresponds to Lambert conformal conic 2 to Mercator and 3 to stereographic accumulated_rain Is the rain accumulated from the previous day attenuation Parameterization to be used to compute cloud attenuation Put 1 to use RADM parameterization or put 2 to use ESQUIF parameteri zation clouds Minimum cloud basis height in m kz Lower threshold for vertical diffusion in m s Lower threshold for vertical diffusion over urban areas in m Higher threshold for vertical diffusion in m s If set to no the lower threshold is applied only at the top of the first layer otherwise it is applied to all levels 2 2 1 s The program basically reads data in MM5 output file and interpolates it in time and space to Polyphemus grid MM5 file is described in MM5 meteo cfg and Polyphemus grid is described 72 CHAPTER 3 PREPROCESSING in general cfg Note that each time a field is loaded by MM5 meteo all time steps are loaded in memory Note that the fields are released from memory when unused but you may still need a lot of memory for big MM5 output files The program first computes the altitude of MM5 layers and converts the Polyphe mus grid coordinates latitude longitude to MM5 grid coordinates Lambert Mercator or stereographic for interpolations Interpolations on the horizontal are performed in MM5 grid for efficiency The pressure is computed
276. undObservationManager The GroundObservationManager is dedicated to ground observation managements general Species Name of observed species The current version deals with only one observed species Error_variance Error variance for the observed species With_spatial_interpolation Should observations be interpolated at adjacent model grid points With perturbation Should the observation be perturbed Perturbation_scale If With_perturbation is set to yes gives the amplitude of the perturbation stations Nstations Total number of stations Stations_file File containing station information code name latitude longi specified in general section Input_directory Directory where the observations are stored tude and altitude amp s in path names is replaced by species name 4 10 2 SimObservationManager The SimObservationManager is dedicated to synthetic observation managements Library NewRan is needed for random number generations Note that NewRan is not included in the distribution and it is the user s duty to install NewRan The associated configuration file is an extension of that of GroundObservationManager The additional sections are mainly for data specifications of the binary data files simulation manager only with observations at ground stations by species name Date_min Starting date for the simulation results in data files Delta _t Time step in seconds for the simulation results in da
277. vels in which pollutants are emitted scavenging Fields If the scavenging model is not set to none Scavenging model If there are point emissions the point emission file used by the model is of the general type described Section 5 15 5 5 3 Vertical Levels and Species Vertical levels are defined in a single data file They are defined by their interfaces This means that the file contains Nz 1 heights where Nz is the number of levels specified in the main configuration file The concentrations are computed at layers mid points Species are listed in the section species of a configuration file In addition some scav enging models needs extra data e The constant model requires a section scavenging coefficient which contains a threshold of rain to apply scavenging in mmh and the name of the species with its associated scavenging coefficient in s for instance scavenging coefficient Scavenging is applied above the following threshold over rain mm h Scavenging rain_threshold 1 Scavenging coefficient of the species s 1 NO2 1 e 4 S02 1 e 4 Notice that if the previous lines are replaced by Scavenging coefficient of the species s 1 all 1 e 4 the same scavenging coefficient will be used for all scavenged species 132 CHAPTER 5 MODELS e The belot model has the following expression a pp where coefficients a and b have to be provided for every species in a section belot fo
278. ver a 4 8 Drivers for the Verification of Adjoint Coding 4 8 1 AdjoimtDriver nakep p h aE a ee 482 Gradient Doyer ieis e koi ee Ak ee Tee OR ee A ee a ee a 48 3 GradientaDVarDriver a oe 644 be ee ee ae a h a 49 Output Sayers se oe sui bead oe ae a Oe eed et al Se S 491 BaseOutp tSaver e se a ssa maaa a afim be eR eee we ee SS 4 9 2 SaverUnitDomain and SaverUnitDomain_aer 4 9 3 SaverUnitSubdomain and SaverUnitSubdomain_aer 4 9 4 SaverUnitDomain_assimilation e e e 4 9 5 SaverUnitDomain_prediction e e 4 9 6 SaverUnitNesting and SaverUnitNesting_aer 4 9 7 SaverUnitPoint and SaverUnitPoint_aer o aa 4 9 8 SaverUnitWetDeposition and SaverUnitDryDeposition 4 9 9 SaverUnitWetDeposition aer and SaverUnitDryDeposition_aer 4 9 10 SaverUnitBackup and SaverUnitBackup_aer 4 10 Observation Managers aooo 4 10 1 GroundObservationManager 0 0 0 000 eee eee eee 4 10 2 SimObservationManager 00 eee ee ee 4 11 Perturbation Manager s ccsa eek oe RAE a ee ee ee ee Re ie 5 Models Dell Ry atissia Pane ek ec ig aes ok we A a ee ee ow eS 5 1 1 Configuration File plume cfg lt lt 446 2 480 eae oe eh eu es 5 1 2 Source Description plume source dat oo o 5 1 3 Vertical Levels plume level dat 3 14 Species gansslan species dat iu
279. vert Directory_luc convert Directory where the output file output land use categories should be stored File_out Output file name in Directory_luc convert dimensions Nc_in Number of land categories in the input format Nc_out Number of land categories in the output format coefficients Correspondence matrix between input land categories and output land categories Each line corresponds to an input category Each line contains the index of the category 64 CHAPTER 3 PREPROCESSING or any number this first column is not read and the distribution of the input category in all output categories columns The distribution is a set of numbers in 0 1 whose sum should be 1 Several configuration files are provided to convert GLCF or USGS categories to We sely or Zhang categories glcf_to_wesely cfg glcf_to_zhang cfg usgs_to_wesely cfg and usgs_to_zhang cfg The output land cover file is in format c y x where c stands for land use category The conversion can be launched with luc convert general cfg usgs_to_wesely cfg 3 3 4 Roughness roughness After land use cover has been computed roughness data can be estimated using program roughness domain Nx Number of grid points along longitude Ny Number of grid points along latitude paths LUC_file File where the land use cover data are stored e g computed using Directory_roughness Roughness_out Roughness_data_file luc glcf or l
280. wing features e its location Abscissa and Ordinate are given in degrees or in meters in case Cartesian coordinates are chosen and Altitude is the vertical height in meters For Eulerian models the emission is released in the cell containing the location of the point emission e the list of emitted species is filled after Species e the type Type may be continuous puff for instantaneous release temporal for continuous emissions varying in time or continuous_line for continuous line emissions 5 15 1 Continuous emissions The continuous emission is described with the following entries Date _beg The date at which the emission starts The date must be in a format de scribed in Section D 7 Date_end The date at which the emission ends The date must be in a format described in Section D 7 Rate The list of rates one per emitted species in mass unit per seconds Velocity The stack exit velocity m s 146 CHAPTER 5 MODELS Temperature The source temperature Celsius degrees Diameter The source diameter m The source velocity temperature and section are read and used for plume rise calculation if the option is activated namely in Gaussian models If they are not known put zero The diameter may also be used to compute the initial horizontal extent of the emitted plume The configuration file for point emissions may contain a section looking like this source Abscissa 5 2 Ordinate 48 5 Altitude 10
281. wipe instead which cleans the environment and closes it You are advised though to use lamclean then lamhalt At this point we hope you managed to create your LAM universe It is time to show you how to launch a parallel job We take the example of a parallelized version of processing photochemistry polair3d To launch the run type mpiexec v np 14 polair3d racm cfg Some remarks about the command above the option np 14 lets launch the program with 14 nodes automatically selected If you want to use a given number of processes per node you can use option N instead and for one process per CPU use C If you want to launch the program on nodes 0 to 7 for instance put option n0 7 The option v makes mpiexec verbose which can be useful in order to know on what nodes the program was launched Note 2 In Unix like systems the command ipcs can be helpful to check whether lamclean was entirely successfull If for any reason your program crashed and despite lamclean some orphan semaphors are left you might kill them thanks to ipcrm 34 CHAPTER 2 USING POLYPHEMUS Note 3 In the case of an MPI OpenMP built program the field Number_of_threads_openmp has to be propely set in the main configuration file as indicated above in the subsection dedicated to the OpenMP way The good old way If you followed in 2 3 3 the good old way to parallelize one of the aerosol modules Aerosol_SIREAM_SORGAM or Aerosol_SIREAM_AEC
282. y conditions to be generated As INCA files provide monthly data you need only to generate the boundary conditions in July for two days that is to say 48 hours The configuration file will be Configuration file for inca boundary conditions bc_input_domain x_min 180 Delta_x 3 2 y_min 90 Delta_y Nz 19 Input species Ns 14 Species bc species_inca dat bc_files Nt 48 Directory_bc boundary_conditions Then launch computation of the boundary conditions with Polyphemus preprocessing bc bc inca config general cfg config bc inca cfg raw_data INCA INCA 07 The output on screen will be Memory allocation for data fields done Reads file done Input data processing done Species 196 APPENDIX C CASTOR TEST CASE 03 done NO done NO2 done HNO3 done PAN done H202 done CO done CH4 done HCHO done C2H6 done NC4H10 done C2H4 done C3H6 done OXYL done As the simulation is set in July and August 2003 launch the program again using INCA 08 this time and 78 hourly time steps in August You will obtain boundary conditions for 14 species C 3 Launching the Simulation C 3 1 Modifying the Configuration Files You should check and modify config castor cfg if necessary You have to check the paths in particular check that the data and saver file are config castor data cfg and config castor saver cfg and to make sure that the
283. y for the subdomain Ny Number of points along y for the subdomain levels File giving the interfaces of the layers for the subdomain Nz Number of layers in the subdomain In Output_file amp f and amp n are replaced as for SaverUnitDomain or SaverUnitDomain_aer and amp c is replaced by the direction along which the boundary conditions were interpolated that means that amp c is replaced by x y or z 4 9 7 SaverUnitPoint and Saver UnitPoint_aer The saver units SaverUnitPoint and SaverUnitPoint_aer are used to save concentrations at a list of given points There are two possible types indices_list saves concentrations at given indices in the simulation grid provided in the main configuration file in section domain and coordinates list saves concentrations at given Cartesian coordinates In case the saver is of type coordinates_list the simulation grid is still read but is not used as concentrations are computed directly at each point of interest The list of points where concentrations are to be saved has to be specified in the section save of the saver configuration file It has to be written just after the line containing the field Output_file The list begins with the field Indices in case the saver type is indices_list and Coordinates if the type is coordinates_list In both cases the list must end with a line containing the field Point_file which is used to specify a file name where the list of all points where concen
284. y you have to fill the configuration file luc glcf cfg Note that the default values in section GLCF are for file gl latlong 1km landcover bsq there is no need to change them if you downloaded this recommended file 3 3 GROUND DATA 61 Database_luc glcf LUC_in Directory_luc glcf LUC_out Step xmin ymin Nx Ny Nc paths Directory where the raw data from GLCF can be found directory where gl latlong 1km landcover bsq lies Name of the file containing raw data i e gl latlong 1km landcover bsq or its new name if you re named it Output directory Output filename The default filename LUC glcf bin is recom mended for clarity GLCF Space step in degrees in GLCF input file Minimum longitude in the input file degrees Minimum latitude in the input file degrees Number of cells along longitude in the input file Number of cells along latitude in the input file Number of land use categories The output land cover file is in format c y x where c stands for land use category Table 3 3 presents land use categories as they are computed with luc glcf Table 3 3 Land use categories in GLCF description S e O Label OOAONATKWNMrH Ru Ro w N Water Evergreen Needleleaf Forest Evergreen Broadleaf Forest Deciduous Needleleaf Forest Deciduous Broadleaf Forest Mixed Forest Woodland Wooded Grassland Closed Shrubland Open Shrubland Grasslan
285. ype to coordinates_list to add the field Levels_coordinates to specified values of z where concentrations are to be saved and to write the field Coordinates instead of Indices The field Levels is still read but not used Here is an example Levels O Levels_coordinates 1 5 Output_file lt Results gt amp f bin Coordinates 4 9 OUTPUT SAVERS 115 470 0 535 0 470 7 535 0 470 5 535 1 1 5 470 8 535 4 2 5 470 8 535 4 4 5 470 8 535 4 7 5 470 8 535 4 10 5 470 8 535 4 13 5 470 8 535 4 17 5 470 8 535 4 Point_file lt Results gt point txt Note that coordinates are entered in meters first z then y then x or just y then x In the previous example every point for which only two coordinates are entered is saved at 1 5 meters above ground For one point one wished to save concentrations at different heights above ground so heights have been explicitly written When dealing with aerosol species one just has to put indices_list_aer or coordinates_list_aer instead of indices_list or coordinates_list respectively 4 9 8 SaverUnitWetDeposition and SaverUnitDryDeposition The output savers SaverUnitWetDeposition and SaverUnitDryDeposition define output saver units when Type is set to wet_deposition or dry_deposition and both require additional parameters presented in the table below save Averaged Should concentrations be averaged over Interval_length If not instantaneous concentrations are saved In

Download Pdf Manuals

image

Related Search

Related Contents

OFFICE OF THE PRINCIPAL : G.S.V.M. MEDICAL COLLEGE  Severin AT 2516 toaster  Sciences Appliquées  ja-106k_manual  取扱説明書 - Kodak PixPro    Tout un programme  Manual - Alpine  User`s Manual  Version intégrale du magazine  

Copyright © All rights reserved.
Failed to retrieve file