Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
8b68dd8
enh: adding new methods for wind heading plots
Gui-FernandesBR Jun 21, 2022
302395a
maint: typo fix
Gui-FernandesBR Jun 21, 2022
598f6a8
enh: adding wind headin profile to our notebook
Gui-FernandesBR Jun 21, 2022
f023c04
maint: typo fix on notebook
Gui-FernandesBR Jun 21, 2022
b2615e3
maint: removing unused attributes
Gui-FernandesBR Jun 21, 2022
03b89b8
Fix code style issues with Black
lint-action Jun 21, 2022
c218992
ENH: adding exportEnvironment method
Gui-FernandesBR Sep 11, 2022
12a2592
MAINT: adjust json format more beatifuly
Gui-FernandesBR Sep 11, 2022
f5edf69
ENH: create exportMeanProfiles core, draft
Gui-FernandesBR Sep 11, 2022
05fb26f
ENH: allow to export EnvAnal profiles
Gui-FernandesBR Sep 11, 2022
d482d96
MAINT: set default type json.dumps
Gui-FernandesBR Sep 11, 2022
7b24b80
ENH: saving EnvAnalysisDict into .json
Gui-FernandesBR Sep 11, 2022
b944ce1
MAINT: Replace misplaced convertion units
Gui-FernandesBR Sep 11, 2022
e8967cb
Fix code style issues with Black
lint-action Sep 11, 2022
be0d26c
MAINT: Add json to requirements
Gui-FernandesBR Sep 11, 2022
2161129
GIT: Trying to force merge
Gui-FernandesBR Sep 11, 2022
352073e
GIT: Merge conflicted branches
Gui-FernandesBR Sep 11, 2022
d4e4b76
Fix code style issues with Black
lint-action Sep 11, 2022
5e6bcc4
MAINT: erasing unexpected conflicts
Gui-FernandesBR Sep 11, 2022
7ecf051
Merge remote-tracking branch 'origin/master' into enh/env_analysis_euroc
Gui-FernandesBR Sep 21, 2022
9d08619
FIX: removing 'json' from requirements, not needed
Gui-FernandesBR Sep 21, 2022
506503d
ENH: Finally reading the .json correctly
Gui-FernandesBR Sep 21, 2022
65d499c
ADD: single level file
Gui-FernandesBR Sep 21, 2022
c96db9d
MAINT: formatting with black
Gui-FernandesBR Sep 21, 2022
19ebc44
FIX: partially solve masks on json using nan
Gui-FernandesBR Sep 21, 2022
4cc4fa4
ADD: EuroC Pressure Level large file
Gui-FernandesBR Sep 21, 2022
514b882
MAINT: refresh branch with master
Gui-FernandesBR Sep 22, 2022
c7a5123
ENH: Improve wind heading profiles
Gui-FernandesBR Sep 22, 2022
2492116
Merge branch 'enh/env_analysis_euroc' into enh/env_analysis_wind_dire…
Gui-FernandesBR Sep 22, 2022
cda9198
Enh: Using jsonpickle to serialize EnvAnal
PatrickSampaioUSP Sep 22, 2022
e5c920c
Enh: added forecast comparaison parameters to env analysis
PatrickSampaioUSP Sep 22, 2022
92acb1f
MAINT: replacing .nc files
Gui-FernandesBR Sep 22, 2022
ce2d65c
Merge pull request #239 from RocketPy-Team/enh/jsonpickle
PatrickSampaioUSP Sep 22, 2022
badea3b
ENH: Cleaning unused codelines
Gui-FernandesBR Sep 22, 2022
c5d6517
MAINT: Improve methods docs
Gui-FernandesBR Sep 22, 2022
e55ddec
MAINT: Add jsonpickle as requirement
Gui-FernandesBR Sep 22, 2022
0e57727
MAINT: removing undesired comments
Gui-FernandesBR Sep 22, 2022
cd2ba82
Merge pull request #237 from RocketPy-Team/enh/env_analysis_refactor_…
Gui-FernandesBR Sep 22, 2022
58bd0c4
Merge pull request #238 from RocketPy-Team/env_analysis_euroc_add_files
Gui-FernandesBR Sep 22, 2022
d4babbe
Merge branch 'enh/env_analysis_euroc' into enh/env_analysis_wind_dire…
Gui-FernandesBR Sep 23, 2022
c39617c
MAINT: REverting notebook changes
Gui-FernandesBR Sep 23, 2022
cee6336
Merge branch 'enh/env_analysis_wind_direction' of https://github.com/…
Gui-FernandesBR Sep 23, 2022
a1873e6
MAINT: refactor surface data file
Gui-FernandesBR Sep 23, 2022
0e8bda5
DOCS: changes on links website
Gui-FernandesBR Sep 23, 2022
6a26465
MAINT: Replacing with .nc files that finally works
Gui-FernandesBR Sep 24, 2022
e396224
ENH: Modifying docs and functions attributes
Gui-FernandesBR Sep 24, 2022
8bbf782
ADD: new notebook for EuroC example
Gui-FernandesBR Sep 24, 2022
809e815
GIT: Merge env_analysis_euroc into wind_direction
Gui-FernandesBR Sep 24, 2022
576dc9d
ENH: Remove undesired sigma plots
Gui-FernandesBR Sep 24, 2022
9516619
FIX: wind heading plots title
Gui-FernandesBR Sep 27, 2022
0c63b61
Merge env_analysis_euroc into forecast_comparison
Gui-FernandesBR Sep 27, 2022
4e40c42
ENH: drafting compareEnvironments method
Gui-FernandesBR Sep 27, 2022
2ceca6a
Enh: Added windspeed forecast comparation plots and env configuration…
PatrickSampaioUSP Sep 29, 2022
145e4c5
Merge
PatrickSampaioUSP Sep 29, 2022
2002a85
Fix code style issues with Black
lint-action Sep 29, 2022
8b737b3
MAINT: removed unused func
PatrickSampaioUSP Sep 29, 2022
eeff1cd
gMerge branch 'enh/forecast_comparaison' of https://github.com/Projet…
PatrickSampaioUSP Sep 29, 2022
9b9d6e6
Enh: Executed notebook
PatrickSampaioUSP Oct 4, 2022
0f070a4
Enh: Docs for new parameters
PatrickSampaioUSP Oct 5, 2022
df7f927
Merge pull request #244 from RocketPy-Team/enh/forecast_comparaison
PatrickSampaioUSP Oct 5, 2022
e8da19e
Merge remote-tracking branch 'RocketPy-Team/enh/env_analysis_euroc' i…
Gui-FernandesBR Oct 8, 2022
d4abe4b
Merge pull request #197 from RocketPy-Team/enh/env_analysis_wind_dire…
Gui-FernandesBR Oct 8, 2022
88e2bc2
DOC: adding new notebook to docs page
Gui-FernandesBR Oct 8, 2022
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
Binary file not shown.
Binary file not shown.
51,355 changes: 51,355 additions & 0 deletions docs/notebooks/environment_analysis_EuroC_example.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/user/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Welcome to RocketPy's user documentation!
../notebooks/getting_started.ipynb
../notebooks/environment_class_usage.ipynb
../notebooks/environment_analysis_class_usage.ipynb
../notebooks/environment_analysis_EuroC_example.ipynb
../notebooks/dispersion_analysis/dispersion_analysis.ipynb
../notebooks/utilities_usage.ipynb
../matlab/matlab.rst
Expand Down
2 changes: 2 additions & 0 deletions docs/user/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The following packages are needed in order to run RocketPy:
- timezonefinder
- simplekml
- ipywidgets >= 7.6.3
- jsonpickle


