Giter Club home page Giter Club logo

ah3-utils's Introduction

AH3 Utilities

Suite of programs for analysis of datacubes from the Capreole+C^2 Ray radiation-HD code

This includes reading and writing of Garrelt Mellema’s AH3 file format.

End-user programs

ah3test

Check that an AH3 file can be read and re-written

ah3tofits

Convert an AH3 file to a set of FITS files (one for each physical variable)

Example of ah3tofits usage

will@robbie:results-pdr$ datadir=. ; dateid=512_2010 ; runid=3 ; timeid=1
will@robbie:results-pdr$ printf '%s\n' $datadir $dateid $runid $timeid | ../ah3-utils/src/ah3tofits
 Root directory?
 Date ID (e.g., 29112005)
 Run ID (e.g., a)
 Time ID (e.g., 70)
 Reading from AH3D file 512_2010_3_0001.ah3
 &HDR_NAMELIST
 HDR%BANNER  = Capreole (F90) 3D Hydrodynamics                                                 ,
 HDR%NROFDIM =           3,
 HDR%NROFVARS        =           7,
 HDR%NROFGRIDS       =           1,
 HDR%REFINEMENTFACTOR        =           1,
 HDR%FRAMENR =          10,
 HDR%GAMMA   =   1.66666666666667     ,
 HDR%TIME    =   31557600000.0000
 /
         512         512         512  1.205468793090867E+016
  1.205468793090867E+016  1.205468793090867E+016  2.410937586181734E+016
  2.410937586181734E+016  2.410937586181734E+016           1
Reading variable #1
Reading variable #2
Reading variable #3
Reading variable #4
Reading variable #5
Reading variables #6 to #7
 maximum density is   9.415811621388648E-018
 at          254         306         334
will@robbie:results-pdr$ ls -lh  ${dateid}_${runid}*.fits
-rw-r--r-- 1 will 60001 513M Oct 30 11:04 512_2010_3_0001d.fits
-rw-r--r-- 1 will 60001 513M Oct 30 11:09 512_2010_3_0001p.fits
-rw-r--r-- 1 will 60001 513M Oct 30 11:04 512_2010_3_0001u.fits
-rw-r--r-- 1 will 60001 513M Oct 30 11:06 512_2010_3_0001v.fits
-rw-r--r-- 1 will 60001 513M Oct 30 11:07 512_2010_3_0001w.fits
-rw-r--r-- 1 will 60001 513M Oct 30 11:09 512_2010_3_0001x.fits

ah3uniform

Take an AH3 file and makes it uniform (average density, average energy, and all velocities zeroed).

ah3doctor

Remove some mass from the center of the grid

ah3rebin

Rebin an AH3 file to half the resolution

Support modules

ah3mod

Read and write AH3 files. Note that multi-node MPI files are not supported (yet).

wfitsutils

Read and write FITS files

Dependencies

ah3tofits (via wfitsutils) depends on the cfitsio library

Fedora

sudo yum install cfitsio

Other

Install from source, e.g., like this:

wget ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3250.tar.gz
tar xzf cfitsio3250.tar.gz
cd cfitsio
./configure --prefix=/usr/local
make
sudo make install

Of course, you will want to change 3250 to te latest version. If you don’t have wget you can use curl instead (curl URL -o FILENAME).

Compilation

  • First install the dependencies
  • Enter the src/ directory
  • [OPTIONAL] Copy local.mk.sample to local.mk and edit it to specify the desired compiler command (F90C), compiler options (F90LAGS), and libraries to link (LFITS).
    • The default values are
F90C=gfortran
F90FLAGS=-O3
LFITS=/usr/local/lib/libcfitsio.a

Plans

[#B] Break out wfitsutils.f90 into a submodule

Would make sense, since I use it in other projects too. But I need to learn how git submodules work. They look a bit scary.

[#C] Support MPI version of AH3 file format

This is low priority since I don’t need it myself

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.