Skip to content

Commit

Permalink
ADD: Testing, new constraint for points, code reorganization and
Browse files Browse the repository at this point in the history
cleanup.
  • Loading branch information
Robert Jackson committed Jan 22, 2020
1 parent 94a83cb commit 102bc5a
Show file tree
Hide file tree
Showing 9 changed files with 390 additions and 409 deletions.
24 changes: 0 additions & 24 deletions examples/get_iem_data.py

This file was deleted.

3 changes: 3 additions & 0 deletions pydda/constraints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
make_constraint_from_wrf
add_hrrr_constraint_to_grid
make_constraint_from_era_interim
download_needed_era_data
get_iem_obs
"""

Expand Down
21 changes: 14 additions & 7 deletions pydda/constraints/station_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,20 @@ def get_iem_obs(Grid, window=60.):
-------
station_data: list of dicts
A list of dictionaries containing the following entries as keys:
lat - Latitude of the site (float)
lon - Longitude of the site (float)
u - u wind at the site (float)
v - v wind at the site (float)
w - w wind at the site (assumed to be 0) (float)
name - Station ID (string)
x, y, z - The (x, y, z) coordinates of the site in the Grid.
*lat* - Latitude of the site (float)
*lon* - Longitude of the site (float)
*u* - u wind at the site (float)
*v* - v wind at the site (float)
*w* - w wind at the site (assumed to be 0) (float)
*site_id* - Station ID (string)
*x*, *y*, *z* - The (x, y, z) coordinates of the site in the Grid. (floats)
"""

# First query the database for all of the JSON info for every station
Expand Down
3 changes: 3 additions & 0 deletions pydda/cost_functions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@
calculate_model_cost
calculate_model_gradient
calculate_fall_speed
calculate_point_cost
calculate_point_gradient
"""


Expand All @@ -88,4 +90,5 @@
from .cost_functions import calculate_vertical_vorticity_gradient
from .cost_functions import calculate_model_cost
from .cost_functions import calculate_model_gradient
from .cost_functions import calculate_point_cost, calculate_point_gradient
from .cost_functions import J_function, grad_J
Loading

0 comments on commit 102bc5a

Please sign in to comment.