I can answer one of your questions but you will need to download and install the add-on again if you haven't yet. The add-on now lets you access functionality via the script shown below.
- This assumes a recent version of the
octave_gradients
add-on is available locally.
code for using the add-on inside a script:
import bpy
import addon_utils
addon_utils.enable("octave_gradients")
# add material, or reuse existing one
mymat = bpy.data.materials.get('lazy_cube')
if not mymat:
mymat = bpy.data.materials.new('lazy_cube')
mymat.use_nodes = True
nodes = mymat.node_tree.nodes
if not 'ColorRamp' in nodes:
nodes.new(type="ShaderNodeValToRGB")
ColorRamp = nodes['ColorRamp']
# reuse the Octave Gradient maker code, when calling from this context,
# it will add a function called 'external_octave' to the driver_namespace
# this function doesn't care what context you are in, all it wants
# is a reference to the ColorRamp node, and a number between 0..13
bpy.ops.scene.gradient_pusher()
external_octave = bpy.app.driver_namespace['external_octave']
# force ramp theme
external_octave(ColorRamp, 12) # jet=12
# hook the ColorRamp up to the DiffuseBSDF node.
DiffuseBSDF = nodes.get("Diffuse BSDF")
mymat.node_tree.links.new(ColorRamp.outputs[0], DiffuseBSDF.inputs[0])
What you should be able to solve on your own is how to get temperatures into a range of 0 to 1, so the color ramp can map them.