GithubHelp home page GithubHelp logo

yangxhcaf / ghcnd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eaburakowski/ghcnd

0.0 1.0 0.0 24 KB

Scripts used to process Global Historical Climatology Network Daily data.

MATLAB 100.00%

ghcnd's Introduction

GHCND

Scripts used to process Global Historical Climatology Network Daily (GHCND) data. GHCND data available at: https://www.ncdc.noaa.gov/data-access/land-based-station-data/land-based-datasets/global-historical-climatology-network-ghcn

Matlab scripts used for processing GHCND data. Code requires customization and will not run 'as-is'. Several of the matlab scripts are dervied directly from, or modified from, the Matlab Spring Indices code package: https://www.mathworks.com/matlabcentral/fileexchange/54679-extended-spring-indices--si-x--code Ault et al. 2015.

Always happy to answer questions and I welcome helpful suggestions to improve the efficiency of the code. The snow-related code was written for a specific project (Protect Our Winters & REI, 2018 - https://www.rei.com/blog/snowsports/climate-change-threatens-11-3-billion-snowsports-industry-protect-our-winters-report-says) and is adaptable for multiple uses. The code is also being used to update the New Hampshire Climate Assessment Report using Localized Constructed Analogs (LOCA) data (Pierce et al. 2014).

contact: [email protected].

Files listed in order of use in my processeing & analysis.

(1a) mk_ghcnd.m

  • processes metadata file from GHCND (ghcnd-stations.txt)

(1b) mk_ghcnd_inv.m

  • processes inventory file from GHCND (ghcnd-inventory.txt)

(2) filterGHCND.m

  • Screens and filters Global Historical Climatology Network Daily (GHCN-D)
  • for station availability based on:
    • start year of record
    • end year of record
    • location (US states)
    • data availability (var = SNWD, SNOW, TMAX, TMIN, or PRCP)

(3) read_ghcnd_dly_file.m

  • loads ghcnd station data
  • used in GHCND_SNWD.m, below. Not meant to run as stand-alone
  • from Matlab Spring Indices code package (Ault et al. 2015)

(4) GHCND_SNWD.m (same for GHCND_TMAX.m, GHCND_PRCP.m)

  • loads Global Historical Climatology Network Daily files using the function "read_ghcnd_dly_file.m"
  • Output is a state-level .mat file of daily station data meeting criteria defined in filterGHCND.m

(5) procSNWD.m (same for procTMAX_LOCA.m, procTMIN_LOCA.m, procPRPC_LOCA.m)

  • loads state-level .mat files created using "GHCND_SNWD.m", which contain GHCND daily snow depth data (in mm), 2000-2016.
  • The script then does the following:
    • calculates percent missing data per season or year
    • removes years or seasons missing % threshold of daily records
    • removes stations missing > 2 years of data (procSNWD.m only)
    • sums the number of days per winter (December through March) with snow depth greater than a user-defined threshold (>4" recommended; procSNWD.m only)
    • calculates the state average # of snow days per winter (procSNWD.m only)
    • ranks the winters from highest to lowest number of snow covered days (procSNWD.m only)
    • calculates a variety of metrics for TMAX, TMIN, and PRCP.

(6) writeGHCND_metadata.m

  • writes metadata from GHNCD station list generated using filterGHCND.m into .csv file (for use in LOCA processing)

ghcnd's People

Contributors

eaburakowski 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.