Assumnig that the executable of LAPEMI and its input file are in the same folder, LAPEMI is run by simply typing:

lapemi.exe lapemi.inp in Windows or ./lapemi.x lapemi.inp in Linux o macOS.

If the executable and/or the input file are in different folders it is necessary to specify the full path to such files. If paths and or names contain blank spaces, double quotes must be used.

Main input file (lapemi.inp)

The input file of the LAPEMI processor (lapemi.inp) may contain an arbitrary number of comments customizable by each user. The file must also contain the command lines, which must be written between a pair of exclamation marks. The position of the command line within the input file is arbitrary, but their relative position must remain unchanged.

An example of LAPEMI input file is shown in the following.



        **********************
        *** RUN PARAMETERS ***
        **********************

 LAPEMI is the emission pre processor of the Lagrangian Particle
 Model LAPMOD. It reads the values of the annual emissions and
 writes the LAPMOD emission file on an hour basis.

*************
*** DATES ***
*************

Initial and final dates of the LAPMOD simulation. LAPMET will
prepare the emissions for the specified time interval.

Initial date/hour of the simulation (YYYY MM DD HH)

1. ! SIMINI(4) = 1980 05 01 15 !

Final date/hour of the simulation (YYYY MM DD HH)

2. ! SIMEND(4) = 1980 05 01 21 !

****************************
*** SOURCES &  EMISSIONS ***
****************************

Number of sources to be modelled

3. ! NSRC = 5 !

Number of species to be modelled

4. ! NSPC = 3 !

File containing the source type, geometry and annual
emissions for each source

The source type codes of LAPMOD are the following:
1  - Point source (without plume rise)
2  - Line source
3  - Area source (circle)
4  - Volume source (parallelepiped)
5  - Volume source (sphere)
6  - Point source (with plume rise)

5. ! FSRC = Y:\mod\lapmod\lapemi\input\sources.dat !

Species names

6. ! SPCNAM = CO NOX PM10 !

Species emission units
1 – t/year (TOUe/year for ODOR substance)
2 - kg/year (GOUe/year for ODOR substance)
3 - g/year (MOUe/year for ODOR substance)

7. ! UNITS = 1 1 1 !

****************
*** PROFILES ***
****************

Profiles are needed for the time-modulation of the release.
Three profile types are used:
- annual (12 multiplication factors, one for each month)
- weekly (7 multiplication factors, one for each day)
- daily  (24 multiplication factors, one for each hour)

Profiles are stored in three different files, one annual,
one weekly and one daily.
Each profile-file contains an arbitrary number of profiles
for each period. Each profile is stored as a record and has as
many fields as needed by the file where it is contained
(12 for the annual, 7 for the weekly and 24 for the daily), plus
two, the first one, which indicates the profile number, and the
last one, which is a string description of the profile.
The first record of each profile-file indicates the number
of profiles contained.

File with the monthly profiles

8. ! FPRY = Y:\mod\lapmod\lapemi\input\monthly.prf !

File with the weekly profiles

9. ! FPRW = Y:\mod\lapmod\lapemi\input\weekly.prf !

File with the daily profiles

10. ! FPRD = Y:\mod\lapmod\lapemi\input\daily.prf !


LAPEMI can use a file indicating the dates of the most
important holidays (Christmas, Easter, ...). These dates
are treated as Sundays. If the holidays file is not used,
put NO in the following input, otherwise insert the path
and name of the file.


11. ! FHOL = Y:\mod\lapmod\lapemi\input\holidays.dat !
* FHOL = NO * If not used

**************
*** OUTPUT ***
**************

The output file can be ASCII (IFRM=0) or BINARY (IFRM not 0)

12. ! IFRM = 0 !

FOUT is the output file name (and path)

13. ! FOUT = Y:\mod\lapmod\lapemi\output\rel.inp !

OUTDIR is the output directory (which must terminate with a \)

14. ! OUTDIR = Y:\mod\lapmod\lapemi\output\ !

***********
*** GEO ***
***********

UTM zone number to which all the source coordinates refer.

