-
Notifications
You must be signed in to change notification settings - Fork 6
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
Joss2 #109
Joss2 #109
Conversation
for more information, see https://pre-commit.ci
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #109 +/- ##
=======================================
Coverage 94.28% 94.28%
=======================================
Files 11 11
Lines 2658 2658
Branches 712 712
=======================================
Hits 2506 2506
Misses 66 66
Partials 86 86 ☔ View full report in Codecov by Sentry. |
@ThomasHaine Please take a look at the changes to paper/paper.md. If you think it is fine, feel free to merge this PR. |
paper/paper.md
Outdated
@@ -28,15 +28,16 @@ bibliography: paper.bib | |||
|
|||
Numerical simulations of the Earth's oceans are becoming more realistic and sophisticated. Their complex layout and sheer volume make it difficult for researchers to access and understand these data, however. Additionally, most ocean models, mostly finite-volume models, compute and calculate spatially-integrated properties, such as grid-cell averaged temperature or wall-integrated mass flux. On the other hand, in-situ oceanographic observations are effectively collected at points in space and time. This fundamental difference makes the comparison between observations and results from numerical simulation difficult. | |||
|
|||
In this work, we present seaduck, a Python package that can perform both Eulerian and Lagrangian interpolation on generic ocean datasets with good performance and scalability. This package accesses numerical datasets from the perspective of space-time points. It automatically navigates complex dataset layouts (grid topologies) and transforms discrete information into continuous fields. The values and derivatives of those fields can be accessed at any point in the domain defined by the user. Similar to fixed and drifting observational oceanographic instrument platforms, the points can be either stationary (Eulerian) or advected by the flow (Lagrangian). | |||
In this work, we present seaduck, a Python package that can perform both Eulerian interpolation and Lagrangian particle simulation on generic ocean datasets with good performance and scalability. This package accesses numerical datasets from the perspective of space-time points. It automatically navigates complex dataset layouts (grid topologies) and transforms discrete information into continuous fields. The values and derivatives of those fields can be accessed at any point in the 3+1 dimensional space-time domain defined by the user. | |||
With the Lagrangian particle simulator integrated, aside from stationary points (Eulerian), users can also access oceanographic properties at points advected by the flow (Lagrangian), similar to collecting data from drifting observational oceanographic instrument platforms. |
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.
Line 32: I suggest: "For example, users can compute oceanographic properties as Eulerian timeseries (at fixed points in space), like from moored oceanographic current meters, or as Lagrangian timeseries (drifting with the current), like from oceanographic floats."
paper/paper.md
Outdated
|
||
# Statement of need | ||
|
||
The seaduck package is different from other ocean analytical tools (e.g., oceanspy [@Almansi2019]) because it accesses the circulation model data from the perspective of an arbitrary space-time point. Users define the points of interest using longitude, latitude, depth, and time. The package then reads necessary information from nearby model grid points and constructs the continuous (scalar or vector) field around the points. The index lookup and space-time interpolation involved in this process is done efficiently with `scipy.spatial.cKDtree` [@Virtanen2020] and numba [@Lam2015] compiled code, respectively. As the points can be defined arbitrarily in the model domain, accessing discrete numerical output feels to the user like retrieving values from a continuous field, despite the complex model grid. | ||
|
||
The points can be stationary (fixed in space, or Eulerian) or be advected by a vector velocity field (Lagrangian). Most Lagrangian particle packages (e.g., [@oceanparcel, @individualdisplacement]) compute particle trajectories by solving the initial value problem numerically. Instead, seaduck uses efficient, accurate, mass-conserving analytic formulae, which assumes a step-wise steady velocity field similar to that used by TRACMASS [@tracmass]. The Lagrangian advection code is largely numba compiled, and the total amount of computation is less than solving the problem numerically. The Lagrangian particle functionality is based on the above-mentioned interpolation utilities, thus, it automatically navigates the complex topology of numerical ocean models. | ||
|
||
Seaduck provides highly customizable interpolation methods for both Eulerian and Lagrangian points. Users can control all the properties of a hierarchy of kernels, including: (1) The shape of the interpolation kernel(s) in both spatial and temporal dimensions, which defines which neighboring points are used, and therefore how the continuous field is estimated. (2) The interpolation weight function, which allows users to calculate generic linear operations on the data, such as differentiation and smoothing, in all four dimensions. The hierarchy of kernels controls behavior near land-masked points. Specifically, the hierarchy consists of successively more compact kernels that are used depending on the proximity of land points. | ||
Seaduck's interpolation functionalities works similar to other interpolation tools (e.g. scipy[@Virtanen2020] and xESMF[xesmf]). Despite that seaduck only support interpolation using neighboring grid points, users has control over a lot of properties of a hierarchy of the interpolation kernels which is not always present or easy to implement in other packages. This includes: (1) The shape of the interpolation kernel(s) in both spatial and temporal dimensions, which defines which neighboring points are used, and therefore how the continuous field is estimated. (2) The interpolation weight function, which allows users to calculate generic linear operations on the data beyond simple interpolation, such as differentiation and smoothing.(3) The hierarchy of kernels which controls behavior near land-masked points. Specifically, the hierarchy consists of successively more compact kernels that are used depending on the proximity of land points.Those interpolation functionalities are available in all four dimensions and for both Eulerian and Lagrangian points. |
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.
Line 40: I suggest "Seaduck's interpolation functionality is similar to other interpolation tools (e.g., scipy[@Virtanen2020] and xESMF[xesmf]). Seaduck only supports interpolation using neighboring grid points, but users control the properties of a hierarchy of interpolation kernels; which is an advantage. These properties include: (1) The space-time shape of the interpolation kernel(s), which defines which neighboring points are used, and therefore how the continuous field is estimated. (2) The kernel weight function, which allows users to calculate generic linear operations on the data beyond simple interpolation, such as differentiation and smoothing. (3) The hierarchy of kernels near land-masked points."
paper/paper.md
Outdated
@@ -46,15 +47,15 @@ While some usage examples are presented here, many more can be found in the docu | |||
|
|||
## Interpolation / regridding | |||
|
|||
As an example of seaduck's interpolation/regridding functionality, consider a realistic simulation of the Kangerdlugssuaq Fjord, which is in east Greenland [@Fraser2018]. This is an MITgcm [@mitgcm] simulation with uneven grid spacing such that grid cells within the fjord are much more densely packed than elsewhere. The goal is to interpolate, and hence regrid, the sea surface height field, $\eta$, to a uniform grid spacing in the southern part of the domain. In Fig. 1, the coherent patch between 66.5 N and 67 N is a very dense scatter plot of the interpolated value where neighboring points are connected together. The rest of this plot is scatter plot of model output at center grid points. The close agreement between the interpolated and output value can be clearly seen in Fig. 1. The interpolation also remains smooth near strong gradient and land boundaries. | |||
As an example of seaduck's interpolation/regridding functionality, consider a realistic simulation of the Kangerdlugssuaq Fjord, which is in east Greenland [@Fraser2018]. This is an MITgcm [@mitgcm] simulation with uneven grid spacing such that grid cells within the fjord are much more densely packed than elsewhere. The goal is to interpolate, and hence regrid, the sea surface height field, $\eta$, to a uniform grid spacing in the southern part of the domain. In Figure. 1, the coherent patch between 66.5 N and 67 N is a very dense scatter plot of the interpolated value where neighboring points are connected together. The rest of this plot is scatter plot of model output at center grid points. The close agreement between the interpolated and output value can be clearly seen in Figure. 1. The interpolation also remains smooth near strong gradient and land boundaries. |
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.
Line 50: I suggest "As an example of seaduck's interpolation/regridding functionality, consider a realistic simulation of the Kangerdlugssuaq Fjord, which is in east Greenland [@Fraser2018]. The simulation uses the MITgcm [@MITgcm] with uneven grid spacing such that grid cells within the fjord are much more densely packed than elsewhere. The goal is to interpolate, and hence regrid, the sea surface height field,
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.
I made a few comments on the text. Unless you have questions, implement the changes and merge the PR.
paper/paper.md
Outdated
|
||
![Fig 2. Streaklines of particle advected by stationary 2D slice of the LLC4320 simulation. Colors denote the current speed.](https://github.com/MaceKuailv/seaduck_sciserver_notebook/blob/master/stable_images/LLC4320_29_2.png?raw=true) | ||
![Streaklines of particle advected by stationary 2D slice of the LLC4320 simulation. Colors denote the current speed.](https://github.com/MaceKuailv/seaduck_sciserver_notebook/blob/master/stable_images/LLC4320_29_2.png?raw=true) |
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.
Change "Streaklines of particle" to "Particle streaklines".
for more information, see https://pre-commit.ci
@ThomasHaine I changed all of them, I am going to merge this shortly, and test if the http issue is resolved or not. |
Paper fixes in response to editor's comments
@ThomasHaine What do you think?