Skip to content

Commit

Permalink
Merge pull request #5 from IMMM-SFA/v0.0.0
Browse files Browse the repository at this point in the history
Stage v0.0.0 release
  • Loading branch information
crvernon authored Aug 30, 2022
2 parents b91b6c8 + 24851ae commit d1c3caa
Show file tree
Hide file tree
Showing 29 changed files with 188 additions and 404 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/build.yml

This file was deleted.

82 changes: 82 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# vscode
naturf/.vscode

# ignore docs build
docs/build/

# pyenv
.python-version

# jupyter
.ipynb_checkpoints
notebooks/.ipynb_checkpoints/*

# package
build/
*.pyc
naturf.egg-info/
dist/

# pycharm
.idea

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk
© 2022 GitHub, Inc.
Terms
Privacy
Security
Status
Contact GitHub
Pricing
API
Training
Blog
About
20 changes: 11 additions & 9 deletions NATURF/LICENSE → LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ MIT License

Copyright (c) 2022 Levi Sweet-Breu and Melissa Allen-Dumas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Copyright (c) 2022 UT-Battelle, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Expand All @@ -16,6 +18,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
Empty file removed NATURF/.gitkeep
Empty file.
3 changes: 0 additions & 3 deletions NATURF/.vscode/settings.json

This file was deleted.

2 changes: 0 additions & 2 deletions NATURF/__init__.py

This file was deleted.

Binary file removed NATURF/tests/00065-00096.00065-00096
Binary file not shown.
261 changes: 0 additions & 261 deletions NATURF/tests/C-5.csv

This file was deleted.

16 changes: 0 additions & 16 deletions NATURF/tests/compare_dc_output.py

This file was deleted.

21 changes: 0 additions & 21 deletions NATURF/tests/index

This file was deleted.

46 changes: 40 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,41 @@
[![build](https://github.com/IMMM-SFA/naturf/actions/workflows/build.yml/badge.svg)](https://github.com/IMMM-SFA/naturf/actions/workflows/build.yml)

This repository contains:
- Code
- data, and
- products related to IM3
- and much more

## naturf

NATURF: Neighborhood Adaptive Tissues for Urban Resilience Futures

## Description

The Neighborhood Adaptive Tissues for Urban Resilience Futures tool (NATURF) is
a Python workflow that generates data readable by the Weather Research and
Forecasting (WRF) model. The NATURF Python modules use shapefiles containing
building footprint and height data as input to calculate 132 building parameters
at any resolution and converts the parameters into a binary file format.

NATURF was created to:

- addresses the knowledge gap of the effect of the geometry of a neighborhood on the local meteorology and
- translate neighborhood morphology (building footprints, heights, spacing, etc.) representations to the WRF-readable urban parameters so that meteorological processes at urban scale can interact with the built environment.

## Example Data

The example data provided with this package includes a shapefile containing building footprints and heights for one 3.2km by 3.2km tile of
Washington, D.C. (C-5.shp) and a CSV file that lists the index name for each tile in Washington, D.C. (DC_Indices.csv).

NATURF requires the center latitude and longitude of the study area in order to correctly project the output data,
but these values are already included in `scripts/workflow.py` for the example data.

Outputs from the example data should include a binary file named `00065-00096.00065-00096`, an `index` file,
a CSV file with urban parameter values for each building, two NumPy files, several pickle files that are
used in the compilation of the binary file, and a directory of TIF rasters that represent each of the
132 calculated urban parameters.

## Workflow

1. Example data is provided in this repository in the `example` directory
2. Setup paths and settings in `scripts/workflow.py`
3. Run `scripts/workflow.py` in a Python 3.8 or greater environment

## Citation

> Allen-Dumas, Melissa Ree, Sweet-Breu, Levi, Seals, Matthew, Berres, Andy, Vernon, Chris R., Rexer, Emily, and USDOE Office of Science. NATURF. Computer software. https://www.osti.gov//servlets/purl/1879628. Vers. 0. USDOE Office of Science (SC), Biological and Environmental Research (BER). Earth and Environmental Systems Science Division. 31 Aug. 2022. Web. doi:10.11578/dc.20220803.4.
Binary file removed daymet_v3_tmax_annavg_1999_hi.nc4
Binary file not shown.
50 changes: 50 additions & 0 deletions example/DC_Indices.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
GRID_ID,Index
A-7,00001-00032.00001-00032
B-7,00033-00064.00001-00032
C-7,00065-00096.00001-00032
D-7,00097-00128.00001-00032
E-7,00129-00160.00001-00032
F-7,00161-00192.00001-00032
G-7,00193-00224.00001-00032
A-6,00001-00032.00033-00064
B-6,00033-00064.00033-00064
C-6,00065-00096.00033-00064
D-6,00097-00128.00033-00064
E-6,00129-00160.00033-00064
F-6,00161-00192.00033-00064
G-6,00193-00224.00033-00064
A-5,00001-00032.00065-00096
B-5,00033-00064.00065-00096
C-5,00065-00096.00065-00096
D-5,00097-00128.00065-00096
E-5,00129-00160.00065-00096
F-5,00161-00192.00065-00096
G-5,00193-00224.00065-00096
A-4,00001-00032.00097-00128
B-4,00033-00064.00097-00128
C-4,00065-00096.00097-00128
D-4,00097-00128.00097-00128
E-4,00129-00160.00097-00128
F-4,00161-00192.00097-00128
G-4,00193-00224.00097-00128
A-3,00001-00032.00129-00160
B-3,00033-00064.00129-00160
C-3,00065-00096.00129-00160
D-3,00097-00128.00129-00160
E-3,00129-00160.00129-00160
F-3,00161-00192.00129-00160
G-3,00193-00224.00129-00160
A-2,00001-00032.00161-00192
B-2,00033-00064.00161-00192
C-2,00065-00096.00161-00192
D-2,00097-00128.00161-00192
E-2,00129-00160.00161-00192
F-2,00161-00192.00161-00192
G-2,00193-00224.00161-00192
A-1,00001-00032.00193-00224
B-1,00033-00064.00193-00224
C-1,00065-00096.00193-00224
D-1,00097-00128.00193-00224
E-1,00129-00160.00193-00224
F-1,00161-00192.00193-00224
G-1,00193-00224.00193-00224
1 change: 1 addition & 0 deletions example/shapefile/C-5.cpg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UTF-8
Binary file added example/shapefile/C-5.dbf
Binary file not shown.
1 change: 1 addition & 0 deletions example/shapefile/C-5.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PROJCS["NAD_1983_Contiguous_USA_Albers",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Albers"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-96.0],PARAMETER["Standard_Parallel_1",29.5],PARAMETER["Standard_Parallel_2",45.5],PARAMETER["Latitude_Of_Origin",23.0],UNIT["Meter",1.0]]
Binary file added example/shapefile/C-5.sbn
Binary file not shown.
Binary file added example/shapefile/C-5.sbx
Binary file not shown.
Binary file added example/shapefile/C-5.shp
Binary file not shown.
Binary file added example/shapefile/C-5.shx
Binary file not shown.
4 changes: 0 additions & 4 deletions requirements.txt

This file was deleted.

6 changes: 3 additions & 3 deletions NATURF/Binary.py → scripts/Binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,11 +453,11 @@ def make_binary(name, path, tifDir, cenlat, cenlon, outputDir, id_field, height_
index.write(' dx=100.0\n')
index.write(' known_x=1\n')
index.write(' known_y=1\n')
index.write(' known_lat=35.6936372\n')
index.write(' known_lon=-115.4739874\n')
index.write(' known_lat=38.7940343\n')
index.write(' known_lon=-77.1294740\n')
index.write(' truelat1=45.5\n')
index.write(' truelat2=29.5\n')
index.write(' stdlon=-114.75\n')
index.write(' stdlon=-77.0\n')
index.write(' wordsize=4\n')
index.write(' endian=big\n')
index.write(' signed=no\n')
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions setup.cfg

This file was deleted.

34 changes: 0 additions & 34 deletions setup.py

This file was deleted.

0 comments on commit d1c3caa

Please sign in to comment.