Skip to main content

A Python interface to FLEXPART data.

Project description

# The pflexible module
# This module is being created to work with FLEXPART model ouput.
# For more information on FLEXPART visit:
# http://transport.nilu.no/flexpart
#
# FLEXPART is a Lagrangian particle dispersion model
# written by Andreas Stohl. It is in active development at NILU and by
# Sabine Eckhardt, Harald Sodemann, John Burkhart and numerous research
# groups worldwide.
#
# This module is based partially on Matlab(c) routines developed
# by Sabine Eckhardt and Harald Sodemann at NILU. Subsequent development
# and the Python routines have been conducted by John Burkhart.
#

for further information contact:
John F Burkhart, Norwegian Institute for Air Research
john.burkhart@nilu.no
2011.09.26


-----------
NOTES
-----------

Primary introduction to the module is here:
http://niflheim.nilu.no/~burkhart/pflexible


BitBucket
=========


Clone the bitbucket repository into a folder in your PYTHONPATH::

%hg clone https://bitbucket.org/jfburkhart/pflexible pflexible


----------------------
Working with pflexible
----------------------

There are a few 'gotchas' when using the module. First, you will likely
have to recompile (f2py) the FortFlex.f file and create a FortFlex.so module
for whatever computer you're using. The one presently is compiled for
64bit Linux (Ubuntu 12.04). For more information see the f2py directory.

An alternative 'BinaryFile' class has been created so one can work with pure
Python. Alone, it is significantly slower than the FortFlex module, however,
if you use the dumpgrid module, significant speedups can be achieved. For this
run::
python setup.py build_ext --inplace

This will compile the pflexcy.pyx file into a pflexcy.so module that can be
imported and used by the pf.readgrid function. A series of tests are run to try
and determine the best module to use -- somewhat transparently to the user. See
the pflexible.readgridV8 function for more information.

Primary functionality comes from the readheaderV8 function and the readgridV8
function. I have tried to create a "Header" class that can be used for some
typical analysis. See the examples directory, and don't forget to read the
source code.

Key Tools
----------

The primary workflow and usefulness of pflexible comes from the read_header and read_grid
routines, which are designed to help ultimately with plotting and data analysis of
the FLEXPART output.

To get started, at least become familiar with:

* Header class
* read_header
* read_grid
* fill_backward
* plot_sensitivity

NOTE: the other plotting functions are mostly wrappers which
ultimately make a call to plot_sensitivity.

Disclaimer
------------
About the mapping.py module, it is primarily designed as some convenience
routines for working with basemap.

All these routines were written 'on the fly', without a design plan
or test cases. Everything probably could use a rewrite!



Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

pflexible-0.9.0.zip (98.2 kB view details)

Uploaded Source

pflexible-0.9.0.tar.gz (94.8 kB view details)

Uploaded Source

File details

Details for the file pflexible-0.9.0.zip.

File metadata

  • Download URL: pflexible-0.9.0.zip
  • Upload date:
  • Size: 98.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pflexible-0.9.0.zip
Algorithm Hash digest
SHA256 e8487e399376ef5d9a830ebffeb5c5b6b4bae31f2eaef88094116ffbe170ece2
MD5 3be249d74d8511808869ffa4c638dfc7
BLAKE2b-256 1f617b582139b91b6517c2717c378ef7e7f2cf7dbeb801c9340afe8c7beaf215

See more details on using hashes here.

File details

Details for the file pflexible-0.9.0.tar.gz.

File metadata

  • Download URL: pflexible-0.9.0.tar.gz
  • Upload date:
  • Size: 94.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pflexible-0.9.0.tar.gz
Algorithm Hash digest
SHA256 08454bba227080f7d9048605e1181ae6caa1d29fb325a71b33d725afa97a1b0c
MD5 a78bd42e3658b3cc358aa1e13328cac1
BLAKE2b-256 d96fb55b50c64551372dce40bc4e5ceb75b376a267bad852f99efeea895679a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page