Skip to content
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

public-facing attributes need better descriptions and units #142

Open
amoodie opened this issue Feb 25, 2021 · 1 comment
Open

public-facing attributes need better descriptions and units #142

amoodie opened this issue Feb 25, 2021 · 1 comment

Comments

@amoodie
Copy link
Member

amoodie commented Feb 25, 2021

The public-facing model attributes need better docstrings and descriptions of units.

pyDeltaRCM/pyDeltaRCM/model.py

Lines 1083 to 1167 in ca323c6

@property
def channel_flow_velocity(self):
"""Get channel flow velocity."""
return self.u0
@channel_flow_velocity.setter
def channel_flow_velocity(self, new_u0):
self.u0 = new_u0
self.create_other_variables()
self.init_sediment_routers()
@property
def channel_width(self):
"""Get channel width."""
return self.N0_meters
@channel_width.setter
def channel_width(self, new_N0):
self.N0_meters = new_N0
self.create_other_variables()
self.init_sediment_routers()
@property
def channel_flow_depth(self):
"""Get channel flow depth."""
return self.h0
@channel_flow_depth.setter
def channel_flow_depth(self, new_d):
self.h0 = new_d
self.create_other_variables()
self.init_sediment_routers()
@property
def sea_surface_mean_elevation(self):
"""Get sea surface mean elevation."""
return self.H_SL
@sea_surface_mean_elevation.setter
def sea_surface_mean_elevation(self, new_se):
self.H_SL = new_se
@property
def sea_surface_elevation_change(self):
"""Get rate of change of sea surface elevation, per timestep."""
return self.SLR
@sea_surface_elevation_change.setter
def sea_surface_elevation_change(self, new_SLR):
self.SLR = new_SLR
@property
def bedload_fraction(self):
"""Get bedload fraction."""
return self.f_bedload
@bedload_fraction.setter
def bedload_fraction(self, new_u0):
self.f_bedload = new_u0
@property
def influx_sediment_concentration(self):
"""Get influx sediment concentration."""
return self.C0_percent
@influx_sediment_concentration.setter
def influx_sediment_concentration(self, new_u0):
self.C0_percent = new_u0
self.create_other_variables()
self.init_sediment_routers()
@property
def sea_surface_elevation(self):
"""Get stage."""
return self.stage
@property
def water_depth(self):
"""Get depth."""
return self.depth
@property
def bed_elevation(self):
"""Get bed elevation."""
return self.eta

For example channel_width has a getter and setter. Does this need to be set in terms of N0 (number cells) or N0_meters (meters). Does this automatically reinitialize the necessary DeltaModel internals to actually make the change take effect? Need documentation and tests on these.

Relates to BMI_pyDeltaRCM.

@amoodie amoodie added this to the Stable API milestone Feb 25, 2021
@amoodie
Copy link
Member Author

amoodie commented Feb 25, 2021

relates to #103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant