Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

- Switch to using np.arctan2 rather than np.arctan for Probabilistic Advection [#2](https://github.com/dmidk/SolarSTEPS/pull/2), @KristianHMoller

6 changes: 4 additions & 2 deletions Models/ProbabilisticAdvection.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ def ens_forecast(self,
else:
raise Exception('angle_pert_dist must be either normal or vonmises')

pert_motion_field[0, :, :] = pert_abs * np.cos(np.arctan(y / x) + beta_noise)
pert_motion_field[1, :, :] = pert_abs * np.sin(np.arctan(y / x) + beta_noise)
# Use arctan2 for angle calculation to handle all quadrants correctly
base_angle = np.arctan2(y, x)
pert_motion_field[0, :, :] = pert_abs * np.cos(base_angle + beta_noise)
pert_motion_field[1, :, :] = pert_abs * np.sin(base_angle + beta_noise)

yhat_maps = self.extrapolate(self.last_map,
pert_motion_field,
Expand Down