Home
Polyphemus 1.9 User's Guide - GForge
Contents
1. Date 20010422 2YNxh 7 16 SUNY AS UL luc gt usgs dep wesely fluc_dir luc 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 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 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 preproces
2. 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 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 B 4 RESULT VISUALIZATION 193 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 there 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
3. 83 3 6 5 Sea Salt Emissions sea salt 0 200002 e eee 83 mek ita Conditions Te sosok ik ee SOR e eh ee ee ee a 84 38 Boundary Conditions sss se sed ee Ea sa gaa ea ew a we SG 85 381 Boundary Conditions tor Polaw3D 2 4 24 02 e640 bd a ees 85 3 8 2 Boundary Conditions for Castor be inca 00005 87 3 8 3 Boundary Conditions for Aerosol Species bc gocart 87 3 9 Preprocessing for Gaussian Models 2 a 91 SoL Program discretization o es d scs omi A Oh oh ee A ai 91 3 9 2 Programs gaussian deposition and gaussian deposition_aer 93 CONTENTS 4 Drivers A a IE d IMANES esse E oa RARA AR A ce 4 3 Publ oa ooa orense Pee eRe Ge aS d PlumeMonteCarloDriver ociosos eras a Be ee 45 MonteCarloDriver s a so tone ta 04 daa a RA a 4 6 PerturbationDviver gt o o o s sies go aa i E a A 4 7 Data Assimilation Drivers e ATL lt AssimilationDrive cion eRe o a 4 7 2 OptimallnterpolationDriver e Aa AA e tty oe ae AI a e E a a aa ATA ERSORIDEVE wo 24 a o eee ae A a Sa e daa A ito FourDimMVarDriyer lt sos ss ns aa a a 4 8 Drivers for the Verification of Adjoint Coding 48 1 AdjomtDriv r 4 o coords a da daa a BS a AB a IN 48 3 GradiemtaDVarDriver o o e sacco s ceros a ada 49 Output Savers soss sci sopada ey ad eee eS A 4 9 1 BaseQutputSaver ss ssp ae mawar e aiea a aoe aoma aa kaa ea 4 9 2 SaverUnitDomain and SaverUnit
4. ECMWF 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 First hour stored in the Grib file Time step in hour of data stored in every ECMWF file Number of time steps stored in every ECMWF file Longitude in degrees of the center of the lower left cell in ECMWF grid Step length in degrees along longitude of ECMWF grid Number of cells along longitude integer in ECMWF grid Latitude in degrees of the center of the lower left cell in ECMWF grid Step length in degrees along latitude of ECMWF erid Number of cells along latitude integer in ECMWF grid Number of vertical layers integer in ECMWF grid meteo Should meteo data be computed 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 photolysis_rates 3 4 METEOROLOGICAL FIELDS 65 Compute Photolysis_Data Should photolysis rate related data be computed Photolysis_option options for photolysis rate computation 3 choices are available put 1 for attenuation compute cloud attenuation a coefficient that range between 0 and 2 put
5. Download and select the file gl latlong 1km landcover bsq gz Finally 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 59 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 ES E O Label OOAONAT KWH rH j nj ES w N Water Evergreen Needleleaf Forest Evergreen Broadleaf Forest Deciduous Needleleaf Forest Deciduous Broadleaf Forest Mixed Fore
6. 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 6 weight date if relevant the list per station of dates for weights 7 stat possibly global statistics 8 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 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 Consult the AtmoPy reference documentation to get a description of all aggregation methods from a technical point of view
7. aer1_1 corresponds to the coefficient for the species aerl and the diameter of index 1 that is equal to 1 um and so on 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 11 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 GaussianPlume_aer model which is the same mod
8. 105 15 Figure C 1 Figure obtained using IPython and AtmoPy unit is ug m 204 APPENDIX C CASTOR TEST CASE 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 x_min 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 make 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 205 206APPENDIX D LEXICAL REFERENCE OF POLYPHEMUS CONFIGURATION FILES e coma and e vertical bar For exampl
9. 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 date_max 2001 04 30 x_min 10 Delta_x 2 Nx 16 y_min 36 Delta_y 2 Ny 11 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 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 sepa
10. 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 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 5 14 LAGRANGIAN PARTICLES 147 meteo Date_min Starting time of the meteo data files see dates formats in Section D 7 Delta_t Timestep of the meteo data files in seconds Fields Required fields are MeridionalWind and ZonalWind and Temperature and Pressure in case air density is taken into account Filename Generic path where the shortcut amp f refers to a field name defined in Fields VerticalDiffusion File name for VerticalDiffusion 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 particles 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
11. 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 2 x 7 gt gt gt print 2 y Under IPython print is useless just type 2 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 i gt gt gt a range 10 print a 166 CHAPTER 7 POSTPROCESSING o des 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 4 3 Inside the inner loop y x Outside the inner loop but still inside the outer loop print y Outsid
12. 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 filename NO bin Nt 22 Nz 5 Ny 33 Nx 65 disp m d2 5 0 A 6 VISUALIZING RESULTS 187 160 140 120 100 Figure A 1 Figure obtained using IPython and AtmoPy unit is ugm 188 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 Wh
13. CastorTransport CastorChemistry 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 CHECKING RESULTS Al 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 Nz 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 Nrotal Nt X Naays Here are some indications on wha
14. For instance three dimensional fields may be stored in formats z y xj or t y x t z a or Tt 2 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 GLCE 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
15. 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 wget http euler lmd 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
16. a N Il N w 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 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 gt gt gt m ge
17. be it with SCons or make you need to slightly change the compilation options With SCons add the option _ 1 on the command line that 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 interes
18. 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 WithHightWidthPrecision With_NO2_chemistry With_OH_chemistry 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 If yes increas
19. 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 199 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 preprocessing 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
20. emissions a line like ISO 0 If volume emissions are activated With volume_emission Nz is the num ber of levels in which pollutants are emitted 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 NO2 1 e 4 S02 1 e 4 Notice that if the previous lines are replaced by Scavenging coefficient of the species all 1 e 4 s 1 s 1 the same scavenging coefficient will be used for all scavenged species e The belot model has the following expression apo
21. 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 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 80 CHAPTER 3 PREPROCESSING 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 Polyphemus team polyphemus helpClists 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_em
22. 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_ amp c 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 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 Gocart format and conventions Gocart model usually provides files with the following naming convention http code916 gsfc nasa gov People Chin gocartinfo html 88 CHAPTER 3 PREPROCESSING file name signification yyyymm XX vs g 6 hourly concentrations in g m yyyymm XX vs g day daily averaged concentrations in gm7 yyyymm XX vs
23. lt generic_cfg gt preprocessing ground luc luc 0 roughness luc 10 meteo config_directory lt generic_cfg gt preprocessing meteo meteo vertical_resolution first_layer_height 20 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 2 9 ENSEMBLE GENERATION 53 LUC_file lt Directory_ground_data gt luc_dir LUC lt LUC_origin gt bin Directory_meteo lt Directory_computed_fields gt meteo meteo_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 param
24. 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 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
25. of the chemistry transport model is start ing It is also the date 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
26. 0 4 O 0 4 means that PPOA species is composed of 40 of CC 2 and 40 of CC 4 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 3 9 PREPROCESSING FOR GAUSSIAN MODELS 91 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 many times to launch bc 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
27. 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 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 B rjesson 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 Dis
28. 5 13 4 Noteworthy Remarks about Output Saving 147 Lagrangian Particles 64604 04 eb debe ee ee eee ew a h 147 5 14 1 ParticleDIFPAR Horker so cod fe ocara we EEG ee a a 148 5 14 2 ParticleDIFPAR FokkerPlanck 0 0002000 148 Point Emission Management aoaaa 148 5 15 1 Continuous emissions e ee 149 515 24 Pw CMSS y oca a e BO oe ea Sw a wl 149 ala Temporal Emissions 2 605 ats eae a oe ae ee a ee a 150 5 15 4 Continuous line emission s sooo e 151 Chim re fae ie tia k Bede eh ee RE Bea Se ee ee eR ee ee 151 516 1 Tnstallatio iii AG bo EE RRO EG soe 2a ob acre BH 151 CONTENTS 7 6 162 Configuration ct Go a a EE a a a A Da 152 6 Modules 155 6 1 Transport Modules ec ws ee ade REE A ae Pees 155 GLI AdvectionDsT3 coi Ba eda es PRD A Oe EAE Sa ew Ra 155 6 1 2 SplitAdvectionDalS corps desa we RG ee ew a as 155 6 1 3 GlobalAdvectionDST3 0202002022 eee eee 155 GE DuimnmsSiEARUSA eros ee De ee a he oa we ir A 155 61 5 GlobalDitiusionROS2 2 54465255 Peds te we RRA ei 155 6 1 6 TransportPPM ooo e eck de eke Re eee ee ee ee 156 6 2 Chemistry Modules 22 44 o conse 260 SG bE RED RR EE EG 156 62 1 Photochemistry 244 4 464 664554 be bade e Ee SRS 156 6 2 2 ChemistryRADM 00000 eee ee ee 156 B28 themistryGastor o ed e Bey Bale Re ea a eee 156 Gl MBE a Bl Pe ee ee ee A ee A bo ee a eS 156 63 Aerosol Modules se s seost e eee a ee be ay ee EG Ba SR PR
29. 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 76 76 76 76 76 76 76 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 25 25 25 25 25 25 25 25 25 26 25 Q agaagaAaAaARnaAaAAaAaAaaAaAaAaAaAAaAaAa 0 O uU TOQ aaaaaaqaQqua a aaaa qa aaa aaa aa qua YXS YXS YXS YXS YXS YXS YXS YXS YXS YXW YXS 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 YX YX YX YX YX YX YX YX YX YX YX YX YX YX CHAPTER 2 USING POLYPHEMUS m s kg kg kg kg kg kg kg kg kg kg kg kg K DAY m s Pa Pa cm cm m DIMENSIONLESS DIMENSIONLESS 1 s K DEGREES DEGREES category K m DIMENSIONLESS W m 2 W m 2 m s W m 2 W m 2 W m 2 W m 2 AAN WN 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 HORIZONTAL WIND V COMPONENT OF HORIZONTAL WIND TEMPERATURE MIXING RATIO CLOUD WATER MIXING RATIO RAIN WATER MIXING RATIO CLOUD ICE MIXING RATIO SNOW MIXING RATIO GRAUPEL MIXING RATIO ATMOSPHERIC RADIATION TENDENCY VERTICAL WIND COMPONENT PRESSURE PERTURBATION REFERENCE SURFACE PRESSURE MINUS PTOP GROUND TEMPERAT
30. 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 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 45 46 V T Q CLW RNW ICE SNOW GRAUPEL RAD TEND W PP PSTARCRS GROUND T RAIN CON RAIN NON TERRAIN MAPFACCR MAPFACDT CORIOLIS RES TEMP LATITCRS LONGICRS LAND USE TSEASFC PBL HGT REGIME SHFLUX LHFLUX UST SWDOWN LWDOWN SWOUT LWOUT SOIL SOIL SOIL SOIL SOIL SOIL SOIL SOIL SOIL SOIL SOIL SOIL CANOPYM WEASD SNOWH SNOWCOVR ALB GRNFLX See Sg 88H AAH PWNRrPPWNPFPPWNEH N YNWwWWWWWWW WwW Ww NNNNN N NNNNNNNNNN NONNNNNNNNNNNNNNNNN DN 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76
31. Eulerian model and a Gaussian model The Gaussian model can be GaussianPlume or GaussianPuff It processes major emissions first with the Gaussian model When GaussianPuff is used puffs are fed back to the Eulerian model when their size is large enough When GaussianPlume is used plumes emitted from line sources or point sources are fed back to the Eulerian model at a distance of 200 m to the source on a trapezoidal surface The PlumeInGrid model that use GaussianPlume is presented in Briant and Seigneur 2012 Apart from this special treatment of 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 when GaussianPuff is used 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 or plume cfg for options for the Gaussian plume model 5 11 1 Main configuration file In the main configuration file there is a new section named gaussian that provides gaussian gaussian type Type of the Gaussian model puff or plume line file gaussian Name of the configuration file for the Gaussian model With_temporal profile Proportional emission Emitted_species Set to yes if a tempor
32. Mozart 2 files in hours 3 8 BOUNDARY CONDITIONS 85 Nx Number of grid points along latitude in Mozart 2 files integer Ny Number of grid points along longitude in Mozart 2 files integer Nz Number of vertical levels in Mozart 2 files integer Database_ic 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 Chemical mechanism used in your simulation Species 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_v1 dat and species_racm_v2 dat Molecular weights File providing the molecular weights of output species Directory_ic 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
33. 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
34. about the configuration files you are advised to have a look at the lexical reference given in the Appendix D For informations 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 Polyphemus preprocessing bio gt bio Further details about specific programs are provided in chapter 3 2 5 RUNNING THE PROGRAMS 29 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 id Note The end date whet
35. 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 de beh Jr PZA ad ha where J is the objective function x is the control variable h is the perturbation direction is the perturbation coefficient and V J is the gradient calculated by adjoint model lt gt denotes inner product With a gt 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 name
36. concentrations and observations at the sta tion station with regard to the time Measurements are displayed with the style defined in 172 CHAPTER 7 POSTPROCESSING 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 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 PMio PMa 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
37. 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 Nz Ve Nz Ve Ve Po domain Number of output vertical levels rtical levels Path to the text file that stores the altitudes in m of output level interfaces hence Nz 1 values are read EMEP in Number of input vertical levels 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 Nsectors Number of activity sectors The program must be launched with distribution general cfg emissions cfg 3 6 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
38. 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 with s 2 as standard deviation of the loga
39. files Levels Levels for the simulated data in files Initial_concentration Flag that indicates whether initial concentrations are included in data file 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 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 maxim
40. 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 SaverUnitPoint_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 not read because it 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 conc
41. humidity in kgkg e the liquid water content in kg kg e the cloud attenuation coefficients 3D field Attenuation bin in 0 2 or e the water and ice cloud optical depths or e the photolysis rates in s7 for every species specified in the configuration file 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 stored 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 PARdir File
42. into account roughness height Richardson_with_roughness no 5 accumulated_data For data storing values cumulated 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 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
43. 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 or continuous line 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 122 CHAPTER 5 MODELS to be provided The section half
44. 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 coeff cients File Path to the file that contains the scavenging coefficients for all species Read only if Type is set to file 94 CHAPTER 3 PREPROCESSING deposition 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 or
45. model Lwc_cloud_threshold With_coagulation With_condensation With nucleation Fixed_aerosol_density aqueous_module With_in_cloud_scavenging With heterogeneous reactions With_kelvin_effect Dynamic_condensation_solver Fixed_cutting diameter Sulfate_computation Redistribution_method Nucleation_model With_fixed_density options Does the aerosol module returns cloud droplet pH Which below cloud scavenging model is used Liquid water content threshold for clouds Is coagulation taken into account Is condensation taken into account Is nucleation taken into account Fixed aerosol density in kg m used in the module Which aqueous module is used none simple or VSRM Is in cloud scavenging taken into account Are heterogeneous reactions taken into account Is Kelvin effect taken into account Which solver is used for dynamic condensation etr ros2 or ebi Fixed cutting diameter in um Which method is used to solve sulfate condensation equilibrium or dynamic Which redistribution method is used number conserving or interpolation Which nucleation model is used binary or ternary Is aerosol density fixed in the module 160 CHAPTER 6 MODULES 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 informatio
46. 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 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 197 198 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
47. 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 relationship 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 NHg 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 avail
48. 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 210APPENDIX 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 Briant R Korsakissok I and Seigneur C 2011 An improved line source model for air pollutant dispersion from roadway traffic Atmospheric Environment 45 4099 4107 Briant R and Seigneur C 2012 Multi scale modeling of roadway air quality impacts devel opment and evaluation of a plume in grid model Submitted to Atmospheric Environment Chang J Brost R Isaken I Madronich S Middleton P Stockwell W and Walcek C 1987 A three dimensional Eulerian acid deposition model physical concepts and formula tion Journal of Geophysical Research 92 D12 14 681 14 700 Debry E Fahey K Sartelet K Sportisse B and Tombette M 2007 Technical Note A new SIze REsolved Aerosol Mo
49. 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 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 observation 8 stat possibly global statistics 178 CHAPTER 7 POSTPROCESSING 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
50. 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 Autumn Late_autumn Snow Spring 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 Data file for autumn see below for details Data file for late autumn see below for details Data file for snow see below for details 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 modif
51. 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 y
52. puffs emitted at different 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 Show_date Date min Delta_t Nt x min Delta_x Nx ymin 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 display Irrelevant Provide any Boolean domain Provide the simulation starting date see Section D 7 Time step of the simulation in seconds Number of time steps integer 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 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 read only if With _
53. recom mended for clarity USGS Space step in meters Longitude of the center 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 5 Eu E O Label NOT R WN FH O 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 Shrubland 3 3 GROUND DATA 61 8 Mixed Shrubland Grassland 9 Savanna
54. s71 If activated horizontal diffusion 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 It 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 If a few fields are not stored in a file with a generic path their specific paths can
55. 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 s 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 Iodine 0 5
56. shown in Equation 3 1 xx 40 int 3 1 Na 6 a with Na the number of days since the beginning of the year 0 for first January and int x represents the integral part of x The program Polyphemus preprocessing ic automatically select the file to use with the date given in ic cfg Output results are in ug m 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 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 86 CHAPTER 3 PREPROCESSING bc input domain Nt Number of time steps in Mozart 2 files Delta t Time step of Mozart 2 files in hours Nx Number of grid points along longitude in Mozart 2 files integer Ny Number of grid points along latitude in Mozart 2 files integer Nz Number of vertical levels in Mozart 2 files integer Directory_bc Species Molecular_weights 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
57. 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 e the specific humidity in kgkg e the liquid water content in kg kg e the cloud attenuation coefficients 3D field Attenuation bin in 0 2 or e the water and ice cloud optical depths or e the photolysis rates in s7 for every species specified in the configuration file e the solar radiation intensity SolarRadiation bin in Wm 72 CHAPTER 3 PREPROCESSING 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 5 Program MM5 meteo castor Program MM5 meteo castor processes MM5 data and generates meteorological fields required by chemistry transport model Castor Vertical_levels Database_MM5_meteo Roughness file Directory_meteo Delta_t Nt x_min Delta_x Nx ymin Delta_y Ny Nz projection_type Horizontal_interpolation domain File containing the parameters alpha and beta used to co
58. specified as follows in species dat species Spl Sp2 Sp3 Sp4 aerosol_species Aeri Aer2 filiation_matrix File matrix dat filiation_matrix_aerosol 6 3 AEROSOL MODULES 159 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 00 8 0 1 0 05 0 10 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 Sq 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 The gas chemistry is solved with one of three chemical mechanisms the RACM Stockwell et al 1997 the RACM2 Goliff and Stockwell 2008 and the CBO5 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 With_pH Scavenging
59. the good old way to parallelize one of the aerosol modules Aerosol_SIREAM_SORGAM or Aerosol_SIREAM_AEC 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 Ursa raw_data results reference new_emissions Es 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 differ
60. the meteorological data file where only the ozone background concentration is different from zero Pressure Pa Pressure 101325 Attenuation Attenuation 0 99 Specific humidity 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 NO3NO2 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 128 CHAPTER 5 MODELS 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 d
61. 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 matplotlib 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 IPython with command ipython IPython needs to be launched once to complete its user installation You should get the prompt
62. this option is chosen 2 initial steps are nedded 1 firstly during the preprocessing stage meteo data must be calculated with the option Photolysis_option set to 3 2 secondly the OPAC package must be downloaded Operations that must be followed to downloaded it are given Section 7 4 1 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 initial_condition_aerosol Fields Filename boundary_condition_aerosol Date_min Delta_t Fields Filename deposition_velocity_aerosol Fields Filename point_emission_aerosol file surface_emission_aerosol Date_min Delta_t Fields Filename volume_emission_aerosol Date_min Delta_t Nz Fields Filename meteo meteo Date_min Delta_t Fields Filename Comments If initial conditions are activated With initial condition aerosol If boundary conditions are activated With boundary_condition aerosol If deposition is activated With_deposition_aerosol and de position velocities are not computed Compute_deposition_aerosol set to no Path to the file which defines the point emissions If point emissions are activated With point emissions aerosol If surface emissions are activated With surface emission aerosol If volume emissions are activated With_volume_emission aerosol Nz is the number of levels in which pollutants are emitted If photolysis rates are
63. 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 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 tmin 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 xmin Abscissa of the center of the lower left cell longitude in degrees Delta_x St
64. 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 183 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 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 4 Then compile MM5 m
65. used to define paths that will be referred later on and domain contains the domain definition along with its space and time discretization 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 meteo 28 CHAPTER 2 USING POLYPHEMUS Should the surface Richardson number be computed taking
66. 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 10ms e Urban environment B 3 SIMULATIONS 191 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 paths 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 scre
67. 10 Deciduous Broadleaf Forest 11 Deciduous Needleleaf Forest 12 Evergreen Broadleaf 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
68. 2 for photolysis rate computation in the meteo prepocessing stage or put 3 if photolysis rates are to be computed on line in the processing stage then only cloud and ice optical depth are computed Attenuation_Type Parameterization to be used to compute cloud attenuation for Pho tolysis_option 1 Put 1 to use RADM parameterization or put 2 to use ESQUIF parameterization Species List of photolysis rates output for Photolysis_option 2 Ice_cloud If Photolysis_option 2 or 3 is chosen should ice cloud data be taken into account clouds Critical_relative_humidity Two options are available for computing critical relative humidity 1 for sigma parametrisation and 2 for two_layers parametrisation Min height Minimum cloud basis height in m 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 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 ECMW
69. 3 provide no end date nor duration In that case a duration of one day 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 58 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
70. 5 6 Y 8 9 10 11 12 13 14 15 16 17 1 1 0 1 0 1 0 1 0 1 0 1 01 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 CB05 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 paths 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 Land_data Data file giving emission factors f
71. 900 e 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 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 90 CHAPTER 3 PREPROCESSING paths Directory_bc Directory where output will be written 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 verti
72. AIN 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 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 0 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 COARSE
73. Configuration Files Ri ee ek u a aea Ruining the Programs cupra a OE ee a De ee 2 5 1 Running a Program from Command Line 2 5 2 Sharing Configuration s esale soria RG a eee ad 2 5 3 Notes about the Models 2 2 666254 be See eee 2 5 4 Running a parallelized program oaoa 00048 Setting Up a Simulation 22 eee wR ee eee 2 6 1 Suggested Directory Tree ee ee 26 2 R adM PS 4 54 04 8000 Roe EO a ee we ee eae 2 6 3 Mandatory Data in Preprocessing 2 2020004 2 6 4 Mandatory Data for Models 0 2 0 00 eee eee ees 2 6 5 Models Modules Compatibilities 54 04 454 404 64 55 Checking Results sor sns ea a peers eae oe ee eee ae a Se eee 2 7 1 Checking the output file size of preprocessing programs 2 7 2 Checking the output file size of processing programs 273 Checking the val es s s Sa socane eras ek ae oe a Usci l Tool o s c toeg aoi RR eS ar OE HOR a Ee ee eS ee Be we 2 8 11 11 12 12 14 14 15 15 16 16 17 17 CONTENTS 2 8 1 Information about Binary Files o o 43 2 8 2 Differences between Two Binary Files 44 289 MMS Piles s iacr ee tona a ma a ae a a Bae a 44 28A CTIPL calldates no saa eae a A A A e 48 200 Other Utilities loo a a a ee EG a a Se ee 49 2 9 Ensemble Generation a 49 2 9 1 Requirements ee 49 29 2 Conbegurati n Piles s s e sa ace a a a
74. Construct file or makefile may need changes too If you are not confident with your own changes have a 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 com
75. DIX 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 Reading 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
76. Domain aer 4 9 3 SaverUnitSubdomain and SaverUnitSubdomain_aer 49 4 SaverUnitDomainsassimilation lt s gt si o d ee ee a so sa a dona ai 4 9 5 SaverUnitDomain_prediction a 4 9 6 SaverUnitNesting and SaverUnitNesting aer ooo 4 9 7 SaverUnitPoint and SaverUnitPoint_aer o a 4 9 8 SaverUnitWetDeposition and SaverUnitDryDeposition 4 9 9 SaverUnitWetDeposition_aer and SaverUnitDryDeposition_aer 4 9 10 SaverUnitBackup and SaverUnitBackup_aer 4 4 10 Observation Managers c eas 2 Tibo a d iaa aad 4 10 1 GroundObservationManager a 4 10 2 SimObservationManager 0 a 4 11 Perturbation Manager 5 Models Bol GABIAS vagando Be A a we a we DTA 5 1 1 Configuration Filet plume cfg o osos rt See oes 5 1 2 Source Description plume source dat oo 5 1 3 Vertical Levels plume level dat o 5 1 4 Species gaussian species dat 14 65260 hGH Re eee eae 5 1 5 Meteorological data file gauussian meteo dat 5 1 6 Correction coefficients file correction coefficients dat Da GaussiamPhimeaer carne a aaa aE da 5 2 1 Configuration File plume aer c B8 5 2 2 Source Description plume source_aer dat o o ooo 5 2 3 Vertical Levels plume level dat o 0 2 4 Species gavssian species_aer dat 2 6 ci RR 5 2 5 Diam
77. ES 135 5 1 1 Main Configuration File polair3d cfg lt 135 9 1 2 Data Description polair3d data C E coco 1 a eS 137 5 7 3 Vertical Levels and Species o e ee tenes 138 Polars DChemistryvAgsim Cont a a aa e 138 Castor TranspOrt osas ias e a Paw aa A Se eck doe A 139 5 9 1 Main Configuration Wile castorccig ee eR eG 139 232 Date Description castor data c E 248 3 68a whee nr 139 5 9 3 Vertical Levels and Species ee ee eee 140 CastorChemistry 2 20 22 020422 RR LG eae 140 5 10 1 Main Configuration File castor C E oo 22 eee ema 140 5 10 2 Data Description and Species o e e 140 5 10 3 Chemistry Pileg s pacs s ae mani a a 284 aaa A 141 Piume DGrnd ii hee ee a p ee ns Se eee a a ae da aa 141 5 11 1 Main configuration file 0 5652 au ea moa doaa ee eee 141 5 11 2 Data description file lt gt s sa sace cx aaa 4 2 2 142 5 11 3 Puff configuration file puff cfg when GaussianPuff is used 143 5 11 4 Plume configuration file plume cfg when GaussianPlume is used 144 Stationary Model s r sce e Pa ee ee EG aia a ae edo P a wae 144 Lagrangian Transport 2 2 cors sg rion eana kooi a e a h a a a 145 5 13 1 Main Configuration File lagrangian stochastic cfg 146 5 13 2 Data Description lagrangian stochastic data cfg 146 5 13 3 Vertical Levels and Point Emission o o 147
78. ES 159 6 3 1 Aerosol SIREAMSORGAM e 159 6 3 2 Aerosol SIREAMAEC 00002 eee ee eee eee 161 O ia dies eee a be owe es ba bE Bad ee ee ee ak 162 7 Postprocessing 163 TL Graphical Output 45 65 4442 6252 e FR Ee ee So ee See A 163 7 1 1 Installation and Python Modules o o e 163 7 1 2 A Very Short Introduction to Python and Matplotlib 165 7 1 3 Visualization with AtmoPy i kri edenes 167 7 2 Postprocessing for Gaseous Species 2 o 170 7 2 1 Configuration File lt o aso esaea oc eedonia dabaa ti natah 170 12 2 PERDON ISLAN ssi rad spie riaa we ee ee ew 171 T POPL A E 171 To Postprocessing for Aerosols en c ka miedu soe AE ee a a Pee ee ee 172 1 31 Configuration Fil lt oas sv aos aace a Ree ee a e a GE 172 10 2 Deript init aerosol Py s a 244 sw A ag aS 172 1 0 3 Opt Graph 2erosolepy sqa cepa ia da ee ee a es 173 7 4 Computation of Aerosol Optical Parameters 173 TATL OPAC Package ooo oto ds id a A 173 7 4 2 Tabulation of a Mie Code anaa aaa e 174 7 4 3 Computation of Optical Parameters a soos a 174 7 0 Ensemble Forecasting 2 244 coreg otes da 04 aoid be a a RR RG See 176 7 5 1 Loading Data Configuration File and EnsembleData 176 7 5 2 Sequential Aggregation ee ee 178 T6 Liquid Water Content Diagnosis cesos ea ee AP eae 179 7 6 1 Configuration File water plume cig lt o e lt l
79. F file for a given day the ECMWF 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 ice water content 247 if Ice_cloud true medium cloudi ness 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 temper ature skin temperature Richardson number surface Richardson number specific humidity liquid water content ice water content if Ice cloud true 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 first level wind module rain intensity in mmh convective rain intensity cloud height and photolysis rates data attenuation factors photolysis rates or cloud optical de
80. If yes the model will compute concentrations on the domain 5 1 GAUSSIANPLUME 121 Compute_list If yes the model will compute concentrations on the list of point in the file point dat Npmax Maximum number of point sources per line sources Used for the discretization of line sources when the wind direction is parallel to the source direction Discretization step Discretization step in meter Used for the discretization of line sources when the wind direction is parallel to the source direction Coordinates_computed_pointPath to the file containing coordinates of points that has to be computed used only with Compute_list If several savers are used the file must contains coordinates of all points from all savers Do not use the file point txt that is generated with the saver unless all coordinates are integer deposition Deposition model Model used to take dry deposition into account Chamberlain for Chamberlain model Overcamp for Overcamp model Nchamberlain Number of points to calculate the Chamberlain integral integer Relevant only when dry deposition with Chamberlain model is taken into account output 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 sum in the plume model In the puff model it
81. 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 Python 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 163 164 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 IPython and In 1 from pylab import In 2 plot C 5 81 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 W
82. M5 meteo castor preprocessing emissions chimere_to_castor preprocessing bio bio castor preprocessing dep 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 42 e Volumetric soil water layer 4 42 2 6 SETTING UP A SIMULATION 37 Temperature 3D 130 U velocity 3D 131 V velocity 3D 132 Specific humidity 3D 133 Snow depth 141 Stratiform precipit
83. MM5 corresponds to MM5 coordinates and latlon to latitude longitude coordinates 3 4 METEOROLOGICAL FIELDS Dot_coordinates Relative_humidity_threshold Low_cloud_top_max Min_dry Min_wet Min_above_PBLH Max 73 File containing coordinates of dot points Used if Horizontal_interpolation is set to latlon meteo Minimum relative humidity above which cloud are formed Low clouds maximum height in m Kz Minimum value of Kz in PBLH for dry conditions in 2 ms Minimum value of Kz in PBLH for cloudy conditions in ms Minimum value of Kz above PBLH in ms Maximum value for Kz in ms Among output files one may find e the altitude in meters e the air density AirDensity bin e the pressure in Pa Pressure bin e the temperature and temperature at 2 m in K Temperature bin and Temperature_2m bin e the meridional wind zonal wind convective velocity and wind module at 10 m MeridionalWind bin ZonalWind bin ConvectiveVelocity bin and WindModule_10m bin inms e the boundary layer height in m PBLH bin e the vertical diffusion coefficients using Troen and Mahrt parameterization Kz bin in m aa e the specific humidity in kgkg SpecificHumidity bin e the surface relative humidity SurfaceRelativeHumidity bin e the liquid water content in kg kg LiquidWaterContent bin e the cloud attenuation coefficients Attenuation bin e the soil mo
84. Names of inventory species Number of activity sectors Emission ratio for urban areas see below Emission ratio for forest see below 3 6 EMISSIONS Other_ratio File x_min Delta_x Nx ymin Delta y Ny N Aggregation Speciation directory 81 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 Deposition_factor_NH3 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 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 domai
85. 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 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 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 co
86. Polyphemus 1 9 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 R gis Briant http cerea enpc fr polyphemus polyphemus help lists gforge inria fr Contents 1 Introduction and Installation el I 1 3 2 1 2 2 2 3 2 4 2 5 2 6 2 7 Polyphemus Overview babu kop e ea a a E Ee a a e e aaa a Reqirenments rr ro ORS RE AL SY eee e a a eee 1 2 1 Operating Systems and Compilers o e e 1 2 2 External Libraries and Python Modules o 1 2 8 Parallel Computing c ss aaas essa as Tostalation a 6 Bk be a ee aa a a ee ae da a LSL Main mS uUCUonS e ocne 5 a a a A ee od e we a ES a g oar eh he aa e E Pe Poe ee hls TA See e 1 33 INEWRAM oo d cas co a ee a e a Pe ee a A L34 WGRIB coso cios g ia i i oa ed i ra a 13 5 ISORROPIA 00 ese so es aa ee eG ee eee Re eS 1 3 6 ISORROPIA AEGC aa ba eee wee Pa ee Ea e ee har 1 3 7 Fortran Subroutin s s ss 6 466 ee eee ba be dee eb Pek ees 2 Using Polyphemus REAK A OR ee De ee ee he Se EE Guide Overviews ek oe pee Oe Ok ew ee eee Pe es Compiling the Programs gt s eao ss 6 65 64 2 2 be ed eee ea eee a 23 1 Compiling with SCGNS 20 6 244 6444 24 wow e ba dace aed 4 2 3 2 Compiling with make e 2 3 3 Compiling for Parallel Computing Editing your
87. Puff with Aerosol Species o oo a a 194 BAS Gaussian Pull with Line Sourte 62 4 e a 22444444 a 195 Castor Test Case 197 C 1 Modifying the General Configuration File 0 0 00000 eee 198 C 2 Computing Input Data ss s a saa ceed eee ee Ae RE ES 198 GI band Data se ransa aap we eo aK eS eb eo ee a em A ee 198 C 2 2 Meteorological Data e 198 G23 Anthropogenic Emissions lt a a nd a a 199 G24 Biogenic Emissions oc k a Soe a a See e 199 0 29 Summing Emissi s e o s e s a E ae ae a eS 200 02 6 Deposition Velocities o e sse s dra a da 200 C27 Boundary Conditions lt o s o sad edee wi a e oboe sra a 201 C 3 Launching the Simulation lt o a sa sasaaa da aao a A 202 C 3 1 Modifying the Configuration Files aoaaa 202 Co la sssusa we Ee a OS oe hee eee k Ge ee ne 202 C 3 3 Checking your results a 203 C 4 Visualizing the Results 2 04 6 6 eb ee eee eR ee ee 203 Lexical Reference of Polyphemus Configuration Files 205 Dal Denmtions 224 24 4286 64 4 6 AS Be eee awe PG we AOA SS as 205 EZ FACING a Swe be ee ae Be ee Da Be eee Pe be Ge eS 205 D3 COMMIS do a Bk oe ee Sh we we BUS pone OR Bee Bg dom Mie h k a aii 206 DA Markos ees sa r emaa See Be ee Soe ee Oe Re ee a a 207 DO DECHO S er e ie ee lada aaa Eee ee 207 DO Multiple Files ee d s seso BE ke ae a GO ea oe a ce a 208 Dy D css aaa Be eee ee PA ae ae a be a 208 DE BODAS s see re Bd ow bode ho
88. 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 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 2 EnsembleMean ensemble mean 7 6 10 11 12 13 14 15 16 17 18 19 20 LIQUID WATER CONTENT DIAGNOSIS 179 EnsembleMedian ensemble median ELS least squares ensemble a posteriori method ELSd least squares ensemble per time round a posteriori method ELSAN least squares ensemble per time round with learning period also known as su perensemble Krishnamurti et al 2000 ExponentiallyWeightedAverage ExponentiatedGradient ExponentiatedGradientWindow and 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 or
89. 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 16 CHIMERE 151 5 15 4 Continuous line emission The continuous _line 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 Coordinate file 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 Species Iodine Caesium Type continuous_line Date_beg 2001 01 01_01 00 00 Date_end 2001 01 01_04 00 00 Coordinate_file line emission dat 5 16 Chimere Polyphemus provides a C interface to the chemistry transport model Chimere http www 1lmd polytechnique fr chimere This interface allows to plug Chimere to Polyphemus drivers and to Verdandi assimilation methods Note that contrary to Castor the interface is not a reimplementa
90. 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 209 Months range from 01 to 12 Days range from 01 to 31 Hours range 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
91. URE ACCUMULATED CONVECTIVE PRECIPITATION ACCUMULATED NONCONVECTIVE PRECIPITATION TERRAIN ELEVATION MAP SCALE FACTOR MAP SCALE FACTOR CORIOLIS PARAMETER INFINITE RESERVOIR SLAB TEMPERATURE LATITUDE SOUTH NEGATIVE LONGITUDE WEST NEGATIVE LANDUSE CATEGORY SEA SURFACE TEMPERATURE PBL HEIGHT PBL REGIME SENSIBLE HEAT FLUX LATENT HEAT FLUX FRICTIONAL VELOCITY SURFACE DOWNWARD SHORTWAVE RADIATION SURFACE DOWNWARD LONGWAVE RADIATION TOP OUTGOING SHORTWAVE RADIATION TOP OUTGOING LONGWAVE 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 SNOW COVER ALBEDO GROUND HEAT FLUX AS SS SIN HS 0NnNe 2 8 USEFUL TOOLS VEGFRC 2 76 86 c YX fraction SEAICE 2 76 86 G YX DIMENSIONLESS SFCRNOFF 2 76 86 c YX mm UGDRNOFF 2 76 86 c YX mm T2 2 76 86 C YX K Q2 2 76 86 YX kg kg 1 U10 2 76 86 C YX m s 1 V10 2 76 86 C YX m s 1 ALBD 2 27 2 CA PERCENT SLMO 2 27 2 CA fraction SFEM 2 27 2 CA fraction SFZO 2 27 2 CA cm THERIN 2 27 2 CA 100 cal cm 2 K 1 s71 2 SFHC 2 27 2 CA J m 3 K 1 SCFX 1 27 CA fraction SIGMAH 1 25 H S sigma Total number of time steps read in th
92. _life 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 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 deposition described in Se
93. able to compute wet diameters depending on the option Wet_diameter_estimation If set to Isorropia the aerosol liquid water content computed by 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 6 3 AEROSOL MODULES 161 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 option Thermodynamics module but only in a full equilibrium configuration Fixed_cutting diameter is the maximum diameter generally 10 um 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 f90 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 giv
94. ace numbers and may be based on preexisting fields x_min 12 5 Delta_x 0 5 Nx 100 y_min lt x_min gt Delta_y 1 Ny lt Nx gt 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 208 APPENDIX 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 zmin 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 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
95. acle 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 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 180 Path Temperature Pressure SpecificHumidity LiquidWaterContent source temperature source water_content Option Unit LiquidWaterContent CHAPTER 7 POSTPROCESSING meteo Path to the meteorological data files Temperature file Pressure file Specific humidity file Liquid water content file parameters Liquid water potential temperature in K at source Total water content at the source mass fraction output Should the liquid water content in the plume only option plume or in the plume and the ambient air option total be computed Unit of the output Put a for gkg and b for gm Output file name file containing the field of liquid water mass fraction The water content diagnos
96. agrangianTransport 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 148 CHAPTER 5 MODELS 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 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 lagrangian 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 di
97. al profile must be used for Gaussian emis sion with GaussianPlume only Set to yes if Gaussian emissions are proportional from one species to another for all sources If yes only one emitted species must be specified in the source file others are specified below This field is required if Proportional_emission is set to yes It must contains the name of the emitted species associated with a multiplicative factor all on the same line that will be applied to the emitted species of the source file 142 CHAPTER 5 MODELS 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
98. alculated efficiently using adjoint model of the underlying model The algorithm parameters are set in section 4DVar Display_precision Jb_file Jo_file Gradient_norm_file With_trajectory_management Trajectory_delta_t Trajectory file With_background_item Read_inverse_background matrix File_background_inverse_matrix File_background_matrix 4DVar Display precision for optimization results Name of the file that saves background departure during op timization Name of the file that saves observation discrepancy during optimization Name of the file that saves gradient norms during optimiza tion If the trajectory of model integration is saved to disk for ad joint integration Trajectory time step in seconds Name of the file that saves model trajectory If the background term is taken into account in the cost func tion Should the inverse of background error covariance matrix be read from disk Name of the file that stores the inverse of the background error covariance matrix Name of the file that stores the background error covariance matrix The parameters for numerical optimization algorithm are set in section Loptimizer 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 during iteration
99. 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 185 As before check the paths and dates In particular if the dates in any section except for photolysis see below 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 fo
100. ar MM the month and DD the day of the date given in command line 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 directory where the photolysis rate model FastJ and its parameter files can be found Directory where output meteorological files are stored Directory where output files related to photolysis rate calculation 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 meteo Should meteo data be computed accumulated_rain Is the rain accumulated from the previous day photolysis_rates Should photolysis rate related data be computed 3 4 METEOROLOGICAL FIELDS 79 Photolysis_option Attenuation_Type options for photolysis rate computation 3 choices are available put 1 for attenuation compute cloud attenuation a coefficient that range between 0 and 2 put 2 for photolysis rate computation in the meteo prepocessing stage or
101. ared 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 written on disk in simple precision so that on restart you cannot avoid roundoff errors between simple and double precision 4 10 OBSERVATION MANAGERS 117 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 GroundO
102. ata that may differ are the paths to the 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 5 5 POLAIR3DTRANSPORT 129 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 sim
103. ated In the following table all possible sections are listed with their entries Section initial condition boundary_condition meteo deposition Entries Fields Filename Date_min Delta_t Fields Filename Date_min Delta_t Fields Filename Date_min Delta_t Fields Filename Comments If initial conditions are activated With_initial_condition If boundary conditions are activated With_boundary_condition 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 If deposition is activated With_deposition 132 point_emission file surface_emission Date_min Deltat Fields Filename additional_surfa Date_min Delta_t Fields Filename volume_emission Date_min Delta_t Nz Fields Filename scavenging Fields CHAPTER 5 MODELS Path to the file which defines the point emis sions described below If point emissions are activated With_point_emissions If surface emissions are activated With_surface_emission If surface additional emissions are activated 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
104. ation Large scale precipitation accumulated 142 Convective precipitation accumulated 143 Snowfall convective stratiform accumulated 144 Surface sensible heat flux accumulated 146 Surface latent heat flux accumulated 147 Logarithm of surface pressure 152 Boundary layer height 159 Total cloud cover 164 2 meter temperature 167 Surface solar radiation downwards accumulated 169 Surface solar radiation accumulated 176 East West surface stress accumulated 180 North South surface stress accumulated 181 Evaporation accumulated 182 Low cloud cover 186 Medium cloud cover 187 High cloud cover 188 Skin temperature 235 Forecast albedo 243 Cloud liquid water content 3D 246 Cloud ice water content 3D 247 Cloud cover 3D 248 Not all data may be required depending on the programs you actually run 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 38 CHAPTER 2 USING POLYPHEMUS Table 2 3 Mandatory data for each models Model Data necessary Castor Transport Temperature Pressure Altitude AirDensity Meridional Wind Zo
105. ation 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 at http cerea enpc fr polyphemus or at http gforge inria fr projects polyphemus Polyphemus development and support team can be contacted at polyphemus helpOlists 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 helpClists 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
106. ave just installed one of them or because you logged in another computer with a different installation launch SCons with option 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 w
107. be provided after the entry Filename This is the case for VerticalDiffusion in the previous example 5 5 POLAIR3DTRANSPORT Note that 131 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 CO 0 002 u cergrene A mallet 2001 data dep 2005 01 19 ALD modified bin 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 activ
108. bon_treatment 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 Option to compute the index of an internally well mixed mixture Put 1 to use the chemical formula or 2 for Lorentz Lorenz formula 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 176 CHAPTER 7 POSTPROCESSING 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 x and that the correspond ing observation is y One may try to forecast the time round T 1 with a linear combination of the models predictions Y7 1 Ss Um T 1 Tin 7410 The weights vm r41 of the ensemble forecast yp are computed with all x 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
109. bservationManager 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 tude and altitude amp s in path names is replaced by species name specified in general section Input_directory Directory where the observations are stored 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 data
110. by default 4 by default 4 reinjection criterion is based on the puff horizontal size or interpolated at the puff center yes With_reinjection_time is set to yes Horizontal_coefficient Coefficient by which to multiply oy to obtain the puff horizontal Vertical_coefficient Coefficient by which to multiply o to obtain the puff vertical size With_reinjection time Is puff reinjection forced after a given time if set to no the With interpolation Are meteorological data taken at the center of the puff cell no Reinjection time Reinjection time in seconds after the puff emission used only if 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 used only with GaussianPuff 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
111. by the value of the corresponding scavenging coefficient or 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 gas1 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 aer1i_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 aer1i_0 2 11708 aeri_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 102 CHAPTER 3 PREPROCESSING 0 1 um The value following
112. c 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 Directory_mozart 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 3 8 BOUNDARY CONDITIONS 87 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 x min 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 Number 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
113. c_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 03 done NO done N02 done HNO3 done PAN done H202 done CO done CH4 done HCHO done C2H6 done 202 APPENDIX C CASTOR TEST CASE 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 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 s
114. cal 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 um 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 lines in previous section must equal the number of columns after delimiter The numbers in these columns are the 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
115. chnical Report DMA 07 08 Ecole normale sup rieure de Paris 211 212 BIBLIOGRAPHY 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 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 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
116. cifically 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 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 xml 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 In addition to the domain definition Section 3 2 2 below is the information required in the configuration for ic see example ic cfg ic_input domain Date_ic Date for which initial conditions are generated Nt Number of time steps in Mozart 2 files integer Delta_t Time step of
117. ckground 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 represen tation The algorithm parame
118. computed on line Computed_photolysis set to online re quired files are CloudOpticaldepth and IceOpticalDepth 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 138 CHAPTER 5 MODELS 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 PARO1 PARO2 PALK1 POLE1 PAPI1 PAPI2 PLIM1 PLIM2 PPOA PH20 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
119. 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 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 194 APPENDIX B GAUSSIAN TEST CASE Nt is normally the number of time steps Here as it is a stationary simulation it should be equal to 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 y
120. ction 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 5 1 GAUSSIANPLUME 123 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 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 10 4s 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 whatever the standard devia
121. cussions 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 Vehkam ki H Kulmala M Napari 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 BIBLIOGRAPHY 213 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 Yarwood G Rao S Yocke M and Whitten G 2005 Updates to the carbon bond chemical mechanism CB05 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 En
122. d 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 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 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 Mishchenko in Tombette et al 2008 the Mie code of W J Wiscombe Wiscombe 1980 was used If you previously runned polair3d siream sorgam wit
123. d for vertical diffusion in m s Lower threshold for vertical diffusion over urban areas in m s Higher threshold for vertical diffusion in m s 2 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 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 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 3 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 c
124. dae A S 50 293 Quick SN ica la ek Bake ee a A a a 53 Preprocessing 55 A o d 44 224 e REG ER ERA hehe eee a ea ba oo we a 55 Oe IGOR MCHON ee ke ee aon oe oe eee Ge eae ee ee Oe ee ES 55 3 2 1 Running Preprocessing Programs o 55 322 COMBCUDATION os i603 lae ice r bee ba dedeG ee a h 56 gee DOES o wid wel KY AG eee ea he oe ead Be be Sw 57 Goes Data E ed eek ae a OA a a a de ee e 58 So Ground Daka E 58 3 3 1 Land Use Cover GLCF Tuc glef coccion ida esas 58 3 9 2 Land Use Cover USGS Lue 088S o e scaccu casa ira 59 3 3 3 Conversions luc convert ss sss sd ater ewe eee 61 334 Roughness TOURS p cocos aa sa a A AA 62 ooo LUC for emissions xtractsglcf so we ee awad a 62 aL Meteorological Fields ocurra a Oe e ee pe ee a 63 ol Program meten o ooge e RP woe a ee a a RR we 63 G2 a o A A AAN 66 sao a a ANNE 67 SAA Program BMS MeLeO ceba a oa RU e a ee toe os 69 3 4 5 Program MMD meteo castor e 72 O40 Program WAR MELBO 2 io a E E A ee ee ae es 74 3 0 Depositar Velocities oo sc moe a a Aa eho 76 ool Progra Ger s dc e GR e eR da es ee a a 76 35 2 Program dep embersom pu css a ee we ae 78 oO IESO Tc ea Rb ee Re a BS a a ee 78 3 6 1 Mapping 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
125. del 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 Geophysical 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 Te
126. del see the Section describing it The differences are only in section domain and two additional sections stationary and convergence domain from what is normally defined here from what is normally defined here stationary Nt Number of time steps for the simulation Delta t Time step of the simulation in seconds convergence Norm Norm used to check convergence one two or infinity Method Method used to normalize the norm mean or max Epsilon Convergence criterion for instance 1 e 4 Nt Maximum number of iterations of the underlying model This is different Delta_t Time step of the internal loop internal time step This is different 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 configuration 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 146 CHAPTER 5 MODELS 5 13 1 Main Configuration File lagrangian stochastic cfg The main confi
127. del 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 QptimalInterpolationDriver 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 observations 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 The value of Configuration file can be set to observation cfg if yo
128. described in Section 5 1 The only data that may differ are the paths to the input files 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 GAUSSIANPUFF 125 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
129. directory you need to have the scripts compile_run py and run py and a SConstruct file In your working directory follow these steps 1 In Sconstruct and run py set the variable polyphemus_path to the Polyphemus direc tory 2 Put or copy your configuration script chimere sh in the working directory 3 Edit chimere sh to set the variable chimere_root to the Chimere path 4 If you use the parallel version run lamboot as usual 5 Run the script run py chimere cfg after you properly configured in chimere cfg see below 5 16 2 Configuration The configuration file for the script run py called chimere cfg by default is described below Configuration Date_min Delta t Nt x min Delta_x Nx ymin Delta y Ny Nz Vertical_levels Species Species_aer Bin_bounds Nreac Data_description chimere Path to the configuration file for the main program domain Starting date in any legal format see Section D 7 Put 3600 because Chimere always advances by an hour Number of timesteps integer that is number of hours Abscissa of the center of the lower left cell Provide a longitude in degrees 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 defin
130. 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 cfgis 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 gt is the index of the size bin But often measurements are aggregated data e PMjo and PM 5 are the mass of aerosol with a diameter smaller than 10 um and 2 5 um respectively e Total mass of one chemical component 7 4 COMPUTATION OF AEROSOL OPTICAL PARAMETERS 173 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 an
131. e 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 Use equal sign between a field and its value if the value is a number 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
132. e 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 3 9 PREPROCESSING FOR GAUSSIAN MODELS 97 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 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 the species
133. e Talos include SeldonData If you do not want to define a variable remove the line where it is defined or write linker None 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 variabl
134. e are set the command line option overwrites the variable in the SConstruct file Variable Content Command line 24 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 h
135. e concentration and K is the diffusion matrix 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 130 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 CHAPTER 5 MODELS 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
136. e ee SO A Ee ES ee or ae bdo SX 209 Chapter 1 Introduction and Installation 1 1 Polyphemus Overview Polyphemus Mallet et al 2007b is an air quality modeling 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 E 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 libra
137. e file 97 For each variable is provided its name its number of dimensions its length along dimension 1 if applicable its length along dimension 2 if applicable its length along dimension 3 if applicable its length along dimension 4 if applicable the position at which the variable is given Stag 47 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 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 its dimensions ordering its unit or DIMENSIONLESS 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 Max 271 911 327 747 Mean 294 112 Std dev 6 46779 TestCase raw_data MM5 gt get_info_MM5 MM5 2004 08 09 ALB 48 CHAPTER 2 USING POLYPHEMUS Min 0 0738 Max 0 8 Mean 0 122658 S
138. e 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 3 9 PREPROCESSING FOR GAUSSIAN MODELS 95 Temperature Celsius degrees 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 others is
139. e 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 Eulerian time step The number N of iterations for the Gaussian model performed at each iteration of the Eulerian model is therefore computed as At i N max SFE 1 5 1 AtGaussian the time step of the Gaussian model Delta_t in file puff cfg Atpug is the time step between two puff emissions and AtEulerian is the time step of the Eulerian model given in the main configuration file In short it is ensured that Atpug gt AfGaussian and AtGaussian lt AtEulerian Where AfGaussian iS 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 configurat
140. e 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 10 10 10 Lato Abe bch 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 a 1 2 Calculation without the first column 18 18 4 8 Matplotlib gt gt gt from numpy import gt gt gt from pylab import Loads Matplotlib gt gt gt x arange 10 dtype d gt gt gt y Xx 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 gt gt gt plot x y k for a dotted line 7 1 gt gt gt gt gt gt gt gt gt gt gt gt gt gt gt gt gt gt gt gt gt 7 1 GRAPHICAL OUTPUT 167 clf Clears the figure plot x y k label Simple
141. e way the dispersion of the pollutants inside a cell is modelled e to simulate the dispersion of passive 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 S
142. ection 6 3 2 for details Which parallelization do fit to your needs We decided to give you the choice between several parallel computing alternatives 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
143. ed using Directory_roughness Roughness_out Roughness_data_file luc glcf or luc 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 latlong 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 63 File_GLCF File_out xmin Nx ymax Ny Step x min Nx ymin Ny paths GLCF input file global It is the same as the one used for luc glcf Out
144. el 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 of Monte Carlo simulations for
145. elocity is stored File where the attenuation is stored File where the aerodynamic resistance is stored File containing the land use cover Number of land use cover categories Number of vegetation classes File containing land data in Chimere format File containing the data for species molecular weight Henry con stant reactivity Directory where the output files are stored Species 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 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 EMISSIONS 79 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 distribution 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
146. en as 1 9 m3 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 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
147. en 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 it 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 189 190 APPEN
148. en 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 lodine 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 0 Maximum 3 3259 Mean 0 0236683 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 lodine 192 APPENDIX B GAUSSIAN TEST CASE 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 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
149. 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 207 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 define 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 repl
150. ent runs Notice that Polyphemus directory includes the version number or the date This is very useful 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 dr
151. entrations are saved is to be written during the simulation This looks like Type indices_list 114 CHAPTER 4 DRIVERS 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 0 0 0 2 0 0 0o 5 15 2 5 15 O 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 Npoin 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
152. ep length along x in degrees longitude Nx Number of cells along x integer ymin Ordinate of the center of the lower left cell latitude in degrees Delta y Step length along y usually in degrees latitude Ny Number of cells along y integer Nz Number of vertical levels integer station file File describing the stations station file type Type of station file Emep Airbase BDQA Pioneer obs_dir Directory where observations are stored output t_range Range of dates standard format see Section D 7 over which con centrations and observations should be considered 7 5 ENSEMBLE FORECASTING 177 concentrations paired select_station measure cutoff ratio 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 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
153. eposition 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 coefficient is constant for one given diameter and entered in the species file 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 velocity is constant for one given diameter and entered in the species file 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 constant values pro
154. er Several meteorological fields are computed with ComputePotentialTemperature ComputeSaturationHumidity and ComputeSurfaceHumidity_diag If fluxes are not di agnosed the Monin Obukhov length is computed 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 3 4 METEOROLOGICAL FIELDS 69 coefficients are computed with ComputeTM_Kz The main output is a 3D time dependent field format t z y xj 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 4 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 prog
155. er number see species list above e Q 3 dimensional concentration of tracer nn e 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 3 8 BOUNDARY CONDITIONS 89 Important e If you plan to read Gocart data on your own do not forget to translate files from big endian to little endian if necessary e 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 on the year e 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 00950000 e 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 00997
156. es the precision of the computation of the line source width along with the computational time If yes a simple NO2 chemistry will be computed Species NO O3 and NO2 are required to use this option and the mass unit of all input value should be ug to be coherent with kinetics constants If yes a simple chemistry mechanism for OH will be computed Species BUTA NO2 HCHO and 03 are required to use this option and the mass unit of all input value should be ug to be coherent with kinetics constants 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 about 200 meters Plume_rise_parameterizatiorParameterization used to compute the plume rise HPDM Holland File meteo File _ source File_correction Compute_domain 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
157. es vertical levels interfaces Path to the file that defines gas phase species Path to the file that defines aerosol species The bounds of the diameter classes for aerosol species Note that the classes are the same for each aerosol species Number of gas phase reactions data Path to the file that lists all emitted anthropogenic species all emitted biogenic species the number of ver tical levels in the emissions and the names of the species families display 5 16 CHIMERE Show_iterations Show_date Configuration file 153 If activated each iteration is displayed on screen If activated the starting date of each iteration is dis played on screen in format YYYY MM DD HH 11 notations from Section D 7 output Path to the configuration for the output saver 154 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 SplitAdvectio
158. eteo 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 APPENDIX A POLAIR3D TEST CASE E 00 nse SpecificHumidity Liquid Water content CloudHeight SurfaceTemperature SkinTemperature SoilWater SensibleHeat Evaporation SolarRadiation Rain FrictionModule BoundaryHeight done Computing Kz done Computing PAR done Writing data done t t t 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
159. eter cfg p GenerateldEnsemble You can save your ensemble identities in a file or load them from a file with these two methods p WriteldEnsembleFile id_ensemble dat p ReadIdEnsembleFile id_ensemble dat copy True 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 54 CHAPTER 2 USING POLYPHEMUS For example In 1 d ConfiReplacement GetConfigVariable model_index 0 ensemble_program In 2 d Out 2
160. eters diameter dat a ee eee eee 5 2 6 Meteorological data gaussian meteo dat 0 0 0 oe Gassan Pan 1250 Ses BON GE Se ES ee BS aue PA So eee EH 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 119 5 4 5 5 5 6 5 7 5 8 5 9 5 10 oi 5 12 5 13 5 14 5 15 5 16 CONTENTS 5 3 1 Configuration File puff cfg xen Sed SE Rae OE Se eee 125 53 2 Puf Description puff dat ooo o ace d k h e aane bi 126 5 3 3 Vertical Levels Species and Meteorological data 126 Gaussian Pu aef i ena otoke oe ee ia ead eee a a he td 127 54 1 Configuration Wile puff aer C E scoed srice a nerro aia 128 5 4 2 Source Description puff aer dat 128 5 4 3 Vertical Levels Species Meteo and Diameters 128 Polars D Transport lt sose ios tasar a A 129 5 5 1 Main Configuration File polairad fig i o 2 dei ee eee 129 5 5 2 Data Description polair3d data cfg 130 5 5 3 Vertical Levels and Species 02 020000 eee eee eee 132 PoleirgDChemishty sss cies os rias Be ROR Bi a Bw ba 133 5 6 1 Main Configuration File polair3d cfg 246 64 asnon eua bees 133 5 6 2 Data Description polair3d data cfg 134 5 6 3 Vertical Levels and Species o ee eee 135 Polar 3DAETOSOL a as e me rr A ee ee
161. f 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 181 182 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 Other 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
162. f type Castor only require one transport module which deals with 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 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 40 CHAPTER 2 USING POLYPHEMUS Table 2 4 Compatibility between models and transport modules AdvectionDST3 DiffusionROS2 TransportPPM Polair3D Transport X X Polair3DChemistry X X Polair3DAerosol X X Polair3DAssim X X PlumelInGrid X X CastorTransport X CastorChemistry X SplitAdvectionDST3 GlobalAdvectionDST3 GlobalDiffusionROS2 Polair3DTransport X X X Polair3DChemistry X X X Polair3DAerosol X X X Polair3DAssim X X X PlumelInGrid X X X
163. ffusion used in the mass distribution named Gaussian_kernel_horizontal_diffusion In the ETEX case of Wendum 1998 the first field was set to 25000m s7 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 following 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 fi
164. fg below are the entries for Kz_TM path Directory_Kz_TM Name of the directory where the vertical diffusion coefficients out put are stored the filename being Kz_TM bin LUC_file 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 68 Sea_index Urban_index Roughness_file Directory_meteo File_Kz Directory_Kz_TM Min Min_urban Max Apply_vert P C SBL Ric Fluxes diagnosed BL_diag Perturbed_BL TM_stable CHAPTER 3 PREPROCESSING Index of sea in land categories It is O 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 s Lower threshold for vertical diffusion over urban areas in m Higher th
165. 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 from diverse available sources e g mo
166. 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 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 nt1 nt2 nn 0 end do enddo where e imx total number of longitudinal grid 144 e jmx total number of latitudinal grid 91 e Imx total number of vertical layers version dependent e nmx total number of species 4 or 5 see species list above e ntl yyyymmdd after 2000 year month day e g 20010201 or yymmdd before 2000 e g 970101 e nt2 hhmmss hour minute second e g 120000 e nn trac
167. get 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 Next you have to edit include newran include h and uncomment the line define use_namespace define name spaces That is remove the first two slashes 16 CHAPTER 1 INTRODUCTION AND INSTALLATION 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 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 ver
168. 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 Performance 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 SC
169. gle 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 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 44 CHAPTER 2 USING POLYPHEMUS 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 par
170. guration file lagrangian stochastic cfg gives information on the domain def inition and the options of the simulation Date min Delta_t Nt x min Delta_x Nx ymin Delta y Ny Nz Vertical levels Species With_air_density With_point_emission Data description Horizontal _diffusion Configuration file 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 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 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
171. h the option Computed photolysis set to online you already had to install the OPAC package and you can directly go to the Tabulation of a Mie Code subsection 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 include opac directory from the web address ftp ftp 1lrz muenchen de pub science meteorology aerosol opac index html Untar the file by making cd Polyphemus include opac 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 cd optdat atils replace_string gt 174 CHAPTER 7 POSTPROCESSING 7 4 2 Tabulation of a Mie Code The next step is to tabulate the Mie Code The Mie of code of Mishchenko is directly included in the distribution packaged here include mie_code mishchenko To create the tabulation you have to go to the optics postprocessing to compile and execute the tabulation you may have to change the compiler name in scons to fit your platform cd postprocessing optics input Mie_tab scons compute_optic_tabulation Two files are then created Mish_Grid Mie dat and Mish_efficiency factors_tab_550 dat Warning the tabulation of the efficiency factors will then be done at the wavelength 550 nm unless you change the val
172. hat are specific to control the behaviour of a given object should be provided in the section it is related to and possibly in sections of 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 i
173. hat 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
174. her it is given directly or computed by adding the time interval to the beginning date is always considered as excluded 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 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 domain 30 CHAPTER 2 USING POLYPHEMUS 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 N
175. ilename 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 17 4 8 25 4 2 3 6 20 3 0 15 2 4 1 8 10 L2 5 0 6 o 10 20 30 40 50 0 0 Figure B 2 Puff visualization at time step 30 for species aerl and first diameter Third meteo rological situation Ground concentration in u g m 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 196 280000 257 240000 30l 200000 160000 15 120000 10 80000 40000 a Ground concentration at t 1s 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 u g m APPENDIX B GAUSSIAN TEST CASE 24000 21000 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 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
176. ill get your programs built the way you want OpenMP alone At first let us consider the case where you just want an OpenMP parallelization 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 poster
177. imes are set to 0 The equation involved is very similar to equation 6 1 except that the value of T y2 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 aerosol_species 158 CHAPTER 6 MODULES Aer1 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 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 z y 2 ACU z y 2 6 2 cp x y 2 where A is the s x s filiation matrix and C x y z crit yz with c x y z the chy z Y z concentration of species at time step n in point of coordinate x y z and s the number of species involved The parameters are
178. inary 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 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 COMPUTING INPUT DATA 201 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 boundary 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 y_min 90 Delta_y 2 Nz 19 73 zZ lt ll Input species Ns 14 Species bc species_inca dat b
179. 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 tet e ett ttt e eee tt The program creates 20 binary files in data emissions C 2 4 Biogenic Emissions Biogenic emissions are generated from meteorological data using program bio castor Launch the program with 200 APPENDIX C CASTOR TEST CASE 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 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 b
180. input land use categories is located File_in Input file name in Database_luc convert 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 or any number this first column is not read and the distribution of the input category 62 CHAPTER 3 PREPROCESSING 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 comput
181. 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 hc 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 discretized 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 lau
182. ion 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 144 CHAPTER 5 MODELS 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 the 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 11 4 Plume configuration file plume cfg when GaussianPlume is used In addition the Gaussian plume 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 plume cfg are the time step Delta t and the source information File_source is the path to the source file point or line sources to be
183. ions at ground provided for aerosol species With_volume emission aerosol Are volume emissions provided for aerosol species With_scavenging aerosol Is there scavenging for aerosol species With_in_cloud_scavenging Is there in cloud scavenging for aerosol species Collect_dry_flux_aerosol Are the dry deposition fluxes are collected in order to postprocess them if dry deposition is taken into account Collect_wet_flux_aerosol Are the wet deposition fluxes are collected in order to postprocess them if wet deposition is taken into account Options related to online photolysis rates only needed if Computed_photolysis on line Time_step_for_computing photolysis_rates time between two computation of photolysis rates Wet_computation_option Option to compute the aerosol wet refractive index from the dry refractive index Put 1 to use Hanel s relation or 2 to use aerosol water computed in the model 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 otherwise Directory_OPAC Path to the directory containing the OPAC data nor mally include opac optdat File_index_water Path to the file containing the water refrac tive indices at several wavelengths normally include opac index water _tab dat File_species_match Path to the file containing the corresponde
184. ior you might get to know it with the command mpiCC showme whereas the Fortran compiler associated to mpif77 is g77 3 xx you will have to deal with the GCC underscore problem for further details see 1 3 7 The command line shall be modified to utils scons py mpi yes _ 2 26 CHAPTER 2 USING POLYPHEMUS 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 1gfortran 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 consul
185. is 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 sitet 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 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 xjv
186. issions Chemical_mechanism Molecular_weights Polair_vertical_distribution Input_directory Hourly_factors Weekdays_factors Monthly_factors Time_zones Nx_emep Ny_emep Ncountries Species Nsectors Urban_ratio Forest_ratio 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 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
187. isture SoilMoisture bin e the aerodynamic resistance AerodynamicResistance bin e the friction velocity in ms FrictionModule bin 74 CHAPTER 3 PREPROCESSING 3 4 6 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 WRF meteo general cfg WRF meteo general cfg WRF meteo general cfg WRF meteo cfg 2004 08 09_09 00 00 WRF meteo cfg 2004 08 09_09 00 00 2004 08 10_09 00 00 WRF meteo cfg 2004 08 09_09 00 00 1d The configuration file WRF meteo cfg contains several options Database WRF meteo LUC file Sea_index Urban_index FastJ_parameter_files Directory_meteo Directory_photolysis_rates File_Kz Directory_Kz_TM Compute Meteo Prev_accumulated_rain Compute _Photolysis_Data paths 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 ye
188. iver Polair3DTransport model AdvectionDST3 module DiffusionROS2 module See Section 2 5 3 for details 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 preprocessing bio bio 36 CHAPTER 2 USING POLYPHEMUS 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 M
189. ize 4 x N x Nz x Ny x Ng bytes where Nz and Ny are the space steps along x and y directions respectively Nz 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 8 USEFUL TOOLS 43 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 sin
190. label is for the legend plot x 2 y k label Double legend xlabel Abscissa ylabel Ordinate savefig plot_example eps Saves the figure in EPS could be PNG or JPG 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 input optional Nt 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 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 x min Abscissa longitude of the center of the lower left cell It is primarily used to load a background map in figures Delta_x Space step along x longitude It is primarily used to load a background map in figures Nx Number of cells along x y min Ordinate latitude of the center of the lower left cell It is primarily used to load a background map in figures Delta
191. lace 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 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 50 CHAPTER 2 USING POLYPHEMUS 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
192. lair3DTransport In this section the description is limited to Polair3DChemistry additional configuration See Section 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 options With_chemistry Should chemistry occur With_photolysis Should photolysis occur With_tabulated_photolysis Should photolysis rate be tabulated If yes the option Computed photolysis must be set to no 134 CHAPTER 5 MODELS Photolysis_tabulation_option Read only if With_tabulated photolysis If 1 the tab ulation generated by SPACK is used If 2 the binary files obtained by preprocessing tools JProc or FastJ are used Computed_photolysis must be set to no if With_tabulated_photolysis If they are not tabulated photolysis rates must be com puted during the preprocessing stage options preproc to better take into account clouds With_forced_concentrations If activated the concentrations of a few species are set to values read in files Source _splitting 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 With adaptive time stepping for gaseous chemistry Adaptive_time_step_to
193. le 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 4 columns number of emitted species 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 width m rate 1 rate 2 O O 30 10 56 5 56 5 20 O 30 10 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 deposition
194. lerance Tolerance for the adaptive time step Min _adaptive_time_step Minimum for the adaptive time step Option chemistry Chemistry mechanism used in the simulation You can choose among RACM RACM2 and CBOB 5 6 2 Data Description polair3d data cfg In addition to the configuration described in Section 5 5 2 asection photolysis_rates may be required if the chemical mechanism includes photolysis reactions Depending on the chosing option for photolysis rates different fields are read If photolysis rates are tabulated they depend on days time angle latitude and altitude During the time integration they are linearly interpolated in all cells The following fields describe the tabulation parameters that must be filled Section Entries Comments photolysis rates 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 rates are provided Date_min Starting dates of photolysis rates Delta_t Time step in days if tabulated photolysis rates Fields Filename Photolysis reaction names and the paths to the files in which photolysis rates are stored In the case where photolysis rates are calculated during the preprocessing stage photolysis rate
195. lled after Species 5 15 POINT EMISSION MANAGEMENT 149 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 The mass unit is arbitrary and output data will then use the same mass unit as input data Velocity The stack exit velocity m s 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 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 wi
196. m s Deposition_velocity Caesium 0 0005 Iodine 0 005 Program gaussian deposition_aer The program gaussian deposition_aer 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 98 File_aer Value Type_aer File_aer Velocity_part CHAPTER 3 PREPROCESSING Path to the file that contains the scavenging coefficients for aerosol species Read only if Type aer is set to file 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 Tf the d
197. mand for the related processing photochemistry polair3d remains unchanged From processing photochemistry 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 environme
198. model Background _error_variance 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_scale_background Balgovind scale 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 CastorTransport 139 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 Delta_x Nx ymin Delta_y
199. mory 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 Polyphemus grid coordinates latitude longitude to MM5 grid coordinates Lambert Mercator or stere ographic for interpolations Interpolations on the horizontal are performed in MM5 grid for efficiency The pressure is computed based on MM5 fields The winds are rotated 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 Photolysis rates data are then computed depending on Photolysis_option it can be attenuation coefficients cloud optical depths or photolysis rates Attenua tion coefficients are computed with ComputeAttenuation_LWC RADM parameterization or ComputeAttenuation_ESQUIF ESQUIF parameterization cloud optical depths with ComputeExtinction and photolysis rates for every species specified in MM5 meteo cfg witha photolysis model Fast J The vertical diffusion coefficients are computed with ComputeLouisKz Louis 1979 Finally photosynthetically active radiation are estimated based on
200. mpson 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 3 6 5 Sea Salt Emissions sea salt Program sea_salt computes the emissions of sea salt aerosols Its options and parameters are given in sea_salt cfg Surface_wind_module_file Directory_sea_salt Parameterization Threshold_radius Delta_t paths Binary where the wind module a
201. mpute 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 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 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
202. n 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 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 the week 82 CHAPTER 3 PREPROCESSING 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
203. nDST3 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 155 156 CHAPTER 6 MODULES 6 1 6 TransportPPM Module TransportPPM is the 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 C
204. nalWind VerticalDiffusion CastorChemistry Same as Castor Transport and SpecificHumidity LiquidWaterContent 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 or Photolysis rate files or CloudOpticalDepth Polair3DChemistry AssimConc Same as Polair3DChemistry Polair3DAerosol Same as Polair3DChemistry and LiquidWaterContent SnowHeight PlumelnGrid Same as Polair3DChemistry and LowCloudiness MediumCloudiness HighCloudiness SolarRadiation FirstLevelWindModule FrictionModule BoundaryHeight LMO Monin Obukhov length GaussianPlume or GaussianPlume_aer Temperature Wind_angle Wind wind module 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 2 6 SETTING UP A SIMULATION 39 used Coriolis Coriolis parameter if similarity_theory is GaussianPuff or GaussianP
205. nce between the model species and the OPAC species normally include opac species_opac_match dat Directory_efficiency factor Path to the directory containing the efficiency factors file normally include fastJ Mie_table FastJ_wavelength List of the wavelengths for which the optical parameters are computed in um Tabulation_refractive_index_real Dimension of the tabulation efficiency factors for the real part of the refractive index Tabulation_refractive_index_imaginary Dimension of the tabulation efficiency factors for the imaginary part of the refractive index Ndiameter Dimension of the tabulation efficiency factors for the aerosol diameters N_OPAC_wavelength Number of wavelengths for which OPAC data are given do not change 5 7 POLAIR3DAEROSOL 137 N_water_wavelength Number of wavelengths for which water refractive indices are given FastJ_parameter_files Path to the directory containing FastJ parameter files normally include fastJX The bin bounds are presented as follow Bin_bounds diameter of the particle classes in micrometers 0 00 111 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 The section Options related to online photolysis rates is only read if photolysis rates are computed online in the processing stage option Computed photolysis online in Po lair3DChemistry Tf
206. nched 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 Deltat Time step to calculate the discretized trajectory in the case of a moving source source Source_type Source type puff or continuous If the type is puff section puff source is read Section plume source is used when 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 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 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 i
207. ne 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 5 4 GAUSSIANPUFF_AER e In the configuration file for meteorological data the pressure in Pa attenuation coeffi 1 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
208. nfiguration 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 140 CHAPTER 5 MODELS Section Entries Comments initial_condition Fields Filename If initial conditions are activated With initial condition and not inter polated Interpolated_initial_condition set to no boundary_condition Fields Filename If boundary conditions are activated With boundary condition meteo Date_min Delta_t Required fields are Temperature Pressure Fields Filename Altitude AirDensity MeridionalWind ZonalWind and VerticalDiffusion deposition Date_min Delta_t If deposition is activated With_deposition Fields Filename 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 CastorTrans
209. no Output_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 6 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 l 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 of th
210. normal You have nine different parameters The model identity 010210221 represents 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 52 CHAPTER 2 USING POLYPHEMUS 0 luc usgs 1 chemistry radm 0 time step 600 s 2 vertical resolution 7 1 first layer height 50 m 0 temperature raw field 2 wind angle raw field 20 degrees 2 wind velocity raw field 1 24 1 NO emissions raw field 0 82 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
211. not averaged Levels Averaged Initial_concentration 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 O 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 t
212. ns can be greater than or equal to the simulation time step deposition Deposition model Model used to take dry deposition into account Chamberlain for Chamberlain model Overcamp for Overcamp model Nchamberlain Number of points to calculate the Chamberlain integral integer Relevant only when dry deposition with Chamberlain model is taken into account output Configuration file Path to the configuration for the output saver 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 Ntpug x At is emitted O
213. ns 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 equilibrium 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
214. nstant 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 species file containing the sec
215. nt you will be asked for additional efforts Finally the following guidelines might convince you to migrate 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 y
216. 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 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_cost indicates
217. omain_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 comp
218. omputations 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 The units of input data e g initial condition boundary condition etc should be given as 1 9 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 Wi
219. on or stochastic Lagrangian simulations Similarly WGRIB is only needed for preprocessing programs preprocessing meteo meteo to work and has not been included 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 S
220. on photolysis rates Attenuation coefficents ranging from 0 to 2 are computed with ComputeAttenuation LWC RADM parameter ization or ComputeAttenuation_ESQUIF ESQUIF parameterization in meteo or MM5 meteo or WRF meteo In the processing stage attenuation coefficients will multiply clear sky tabulated photolysis rates The second treatment of photolysis rates consists in directly computing photolysis rates in the presence of clouds using a photolysis model the Fast J model In that case call to the photolysis model is done in the program meteo or MM5 meteo or WRF meteo and output of these program are photolysis rates as bin files according to the list given in meteo cfg or MM5 meteo cfg or WRF meteo cfg At the processing stage these photolysis rates will be directly used instead of using clear sky tabulation This method is less parameterized and more accurate than the attenuation one However it is only valid when the top of the vertical output grid in general cfg is not lower than clouds At mid latitude 10 km should be reasonable The last treatment of photolysis rates consists in computing photolysis rates in the presence of clouds but also aerosols Clouds are diagnosed using ECMWF data and can be treat during the preprocessing stage as it is the case in the 2 previous treatments but aerosols are computed during the processing stage In that case meteo prepocessing stage will consist only in the computation of cloud optical dep
221. on time step Simulation number of time steps 7 4 COMPUTATION OF AEROSOL OPTICAL PARAMETERS 175 x min Nx ymin Delta y Ny Nz Wavelength Tabulation refractive_index real Tabulation_refractive_index_imaginary Ndiameter N_OPAC_wavelength N_water_wavelength 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 wavelengths 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 Wel1_mixed_computation option Black_car
222. oncentration 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 SaverUnit WetDeposition_aer and SaverUnitDryDeposition_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 If Species is set to all the deposition fluxes will be saved for all aerosol species and for all scavenged or dry deposited diameters 116 CHAPTER 4 DRIVERS 4 9 10 SaverUnitBackup and SaverUnitBackup_aer The output savers SaverUnitBackup and SaverUnitBackup_aer are respectively similar to SaverUnitDomain and SaverUnitD
223. ons is a seductive and powerful alternative to make based on the Python language http wow scons org You may not install it on your system as it is locally 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
224. or 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_bio Directory where output biogenic emissions are stored biogenic 3 6 EMISSIONS Delta_t Rates Terpenes Terpenes_ratios 83 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 Yarwood 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 Si
225. orld 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 directory 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 ln s path to Polyphemus include atmopy or 7 1 GRAPHICAL OUTPUT 165 2 update PYTHONPATH so that it includes the path to atmopy e g in Bash export PYTHONPATH PYTHONPATH
226. ory where output files related to photolysis rate calculation are stored File Kz Name of the file where the vertical diffusion coefficients as com puted with the Louis parameterization are stored 70 Directory_Kz_TM Delta_t Nt x_min Delta_x Nx y min Delta y Ny Nz projection_type Compute_Meteo Prev_accumulated_rain Compute_ Photolysis Data Photolysis_option Attenuation Type Species Ice_cloud Min height Min Min_urban CHAPTER 3 PREPROCESSING Name of the directory where the vertical diffusion coefficients out put are stored the filename being Kz_TM bin 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 erid 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 meteo Should meteo data be computed accumulated_rain Is the rain accum
227. ou 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 pgm see that the wind is turning with increasing speed 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 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 B 4 RESULT VISUALIZATION 195 gt gt d getd f
228. ou want to shutdown the LAM universe type lamhalt In case lamclean has failed you can use lamwipe 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
229. out arguments For instance emissions gt emissions Usage emissions 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 0 5 Nx 65 y_min 40 5 Delta_y 0 5 Ny 33 Nz 5 Vertical_levels lt Programs gt levels dat Entries in section general are markups provided for convenience See Section 2 5 2 for further explanations 3 2 INTRODUCTION 57 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
230. 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 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 Y 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 162 CHAPTER 6 MODULES The following option lets you the possibility to account for oligomerization Pun and Seigneur 2007 of some organic species Currently only BiAOD 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
231. paths to the four other files A configuration for Polair3DAerosol is an extension of the configuration for Polair3DChemistry 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 Bin_bounds The bounds of the diameter classes for aerosol species Note that the classes are the same for each aerosol species options With initial condition aerosol Are initial conditions provided for given aerosol species If not initial concentrations are set to zero With_boundary_ condition aerosol Are boundary conditions available for given aerosol species 136 CHAPTER 5 MODELS With_pH Does the aerosol module returns cloud droplet pH Lwc_cloud_threshold Liquid water content threshold above which a cloud is diagnosed in the cell Fixed aerosol density Fixed aerosol density in kg m used in the model With_deposition_aerosol Is dry deposition taken into account for aerosol species Compute deposition aerosol 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 With_point_emission_aerosol Are point emissions provided for aerosol species With _surface emission aerosol Are emiss
232. 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 puffs 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 126 CHAPTER 5 MODELS Above_BL 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 With_HPDM 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_parameterizatiorParameterization used to compute the plume rise HPDM Holland or Concawe read only if With_plume_rise is set to yes File_meteo Path to the file containing the meteorological data File puff Path to the file that contains the puff data Delta_t_puff Time step between two puff emissio
233. port 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 presented in Section 5 9 3 5 11 PLUMEINGRID 141 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 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
234. pths depending on Photolysis_option 66 CHAPTER 3 PREPROCESSING Inside meteo ECMWF variables are decumulated in time if necessary Pressures at ECMWF levels are computed with ComputePressure and altitudes are computed with ComputeInterfHeight and ComputeMiddleHeight Richardson number is then estimated with ComputeRichardson Cloud data are then computed the relative humidity and the critical relative humidity are com puted 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 Depending on pho tolysis rates computation option the attenuation coefficient or the cloud extinction may be computed see photolysis rate specific section below All input fields are then interpolated on the output grid Photolysis rates data may then be computed using a photolysis model Finally photosynthetically 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 Kz and maybe Kz_TM Photolysis rates treatment This section is common to meteo MM5 meteo and WRF meteo In Polyphemus there is 3 ways to treat photolysis rates The first one is called Attenuation method and followed Chang et al 1987 It is a first order method to treat cloud impact
235. put 3 if photolysis rates are to be computed on line in the processing stage then only cloud and ice optical depth are computed Parameterization to be used to compute cloud attenuation for Pho tolysis_option 1 Put 1 to use RADM parameterization or put 2 to use ESQUIF parameterization Species List of phtotolysis rates output for Photolysis_option 2 Ice_cloud If Photolysis_option 2 or 3 is chosen should ice cloud data be taken into account 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 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 The program basically reads data in WRF output file and interpolates it in time and space to Polyphemus grid WRF s files grids are described in its attributes and global variables as every NetCDF file and Polyphemus 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 Me
236. put file That is the file given in section LUC of emissions cfg GLCF Minimum longitude of the GLCF domain whole world Number of steps along the longitude Maximum latitude of the GLCF domain whole world Number of steps along the latitude Space step in degrees of the input GLCF file The output file will have the same resolution subdomain Minimum longitude of the subdomain Number of steps along the longitude Minimum latitude of the subdomain Number of steps along the latitude The program may be launched with extract glcf general cfg extract glcf cfg Note that the file extract glcf cfg general cfg is not compulsory providing no markup from it is used in 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 ECMWFE 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 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 tha
237. r 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 5 13 LAGRANGIANTRANSPORT 145 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 the 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 one for the underlying mo
238. r 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 YYMMDD and not any of the other formats given in the Section D 7 2 9 ENSEMBLE GENERATION 49 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 rep
239. r 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 simulation 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 186 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
240. r value for it In this case the size of bio output files should be 24 x Ngays x Ny x Na 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 Ngays to use For example the command bc general cfg bc cfg h0067 nc preprocesses one Mozart file Then Ndays 10 But with the command pc 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 Ngays X Ny x Nz x 4 e y should be Naays X Nz x Nz X 2 x 4 e x should be Ndays x Nz X Ny x 2 x 4 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 results file should be of s
241. ram MM5 meteo is equivalent to what is performed by meteo and kz successively Similarly to ECMWF files Kz_TM can be used afterwards Program MM5 meteo can be launched as follows MM5 meteo general cfg MM5 meteo cfg 2004 08 09_09 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 paths Database _MM5 meteo 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 LUC_file 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 xj Lis the land category and it must contain proportions in 0 1 of each land category in every grid cell Sea_index Index of sea in land categories It is 0 for GLCF description and 15 for USGS description Urban_index Index of cities in land categories It is 13 for GLCF description and 0 for USGS description FastJ_parameter_files Path to the directory where the photolysis rate model FastJ and its parameter files can be found Directory_meteo Directory where output meteorological files are stored Directory_attenuation Directory where output attenuation file is stored Directory photolysis rates Direct
242. rate 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 2 9 ENSEMBLE GENERATION 51 deposition_velocity 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 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 emissions_NOx 1 5 log
243. rcator 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 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 76 CHAPTER 3 PREPROCESSING 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
244. reshold for vertical diffusion in m s 2 2 1 Sad 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 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 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 Multiplication factor for the boundary layer height in the Troen z Mahrt parameterization 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 lay
245. rithm 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_value 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 perturbation management Configuration
246. rivers e subsection 4 9 1 BaseOutputSaver of section 4 9 Output Savers You now have all the elements you need to choose the processing 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 utils 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 t
247. ry AtmoPy 10 CHAPTER 1 INTRODUCTION AND INSTALLATION Polyphemus Database Data processing libraries AtmoData SeldonData Input data processing Files 5 Numerical Statistics integration AtmoPy Computes physical fields Polair3D f Physics i Libraries with physical E parameterizations E ij AtmoData Figure 1 1 Polyphemus flowchart preprocessing model computations postprocessing Its flowchart is shown in Figure 1 1 in which three steps may be identified 1 preprocess ing interpolations physical parameterizations 2 model computations possibly with data assimilation or any other method implemented in a driver 3 postprocessing comparisons to measurements statistics visualization 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 photolysis rates data 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
248. s There are two ways to activate the options through the command line or through some variables set in the local SConstruct file Command 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 a 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 u
249. s and you should check them and might have to correct them before using them 2 3 1 Compiling with SCons Where is SCons Polyphemus includes 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 problem
250. s have the same form as meterological data Therefore only the following fields are required 5 7 POLAIR3DAEROSOL 135 Section Entries Comments photolysis_rates Date_min Starting dates of photolysis rates Delta t Time step in seconds Fields Filename Photolysis reaction names and the paths to the 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 els is exactly the same As for species a section molecular_weight lists the molecu lar weights in gmol of all species If photolysis reactions are involved the section 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 photolysis_reaction_index NO2 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 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
251. sed permissive compiles C without restrictive options mode_fortran permissive strict compiles Fortran with options Wall 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 includ
252. short description of the flowchart The program of the simulation looks like processing photochemistry polair3d 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 th
253. 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 the 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 33 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 wiw crobertnz 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 w
254. sing programs there are references to functions like ComputePressure ComputeAttenuation_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 59 56 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 with
255. sions of WGRIB at ftp ftp cpc ncep noaa gov wd51we wgrib wgrib tar but they might not be compatible with Polyphemus 1 3 5 ISORROPIA 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
256. sol 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 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 option is only avail able if concentrations are
257. st Woodland Wooded Grassland Closed Shrubland Open Shrubland Grassland 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 60 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_01le 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
258. t 179 A Polair3D Test Case 181 AL Prepare the Test Case crio a a a a ae a 181 A 2 Verifying the General Configuration File 20 182 A 3 Computing Ground Data e 182 A S L Land Use Cover cs fc ewe ee we eee manea A 182 A 3 2 Roughness 2 2 ee 183 A 4 Computing Meteorological Data e e e 183 CONTENTS A5 Launching the Simulation o t sesam sa A a a 184 A 5 1 Modifying the Configuration File 184 A 5 2 Modifying the Data File o e e 184 A 5 3 Modifying Saver File 2 2 2 e e 185 ADA Simulation a oe o a ee da a aida a 185 A55 Checking your results 2 6 ngewe ee ioa A ee a a 185 AG Visualizing Results y oe ee we a ee ee k a a aE 185 A 6 1 Modifying Configuration File o e 185 A02 Usina IPVEh i ei sos a Hh EE a dis 186 Gaussian Test Case 189 Bul Preprocessing assi ees Boke ae Bete es Mo ee ee aoe a ae eG ee Aa 189 D2 Disetz e 2 4k a wee Boe Rk a eo ee ew a we do ae we 190 Ba DUROS lt lt desuso Pe RE OE re Re He ee ede ae we Ee o 190 Boot PIE e lt 8 Saks Sean eed ed Ae eR OLS eR EES ES HSA eS S ee 190 B 3 2 Puf with Aerosol Species e ecc ca os ec ee ea eG t 191 B 3 3 Puf with Line Source ce 4224485586455 5454 4 2 ea pas 192 B 4 Result Visualization scsi ninas Skee a ER eR EEG RS 193 B 4 1 Gaussian Plume d ndre u ied waa Eea a 193 B 4 2 Gaussian
259. t 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 xmin 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 ymin Ordinate of the center of the lower left cell latitude in degrees Delta y Step length along y usually in degrees latitude Ny Number of cells along y integer Nz Number of vertical levels integer station file File describing the stations station file type Type of station file Emep Airbase BDQA Pioneer 7 2 POSTPROCESSING FOR GASEOUS SPECIES 171 obs_dir station t_range concentrations paired daily_basis y range scatter meas_style sim_style select_station measure cutoff ratio output 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 sca
260. t Section 6 3 2 2 4 Editing your Configuration Files Now that you are done with compiling and before you launch your own preprocessing 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 Date 2004 08 09_03 00 3 Delta_t 3 0 4 2 4 EDITING YOUR CONFIGURATION FILES 27 x_min 10 0 Delta_x 0 5 Nx 65 40 5 Delta_y 0 5 Ny 33 y_min 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
261. t 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 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 SplitAdvectionDSTS 6 1 4 DiffusionROS2 6 2 1 Photochemistry of chapter 6 Modules e section 4 1 BaseDriver of chapter 4 D
262. t meteo needs as input data the land use cover which can be built using programs in preprocessing ground The reference configuration files for meteo is Polyphemus preprocessing meteo meteo cfg together with Polyphemus preprocessing general cfg 64 CHAPTER 3 PREPROCESSING In addition to the domain definition below are options of meteo Database_meteo Roughness_in FastJ_parameter_files Directory_meteo Directory_attenuation 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 Path to the directory where the photolysis rate model FastJ and its parameter files can be found Directory where output meteorological files are stored Directory where output attenuation files are stored Directory photolysis _rates Directory where output files related to photolysis rate calculation Date t_min Delta t Nt xmin Delta x Nx ymin Delta_y Ny Nz Compute_Meteo Richardson_with_roughness Accumulated_time Accumulated_index are stored
263. t surface is stored 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 84 CHAPTER 3 PREPROCESSING LUC File File containing land use cover Nb_luc Number of land categories Sea_index Index of sea in land categories It is 0 for GLCF description and 15 for USGS description PM Section_computed Should diameter classes bounds be computed Otherwise they are read in File_sections Diameter_min Minimum diameter if diameter classes bounds are computed Diameter_max Maximum diameter if diameter classes bounds are computed Nsections Number of diameter classes File_sections 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 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 spe
264. t to check depending 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 Ny x Ny x 4 x 14 As of luc usgs it should be Ng x Ny x 4 x 24 Meteorological fields For programs meteo Kz MM5 meteo WRF meteo and Kz_TM related file size e for 2D fields is Nota X Ny X Nx X 4 e for 3D fields is Niotaz X Nz x Ny X Nz x 4 e except for the fields Kz and Kz_T Niotal x Nz 1 x Ny x No x 4 e for the field MeridionalWind Niotal X Nz x Ny 1 x Nz x 4 e and for the field ZonalWind Notat x Nz x Ny x Nz 1 x 4 Deposition Velocities For program dep the size of output files should be Niotaz X Ny X Nz x 4 42 CHAPTER 2 USING POLYPHEMUS 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 Ny 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 Na 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 popula
265. tat time_evolution computes the time evolution of a spatial indicator For instance 170 CHAPTER 7 POSTPROCESSING 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 scipy 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 inpu
266. td 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 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 OZ CPU Oavgtext 0avgdata Omaxresident k Oinputs 0outputs Omajor 176minor pagefaults Oswaps nice time echo Current date 20060721 Current date 20060721 0 00user 0 00system 0 00 00elapsed O 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 2004CPU Oavgtext 0avgdata Omaxresident k Oinputs 0outputs Omajor 177mino
267. te at which concentrations may be saved If the value l is supplied Date_end is set at the end of the simulation The number of steps between saves The type of saver see Table 4 16 for details 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 aero
268. ters are set in section RRSQRT 108 CHAPTER 4 DRIVERS Number_analysis_mode Number_model_mode Number_observation_mode Propagation_option Finite_difference_perturbation RRSQRT The expected rank number column number of the square root mode matrix of forecast error covariance matrix The number of the columns of the square root of model error covariance matrix to be added to the mode matrix The number of the columns of the square root of observa tion error covariance matrix to be added to the analyzed mode matrix The option for the forecast of the columns of mode ma trix Only finite difference is supported 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 the objective function is c
269. th 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 150 CHAPTER 5 MODELS 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 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 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 Delta t The time step in seconds between two temporal factors TemporalFactor 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 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
270. th using ComputeExtinction a function of AtmoData These cloud optical depth will then be read during the processing stage For the second and third treatment one can decided to take into account ice clouds by setting the Ice_cloud parameter to true but MM5 and WRF data does not always contain information on ice clouds Cloud optical depths are stored in Directory_meteo when attenuation is stored in Directory_attenuation and photolysis rates in Directory_photolysis_rates 3 4 2 Program Kz Program Kz computes the vertical diffusion coefficients needed in almost all applications using Louis parameterization Louis 1979 3 4 METEOROLOGICAL FIELDS 67 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 below are options for Kz File Kz LUC_file Urban_index Min Min urban Max Apply_vert paths Name of the file where the vertical diffusion coefficients output are stored 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 cities in land categories It is 13 for GLCF description and 0 for USGS description kz Lower threshol
271. th_time_dependence If set to yes the value of the half life time for each species depend on the time of the day With_filiation_matrix If set to yes decay and filiation are represented by a matrix 6 2 CHEMISTRY MODULES 157 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 Tij is the species half life time in days and to 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 that concentration does not vary due to decay 6 1 C t C to exp Et T1 2 The parameters needed are provided in species dat as follow species Spi Sp2 Sp3 Sp4 aerosol_species Aeri 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 Ta 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 t
272. 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 A section ground provides some information about 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 5 11 PLUMEINGRID 143 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 Finally a section temporal profile is required when the option temporal profile is set to yes only with GaussianPlume It must contain the temporal profile file path along with its starting date 5 11 3 Puff configuration file puff cfg when GaussianPuff is used 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 Th
273. 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 1gm They are stored as amp f_ amp c 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 For example the concentrations in 03_x bin are interpolated at both ends of the domain along x for all grid points along y and z Program bc dates Program bc dates is very similar to b
274. tial 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 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 4 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 4 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_list 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 2 8 USEFUL TOOLS Metadata 999 means unknown OUTPUT FROM PROGRAM MM5 V3 11 TERRAIN VERSION 3 MM5 SYSTEM FORMAT EDITION NUMBER 1 TERR
275. tion of Chimere It simply calls the Chimere routines and provides C methods for communication with other objects from Polyphemus and Verdandi 5 16 1 Installation Polyphemus supports the version 2008c of Chimere The later can be downloaded at http www lmd polytechnique fr chimere downloads Please refer to the Chimere documentation for its installation This user s guide only addresses the specific steps required for the interface to work You need to make one single change in Chimere Note that this change is harmless after it you will be able to use Chimere either directly or through the C interface In the Chimere di rectory probably named chimere2008c go into scripts You should find chimere run sh This file should be patched with the Polyphemus file include models chimere chimere run sh_patch patch p0 chimere run sh lt path to polyphemus include models chimere chimere run sh patch You need to add to LIBRARY PATH the path to the libraries of g95 which may not be in usr lib For instance with the Debian package from g95 web site available at the time these lines are written LIBRARY PATH should be updated with export LIBRARY_PATH usr share g95 lib gcc lib x86_64 unknown linux gnu 4 1 2 LIBRARY_PATH 152 CHAPTER 5 MODELS Make a copy of the example directory processing chimere This copy will be your working directory in which you store the Chimere configuration and the interface configuration In this
276. tion 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 124 CHAPTER 5 MODELS 5 1 6 Correction coefficients file correction_coefficients dat The correction coefficient file is used for line sources and gaseous species only It contains coeffi cients 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 Briant et al 2011 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
277. tions dedicated to aerosol species laerosol_species aerl aer2 aer3 scavenging_constant_aer 100 CHAPTER 3 PREPROCESSING 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 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 0 0 05e 2 1 0 5e 2 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 3 9 PREPROCESSING FOR GAUSSIAN MODELS 101 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
278. tm 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 7 1 GRAPHICAL OUTPUT 169 gt gt gt disp m d 2 11 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 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 gt gt gt dispcf m stat spatial_distribution d mean 0 Function s
279. 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 With 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 lati
280. tream 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 ieee 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 4 VISUALIZING THE RESULTS 203 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 Visualizing 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
281. treated by the Gaussian model Delta_t specified in the plume cfg file while the Delta_t specified in the main configuration file is the Eulerian time step The Eulerian time step must be inferior or equal to the Gaussian time step to ensure the convergence of the chemistry scheme Gaussian time step n X Eulerian time step with n is a positive integer Note that care must be taken when a small Gaussian time step is used Indeed Gaussian Plume model assume that plumes reaches a stationary state which might not be the case if a small Gaussian time step is used For plume in grid with chemistry the option With_chemistry has to be set to yes both in the main configuration file and in plume cfg The options With_NO2_chemistry and With_OH_chemistry can be used with the plume in grid model 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 plume model and in the Eulerian model in order to ensure consistency between the two models If deposition in the Gaussian model is used the 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 plume model by the plume in grid model The species file is still read It is advised to use the same as the species file fo
282. ts width along with the emission rate for each species in mass s m The data file contains eight columns the number of emitted species It correspond 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 Yim Z1 m Id2 X2 m Y2 m Z2 m width m rate 1 rate 2 1 100 90 1 2 100 110 1 10 56 5 56 5 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 width in meters associated with emission rate in mass s m rate 1 rate 2 and the line extremities 3 9 PREPROCESSING FOR GAUSSIAN MODELS 93 are given by the first and last nodes in the file The file must contain at least the coordinates of two points and the last line does not contain emission rates because it does not represent the first extremity of a segment There is no identifying number here since each node is assumed to appear only once in the fi
283. tter 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 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 file 7 2 3 Script disp py This script written in Python allows to display
284. u 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 state model simulations and the ba
285. ue of wavelength_tab in compute_optic_tabulation f 7 4 3 Computation of Optical Parameters To compute the optical parameters go to the optics directory and compile optics cpp scons The optics program generated needs two configuration files the general cfg from the preprocessing and the optics cfg described hereafter Directory_simulation_result File_temperature File_pressure File_specific_humidity Directory_OPAC File_index_water File_species_match Directory_efficiency_factor Directory_result Date t_min Delta_t Nt paths Path to the results of the polair3d siream simula tion Path to the temperature field file general domain Path to the pressure field file general domain Path to the specific humidity field file general do main Path to the directory containing the OPAC data normally include opac optdat Path to the file containing the water refrac tive indices at several wavelengths normally include opac index water _tab dat Path to the file containing the corre spondence between the model species and the OPAC species normally include opac species_opac_match dat 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 of the beginning of the polair3d siream simu lation Starting time in seconds since midnight Simulati
286. uff_aer Same as Gaussian and Attenuation if with_chemistry is set to yes Pressure if with_chemistry is set to yes Specific_humidity if with_chemistry is set to yes LagrangianTransport MeridionalWind ZonalWind VerticalDiffusion configuration file Temperature Pressure Horizontal diffusion not always mandatory depending on the model of particle this value is given in the main 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 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 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 o
287. ulated from the previous day photolysis_rates Should photolysis rate related data be computed options for photolysis rate computation 3 choices are available put 1 for attenuation compute cloud attenuation a coefficient that range between 0 and 2 put 2 for photolysis rate computation in the meteo prepocessing stage or put 3 if photolysis rates are to be computed on line in the processing stage then only cloud and ice optical depth are computed Parameterization to be used to compute cloud attenuation for Pho tolysis_option 1 Put 1 to use RADM parameterization or put 2 to use ESQUIF parameterization List of phtotolysis rates output for Photolysis_option 2 If Photolysis_option 2 or 3 is chosen should ice cloud data be taken into account 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 2 Ze L s 7 3 4 METEOROLOGICAL FIELDS 71 2q l1 Max Higher threshold for vertical diffusion in m s74 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 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 in general cfg Note that each time a field is loaded by MM5 meteo all time steps are loaded in me
288. ulation Date_min Delta_t Nt x_min 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 th
289. um 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 eg 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
290. 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 come 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 L
291. vided by the user Input Files 1 Meteorological data file it is the same as the one for gaussian deposition If the 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 3 9 PREPROCESSING FOR GAUSSIAN MODELS 99 Diameter micrometer diameter 0 1 1 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 scavenging for aerosol species is co
292. vironment 36 537 560
293. water diagnosis in a plume optics computation of aerosol optical parameters ensemble ensemble forecasting include Talos C library to manage configuration files used everywhere in 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 inform
294. where coefficients a and b have to be provided for every species in a section belot for instance 5 6 POLAIR3DCHEMISTRY 133 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 mol L 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 CBO5 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
295. where the direct beam part of photosynthetically active radi ation is stored SpecificHumidity File where 3D specific humidity is stored SurfacePressure File where surface pressure is stored FrictionVelocity File where friction velocity is stored CanopyWetness File where canopy wetness is stored Rain File where rain is stored 3 5 DEPOSITION VELOCITIES 77 RoughnessHeight Type ChemicalMechanism Data Directory_dep Ns CellRoughness Ra Rb Re Save resistance 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 gmol 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 are 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
296. 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 Date_beg Date_end Interval_length Type Output_file Chemical species to be saved If it is set to a11 concentrations for all species are saved 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 The last da
297. y 33 Nz 5 Vertical_levels lt Programs gt levels dat The simulation domain and the simulation date 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
298. y Space step along y latitude It is primarily used to load a background map in figures Ny Number of cells along y Nz Number of vertical layers file 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 in Nt x_m y_m Nz fil put 121 in 10 0 Delta_x 0 5 Nx 67 in 35 Delta_y 0 5 Ny 46 1 e results 03 bin 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 168 CHAPTER 7 POSTPROCESSING instance polair3d cfg contains the number of model layers not necessary the number of levels in the target file Python Commands Loading and Processing 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 gt gt gt d getd disp cfg filename results NO bin Nt ll o w7 i o
299. y these files or create new files only if you are well aware of deposition parameterizations With Polyphemus a set of 5 files 78 CHAPTER 3 PREPROCESSING 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 Altitude SurfaceTemperature SurfaceRelativeHumidity FrictionVelocity Attenuation AerodynamicResistance LUC file Nc Nveg Land_data Species _data Directory_dep Ns paths File where altitude is stored File where surface temperature is stored File where surface relative humidity is stored File where the friction v
300. 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 470 0 535 0 4 9 OUTPUT SAVERS 115 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 Initial_c
Download Pdf Manuals
Related Search
Related Contents
Enterprise Back Office Suite SP2-1-145-21 - Publications du gouvernement du Canada Renesas M3T-DUMMY64 User's Manual Anwenderhandbuch Sicherheitsschaltgeräte im Cargar DENSAN 取扱説明書 SMART 3 CC-CD (ST/x) Manual de Usuario Modelo: SL-350TRS-CE-D Guía para instaladores ADVERTENCIA Cooper Lighting QCM500 User's Manual Innova AL-PRSMG-07 Installation Guide Copyright © All rights reserved.
Failed to retrieve file