# Difference between revisions of "Using R to analyze GEOS-Chem data"

From Geos-chem

Line 1: | Line 1: | ||

On this page we include a tutorial about how to use the R programming language to analyze GEOS-Chem data. | On this page we include a tutorial about how to use the R programming language to analyze GEOS-Chem data. | ||

− | '''''Amos Tai <pkamostai@gmail.com> wrote ( | + | '''''Amos Tai <pkamostai@gmail.com> wrote (Jan 2013):''''' |

I have prepared a tutorial for using R to analyze GEOS-Chem and atmospheric data in the file: | I have prepared a tutorial for using R to analyze GEOS-Chem and atmospheric data in the file: | ||

− | R_Intro_for_Atmos_Sci.R | + | [https://dl.dropbox.com/u/2485687/R_Intro_for_Atmos_Sci.zip R_Intro_for_Atmos_Sci.R] |

with test data: | with test data: | ||

PM25_met_Ohio_201007.txt | PM25_met_Ohio_201007.txt | ||

PM25_T_daily_US_201007.RData | PM25_T_daily_US_201007.RData | ||

+ | and an introductory guide to R for MATLAB users: | ||

+ | R_for_MATLAB_Users.pdf | ||

I have also written many R functions suitable for analyzing 2D and 3D GEOS-Chem, EPA and meteorological data in these source files: | I have also written many R functions suitable for analyzing 2D and 3D GEOS-Chem, EPA and meteorological data in these source files: | ||

− | + | [https://dl.dropbox.com/u/2485687/get_geo.R get_geo.R] (for spatial analysis and visualization: interpolation, regridding, mapping, etc.) | |

− | + | [https://dl.dropbox.com/u/2485687/get_met.R get_met.R] (for dealing with time series and meteorological data) | |

− | + | [https://dl.dropbox.com/u/2485687/get_stat.R get_stat.R] (for general statistical and mathematical methods) | |

− | + | [https://dl.dropbox.com/u/2485687/get_EPA.R get_EPA.R] (for handling EPA air quality data) | |

The files include detailed instructions for each function. They can be used by sourcing in the R environment: | The files include detailed instructions for each function. They can be used by sourcing in the R environment: | ||

> source('get_geo.R') | > source('get_geo.R') | ||

− | + | These functions will be revised and updated from time to time. Feel free to download and use! | |

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + |

## Revision as of 22:12, 8 January 2013

On this page we include a tutorial about how to use the R programming language to analyze GEOS-Chem data.

**Amos Tai <pkamostai@gmail.com> wrote (Jan 2013):**

I have prepared a tutorial for using R to analyze GEOS-Chem and atmospheric data in the file:

R_Intro_for_Atmos_Sci.R

with test data:

PM25_met_Ohio_201007.txt PM25_T_daily_US_201007.RData

and an introductory guide to R for MATLAB users:

R_for_MATLAB_Users.pdf

I have also written many R functions suitable for analyzing 2D and 3D GEOS-Chem, EPA and meteorological data in these source files:

get_geo.R (for spatial analysis and visualization: interpolation, regridding, mapping, etc.) get_met.R (for dealing with time series and meteorological data) get_stat.R (for general statistical and mathematical methods) get_EPA.R (for handling EPA air quality data)

The files include detailed instructions for each function. They can be used by sourcing in the R environment:

> source('get_geo.R')

These functions will be revised and updated from time to time. Feel free to download and use!