Skip to content

Commit 7b0d5d4

Browse files
authored
Prepare for new release (#16)
1 parent 3aebb3b commit 7b0d5d4

File tree

5 files changed

+21
-12
lines changed

5 files changed

+21
-12
lines changed

Diff for: .travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
dist: xenial
12
language: python
23
sudo: false
34
addons:
@@ -10,8 +11,8 @@ notifications:
1011
python:
1112
# We don't actually use the Travis Python, but this keeps it organized.
1213
- "2.7"
13-
- "3.5"
1414
- "3.6"
15+
- "3.7"
1516
install:
1617
# You may want to periodically update this, although the conda update
1718
# conda line below will keep everything up-to-date. We do this
@@ -33,9 +34,9 @@ install:
3334
- conda info -a
3435

3536
- conda create -n ecmwf-models python=${TRAVIS_PYTHON_VERSION}
37+
- conda env update -f environment.yml -n ecmwf-models
3638
- source activate ecmwf-models
3739

38-
- conda env update -f environment.yml
3940

4041
- python setup.py develop
4142

Diff for: CHANGES.rst

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
Changelog
33
=========
44

5-
Version 0.X
5+
Unreleased
6+
==========
7+
-
8+
9+
10+
Version 0.5
611
===========
712

13+
- Change default time steps to 6 hours.
814
- Add more tests, also for download functions
915
- Update documentation, add installation script
1016
- Fix bugs, update command line interfaces, update dependencies

Diff for: ecmwf_models/era5/download.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ def download_and_move(target_path, startdate, enddate, variables=None,
169169

170170
except:
171171
# delete the partly downloaded data and retry
172-
os.remove(dl_file)
172+
if os.path.isfile(dl_file):
173+
os.remove(dl_file)
173174
finished = False
174175
i += 1
175176
continue
@@ -229,8 +230,9 @@ def parse_args(args):
229230
help=("Keep the originally, temporally downloaded file as it is instread of deleting it afterwards"))
230231
parser.add_argument("-grb", "--as_grib", type=str2bool, default='False',
231232
help=("Download data in grib format, instead of the default netcdf format"))
232-
parser.add_argument("--h_steps", type=int, default=None, nargs='+',
233-
help=("Manually change the temporal resolution of downloaded images, must be full hours. "
233+
parser.add_argument("--h_steps", type=int, default=[0,6,12,18], nargs='+',
234+
help=("Manually change the temporal resolution of downloaded images."
235+
"Pass a set of full hours here, like '--h_steps 0 12'. "
234236
"By default 6H images (starting at 0:00 UTC, i.e. 0 6 12 18) will be downloaded"))
235237

236238
args = parser.parse_args(args)
@@ -256,5 +258,3 @@ def main(args):
256258

257259
def run():
258260
main(sys.argv[1:])
259-
260-

Diff for: ecmwf_models/era5/reshuffle.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@ def parse_args(args):
139139
"See documentation on image download for resp. ERA products, "
140140
"for more information on variable names of the product. "))
141141
parser.add_argument("--mask_seapoints", type=bool, default=False,
142-
help=("Replace points over water with nan. This option needs the"
143-
"lsm variable in the first file of the image data (mask will be static)."))
142+
help=("Replace points over water with nan. This option needs the "
143+
"LandSeaMask (lsm) variable in the image data (will use mask from first available file). "
144+
"To use a dynamic LSM, reshuffle the LSM variable to time series."))
144145
parser.add_argument("--h_steps", type=int, default=None, nargs='+',
145146
help=("Time steps (full hours) of images that will be reshuffled (must be in the images). "
146147
"By default 6H images (starting at 0:00 UTC) will be reshuffled."))

Diff for: ecmwf_models/erainterim/reshuffle.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,9 @@ def parse_args(args):
134134
"See documentation on image download for resp. ERA products, "
135135
"for more information on variable names of the product. "))
136136
parser.add_argument("--mask_seapoints", type=bool, default=False,
137-
help=("Replace points over water with nan. This option needs the"
138-
"lsm variable in the image data."))
137+
help=("Replace points over water with nan. This option needs the "
138+
"LandSeaMask (lsm) variable in the image data (will use mask from first available file). "
139+
"To use a dynamic LSM, reshuffle the LSM variable to time series."))
139140
parser.add_argument("--h_steps", type=int, default=None, nargs='+',
140141
help=("Time steps (full hours) of images that will be reshuffled (must be in the images). "
141142
"By default 6H images (starting at 0:00 UTC) will be reshuffled."))

0 commit comments

Comments
 (0)