Comments (3)
For latitude and longitude, currently a TypeError is thrown if the input values are outside the grid given by netCDF and OPeNDAP files.
The current idea is to keep throwing errors for such cases since bi-linear interpolation is no longer possible outside the grid given. However, the type of the exception should be different, perhaps ValueError.
In case of the date input, the current implementation does not interpolate between dates in the file, but simply chooses the closest one, i.e. nearest neighbor. Therefore, an exception is not necessary and just a warning would be fine.
from rocketpy.
I believe raising a ValueError for wrong date inputs would be better than using warning, specially in terms of consistency. Besides consistency, I do not believe there is a big different for the end user.
from rocketpy.
Just fixed this in the last two commits: a97620f and e99389e.
When the input longitude, latitude and date are outside the range supplied by the file, a ValueError exception is thrown, explaining the reason and showing the relevant range of the file.
An alternative for the date would be simply to ask netCDF4 to select only exact dates, raising and error whenever a date supplied not contained in the file was given. This wasn't the chosen implementation since it offered little explanation to the user.
Furthermore, when the input date does not match exactly any of the file dates, a warning is now given, and the nearest date available is used. This was decided since no date interpolation is done. Of course, this does not apply to dates outside the file range.
from rocketpy.
Related Issues (20)
- TST: Restructuring the test suite HOT 3
- ENH: _check_user_input method being called multiple times HOT 2
- BUG: Overfilled Tanks produce absurd calculations without an error thrown HOT 4
- ENH: automatically gets inputs and outputs from csv file
- Error during build & install rocketpy using setuptools HOT 1
- BUG: KeyError: 'I_11' and AttributeError: 'NoneType' object has no attribute 'reset' HOT 1
- ENH: Support for Open Meteo API
- ENH: make rocketpy classes json serializable
- ENH: adds an 3D animation of flight trajectory
- DOC: Software in a Loop (SIL) example with parachute ejection systems
- DOC: update badges on our README
- DOC: stop cloning the whole repository just for examples HOT 1
- ENH: plot inertia tensor components in a single plot
- ENH: display both power_off_drag and power_on_drag in a single plot
- ENH: adds `axial_acceleration` attribute to the Flight class HOT 2
- MNT: EmptyMotor class inherits from Motor(ABC)
- MNT: delete tools.cached_property
- DOC: convert notebooks to .rst files in the documentation
- ENH: Support for Meteomatics API
- ENH: give me a scissor or apply `Function.clip` and `Function.crop`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rocketpy.