15. ! IUTMZ = 32 !

Hemisphere: N for North, S for South.

16. ! HEMI = N !


                                    

Input parameters are described in detail in the following table:

Group Position Name Description Range Type
Date 1 SIMINI(4) Date and time LST of simulation start (YYYY MM DD HH) Integers
2 SIMEND(4) Date and time LST of simulation end (YYYY MM DD HH) > SIMINI Integers
Sources and emissions 3 NSRC Number of sources to consider > 0 Integer
4 NSPC Number of species to consider. For each source it will be necessary to provide the emission rates of NSPC species (see next paragraph), specifying 0 when a species is not emitted by one source. > 0 Integer
5 FSRC The path and name of the file containing the source parameters (type, geometry, annual emissions and time variation profiles) are specified through FSRC. The records are described below. The types of sources that can be processed with LAPEMI are:
  • 1 - non-buoyant point source
  • 2 - linear source
  • 3 - area source (circle)
  • 4 - volume source (box)
  • 5 - volume source (sphere)
  • 6 - buoyant point source
Integer
6 SPCNAM List of NSPC species emitted, separated by blank character. The species listed must be presnt in the substances file of LAPMOD. Characters
7 UNITS Units of emission
  • 1 - t/year/NORM (TOUe/year/NORM for substance ODOR)
  • 2 - kg/year/NORM (GOUe/year/NORM for substance ODOR)
  • 3 - g/year/NORM (MOUe/year/NORM for substance ODOR)

NORM depends on the source type: 1 for point sources, m for line sources, m2 for area sources, and m3 for volume sources.

Integer
Profiles 8 FPRY Name and full path of file of monthly emission profiles of sources (described below) Character
9 FPRW Name and full path of file of weekly emission profiles of sources (described below) Character
10 FPRD Name and full path of file of daily emission profiles of sources (described below) Character
11 FHOL Name and full path of file with holiday dates (e.g. Xmas, Easter...). These dates are treated as Sundays. If the holiday file is not used, the string "NO" must be inserted. Character
Output 12 IFRM Output file format:
  • 0 - ASCII
  • 1 - binary
The value of this variable will have to be set accordingly in LAPMOD input when using this generated emission file.
0/1 Integer
13 FOUT Name and full path of the hourly emission file to be produced (LAPMOD input). Character
14 OUTDIR Path to output folder Character
15 IUTMZ UTM zone for input coordinates 1-60 Integer
16 HEMI Hemisphere
  • N - north
  • S - south
Character

Input file with source parameters

The file with the source parameters - specified through the FSRC variable - is composed by as many records as the number of sources (NSRC). Each record contains 14+NSPC fields, where NSPC is the number of species. The fields must describe the following variables (in this order):

  • source name (10 characters)
  • numerical code indicating the source type
  • source geometry (6 real fields)
  • emission temperature (K)
  • emission velocity (m/s)
  • annual emissions (NSPC fields)
  • numerical code of the annual time variation profile
  • numerical code of the weekly time variation profile
  • numerical code of the weekly time variation profile
  • descriptive tag for the source (max 50 characters)

To each source is also automatically assigned a numerical ID equal to its position within the file.

The numerical code indicating the source type is within the interval [1, 7], and identifies the source as specified in Table 6 (actually, type 7, polygonal source, cannot be used in LAPEMI). Table 6 shows, in the correct order, the six fields needed for describing the source geometry. Temperature and emission velocity are used only for sources of type 6 (buoyant point sources)..

ID Source Geometry
1 Point (without buoyancy)
  • X coordinate (m)
  • Y coordinate (m)
  • Z coordinate (m)
  • Not used
  • Not used
  • Not used
2 Line
  • Initial X coordinate (m)
  • Initial Y coordinate (m)
  • Initial Z coordinate (m)
  • Final X coordinate (m)
  • Final Y coordinate (m)
  • Final Z coordinate (m)
3 Area (circle)
  • X coordinate of center (m)
  • Y coordinate of center (m)
  • Z coordinate of center (m)
  • Radius (m)
  • Not used
  • Not used
