-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delft 3D Timestep to Seconds Function #155
Conversation
* changing path to data following organizational update * Reorganized headers Co-authored-by: rpauly18 <[email protected]> Co-authored-by: rpauly18 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Emily, it looks like you did not add any new tests for the new functions? Currently, this PR is reducing coverage by 1%. Let's add some more tests. This simple function should have little to no impact on the repository's coverage.
mhkit/river/io/d3d.py
Outdated
except: | ||
idx = (np.abs(times - time_stamp)).argmin() | ||
QoI= idx | ||
print(f'ERROR: invalid time_stamp. Closest time_stamp found {times[idx]}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no underscore in time stamp.
Include the last day of the year when using years parameter. Fixes MHKiT-Software#154.
…ware#161) * Bug fix: remove timezone replace for astimezone * add pytz to required packages
* Plot each col in DataFrame individually * Remove numpy and pandas version requirements
* Working version of Gaussian Copula * Create dedicated function for iso probs and quantiles * Contour plots worsk for single and multiple contours * Gumbel Copula. * Clayton Copula * Rosenblatt Copula * Guass and gumbel general copula * Add support for nonparametric gaussian, clayton, and gumbel copulas * Require statsmodel for nonparametric KDE copulas * Small changes * Fix bug in KDE log transformation * Adding docstrings * All doc strings updated * Add markers option to contours plotting * Add Copula tests comparing to WDRTresults * Fix x1, x2 pts bug in KDE contour, clean up * Example showing the calculation of all copla methods and comparing to WDRT results * Simplifications and lanuguage cleanup * Add statsmodel * Add testing data files * In plot envrionmental contors convert x1,x2 to values if a Series is passed * Docstring typo corrections * Corrected notebook description typos. * module and example for short-term extreme distributions * docstrings for short-term extreme functions * fixes MHKiT-Software#140 Speedup surface elevation calculation. * correction to surface_elevation * elevation * minor fixes based on review comments * add environmental_contours to init * Remove WDRT functionality * All WDRT contour functionality can be called from one function * Rework tests for new contour functions setup and location * Move all contour example into this file * Update to work with new structure. * Remove all commented out wdrt functions from resource * No changes made. Reverting back. * Have PCA method use general fit. Adds PCAmethod to fit method but can also accept the PCA dictionary. General Docstring Cleanup * Update discussion around the use of the copula method. * Remove copula stand alone notebook * minor formmating changes * Remove test bugs created from merge with origin * Import env contours into resource module and adjust test, examples, ect to function with tthe new structure * Uncommented tests * Remove reference to import the env contours module * fixing minor typo * Move env contours to _file and adjust package to handle new structure * Minor formatting cleanup * Cleanup unsed packages and variables * intial mler upload * formalize functions * add tests and example * sampling rate to averaging period * rename MLER example * working * merging * WDRT functions and examples finalized. Missing tests. * integrate mler into extreme * fixes tests? * fix tests * fix tests * fix full sea state example? * test contour samples * test sample full seastate * random seed * test long term extreme * expand MLER functionality * test short-term extremes * fix mler tests * MLER test error * mler fix 2 * update formats and asserts * further cleanup of countours.py for consistency, typos, and pep8 * run tests? * fix test? * change lists to np.array so they pass the assert statements * clean extreme.py for consistency, pep8 * points_per_interval should be int * typing in examples * full sea state example: make it easier to follow, add more explanation, and use consistent naming * contour example: make it easier to follow, add more explanation, and use consistent naming * Alias ste function and minor formatting. * naming convention * rename example * ste example * allow weights to be np.array * allow weights to be np.ndarray Co-authored-by: ssolson <[email protected]> Co-authored-by: ssolson <[email protected]> Co-authored-by: rpauly18 <[email protected]> Co-authored-by: hivanov-nrel <[email protected]>
* input output files + testing * Code update * Test reformatting * Testing paths * dependency switch from h5netcdf to netcdf4 * Code cleanup * Test import fix * Minor docstring edits * Add dolfyn test data * Test fixes for mhkit * Removing uneeded test files, improving consistency * Not sure why these files didn't upload * Organizational changes and clarifications. Request for additional clarification * Dolfyn codebase updates * Dolfyn example notebooks update * Testing updates * Update example datafile * Latest dolfyn v0.13.0 updates * Name change * input output files + testing * Code update * Organizational changes and clarifications. Request for additional clarification * Dolfyn codebase updates * fix bug and make faster. Un-hard-code default seed/phase. * fix tests * delete commented out tests * retrigger checks * Checkpoint push * New dolfyn data files * Reorganize dolfyn testing * pytest install for warnings tests * Final update for IO * Remove future updates * Ensure file compression runs * Update numpy dependency * trying numpy v1.22 * changing numpy requirements * Remake unittest test cases * Save format options * Add dolfyn view to notebooks * Decode remaining binary ad2cp variables * DOLfYN 1.0.0 dependency Co-authored-by: jmcvey3 <[email protected]> Co-authored-by: ssolson <[email protected]> Co-authored-by: Michelen <[email protected]> Co-authored-by: jmcvey3 <[email protected]> Co-authored-by: rpauly18 <[email protected]>
Superceeded by #168 |
Adding on to the PR #
Delft3D io functions
this PR outputs the time output based on the time step in functionconvert_time
,d3d. get_layer_data
andd3d.get_all_data_points
. A function to get all timestamps 'get_all_timestamps' will return an array of all the timestamps for a data set.Additions:
-
get_all_timestamps
: inputs netcdf4 dataframe and returnas all the time stamps for that data set-
convert_time
: converts atime_index
to atime_stamp
in seconds or vice versaChanges in 'get_layer_data`
z
:z=[bottom_depth*Layer_percentages[layer_index]]-water_level
Changes in 'get_all_data_points`
z
is pulled from 'get_layer_data` and takes into account water level