Skip to content
/ ppnc Public
forked from rcurr/ppnc

Ppnc is a collection of python scripts that have been used to extract pp fields to cf-netCDF for submission to the CCMI archive.

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

theabro/ppnc

 
 

Repository files navigation

Ppnc

Ppnc is a collection of python scripts that have been used to extract pp fields to cf-netCDF for submission to the CCMI archive.

The code makes extensive use of Iris:

Requirements

The following python modules are used:

  • iris
  • numpy

F2PY is used to create the pressureconv modules

f2py -c -m pressureconv pressureconv.f90

Support

These scripts are provided in the hope that someone will find them useful. Due to time restrictions, support for using these scripts is not available.

Example Usage

For usage run:

python ppnc.py --help

or

python ppnc_cella.py --help

Edit some of the files under config to fit your particular use case.

  • config/global_attrs.py # defines some of the metadata that is written
  • config/req_data.py # defines your stashes, conversion factors and units
  • config/tweakables.py # defines your fillvalue and pressure levels

An example invocation of ppnc is as follows:

python ppnc.py -j $JID # Model JobID \
               -t "203001-203912" # Temporal Subset \
               -p /path/to/output/files \ 
               -s $STASH # STASH to restrict to \ 
               --pgrid THETA # Pressure Grid \
               -f /path/to/pp/files/*.pp # pp files to use

An example invocation of ppnc_cella is as follows:

python ppnc_cella.py -j $JID # Model JobID \
                     -a /path/to/model/orography # often called qrparm.orog \
                     -l /path/to/model/land-fraction_file # often called qrparm.fracmask \
                     -p /path/to/output/files \ 
                     -f /path/to/pp/files/${JID}a.pm${C}${N}${mon}.pp # Optional single pp-file to use if calculating grid-cell volume

Note that for ppnc_cella.py, a .pp file containing a single time-point should be used if the gridcell volume is required. This file should contain air potential temperature (theta: m01s00i004). This script writes out areacella, orog, sftlf, and "volcella" (if -f is specified) files.

The submit_scripts folder contains some example bash scripts to create and submit jobs on a system running LSF.

Copyright and licence

This file is part of ppnc.

ppnc Copyright (C) 2015 University of Cambridge

Ppnc is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Ppnc is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with ppnc. If not, see http://www.gnu.org/licenses/.

About

Ppnc is a collection of python scripts that have been used to extract pp fields to cf-netCDF for submission to the CCMI archive.

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.6%
  • Shell 6.0%
  • Fortran 4.4%