4 Volume (box)
  • X coordinate of center (m)
  • Y coordinate of center (m)
  • Z coordinate of center (m)
  • Radius (m)
  • Not used
  • Not used
5 Volume (sphere)
  • X coordinate of center (m)
  • Y coordinate of center (m)
  • Z coordinate of center (m)
  • Radius (m)
  • Not used
  • Not used
6 Point (with buoyancy)
  • X coordinate (m)
  • Y coordinate (m)
  • Z coordinate (m)
  • Stack diameter (m)
  • Not used
  • Not used

The annual emissions must be specified for the NSPC species in the exact order in which they appear in the main input file within variable SPCNAM. They must also be expressed with the unit of measure specified in the main input file through the UNITS variable. The input emissions must always be expressed as cumulative over the year of interest.

The numerical codes of the time modulation profiles are needed to associate them to each source. Different sources may share one or more time modulation profiles.

All the source parameters are read in free format. An example of source parameters file is reported in the following (assuming 3 sources e 2 species released).

"Point1_NB" 1 451000. 5001000. 50. -999. -999. -999. -999. -999. 10. 3. 1 1 1 "stack"
"Point2_B"  6 452000. 5001000. 40. 1.5   -999. -999.  400.   12.  5. 7. 1 2 2 "offgas"
"Line1"     2 455000. 5002000. 40. 455500  5002000.   40. -999. -999.  1. 2. 2 3 3 "road"
                    

Input files with time modulation profiles

The time modulation profiles files must be defined for the year, the week and the day, their names are specified in FPRY, FPRW and FPRD, respectively. These files are composed by a header record specifying the number of records that will follow; then each one of the following records is composed by a number of fields depending on the type of profile. Specifically, the fields are:

  • a unique numerical code identifying the profile
  • time modulation factors (12 for the annual profile, 7 for the weekly profile and 24 for the daily profile)
  • descriptive string for the profile (up to 100 characters)

The numerical code identifying the profile is used for associating each profile to a source. If a profile code has been indicated in the source parameters file and such a code is not found by LAPEMI when reading the profiles, an error message is generated and the software terminates the execution. The descriptive string is read but not used by LAPEMI, its only purpose is to better describe the profile for the user.

The factors listed in every time modulation profiles are numbers within the interval [0,1], and their sum must be equal to 1. Due to numerical errors their sum may be slightly different form 1, therefore LAPEMI allows an error equal to 0.01 (see the ER parameter in READPRF).

All the time modulation profiles are read in free format. An example of file with annual time modulation profiles is reported in the following table.

3
1 0.0833 0.0833 0.0833 0.0833 0.0833 0.0833 0.0833 0.0833 0.0833 0.0833 0.0833 0.0833 "Not Constant"
2 0.0849 0.0767 0.0849 0.0822 0.0849 0.0822 0.0849 0.0849 0.0822 0.0849 0.0822 0.0849 “Constant”
3 0.1111 0.1111 0.1111 0.1111 0.1111 0.0000 0.0000 0.0000 0.1111 0.1111 0.1111 0.1111 "No Summer"
4 0.0000 0.0000 0.1111 0.1111 0.1111 0.1111 0.1111 0.1111 0.1111 0.1111 0.1111 0.0000 "No Winter"
5 0.5000 0.5000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 “Jan + Feb”
                    
Example of file with annual time modulation profiles.

Input file with holidays

The holidays file is specified through the FHOL input variable. It is composed by NH+1 records, where the header record specifies the number of holidays (NH), and each of the following NH records is defined by year, month and day. This is an optional file, if it is not used LAPEMI will determine the day of the week with the CALENDAR routine, assigning only Sundays to the holidays. On the contrary, if the holidays file is used, each holiday will be assigned the Sunday factor of the weekly profile.

The holidays file is read in free format. An example of such a file is the following:

6
2008 01 01
2008 01 06
2008 04 25
2008 05 01
2008 08 15
2008 12 25
                    
Example of holidays file.