tp_polu1-doc.tex 13.9 KB
Newer Older
Youngseob KIM's avatar
Youngseob KIM committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580
\documentclass[xcolor=table]{beamer}
%\documentclass[xcolor=table, mathserif]{beamer}
\usetheme{Madrid}
%\usecolortheme{beaver}
% \usecolortheme{spruce}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
%\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{url}
%\usepackage{multicol}
\usepackage{enumerate}
% \usepackage[table,xcdraw]{xcolor}
%\usepackage{biblatex}
% \usepackage{hyperref}
% \hypersetup{backref = true, pagebackref = true, colorlinks= true, linkcolor = black, citecolor = black, urlcolor = black}
\usepackage{color}
\usepackage{fancyvrb}
\usepackage{framed}

\usepackage{tikz}
\usetikzlibrary{trees}

\usepackage{sistyle}
\SIunitsep{{\;}}
\SIunitspace{{\,}}
\usepackage[Euler]{upgreek}
\newcommand*{\micro}{\ensureupmath{\upmu}}

\author[]{Youngseob Kim}
\title[TP POLU1]{Travaux Pratiques\\Environnement atmosphérique et qualité de l'air}

\setbeamercovered{transparent} 
%\setbeamertemplate{bibliography item}{\insertbiblabel}
\setbeamertemplate{bibliography item}{}
%\setbeamertemplate{navigation symbols}{} 

\institute[]{CEREA (ENPC -- EDF R\&D)} 
\date{25 mai 2020}
%\date{\today} 

\subject{Modélisation de qualité de l'air} 

\graphicspath{{figures/}}

%\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\code}[1]{\texttt{\color{blue}#1}}


\begin{document}

%%%% Cover page %%%%
\begin{frame}
\begin{figure}[h]
  \includegraphics[angle=0,width=0.08\textwidth]{enpc_logo.png}
  \hspace{3cm}
  \includegraphics[angle=0,width=0.15\textwidth]{Logo-Cerea-RVB.png}
  \hspace{3cm}
  \includegraphics[angle=0,width=0.08\textwidth]{EDF-logo-modif.png}
\end{figure}
\titlepage
% \tiny{
%     \url{http://cerea.enpc.fr/munich}\\
%     \url{https://gitlab.enpc.fr/cerea/munich}
% }
\end{frame}

%%%%
\begin{frame}{Plan}
\tableofcontents
\end{frame}


\section{Introduction}

\begin{frame}{Introduction to Polyphemus}
  
\begin{block}{Polyphemus}
  \begin{itemize}
  \item \small Air quality moldeling system
  \item \small Several models from small/local scale to continental scale
  \item \small Multiple polluants: passive, radionuclides, gas (including ozone and NO$_x$), aerosols
  \end{itemize}
\end{block}

\begin{block}{Technical characteristics}
  \begin{itemize}
  \item \small Open-source code
  \item \small Main frame written with C++ (C, Fortran also used) 
  \item \small Parallel computing implmented
  \item \small Post-processing with Python libraries
  \end{itemize}
\end{block}

\begin{block}{Source code}
    \begin{itemize}
      \item \small Homepage: \url{http://cerea.enpc.fr/polyphemus/}
      \item \small Gitlab: \url{https://gitlab.enpc.fr/polyphemus}
    \end{itemize}
  \end{block}

\end{frame}


%%%%%
\begin{frame}{Studied area for hands-on session: pollution peak during Winter 2016}
    \begin{block}{}
      \begin{itemize}
      \item 3 simulation domains from the continental scale to the regional scale
        \begin{itemize}
        \item Domain 1 (Europe): 0.5$^\circ$ X 0.5$^\circ$
        \item Domain 2 (France): 0.1$^\circ$ X 0.1$^\circ$
        \item Domain 3 (Île-de-France): 0.02$^\circ$X 0.02$^\circ$
        \end{itemize}
      \end{itemize}
    \end{block}
\centering
  \includegraphics[width=0.5\textwidth]{domains_map.png}
  \includegraphics[width=0.5\textwidth]{PM10_speciation.png}\\

\end{frame}

%%%%
\begin{frame}[fragile]{Connection via SSH to CEREA server}
    \begin{block}{Linux or Mac}
      - Open Terminal application if you are on a linux system or Mac.\\
      - Type \code{ssh YourID@cerea.enpc.fr} and password
    \end{block}

    \begin{block}{Windows}
      - Launch Putty application\\
      - Type \code{cerea.enpc.fr} in Host Name\\
      - Type YourID and password
    \end{block}

    If your login is successful, please follow the next step
    \begin{Verbatim}[fontsize=\small]
      > ssh YourMachine
      > mkdir /net/libre/trami/YourID
      > cd /net/libre/trami/YourID
    \end{Verbatim}
    

\end{frame}


%%%%
\begin{frame}[fragile]{Download the configuration files and input data}
  \begin{block}{}

\begin{Verbatim}[fontsize=\small]
> cd <working_directory>/Polyphemus-1.11.1/processing/scram-soap
> scons 
\end{Verbatim}


\begin{verbatim}
> tar -xjvf tp_polu1.tar.bz2
\end{verbatim}

    You need to download and extract the archive
    \code{tp\_polu1.tar.bz2} in your working directory.
  \end{block}

\begin{verbatim}
> tar -xjvf tp_polu1.tar.bz2
\end{verbatim}

  \begin{block}{}
Please check if you have the following sub-folders in \code{tp\_polu1}:

\tikzstyle{every node}=[draw=black,thick,anchor=west]
\tikzstyle{selected}=[draw=red,fill=red!30]
\tikzstyle{optional}=[dashed,fill=gray!50]
\begin{tikzpicture}[%
  grow via three points={one child at (0.5,-0.7) and
  two children at (0.5,-0.7) and (0.5,-1.4)},
  edge from parent path={(\tikzparentnode.south) |- (\tikzchildnode.west)}]
  \node {sing-training}
    child { node {\code{Polyphemus-XXX}: }}		
    child { node {\code{rawdata}:}}
    child { node [selected] {\code{polair3d}: }
      child { node {europe}
      }
      child { node {france}}
    };

    % child { node [selected] {tex}
    %   child { node {generic}}
    %   child { node [optional] {latex}}
    %   child { node {plain}}
    % }
    % child [missing] {}				
    % child [missing] {}				
    % child [missing] {}				
    % child { node {texdoc}};
\end{tikzpicture}
\end{block}

\end{frame}


%%%
\begin{frame}[fragile]{Sub-folders}

\begin{block}{}
\begin{itemize}
\item \code{europe}: 
  \begin{itemize}
  \item \code{preprocessing}: python scripts to convert raw data for SinG simulation.
  \item \code{processing}: configuration files for SinG simulation.
  \item \code{data}
  \item \code{results}
  \end{itemize}
\item \code{france}
\end{itemize}
\end{block}

\end{frame}



%%%%
\section{Processing}

\begin{frame}[fragile]{Compile \textbf{Polair3d}}

It is compiled by typing \code{scons}. 

\begin{Verbatim}[fontsize=\small]
> cd <working_directory>/Polyphemus-1.11.1/processing/scram-soap
> scons 
\end{Verbatim}


Configuration files are in : 
\begin{verbatim}
<working_directory>/simulation_2016/config
\end{verbatim}

They are set to be applied, however check their contents.

Input data files are in : 
\begin{verbatim}
<working_directory>/simulation_2016/data
\end{verbatim}

Simulation results will be written in :
\begin{verbatim}
<working_directory>/simulation_2016/results
\end{verbatim}

\end{frame}

%%%%
\begin{frame}[fragile]{Configuration files}
  \begin{block}{Prepare the configuration files}
Three configuration files
\begin{itemize}
  \item \code{polair3d.cfg}: main configuration file (informations on the options of the simulation
  \item \code{polair3d-data.cfg}: configuration file to describe input data files
  \item \code{polair3d-saver.cfg}: parameters to save output results
\end{itemize}
Three input data files
\begin{itemize}
  \item \code{levels.dat}: list of vertical levels
  \item \code{species\_cb05.dat}: list of chemical species
\end{itemize}
  \end{block}


\end{frame}
%%%%%%%%%%%%%%%

%%%%
\begin{frame}[fragile]{Configuration files}

  \begin{block}{\code{polair3d.cfg}}
\begin{Verbatim}[fontsize=\scriptsize]
[domain]

Date_min = 20161130+12-00		Delta_t = 600.	Nt = 6
x_min    = 1.2          Delta_x = 0.02  Nx = 115
y_min    = 47.9         Delta_y = 0.02  Ny = 110
Nz = 14
Vertical_levels: levels.dat

# Species list and associated data.
Species: species_cb05.dat
Bin_bounds:
0.01 0.0398 0.1585 1.0 2.5119 10.
\end{Verbatim}

  \end{block}

\code{Bin\_bounds}: particle size distribution\\
- Size bin 0: particle with a diameter between 0.01 $\micro$m and 0.0398 $\micro$m
\end{frame}


%%%%
\begin{frame}[fragile]{Configuration files}

  \begin{block}{}
    Please make sure that all paths in the configuration files are correct. In
    particular, \code{Directory\_data} in \code{polair3d-data.cfg} should point to the input data files.
  \end{block}


\begin{verbatim}
Directory_data: ../data/
\end{verbatim}


\begin{block}{}
  And \code{Result\_dir} in \code{polair3d-saver.cfg} should be checked. Default
  folder is \code{../results}.
\end{block}

\begin{verbatim}
Result_dir: ../results/
\end{verbatim}


  \vspace{-15pt}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%% Frame
\begin{frame}[fragile]{Launch a simulation}
 
  \begin{block}{}

\begin{Verbatim}[fontsize=\scriptsize]
> cd <working_directory>/simulation_2016/config
> ln -s ../../Polyphemus-1.11.1/processing/scram-soap/polair3d-scram-soap-cb05 .
> polair3d-scram-soap-cb05 polair3d.cfg
\end{Verbatim}
  \end{block}


\begin{Verbatim}[fontsize=\scriptsize]
.
.
.
Module: SOA computation approach:equilibrium
Module: without sea salt in isorropia
Performing iteration #0
Current date: 2016-11-30 00:00
Performing iteration #1
Current date: 2016-11-30 00:10
Performing iteration #2
Current date: 2016-11-30 00:20
Performing iteration #3
Current date: 2016-11-30 00:30
Performing iteration #4
Current date: 2016-11-30 00:40
Performing iteration #5
Current date: 2016-11-30 00:50
\end{Verbatim}


\end{frame}


\section{Post-processing}

\begin{frame}[fragile]{Pollutant concentrations}
  \begin{block}{}
    This script \code{get\_info\_float.cpp} is used to get concentrations of a
    species. You need compile it.
  \end{block}

\begin{verbatim}
> cd <working_directory>/Polyphemus-1.11.1/utils
> scons get_info_float
\end{verbatim}

Move to the directory which contains simulation output.

\begin{verbatim}
> cd ../../simulation_2016/results
> ln -s ../../Polyphemus-1.11.1/utils/get_info_float .
\end{verbatim}

To get ozone concentrations which is calculated as the model species \code{O3},
type the following command
\begin{verbatim}
> get_info_float O3.bin
Minimum: XXXX
Maximum: XXXX
\end{verbatim}
\vspace{-5pt}
\code{\textbf Mean: XXXX}

\end{frame}

%%%%%%%%%%%

\begin{frame}[fragile]{Pollutant concentrations}

  \begin{block}{NO$_x$}
    \begin{itemize}
      \item \small Nitric oxide: \code{NO.bin}
      \item \small Nitrogen dioxide: \code{NO2.bin}
    \end{itemize}
  \end{block}

  \begin{block}{Particulate Matter: composition}
    \begin{itemize}
      \item \small Dust: \code{PMD\_X.bin}
      \item \small Black carbon: \code{PBC\_X.bin}
      \item \small Secondary inorgainc aerosols: sulfate (\code{PSO4\_X.bin}), nitrate (\code{PNO3\_X.bin}), ammonium (\code{PNH4\_X.bin})
      \item \small Organic aerosols (next slide)
      \item \small Others
    \end{itemize}
  \end{block}

Total mass for a particle species is a sum of all size bins.
For dust, the total mass of \code{PMD} is \code{PMD\_0 + PMD\_1 + PMD\_2 + PMD\_3 + PMD\_4}


\end{frame}

%%%%%
\begin{frame}[fragile]{Pollutant concentrations}

  \begin{block}{Organic aerosols}
    \begin{itemize}
      \item Primary: \code{PPOAlP, PPOAmP, PPOAhP, PSOAlP, PSOAmP, PSOAhP}
      \item Secondary: \code{PAGLY, PAMGLY, PAnBlP, PAnBmP, PAnClP, PBiA0D, PBiA1D, PBiA2D, PBiBlP, PBiBmP, PBiDER, PBiMGA, PBiMT, PBiNGA, PBiNIT3, PBiNIT, PBiPER}
    \end{itemize} 
  \end{block}


  \begin{block}{Particulate Matter: by size}
    \begin{itemize}
      \item \small Coarse particles: PM$_{10}$ (diameter less than 10 $\micro$m)
      \item \small Fine particles: PM$_{2.5}$ (diameter less than 2.5 $\micro$m)
    \end{itemize}
  \end{block}

\end{frame}

%%%%%
\begin{frame}[fragile]{Pollutant concentrations}

\centering

  \begin{block}{Concentrations of pollutants (in $\micro$g m$^{-3}$)}
    \begin{itemize}
      \item \small Ozone: 
      \item \small NO$_x$:  
      \item \small PM$_{10}$: 
      \item \small PM$_{2.5}$: 
    \end{itemize}
  \end{block}

  \begin{block}{Chemical composition of PM (in $\micro$g m$^{-3}$)}
    \begin{itemize}
      \item \small Dust: 
      \item \small Black carbon: 
      \item \small Secondary inorgainc aerosols: 
      \item \small Organic aerosols:
      \item \small Others: 
    \end{itemize}
  \end{block}

Please send the results by e-mail to youngseob.kim@enpc.fr

\end{frame}


\section{Scenario for an emission reduction}
%%%%%%%%%%%%%%%%%%%%%%%% Frame
\begin{frame}[fragile]{Description of the scenario}
 
  \begin{block}{Background}
European emission standards for exhaust emissions of new vehicles changed from Euro 5 to Euro 6 in 2014. Standards for NO$_x$ emission have reduced by 45\% for diesel vehicles.
  \end{block}

  \begin{block}{Reduction of NOx emissions}
    
\begin{Verbatim}[fontsize=\scriptsize]
> cd <working_directory>/Polyphemus-1.11.1/utils
> scons mult_nb_float
> cd ../../simulation_2016/data/emissions/surface-emissions
> ln -s ../../Polyphemus-1.11.1/utils/mult_nb_float .

> mult_nb_float NO.bin 0.45 NO_modif.bin
> mult_nb_float NO2.bin 0.45 NO2_modif.bin
\end{Verbatim}
  \end{block}

\end{frame}

% %%%%%%%%%%%%%%%%%%%%%%%% Frame
\begin{frame}[fragile]{Configuration file}

  \begin{block}{polair3d-data.cfg}
    \begin{Verbatim}[fontsize=\scriptsize]
[surface_emission]

Date_min: 2016-11-25
Delta_t = 3600.

Fields: ALD2 CH4 ETHA IOLE MEOH SO2 XYL ALDX CO ETOH HC8 ISOP NH3 OLE TERP ETH  
FORM HONO PAR TOL API LIM SULF POAhP POAlP POAmP
Filename: <Directory_data>/emissions/surface-emissions/&f.bin

NO: <Directory_data>/emissions/surface-emissions/NO_modif.bin
NO2: <Directory_data>/emissions/surface-emissions/NO2_modif.bin

\end{Verbatim}
\end{block}

  \begin{block}{polair3d-saver.cfg}
    \begin{Verbatim}[fontsize=\scriptsize]
Result_dir: ../results_sim2/

\end{Verbatim}
\end{block}

\begin{Verbatim}[fontsize=\scriptsize]
> cd <working_directory>/simulation_2016
> mkdir results_sim2
\end{Verbatim}
\end{frame}

% %%%%%%%%%%%%%%%%%%%%%%%% Frame
\begin{frame}[fragile]{Launch a simulation}

To launch a simulation,
\begin{Verbatim}[fontsize=\scriptsize]
> cd config
> polair3d-scram-soap-cb05 polair3d.cfg
\end{Verbatim}

\begin{block}{Comparison of concentrations}

\centering
\begin{tabular}{|c|c|c|}
\hline
Species & Simulation 1 & Simulation 2 \\
\hline
Ozone & & \\
\hline
NO & & \\
\hline
NO2 & & \\
\hline
Nitrate & & \\
\hline
\end{tabular}
\end{block}

Please send the results by e-mail to youngseob.kim@enpc.fr

\end{frame}

%%%%
\begin{frame}[allowframebreaks]
\frametitle{References}

%\nocite{*} 
\bibliographystyle{apalike} 

{\tiny
\bibliography{munich-ref}
%\printbibliography
}
\end{frame}


\end{document}