User Tools

Site Tools


tools:actools:cmaq_reduced

This is an old revision of the document!


CMAQ Reduced

Under the conventions of the BSC-AC Technical Memorandum 2016-002 this tools makes the reduced version of the CMAQ (CCTM) outputs.

This a tool developed specifically for the CMAQ outputs, it is developed in Python 2.7.x language and use many of the Python libraries to make it easy.

Content

This tool is composed of 3 elements

  • Code
  • Configuration file
  • Reduced specifications

Code

cmaq_reduce.py is fully in Python 2.7.x language and uses some libraries:

  • ConfigParser → To read the configuration file.
  • pandas → To read the CSV as a DataFrame.
  • numpy → To do the calculations of the information.
  • datetime → To use correct dates.
  • netCDF4 → To use NetCDF files.

All the functions of the script are documented following the conventions. Feel free to inspect them.

To run the script is needed two more files to specify What to do (Configuration file) and How to do it (Reduced specifications).

Configuration file

cmaq_reduce.conf is the configuration file needed to run the script. You must give the configuration file as an argument

./cmaq_reduced.py cmaq_reduced.conf

This configuration file is divided in 3 sections and all of the parameters are commented to clarify them.

All the sections will be explained later, but first you have to take in account that normally the paths where are stored the MCIP and CCTM outputs are not statics.

The way to do these dynamic paths is by sustitutions:

  • <date> → YYYYMMDDHH
  • <dateJ> → YYYYJJJ
  • <domain> → domain (IP, EU, …)

example:

 start_date = 30/12/2016
 domain = IP4
 cmaq_out_dir = /gpfs/projects/bsc32/bsc32359/CMAQ-mat/FORECAST/AQ/F-<domain>/OUT
 mcip_folder = MCIP/OUTPUT_MCIP_<dateJ>
 cctm_folder = CCTM/<dateJ>

result:

 mcip_directory -> /gpfs/projects/bsc32/bsc32359/CMAQ-mat/FORECAST/AQ/F-IP4/OUT/MCIP/OUTPUT_MCIP_2016366
 cctm_directory -> /gpfs/projects/bsc32/bsc32359/CMAQ-mat/FORECAST/AQ/F-IP4/OUT/CCTM/2016366
General Section
  • start_date → Starting date to generate reduceds. All the dates must to be in the format “DD/MM/YYYY”. If you want to run the current day start_date = TODAY
  • end_date → End date to generate the reduceds. If you want to do only one day it have to be the same date as the start_date.
  • exp_id → ID of the experiment. For Caliope it is CALIOPE/<domain>
tools/actools/cmaq_reduced.1485941782.txt.gz · Last modified: 2017/02/01 09:36 by ctena