Skip to content

Commit a7d9092

Browse files
authored
Merge pull request #3 from openearth/master
Merge from master
2 parents 3e39dc7 + a704d95 commit a7d9092

File tree

6 files changed

+61
-12
lines changed

6 files changed

+61
-12
lines changed

.circleci/config.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Python CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-python/ for more details
4+
#
5+
version: 2
6+
jobs:
7+
build:
8+
docker:
9+
# specify the version you desire here
10+
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
11+
- image: circleci/python:3.6.1
12+
13+
# Specify service dependencies here if necessary
14+
# CircleCI maintains a library of pre-built images
15+
# documented at https://circleci.com/docs/2.0/circleci-images/
16+
# - image: circleci/postgres:9.4
17+
18+
working_directory: ~/repo
19+
20+
steps:
21+
- checkout
22+
23+
# Download and cache dependencies
24+
- restore_cache:
25+
keys:
26+
- v1-dependencies-{{ checksum "requirements.txt" }}
27+
# fallback to using the latest cache if no exact match is found
28+
- v1-dependencies-
29+
30+
- run:
31+
name: install dependencies
32+
command: |
33+
python3 -m venv venv
34+
. venv/bin/activate
35+
pip install -r requirements.txt
36+
37+
- save_cache:
38+
paths:
39+
- ./venv
40+
key: v1-dependencies-{{ checksum "requirements.txt" }}
41+
42+
# run tests!
43+
# this example uses Django's built-in test-runner
44+
# other common Python testing frameworks include pytest and nose
45+
# https://pytest.org
46+
# https://nose.readthedocs.io
47+
- run:
48+
name: run tests
49+
command: |
50+
. venv/bin/activate
51+
nosetests
52+
53+
- store_artifacts:
54+
path: test-reports
55+
destination: test-reports

aeolis/wind.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ def interpolate(s, p, t):
9696
uw_d = p['wind_file'][:,2] / 180. * np.pi
9797

9898
s['uw'][:,:] = interp_circular(t, uw_t, uw_s)
99-
s['udir'][:,:] = np.arctan2(np.interp(t, uw_t, np.sin(uw_d)),
100-
np.interp(t, uw_t, np.cos(uw_d))) * 180. / np.pi
99+
s['udir'][:,:] = np.arctan2(interp_circular(t, uw_t, np.sin(uw_d)),
100+
interp_circular(t, uw_t, np.cos(uw_d))) * 180. / np.pi
101101

102102
s['uws'] = s['uw'] * np.cos(s['alfa'] + s['udir'] / 180. * np.pi)
103103
s['uwn'] = s['uw'] * np.sin(s['alfa'] + s['udir'] / 180. * np.pi)

circle.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/defaults.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ configuration is listed below.
1010
.. literalinclude:: ../aeolis/constants.py
1111
:language: python
1212
:start-after: #: AeoLiS model default configuration
13-
:end-before: #: Required model configuration parameters
13+
:end-before: #: Merge initial and model state

docs/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sphinxcontrib-bibtex
2+
sphinxcontrib-napoleon

requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
netCDF4==1.4.1
22
coverage
33
codecov
4-
sphinxcontrib-bibtex
5-
sphinxcontrib-napoleon==0.2.8
6-
sphinx-rtd-theme
4+

0 commit comments

Comments
 (0)