-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
17 changed files
with
1,523 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include emulator/data/*.csv | ||
include emulator/pretrained_models/*.pb |
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 |
---|---|---|
@@ -1 +1,34 @@ | ||
# deep_climate_emulator | ||
# deep_climate_emulator | ||
|
||
A Deep Neural Network approach for estimating precipitation fields in Earth | ||
System Models. | ||
|
||
## To install package | ||
```pip install git+https://github.com/webert3/climate-emulator``` | ||
|
||
## Training models | ||
See ```trainer.py``` for an example. | ||
|
||
## Using pretrained models to generate precipitation forecasts | ||
See ```inference.py``` for an example. | ||
|
||
This package comes bundled with a pretrained 18-layer Residual Network (window | ||
size = 60), and this will be loaded by default if TensorFlow checkpoint files | ||
are not provided. | ||
|
||
## GPU support | ||
|
||
It is highly recommended to train your models with a GPU! To train using a GPU, | ||
make sure you have the appropriate versions of TensorFlow and cuDNN installed on | ||
your system. For more information on GPU support see: | ||
<https://www.tensorflow.org/install/gpu> | ||
|
||
Inference using pretrained models, on the other hand, will run sufficiently fast | ||
on CPUs alone (i.e. without GPU support). Our package uses a version of | ||
TensorFlow that runs on CPUs by default. | ||
|
||
## Training Data | ||
All climate model output used in this study as training data is available through | ||
the Earth System Grid Federation. | ||
|
||
## Citations |
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,202 @@ | ||
{ | ||
"layers" : [ | ||
{ | ||
"shortcut" : 2, | ||
"projection" : 0, | ||
"layers" : [ | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 64, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
}, | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 64, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
} | ||
] | ||
}, | ||
{ | ||
"shortcut" : 2, | ||
"projection" : 0, | ||
"layers" : [ | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 64, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
}, | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 64, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
} | ||
] | ||
}, | ||
{ | ||
"shortcut" : 2, | ||
"projection" : 0, | ||
"layers" : [ | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 128, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
}, | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 128, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
} | ||
] | ||
}, | ||
{ | ||
"shortcut" : 2, | ||
"projection" : 0, | ||
"layers" : [ | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 128, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
}, | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 128, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
} | ||
] | ||
}, | ||
{ | ||
"shortcut" : 2, | ||
"projection" : 0, | ||
"layers" : [ | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 256, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
}, | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 256, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
} | ||
] | ||
}, | ||
{ | ||
"shortcut" : 2, | ||
"projection" : 0, | ||
"layers" : [ | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 256, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
}, | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 256, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
} | ||
] | ||
}, | ||
{ | ||
"shortcut" : 2, | ||
"projection" : 0, | ||
"layers" : [ | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 512, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
}, | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 512, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
} | ||
] | ||
}, | ||
{ | ||
"shortcut" : 2, | ||
"projection" : 0, | ||
"layers" : [ | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 512, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
}, | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 512, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
} | ||
] | ||
}, | ||
{ | ||
"shortcut" : 2, | ||
"projection" : 0, | ||
"layers" : [ | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 1, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
}, | ||
{ | ||
"type" : "conv", | ||
"kernel_width" : 3, | ||
"filters" : 1, | ||
"stride" : 1, | ||
"padding" : "SAME", | ||
"activation" : "relu" | ||
} | ||
] | ||
} | ||
] | ||
} |
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,9 @@ | ||
{ | ||
"epochs" : 89, | ||
"lr" : 0.06907177473013913, | ||
"truncated_normal_stddev" : 0.016134691682920446, | ||
"window" : 60, | ||
"decay_func" : "linear", | ||
"use_area_weighted_obj" : 0, | ||
"use_scheduled_sampling" : 1 | ||
} |
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,10 @@ | ||
# Architectures | ||
|
||
The deep-climate-emulator package expects a JSON file defining the DNN | ||
architecture as well as the hyperparameters used during training. Here we | ||
provide two example files containing the architecture definition for our best | ||
residual network (```18-layer-ResNet_architecture.json```) and the | ||
hyperparameters used during training | ||
(```18-layer-ResNet_hyperparameters.json```). These files can be used with the | ||
script ```trainer.py``` to approximately reproduce our results. | ||
|
Oops, something went wrong.