Showing posts with label CPC. Show all posts
Showing posts with label CPC. Show all posts

Thursday, June 26, 2014

Updates to R package raincpc: Global Daily Rainfall for over 35 years

The Climate Prediction Center's  (CPC) global rainfall data, 1979 - present, 50 km resolution, is one of the few high-quality, long-term, observation-based, daily rainfall products available for free. Although raw data is available at CPC's ftp site, obtaining and processing the data is not easy since there are over 12000 files, and formats and names of these files have changed over time. 

The latest version of the raincpc package provides functionality to download, process and visualize over 35 years of global daily rainfall data from CPC. The vignette demonstrates the use of this package, including the extraction and display of regional rainfall data.

Following are some graphics from the raincpc vignette.






Tuesday, November 26, 2013

New R package raincpc: Obtain and Analyze Global Rainfall data from the Climate Prediction Center (CPC)

The Climate Prediction Center's (CPC) daily rainfall data for the entire world, 1979 - present & 50-km resolution, is one of the few high quality and long term observation-based rainfall products. Data is available at CPC's ftp site. However, it is a lot of data and there is no software to analyze and visualize the data.

Some issues with size/format of the CPC data:

  • too many files (365/366 files per year * 34 years, separate folder for each year)
  • each file has 360 rows and 720 columns
  • file naming conventions have changed over time - one format prior to 2006 and couple of different formats afterwards
  • file formats have changed over time - gzipped files prior to 2008 and plain binary files afterwards
  • downloading multiple files simultaneously from the CPC ftp site, using wget, does not seem to work properly
  • there is no software/code readily available to easily process/visualize the data

The R package `raincpc` makes life easier by providing functionality to download and process the data from CPC's ftp site. Some features of this new package are:

  • Data for anytime period during 1979-present can be downloaded and processed
  • Just two functions required: one to download the data (`cpc_get_rawdata`) and another to process the downloaded data (`cpc_read_rawdata`)
  • Making spatial maps using the processed data is easy, via ggplot

Here are some examples on how to obtain and visualize the data - https://github.com/RationShop/raincpc

Below are the relevant CRAN and GitHub sites:
Please let me know if you find any errors or if you have any comments or suggestions.