DOI: 10.7291/d1vq3r
title: FEHM source code modifications and executables for use with ocean-world gravity

description: This is a repository for compiled codes, source code, and input files used
 in this paper: Fisher, A. T., K. D. Dickerson, D. K. Blackman, N.
 Randolph-Flagg, C. R. German, and C. Sotin (2024), Sustained hydrothermal
 circulation under ocean-world gravity, J. Geophys. Res. - Planets,
 submitted and in review. Plain language summary from paper: Ocean
 worlds are planetary bodies that have a liquid ocean, often under an icy
 shell or within the rocky interior. In Earth's solar system, several
 moons of Jupiter and Saturn are ocean worlds. Some ocean worlds are
 thought to have hydrothermal circulation, where water, rocks, and heat
 combine to drive fluids in and out of the seafloor. Hydrothermal
 circulation would impact the chemistry of the water and rock of ocean
 worlds and could help life to develop deep below the icy surface. This
 study shows results from computer simulations of hydrothermal circulation,
 based on a well-understood system on Earth, to measure the influence of
 lower gravity like that appropriate for ocean worlds smaller than Earth.
 The simulations with ocean world (lower) gravity result in fluid
 circulation much like that occurring on and below Earth's seafloor,
 but with several important differences. Lower gravity reduces buoyancy,
 meaning warmed fluids don't become as light when heated. Lower
 buoyancy tends to reduce flow rates in a hydrothermal system, and this
 raises the temperatures of the circulating fluid, which would allow more
 extensive chemical reactions. Lower flow means less heat transport, and
 this could help these flows last longer in an ocean world.
description: There is a README file with information on files posted, and a
 Supporting Information document that goes with the paper that discusses
 modifications to code in some detail. The main research paper also
 discussed how the code was used. 
