Coder Social home page Coder Social logo

wrf-nalcms's Introduction

wrf-nalcms

Urban fraction

Process NALCMS land use data for ingestion into WRF. For conversion of source land use classes (including urban), MODIFIED_IGBP_MODIS_NOAH land use table in WRF is assumed.

Getting started

Set up Python environment, get dependencies, and install

python3 -m venv venv # create a fresh environment
source venv/bin/activate # activate the environment
pip install -U pip # update the package manager
pip install -U https://github.com/cloudruninc/wrf-nalcms # install this package

This will install the nalcms executable program to your path.

Download the NALCMS data

  1. Follow this link.
  2. Download the 30-m land cover from 2015.
  3. Unzip north_america_2015.zip.
  4. Unzip NA_NALCMS_2015_LC_30m_LAEA_mmu5pix_.zip.

This will give you a large TIFF file in your path (NA_NALCMS_2010_v2_LC_30m_LAEA_mmu5pix_.tif).

Running nalcms

Type nalcms -h or nalcms --help to learn how to use nalcms:

nalcms --help
usage: nalcms [-h] [-d] [-c {all,urban}] [-u {single,multi}]
              [--low-density-residential LOW_DENSITY_RESIDENTIAL]
              [--high-density-residential HIGH_DENSITY_RESIDENTIAL]
              [--commercial-industrial COMMERCIAL_INDUSTRIAL]
              nalcms_path geo_em_path

nalcms - Process NALCMS land use data for ingestion into WRF

positional arguments:
  nalcms_path           Path to the NALCMS source TIFF file
  geo_em_path           Path to the geo_em target NetCDF file

optional arguments:
  -h, --help            show this help message and exit
  -d, --demo            NALCMS sampling algorithm demo
  -c {all,urban}, --classes {all,urban}
                        Which classes to process
  -u {single,multi}, --urban {single,multi}
                        Whether to use single or multiple (3) urban classes
                        (default single)
  --low-density-residential LOW_DENSITY_RESIDENTIAL
                        Low density residential urban fraction threshold
                        (default 0.6)
  --high-density-residential HIGH_DENSITY_RESIDENTIAL
                        High density residential urban fraction threshold
                        (default 0.9)
  --commercial-industrial COMMERCIAL_INDUSTRIAL
                        Commercial/industrial urban fraction threshold
                        (default 0.95)

Example use:

nalcms NA_NALCMS_2010_v2_LC_30m_LAEA_mmu5pix_.tif geo_em.d01.nc

nalcms will:

  1. Create a copy of your geo_em file;
  2. Update the following fields: LU_INDEX, FRC_URB2D, LANDUSEF;
  3. Ouput the new geo_em file with a new.nc suffix.

Running the algorithm demo

nalcms --demo NA_NALCMS_2010_v2_LC_30m_LAEA_mmu5pix_.tif geo_em.d01.nc

This will output a set of images describing the sampling procedure, for example:

NALCMS demo

Need help?

Write to [email protected].

Acknowledgement

Development of wrf-nalcms was supported by the National Research Council of Canada.

wrf-nalcms's People

Contributors

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