There used to be an environment variable that was used for just this purpose, but it was removed in
#1247
import openmc.data
lib = openmc.data.DataLibrary.from_xml() # looks for OPENMC_CROSS_SECTIONS if not path provided
lib.register_file(<path to your depletion chain file>)
lib.export_to_xml(<path to new cross section file>)
Then you can update your OPENMC_CROSS_SECTIONS environment variable to point to this new file, or move the new file to the existing location. Alternatively. you could use
os.environ to export the new library directly to the path indicated by the environment variable.
It should be said that you may want to make a backup cross sections file before overwriting the file at OPENMC_CROSS_SECTIONS
Regards,
Andrew