-
Notifications
You must be signed in to change notification settings - Fork 15
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
DRAFT: wellspec with dtop dbot #751
base: master
Are you sure you want to change the base?
Conversation
@andy-beer Have noticed you avoid caching the full cornerpoint array like i did in the |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #751 +/- ##
==========================================
- Coverage 81.06% 81.01% -0.05%
==========================================
Files 190 190
Lines 32529 32552 +23
==========================================
+ Hits 26370 26373 +3
- Misses 6159 6179 +20
☔ View full report in Codecov by Sentry. |
dbot = data['DBOT'] | ||
j,i = int(data['JW']), int(data['IW']) | ||
for k in range(nk): | ||
if dbot == 'BOT': |
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.
does DTOP need to be checked when 'BOT' is in use for DBOT? (I haven't looked in the manual!)
if dbot == 'BOT': | ||
data['L'] = k + 1 | ||
df_expanded.append(data.copy()) | ||
elif (corp[k,j,i,0,:,:,2].min() >= dtop) and (corp[k,j,i,1,:,:,2].max() <= dbot): |
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.
This will include cells that are fully within the dtop to dbot depth range. It would be better if we included cells that are partially in the range, though ideally with a PPERF being set too. Also, it might be slightly better to use the K-, K+ face mid points, rather than the corner points, as the definition of the cell depth range for this purpose.
The corp z units might be increasing upwards (ie. negative values), in which case the z values should be negated before applying this test. You can check the z axis direction in the boolean attribute: grid.crs.z_inc_down which is usually True but not always.
Thanks for picking up on this missing functionality Patrick, and for working up the fix. A few comments responding to your questions and other thoughts that came to me:
WELLSPEC is a Nexus keyword. Nexus is a trademark of Halliburton. |
I recently encountered a model that used the DTOP and DBOT nexus keywords to define a well.
WELLSPEC A_20-1
IW JW L KH RADW SKIN RADB WI PPERF DTOP DBOT
1 1 NA NA 0.2500 0.0100 NA NA 0.0 6325.0 6330.0
1 1 NA NA 0.2500 0.0200 NA NA 1.0 8332.0 8370.0
This creates an issue when trying to derive a BlockedWell from a wellspec. Specifically, when
BlockedWell.derive_from_wellspec
callsBlockedWell.derive_from_dataframe
, there will not be any information in the dataframe's L (layer) column to populate thecell_kji0 = BlockedWell.__cell_kji0_from_df(df, i)
variable.Proposed fix as follows:
BlockedWell.dtop_dbot_to_layers
function converts the existingDTOP
/DBOT
columns in the wellspec dataframe into corresponding k-layers. It does this by:-loading
corp = grid.corner_points()
-iterating through nk and checking if the k,j,i min and max depth is between is in between
DTOP
andDBOT
-if cell is in the
DTOP
-DBASE span, a new row is added to the modified dataframe with the corresponding L = k+1-returns modified dataframe with corresponding L = k+1 values
This function is only called if there are non-null values in the
DTOP
andDBOT
columns.Additionally,
resqpy.well.well_utils._derive_from_wellspec_verify_col_list
function has been updated to provideDTOP
andDBOT
as defaults (along withIW
,JW
,L
,ANGLA
,ANGLV
). This ensures theDTOP
andDBOT
columns are checked every time a well is loaded from wellspec.`