Skip to content

Conversation

@erikvansebille
Copy link
Member

This follows #552

:param repeatdt: Optional interval (in seconds) on which to repeat the release of the ParticleSet
:param lonlatdepth_dtype: Floating precision for lon, lat, depth particle coordinates.
It is either np.float32 or np.float64. Default is np.float32 if fieldset.U.interp_method is 'linear'
and np.float64 if the interpolation method is 'cgrid_velocity'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want all those changes?
I thought we could simply set lonlatdepth_dtype through the **kwargs.
(but they were missing in from_line)
So both methods are obviously valid, but I don't know what's the most common one. And if the param is not in the argument list, then should it be in the docstring, or only in the docstring of pset constructor? Let's have a look how such parameters usually work)

and np.float64 if the interpolation method is 'cgrid_velocity'
"""

lonlat_type = cls.lonlatdepth_dtype_from_field_interp_method(fieldset.U)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if lonlatdepth_type is defined, it should overwrite the default value of lonlat_type

@erikvansebille erikvansebille merged commit 2806465 into master Apr 18, 2019
@erikvansebille erikvansebille deleted the lonlatdepth_dtype_in_particleset_construction_methods branch April 18, 2019 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants