Giter Site home page Giter Site logo

mist_codes's Introduction

MIST_codes

Routines to run and process a grid of MIST models on the Odyssey computing cluster at Harvard.

Prerequisites

Software

env variables

The following environment variables must be set in your e.g., .bashrc, .bash_profile.

  • $ISO_DIR = path to the iso directory.
  • $MIST_CODE_DIR = path to this directory.
  • $XA_CALC_DIR = path to the abundance calculator directory.
  • $MIST_GRID_DIR = path to where the MIST models will be computed.
  • $STORE_DIR = path to where the processed tarballs will be stored.
  • $MESAWORK_DIR = path to the directory where inlists and cleanworkdir will be stored.

inlists is a directory where the MESA inlists that are generated for each MIST grid are stored. The inlists are then copied to individual mass directories for each MIST grid. cleanworkdir is copy of the mesa/star/work directory. This serves as the template directory for each mass directory.

Getting Started

The two high-level scripts are submit_jobs.py and reduce_jobs.py. Files related to MESA, such as the template inlists, can be found in the mesafiles directory. scripts contains all the necessary helper functions.

Submitting a grid of models

./submit_jobs.py my_first_MIST_grid -1.0 0.0 This will run a grid of models with [Fe/H]=-1 and [a/Fe]=0.

It creates a directory named my_first_MIST_grid in $MIST_GRID_DIR. This my_first_MIST_grid directory contains a number of subdirectories XXXXXM_dir for each mass, e.g., 00100M_dir for a 1 Msun model. Each subdirectory is populated with everything, e.g., a customized inlist, that is required to run a single model. The initial_xa_calculator generates an input file of initial abundances for the user-supplied value of [Fe/H] and [a/Fe].

The choice of masses is set in scripts/make_inlist_inputs.py, and the input physics can be modified in mesafiles/inlist_XXXXX and mesafiles/run_star_extras.f, though doing so requires familiarity with MESA. The jobs are submitted using SLURM, where the exact choices of queue name, number of nodes, etc. can be set in the template file mesafiles/SLURM_MISTgrid.sh and scripts/make_slurm_sh.py.

The MESA history files are written out to $MIST_GRID_DIR/my_first_MIST_grid/XXXXXM_dir/LOGS. The MESA terminal output, which is useful for checking the computation progress in real-time, is found in $MIST_GRID_DIR/my_first_MIST_grid/XXXXXM_dir/XXXXXM.o. Any error messages are written out to $MIST_GRID_DIR/my_first_MIST_grid/XXXXXM_dir/XXXXXM.e.

Processing a grid of models

./reduce_jobs.py my_first_MIST_grid This will process the MESA history files and call Aaron Dotter's iso package to generate EEP tracks and isochrones.

This script goes through multiple steps.

  1. It first renames the grid by attaching a _raw suffix, e.g., my_first_MIST_grid_raw.
  2. It creates a my_first_MIST_grid, which contains the subdirectories eeps isochrones, inlists, plots, and models_photos.
  3. It copies over the MESA history files and renames them to XXXXXM.track. It cuts out any redundant model steps due to e.g., retries in the MESA computation and removes any features due to numerical noise that may occur during the post-AGB phase.
  4. It analyzes the XXXXXM.o and XXXXXM.e files to generate a summary file, tracks_summary.txt, of all the individual MESA runs.
  5. It copies over the individual inlists to my_first_MIST_grid/inlists and renames them to XXXXXM.inlist.
  6. If there are any MESA photos or models saved during the computation to allow for convenient restarts, they are also saved to models_photos after being renamed XXXXXM.mod and XXXXXM.photo.
  7. It calls the iso package to make the EEP files and isochrones. There is an option to choose between basic and full. As the names suggest, full is just more comprehensive and contains more MESA columns. See mesafiles/my_history_columns_basic.list and mesafiles/my_history_columns_full.list for more information.
  8. It plots the individual EEPs and isochrones and saves them as pdfs (Optional).
  9. It saves the original MESA history data files separately as my_first_MIST_grid_tracks.
  10. my_first_MIST_grid_tracks, my_first_MIST_grid, and my_first_MIST_grid_raw are compressed and moved over to $STORE_DIR for permanent storage.
  11. Everything my_first_MIST_grid-related is removed from $MIST_GRID_DIR.

See scripts/README.md for more information.

mist_codes's People

Contributors

jieunchoi avatar marwahaha avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.