Coder Social home page Coder Social logo

qxcai / trendy_gcp_prepare_inputs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stineb/trendy_gcp_prepare_inputs

0.0 1.0 0.0 36 KB

Contains scripts to prepare input data for TRENDY/GlobalCarbonProject simulations.

Shell 28.66% R 71.34%

trendy_gcp_prepare_inputs's Introduction

HYDE land use data processing for TRENDY / GCP

Author: Benjamin Stocker, Jul. 2017, [email protected]

This repository contains scripts to process HYDE land use data for TRENDY simulations, used for the Global Carbon Project (GCP). HYDE data is provided by K. Klein-Goldewijk on a spatial grid of 5 arcmin (1/12 degrees) for each variable (pasture, cropland) separately and in ascii format. This repository contains scripts to convert this data to NetCDF and re-grid fields to a 0.5 and a 1.0 degrees spatial grid (land mask from LUH). Re-gridding conserves the total area under cropland use and the total area under pasture use.

Important to note: HYDE 3.2 provides variables grazing = pasture + rangeland, where pasture and rangeland areas are distinguished by management and use intensity. The files produced here contain the variable past which is equal to grazing in the HYDE 3.2 dataset (see asc2cdf_hyde.jnl).

Usage

The following command executes all steps in sequence:

./prepare_landuse_hyde.sh

Steps are:

  1. Get file list on FTP server where original HYDE data is available from.
  2. Download each file (for each variable and time step)
  3. Unzip each file
  4. Convert ascii files to NetCDF
  5. Regrid files to 0.5 and 1.0 degrees grids. This combines pasture and cropland data into a single file
  6. Combine time steps into single file
  7. Modify NetCDF attributes

Requirements

Scripts are in bash, R, and Ferret, and use NCO commands and the lftp command. R uses the RNetCDF library.

Important: Modify all paths in scripts for your application and note some commented-out lines that need to be un-commented for preparing historical LUH files (as opposed to "extension"). You are free to use these scripts - open source! Please clone this repository and share your additions/modifications through github.

trendy_gcp_prepare_inputs's People

Contributors

stineb avatar qxcai avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.