Skip to content

Commit

Permalink
transfer variable instead of variable_names to write so that can dist…
Browse files Browse the repository at this point in the history
…inguish between the two RadiusOfMaximumWinds
  • Loading branch information
WPringle committed Mar 22, 2024
1 parent 9a8cdaf commit 58d5606
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ensembleperturbation/perturbation/atcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,7 @@ def write(
write_kwargs = {
'filename': output_filename,
'perturbation': perturbation_values,
'variables': copy(variable_names),
'variables': copy(variables),
'weight': float(perturbation['weights'].values),
}

Expand Down
5 changes: 3 additions & 2 deletions tests/test_besttrack_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
MaximumSustainedWindSpeed,
perturb_tracks,
RadiusOfMaximumWinds,
RadiusOfMaximumWindsPersistent,
VortexPerturber,
)
from tests import check_reference_directory, DATA_DIRECTORY
Expand Down Expand Up @@ -66,7 +67,7 @@ def test_multivariate_besttrack_ensemble():
MaximumSustainedWindSpeed: -0.25,
CrossTrack: 0.25,
'along_track': 0.75,
'radius_of_maximum_winds': -1,
'radius_of_maximum_winds': -0.5,
},
0.75,
],
Expand Down Expand Up @@ -122,7 +123,7 @@ def test_original_file():
original_track_0.to_file(output_directory / 'original.22')

gauss_variables = [MaximumSustainedWindSpeed, CrossTrack]
range_variables = [RadiusOfMaximumWinds]
range_variables = [RadiusOfMaximumWindsPersistent]

perturber = VortexPerturber.from_file(
output_directory / 'original.22', start_date=datetime(2018, 9, 11), file_deck='b',
Expand Down

0 comments on commit 58d5606

Please sign in to comment.