-
Notifications
You must be signed in to change notification settings - Fork 51
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
Ten diffusive domains w schism boundary #573
Ten diffusive domains w schism boundary #573
Conversation
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 don't think we need to include any of the test/HurricaneLaura
in the repository itself. We can make an archive of the relevant domain data and (relative) configurations, but they shouldn't get commited to the repo.
src/troute-network/troute/nhd_io.py
Outdated
@@ -485,12 +502,20 @@ def write_chanobs( | |||
------------- | |||
|
|||
''' | |||
# TODO: for and if statements are improvised just in case when link of gage location is not in flowveldepth, which should be fixed | |||
link_na = [] | |||
for link in list(link_gage_df.index): |
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 don't think you need to convert this to a list to simply iterate it, same with the next .index
...
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.
list() removed. Thanks.
for link in list(link_gage_df.index): | ||
if link not in list(flowveldepth.index): | ||
link_na.append(link) | ||
link_gage_df_nona = link_gage_df.drop(link_na) |
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.
could probably just drop this inplace
...link_gaga_df.drop(link_na, inplace=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.
done.
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.
doesn't look like this change got committed/pushed???
src/troute-network/troute/nhd_io.py
Outdated
start_date = ds.variables['time'].units | ||
|
||
start_date = dparser.parse(start_date,fuzzy=True) | ||
dt_schism = 3600 # [sec] |
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.
could this be dynamically inferred from the timesteps
array:
if len(timesteps) > 1:
dt_schism = timesteps[1]-timesteps[0]
else:
raise RuntimeError("schism provided less than 2 time steps")
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.
changed. Thanks for your code.
src/troute-network/troute/nhd_io.py
Outdated
start_date = dparser.parse(start_date,fuzzy=True) | ||
dt_schism = 3600 # [sec] | ||
dt_timeslice = timedelta(minutes=dt_schism/60.0) | ||
start_date = start_date # + dt_timeslice |
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.
remove this line
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.
done.
src/kernel/diffusive/diffusive.f90
Outdated
@@ -1547,7 +1612,8 @@ function rtsafe(i, j, Q_cur, Q_ds, z_cur, z_ds, y_ds) | |||
double precision :: x1, x2, df, dxx, dxold, f, fh, fl, temp, xh, xl | |||
double precision :: y_norm, y_ulm_multi, y_llm_multi, elv_norm, y_old | |||
double precision :: rtsafe | |||
|
|||
open(unit=301, file="./output/rtsafe_check.txt") |
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.
remove open file unit
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.
removed.
src/kernel/diffusive/diffusive.f90
Outdated
else ! newton step acceptable. take it. | ||
dxold = dxx | ||
dxx = f / df | ||
temp = rtsafe | ||
rtsafe = rtsafe - dxx | ||
if (temp == rtsafe) return | ||
if (temp == rtsafe) then |
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.
remove this whole block since it is a noop
now anyways.
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.
removed. thanks.
src/kernel/diffusive/diffusive.f90
Outdated
end if | ||
|
||
if (abs(dxx) < xacc) return ! convergence criterion. | ||
if (abs(dxx) < xacc) then | ||
!write(301, *) "fnal:", i, j, iter, rtsafe |
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.
another noop
block here
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.
done. Thanks.
src/kernel/diffusive/diffusive.f90
Outdated
|
||
allocate(el1(nel), a1(nel), peri1(nel), redi1(nel), redi1All(nel)) | ||
allocate(equiv_mann(nel), conv1(nel), tpW1(nel)) | ||
allocate(newdKdA(nel)) | ||
allocate(compoundSKK(nel), elev(nel)) | ||
allocate(i_start(nel), i_end(nel)) | ||
|
||
!open(unit=201, file="./output/xsec_natural.txt") | ||
open(unit=301, file="./output/xsec_natural_check.txt") |
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.
remove this file unit
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.
Done.
src/kernel/diffusive/diffusive.f90
Outdated
!iv = 0 | ||
!do ii2 = iel, nel | ||
! iv = iv + 1 | ||
! dmyarr(iv) = newdKdA(ii2) |
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.
remove any unused/unwanted code from this funnction
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.
Done.
para_ar_g[2] = 50.0 # lower limit of diffusivity (default: 50) | ||
para_ar_g[3] = 5000.0 # upper limit of diffusivity (default: 1000) | ||
para_ar_g[2] = 10.0 # lower limit of diffusivity (default: 50) | ||
para_ar_g[3] = 40000.0 # upper limit of diffusivity (default: 1000) |
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.
If these are the default values, then the comments should be updated appropriately...
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.
Changed. Thanks.
what is this file for? |
It is a mask file for diffusive domains. Even it can be used for both cases, I can slim it down for Lower Colorado. I will adjust it shortly. |
Is the one in the hurricane laura directory still needed? test/HurricaneLaura/domain/coastal_10diffusive.txt |
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 think this can be merged for now. I think some additional refactoring and cleanup would be useful in places, but we can address that once the functionality is merged and can changes can be tested against a "stable" implementation/
for link in list(link_gage_df.index): | ||
if link not in list(flowveldepth.index): | ||
link_na.append(link) | ||
link_gage_df_nona = link_gage_df.drop(link_na) |
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.
doesn't look like this change got committed/pushed???
The changes made here enabled for diffusive wave channel routing to run in serial mode on all ten available mainstem domains where channel cross section survey data are available. Also, schism's water depth output was integrated with t-route so that the water depth values along shorelines were used as downstream boundary conditions for the diffusive wave.
Additions
Removals
Changes
Testing
Screenshots
Notes
Todos
Checklist
Testing checklist
Target Environment support
Accessibility
Other