Uploading a pseudo log into a well folder using script code
Practical example
Assume the project has a well folder with wells. One well has many log curves. From a combination of log curves there has been calculated a pseudo well log curve. The calculation may have been performed using scripting. This documentation shows how to update the well with a pseudo log curve into the set of log curves.
Test script for updating pseudo logs into a well folder
# Go to top level
project up
# Create folder for wells; assume MyWells does not exist
project create category_wells MyWells
# Create well; assume MyWell1 does not exists
project create well MyWell1
# Set members of MyWell1:
# - elevation
project setmember well::elevation 20
# - TD
project setmember well::td 3000
# - well type
project setmember well::well_type 3
# - other fields
project setmember well::wd 123
project setmember well::date "1.1.1970"
# The syntax is operatr because operator is a reserved name in C++
project setmember well::operatr "Company Petroleum"
# Create well path:
# - make polydata representing path active
# - polydata should be on the format X=x Y=y Z=TVDSS, with optional field data MD TVD
mlo path
# - setdata on well will store in path
project setdata
# Create time/depth curve:
# - create empty log and set schema to Time Depth
project create log timedepth "Time Depth"
# - make polydata representing time/depth active; X=MD Y=TWT
mlo timedepth
# - assign values to time depth log
project setdata
# Back to well
project up
# Create log:
# - create empty GR log
project create log GR
# - make polydata representing log active; X=MD Y=log value
mlo log
# - assign values to GR log
project setdata