slide1
Download
Skip this Video
Download Presentation
moz2kpp.py ( includes also a rudimentary kpp2moz routine ) Martin Schultz

Loading in 2 Seconds...

play fullscreen
1 / 18

moz2kpp.py ( includes also a rudimentary kpp2moz routine ) Martin Schultz - PowerPoint PPT Presentation


  • 54 Views
  • Uploaded on

moz2kpp.py ( includes also a rudimentary kpp2moz routine ) Martin Schultz. Motivation. boxmodel intercomparison of chemical mechanisms focus on OH recycling ( isoprene chemistry ) use of standard scenarios („Poppe scenarios “)

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'moz2kpp.py ( includes also a rudimentary kpp2moz routine ) Martin Schultz' - bailey


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1
moz2kpp.py

(includes also a rudimentary kpp2moz routine)

Martin Schultz

motivation
Motivation
  • boxmodelintercomparisonofchemicalmechanisms
  • focus on OH recycling (isoprenechemistry)
  • useofstandardscenarios („Poppe scenarios“)
  • exploresensitivitiestochanges in NOxand VOC levels/emissions

Boxmodelusedis CAABA/MECCA (Sander et al., 2011)

CAABA/MECCA isbased on KPP

selection of mechanisms
Selectionofmechanisms
  • Goal istorun ~4 different scenarios:
  • (middle) freetroposphere
  • clean marine environment
  • urbanbio (urban plumetransportedover a forest)
  • clean bio
  • Thenperformsensitivityvariations (~36 each)
  • ApplicationforandPEGASOS projects
  • So far KPP mechanismsavailablefor MOZ3.5, TM5, MECCA
  • In preparation: ECHAM6-HAMMOZ, MOCAGE
design goals of moz2kpp py
Design goalsof moz2kpp.py
  • Automatictranslationoffull gas-phase mechanismtoavoiderrors
  • Useconsistentnamingofspeciesandreaction tags wherepossible
  • Try todocumentspeciesandreactions (andpreservedocumentation)
  • Maketool easy touse
formats mozpp 2
Formats: mozpp (2)
  • Things tobeawareof:
  • Reactionlabelsandspeciesnamesareused in themodelcode
  • User-definedreactionsindicatedbysimplyomitting a rate coefficientterm
  • Reactionproductscan span multiple lines: k-term on firstline(!)
  • NEW:
  • Documentationpossible (add „!“ or „#“ ascommentcharacter on anyline)
formats kpp as in caaba mecca
Formats: kpp (as in CAABA/MECCA)
  • Twofiles:
  • spc – definitionofspecies
  • eqn – definitionofreactions

SPC

formats kpp as in caaba mecca 3
Formats: kpp (as in CAABA/MECCA) (3)
  • Things tobeawareof:
  • CAABA/MECCA usescommentfeatures („{…}“) for 4 purposes:
    • additionof „M“
    • labelofreaction type orscope (St, Tr, Cl, …)
    • uncertaintyspecificationfor Monte-Carlo runs
    • literaturereference
  • All reactionsarelabeled in a schematicfashion
  • user-defined k terms must bedefined in thecode(example „k_HO2_HO2“)
moz2kpp py
moz2kpp.py
  • Modules required:
  • datetime (standard)
  • re (standard)
  • numpy (standard)
  • Main program:
  • (F5 in Windows shell, or „python moz2kpp.py“)
moz2kpp py 2
moz2kpp.py (2)
  • Arguments andkeywordsofmoz2kppfunction:
  • inputfile: name of the MOZPP formatted mechanism input file
  • kppspcfile: name of the KPP formatted output file with species definitions (*.spc)
  • kppeqnfile: name of the KPP formatted output file with equations (*.eqn)
  • kppreffile: name of an existing KPP file for equation labels
  • use_alias: if True, then MOZART species names will be replaced by KPP names
  • Note: you must have a valid species translation table in species_map.csv
moz2kpp py 3
moz2kpp.py (3)
  • Arguments andkeywordsofkpp2mozfunction:
  • inputfile: name of the KPP formatted equations file
  • outputfile: name of the MOZPP formatted output file
  • use_alias: if True, then KPP species names will be replaced by MOZART names
  • Notes:
  • you must have a valid species translation table in species_map.csv
  • species names will be extracted automatically from reaction list
species map csv
species_map.csv

Translatesspeciesnamesfrom/to KPP/MOZ andprovides „documentation“:

Note: molecularcomposition (needed in KPP spcfile) isderivedfrom MOZPP „formula“ in specieslist.

Couldbeincluded in csvfileinstead …

moz2kpp py data structure for reactions
moz2kpp.py – Data structureforreactions

reactions: listconsistingoftuples (educts, products, kterm, label [rtype], comment)

educts: listcontainingstringswithspecies (photohasonlyoneeduct)

products: listoftupleswith(yield, species)

kterm: string (formatvariesfor MOZ and KPP kterms)

label: string

rtype (only KPP): stringidentifyingreaction type („St“, „Tr“, …)

comment: string

Example: write a formattedreactionstring:

ad