-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added class for ICON-grid in grids.py * Added class ICONGrid in grids.py * Extended the code for mapping to ICON output grid: - globally changed "cosmo_grid" to "output_grid" (except for the existing config-files) - created a new config file for the tno/ICON-case - added 2 new functions in utilities: "prepare_ICON_output_file" and "write_variable_ICON" - built in switches in __init__ and utilities where necessary to distinguish between COSMO and ICON grid - changed further variables where reasonable, e.g. cosmo_cell_x --> output_cell_x * Changed all output_grid-variables in the config-files * Gridding of the pointsources is much more efficient now looping only over cells around the closest vertex * central_longitude in Mellweide-projection is now pollon-dependent and Readme is updated with a link to the Readme in cases/ * cases/README.md is now a link
- Loading branch information
1 parent
7628b63
commit 038a9e5
Showing
14 changed files
with
498 additions
and
127 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
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
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
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,79 @@ | ||
import os | ||
import time | ||
|
||
from emiproc.grids import COSMOGrid, TNOGrid, ICONGrid | ||
|
||
# inventory | ||
inventory = 'TNO' | ||
|
||
# model either "cosmo-art", "cosmo-ghg" or "icon" (affects the | ||
# output units and handling of the output grid) | ||
model = 'icon' | ||
|
||
# path to input inventory | ||
input_path = "/input/TNOMACC/TNO_GHGco/TNO_6x6_GHGco_v1_1/TNO_GHGco_v1_1_year2015.nc" | ||
|
||
# input grid | ||
input_grid = TNOGrid(input_path) | ||
|
||
# input species | ||
species = ['co2_ff', 'co2_bf'] | ||
|
||
# input categories | ||
categories = [ | ||
"A", | ||
"B", | ||
"C", | ||
"D", | ||
"E", | ||
"F1", | ||
"F2", | ||
"F3", | ||
"G", | ||
"H", | ||
"I", | ||
"J", | ||
"K", | ||
"L", | ||
] | ||
|
||
# mapping from input to output species (input is used for missing keys) | ||
in2out_species = { | ||
'co2_ff': 'CO2', | ||
'co2_bf': 'CO2' | ||
} | ||
|
||
# mapping from input to output species (input is used for missing keys) | ||
in2out_category = {} | ||
|
||
# output variables are written in the following format using species and | ||
# category after applying mapping as well as source_type (AREA or POINT) for | ||
# TNO inventories | ||
varname_format = '{species}_{category}' # not providing source_type will add up | ||
# point and area sources | ||
|
||
# path to ICON output grid | ||
icon_path = "/newhome/stem/git/C2SM-RCM/ICON_grids/MCH2km/domain1_DOM01.nc" | ||
|
||
# output ICON grid | ||
output_grid = ICONGrid(icon_path) | ||
|
||
# output path and filename | ||
output_path = os.path.join('outputs', '{online}') | ||
output_name = "tno.nc" | ||
|
||
# resolution of shape file used for country mask | ||
shpfile_resolution = "10m" | ||
|
||
# number of processes computing the mapping inventory->COSMO-grid | ||
nprocs = 18 | ||
|
||
# metadata added as global attributes to netCDF output file | ||
nc_metadata = { | ||
"DESCRIPTION": "Gridded annual emissions", | ||
"DATAORIGIN": "TNO", | ||
"CREATOR": "Jean-Matthieu Haussaire", | ||
"EMAIL": "jean-matthieu.haussaire@empa.ch", | ||
"AFFILIATION": "Empa Duebendorf, Switzerland", | ||
"DATE CREATED": time.ctime(time.time()), | ||
} |
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
Oops, something went wrong.