CMAS Code Repository

From CMASWIKI
Jump to: navigation, search

Contributed Projects

CMAS GitHub

The CMAS Center source code repository includes several meteorology, emissions, and air quality modeling utilities, including:

  • AdjustDust - Apply BELD land use vegetation scavenging factors to gridded dust emissions

regridding tools

global to AQMEII-NA

The following sources are all about regridding a global emissions inventory to AQMEII-NA, a 12-km LCC domain over North America, generating CMAQ-friendly output (e.g., netCDF with hourly estimates in moles/s). They all regrid N2O but are written for flexibility: you can probably adapt them to your species of interest. They all use bash, NCL, and R, and seek to facilitate checking their results with a combination of statistical and visual output.

AQMEII_ag_soil
Combines EPIC crop emittivities with BELD crop coverage data to produce EPIC emissions, which are then combined with EDGAR-4.2 data on agricultural soils and 2D-regridded to produce an ag-soil inventory for AQMEII-NA.
CLM_CN_global_to_AQMEII-NA
2D-regrids a natural-soil inventory from MIT CGCS.
EDGAR-4.2_minus_soil_and_biomass_to_AQMEII-NA
Combines a number of anthropogenic EDGAR-4.2 inventories, 2D-regrids their sum.
GEIA_regrid
Reads a GEIA marine inventory from its native format into netCDF, then 2D-regrids.
GFED-3.1_global_to_AQMEII-NA
2D-regrids non-combustion burning emissions from GFED-3.1.
MOZART-global-to-AQMEII-NA
(incomplete) 3D-regrids a global inventory from MIT CGCS for use as boundary and initial conditions.

integration tools

N2O integration project

The project Simulation of N2O Production and Transport in North America Compared to Tower Measurements integrates regridded N2O emissions into "normal" CMAQ AQ-only emissions, and N2O estimates into "normal" CMAQ AQ-only boundary- and initial-conditions. See particularly the subprojects

Using Git

Git is distributed version control software that allows users to download the very latest version of a branch, without having to wait for someone to get around to packaging it.

Creating an account on Github and adding source code

First create an account on GitHub and define a new project (e.g. CMAS). You can have multiple code archives under a Git project.

Next install Git on your development machine.

Create a working directory on your machine and clone your Git project archive (substituting username and project with your respective user and projects that you set up on Github):

git clone https://github.com/{username}/{project}.git

Create a directory for your source code and add your code to this directory:

mkdir Utility1
cp ~/mycodes/utility1/* .

Add these codes to the Git archive:

git add Utility1
git commit -m "Initial source codes for utility1"

Upload these codes into the online Githup archive

git push https://github.com/{username}/{project}.git

Now your codes are up on GitHub and ready for download by members of the community

Downloading codes on GitHub

Find the code archive on GitHub that you'd like to download and copy the URL from the project page.

The first step is to clone the code repository. Enter in the following on your command line:

git clone https://github.com/{URL of project}.git

In the case that you see "The requested URL returned error: 403" or "error: The requested URL returned error: 403 while accessing..." you need to check your Git client version

git --version

and upgrade to at least git 1.7