All of these packages, with the exception of netCDF4, should be automatically installed when RocketPy is installed using either ``pip`` or ``conda``.
Expand All @@ -49,6 +50,7 @@ The packages needed can be installed via ``pip`` by running the following lines
pip install pytz
pip install timezonefinder
pip install simplekml
pip install jsonpickle

Installing Required Packages Using ``conda``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ requests
pytz
timezonefinder
simplekml
jsonpickle
61 changes: 61 additions & 0 deletions rocketpy/Environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
__license__ = "MIT"

import bisect
import json
import re
import warnings
from datetime import datetime, timedelta

import matplotlib.pyplot as plt
import numpy as np
import numpy.ma as ma
import pytz
import requests

Expand Down Expand Up @@ -3325,6 +3327,65 @@ def allInfoReturned(self):
info["selectedEnsembleMember"] = self.ensembleMember
return info

def exportEnvironment(self, filename="environment"):
"""Export important attributes of Environment class so it can be used
again in further siulations by using the customAtmosphere atmospheric
model.
Parameters
----------
filename

Return
------
None
"""

# TODO: in the future, allow the user to select which format will be used (json, csv, etc.). Default must be JSON.
# TODO: add self.exportEnvDictionary to the documentation
# TODO: find a way to documennt the workaround I've used on ma.getdata(self...
self.exportEnvDictionary = {
"railLength": self.rL,
"gravity": self.g,
"date": [self.date.year, self.date.month, self.date.day, self.date.hour],
"latitude": self.lat,
"longitude": self.lon,
"elevation": self.elevation,
"datum": self.datum,
"timeZone": self.timeZone,
"maxExpectedHeight": float(self.maxExpectedHeight),
"atmosphericModelType": self.atmosphericModelType,
"atmosphericModelFile": self.atmosphericModelFile,
"atmosphericModelDict": self.atmosphericModelDict,
"atmosphericModelPressureProfile": ma.getdata(
self.pressure.getSource()
).tolist(),
"atmosphericModelTemperatureProfile": ma.getdata(
self.temperature.getSource()
).tolist(),
"atmosphericModelWindVelocityXProfile": ma.getdata(
self.windVelocityX.getSource()
).tolist(),
"atmosphericModelWindVelocityYProfile": ma.getdata(
self.windVelocityY.getSource()
).tolist(),
}

f = open(filename + ".json", "w")

# write json object to file
f.write(
json.dumps(self.exportEnvDictionary, sort_keys=False, indent=4, default=str)
)

# close file
f.close()
print("Your Environment file was saved, check it out: " + filename + ".json")
print(
"You can use it in the future by using the customAtmosphere atmospheric model."
)

return None

# Auxiliary functions - Geodesic Coordinates
def geodesicToUtm(self, lat, lon, datum):
"""Function which converts geodetic coordinates, i.e. lat/lon, to UTM
Expand Down
Loading