description: # FEHM source code modifications and executables for use with ocean-world
 gravity [https://doi.org/10.7291/D1VQ3R](https://doi.org/10.7291/D1VQ3R)
 FEHM archive for Fisher et al. (2024), "Sustaining hydrothermal
 circulation with gravity relevant to ocean worlds," revised following
 review for Journal of Geophysical Research - Planets. NB: Above will be
 revised when paper is in print, and a DOI will be added. ## Description of
 the data and file structure Three compressed (zip) files are included in
 this archive: 10_FEHM-Linux_Diffg_Exe.zip 20_FEHM-SourceEdited.zip
 30_FEHM-InputDirs.zip ## Code/Software #### 10\_FEHM-Linux\_Diffg\_Exe.zip
 Contains executable FEHM programs with gravity for Earth, Europa, and
 Enceladus: xfehm_v3.4g9_81 gravity for Earth, 9.81 m/s^2 xfehm_v3.4g1_3
 gravity for Europa, 1.3 m/s^2 xfehm_v3.4g_114 gravity for Enceladus, 0.114
 m/s^2 These codes were compiled with Rocky Linux using the gfortran
 compiler (part of gcc family of compilers). Posted executables may work
 for your system, or you may need/wish to recompile in order to access
 libraries. We have also supplied shell scripts we used to call the
 executables, based on having a set of input files with common root names
 and different file extensions. The "Files" file tells FEHM which
 files to use for input and output. You may need to modify these scripts
 depending on your workflow, how you name your files, etc. Please see file
 examples in 30_FEHM-InputDirs.zip, and follow the guidance given at the
 FEHM site at LANL ([https://fehm.lanl.gov/](https://fehm.lanl.gov/). ####
 20\_FEHM-SourceEdited.zip Please follow these steps to use the modified
 subroutines: (1) Start with the original source code in
 20_FEHM-SourceEdited --&gt; src subdirectory Place the full directory set
 in a suitable workspace, e.g., ~/code/FEHM \[Note - we originally
 recommended that folks download source code from Github, but there have
 been changes made recently to some of the FEHM subroutines. For this
 reason, we have uploaded a "snapshot" of the sourcecode files
 for which we have confirmed compilation works.] \- Before doing anything
 else, we strongly encouarge recompiling the original code, as this will
 tell you if any changes are needed to your system settings, paths,
 gfortran/gcc installation, libraries, etc. \- You must edit the Makefile
 to be consistent with your computer system in order for the Make command
 to be successful in generating an executable program. \- If you are not
 able to compile from the src distribution, please solve that problem
 first, before proceeding. We have noted differences in systems and
 settings in terms of compilers be tolerant of deviations in standard
 Fortran syntax, so you should expect some minor debugging on first
 compilation. (2) Create a working subdirectory for compilation of modified
 code, e.g., ~/code/FEHM/src_g9_81, and copy over the contents of the FEHM
 source directory, which has already been confirmed to allow successful
 recompilation. (3) Copy to the working subdirectory the appropriate files
 from the directory in the zip file, e.g., src_g9_81. In this directory you
 will find these files: comai.f convctr.f hstz.f inctrl.f input.f Makefile
 plot_new.f porosi.f startup.f write_avs_node_s.f wrtout.f In brief - these
 files REPLACE the files with the same names included in the original FEHM
 distribution. (4) Edit the Makefile to name the executable as you wish, on
 line that begins: EXE = ... Note - you might need to make additional
 updates to the revised Makefile if you had to modify the original Makefile
 when you recompiled without the modified subroutines. (5) If you wish to
 use g = 9.81 m/s^2, no other changes are needed before compilation. If you
 wish, you can redefine gravity for another ocean world. There are two
 lines that need to be changed in inctrl.f - search for 9.81 (or AF***) to
 find them, adjust as needed. All other files in FEHM will use values as
 defined in inctrl.f (6) At the command prompt in the working directory,
 run these commands: make clean make \- The first command will clear any
 residual object files or remnants from any earlier attempts to compile the
 code. This is important so that the new object files are used to create
 the executable. \- The second command will create new objects and an
 executable. (7) To run a quick test to see if the executable works, enter
 at command prompt in the working directory: ./FEHM-Filename where
 "FEHM-Filename" is what you defined at the line that begins EXE
 = in the Makefile You should see that FEHM runs, but there will be an
 error because input files have not been specified. To set up a FEHM
 simulation, you will need to follow instructions provided at the FEHM
 website. LANL has documentation here:
 [https://fehm.lanl.gov/](https://fehm.lanl.gov/) This includes links to
 source code on GitHub and gridding software. #### 30\_FEHM-InputDirs.zip
 Example directories are provided for running FEHM to duplicate results
 shown in Figure 3 of the main paper. This figure shows snapshots of
 results from four simulations, files for each of which are stored in
 separate subdirectories: A_p12fto_OCv10_g981 B_p12d1200efto_OCv10_g1_3
 C_p12d600efto_OCv10_g1_3r D_p10d600efto_OCv10_g_114 #####
 A\_p12fto\_OCv10\_g981 Shallow aquifer, aquifer permeabilty = 1e-12 m^2,
 Earth gravity ##### B\_p12d1200efto\_OCv10\_g1\_3 Deep-thick aquifer,
 aquifer permeabilty = 1e-12 m^2, Europa gravity #####
 C\_p12d600efto\_OCv10\_g1\_3r Deep-thin aquifer, aquifer permeabilty =
 1e-12 m^2, Europa gravity ##### D\_p10d600efto\_OCv10\_g\_114 Deep-thin
 aquifer, aquifer permeabilty = 1e-10 m^2, Enceladus gravity In addition to
 the input files in each directory, the user will need to copy over or add
 a static link for the fluid properties lookup table, nist120-1800.out, and
 update the name in the .files file to point to this table. The lookup
 table is provided in the parent folder for the four example folders listed
 above. Please see the FEHM User Manual for more detailed instructions for
 use of FEHM, available with the GitHub repository:
 [https://github.com/lanl/FEHM](https://github.com/lanl/FEHM) Code
 modifications included in this repository are covered by the FEHM license,
 as described in the associated README file.