-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from ccht-ncsu/new_clumping_fx
added new clumping function to deal with levees
- Loading branch information
Showing
11 changed files
with
304 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
UTF-8 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
======================================================================== | ||
Louisiana Levees - Lines | ||
------------------------------------------------------------------------ | ||
https://koordinates.com/layer/20449-louisiana-levees-lines/ | ||
======================================================================== | ||
From: US National Oceanic and Atmospheric Administration (NOAA) | ||
|
||
Region: Louisiana | ||
|
||
CRS: WGS 84 | ||
|
||
------------------------------------------------------------------------ | ||
Processing steps applied by Koordinates | ||
------------------------------------------------------------------------ | ||
|
||
- imported to Koordinates in Esri JSON format on 30 Aug 2016 | ||
- reprojected from WGS 84 / Pseudo-Mercator to WGS 84 | ||
- converted by Koordinates to Shapefile on 27 Jun 2022 (reference #2537192) | ||
|
||
==================== | ||
No license specified | ||
==================== | ||
|
||
No license was specified for this layer. This could mean default rights under copyright law for your legal jurisdiction may apply. Please check with Koordinates if you're unsure of your right to access and use this layer. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import os | ||
import sys | ||
sys.path.append(r'/home/tacuevas/github/Kalpana/kalpana') | ||
from downscaling import runStatic | ||
''' | ||
Idem to example02 but in this case we will use a shapefile with the levee system of | ||
Louisiana | ||
''' | ||
|
||
## full path of the maxele file | ||
ncFile = r'/mnt/coe/engr/admin/ccee/Admin/ccee/jcdietri/jcdietri/Projects/2016-2020-DHS-CRCoE/Tomas/AdCirc/Katrina/maxele.63.nc' | ||
## contour levels to use in the downscaling | ||
## from 0 to 11 (included) every 1 | ||
levels = [0,10, 1] | ||
## output CRS | ||
epsgOut = 6344 | ||
## full path for the shape file with the maxele contours | ||
## same path is used for saving rasters and the grass location | ||
pathOut = r'/mnt/drive1/Insyncs/NCSU/Kalpana/Examples_github/example02_LA/maxele_katrina.shp' | ||
## version of grass 8.2 and 8.3 works | ||
grassVer = 8.2 | ||
## path of the downscaling rasters | ||
pathRasFiles = r'/mnt/drive1/Insyncs/NCSU/Kalpana/Data/topobathy/north_gulf_mexico' | ||
## rasters filenames, can be a list if more than one. | ||
## 'all' for importing ALL THE FILES in pathRasFiles | ||
rasterFiles = 'NGMconedRes10m.tif' | ||
## full path of the raster with the mesh element size | ||
meshFile = r'/mnt/drive1/Insyncs/NCSU/Kalpana/Debug/levees/SL16_NGM_CoNED10m.tif' | ||
## crs of adcirc output (default value) | ||
epsgIn = 4326 | ||
## vertical unit of the maxele | ||
vUnitIn = 'm' | ||
## vertical unit of the downscaled water levels | ||
vUnitOut = 'm' | ||
## name of the maxele variable to downscale. Always 'zeta_max' for downscaling | ||
var = 'zeta_max' | ||
## contours type. Always 'polygon' for downscaling | ||
conType = 'polygon' | ||
## full path of file (kml, kmz, shp, gpkg or tif) to crop the domain. | ||
## in this case we will use the same downscaling raster bounding box as the subdomain | ||
subDomain = os.path.join(pathRasFiles, rasterFiles) | ||
## epsg code or crs of the subDomain. In this case, as we are using the downscaling dem bounding box | ||
## as the subdomain, the same epsg code must be specified. | ||
epsgSubDom = 6344 | ||
## boolean for exporting the mesh as a shape file from maxele, not necessary in this | ||
## case since mesh was exported as preprocess. In example_03 it is exported. | ||
exportMesh = False | ||
## full path of pickle file with vertical datum differences for all mesh nodes | ||
## proprocess step | ||
dzFile = None | ||
## threshold to do apply the vertical datum difference, below -20 vyperdatum gives weird | ||
## results | ||
zeroDif = -20 | ||
## full path of the grass location if a existing one will be used | ||
## if None a new location called 'grassLoc' is created. A new location is created in | ||
## example_03 | ||
nameGrassLocation = None | ||
## Boolean for creating grass location, in this example it was created as a preprocess | ||
## step. In example_03 it is created. | ||
createGrassLocation = True | ||
## Method for assigning the crs to the grass location. Default and faster option | ||
createLocMethod = 'from_raster' | ||
## variable to downscale, can be 'zMax', 'zMean' and 'zMin'. With 'zMean', the mean value | ||
## of each contour is used. | ||
attrCol = 'zMean' | ||
## how many times the representative length the results are grown in the downscaling | ||
repLenGrowing = 1.0 | ||
## remove wet cells with water level below the ground surface | ||
compAdcirc2dem = True | ||
## transform the water level to water depth | ||
floodDepth = False | ||
## export downscaled results as shape files. Slows down the process a couple of minutes | ||
ras2vec = False | ||
## boolean for exporing raw maxele as a DEM. Useful for debugging | ||
exportOrg = False | ||
## full path of the shapefile with levees | ||
leveesFile = r'/home/tacuevas/github/Kalpana/adds/levees_louisiana/louisiana-levees-lines.shp' | ||
## boolean for reprojecting the downscaled dem back to lat/lon | ||
finalOutToLatLon = False | ||
|
||
#################### calling downscaling | ||
runStatic(ncFile, levels, epsgOut, pathOut, grassVer, pathRasFiles, rasterFiles, meshFile, epsgIn=epsgIn, | ||
vUnitIn=vUnitIn, vUnitOut=vUnitOut, var=var, conType =conType, subDomain=subDomain, epsgSubDom=epsgSubDom, | ||
exportMesh= exportMesh, dzFile=dzFile, zeroDif=-zeroDif, nameGrassLocation=nameGrassLocation, | ||
createGrassLocation=createGrassLocation, createLocMethod=createLocMethod, attrCol=attrCol, | ||
repLenGrowing=repLenGrowing, compAdcirc2dem=compAdcirc2dem, floodDepth=floodDepth, | ||
ras2vec=ras2vec, exportOrg=exportOrg, leveesFile = leveesFile, finalOutToLatLon=finalOutToLatLon) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.