-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb4d232
commit a9e1bf1
Showing
10 changed files
with
125 additions
and
62 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 @@ | ||
venv/ |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+23.8 MB
data/MSK_0.009bg3_Globcover_lcz_3_default_Varentsov_etal_Atm_fixDC_True.nc
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,5 @@ | ||
rasterio==1.1.4 | ||
scipy==1.4.1 | ||
numpy==1.19.4 | ||
xarray==0.15.1 | ||
pandas==1.0.5 |
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,36 @@ | ||
import os | ||
abspath = os.path.abspath(__file__) | ||
WORKDIR = os.path.dirname(abspath) | ||
os.chdir(WORKDIR) | ||
from utils import lcz_to_cosmo, remove_double_counting | ||
|
||
## Adjust directory here | ||
CLMFILE = f"{WORKDIR}/data/MSK_0.009bg3_Globcover.nc" | ||
LCZFILE = f"{WORKDIR}/data/LCZ_Russia_Moscow.tif" | ||
|
||
# FILES | ||
UCPFILE = f"{WORKDIR}/tables/LCZ_UCP_default.csv" | ||
GCFILE = f"{WORKDIR}/tables/globcover_lookup.csv" | ||
|
||
|
||
# EXECUTE FUNCTIONS | ||
# 1. Assign UCP values to LCZ map and convert to COSMO Grid | ||
CLM_FILE_NEW = lcz_to_cosmo( | ||
ucpFile=UCPFILE, | ||
clmFile=CLMFILE, | ||
lczFile=LCZFILE, | ||
bandNr=3, | ||
ucpVersion='default', | ||
nrLcz=17, | ||
interpMethod='linear', | ||
aggregation=True, | ||
aggregationScale=2, | ||
isaWeight=True, | ||
saiWeight=False, | ||
fileNameExt='_Varentsov_etal_Atm') | ||
|
||
# 2. Address the double counting issue. | ||
remove_double_counting( | ||
clmFile=CLM_FILE_NEW, | ||
gcFile=GCFILE, | ||
removeUrban=True) |
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