Skip to content

Compressible and Thermodynamically-consistent Spectral Model

License

Notifications You must be signed in to change notification settings

Brown-Justin-M/CaTSM

Repository files navigation

 CCCCCC             TTTTTTTT   SSSSSS   MM    MM           
CCC  CCC   aaaaaa      TT     SSS  SSS  MMM  MMM           
CCC            aaa     TT      SSS      MMMMMMMM           
CCC        aaaaaaa     TT         SSS   MM MM MM           
CCC  CCC  aaa  aaa     TT     SSS  SSS  MM MM MM           
 CCCCCC    aaaaa a     TT      SSSSSS   MM MM MM           
================================================           
================================================           
                                                                  
Written by: Justin Brown                                             
Contact: jmbrown2@nps.edu    

README
                                                                     
    CaTSM is a fluid code designed to solve double-diffusive and         
    microscale fluid problems using compressible physics. The equation   
    state permits linear and ideal gas forms. The code uses the          
    pseudo-spectral method and is periodic horizontally. Initial steps   
    are carried out using a Runge--Kutta/Crank--Nicolson method, but the 
    bulk of the code uses the Adams--Bashforth/Backwards Differentiation 
    Formula.                                                            

ACKNOWLEDGEMENTS

    CaTSM was constructed using Stephan Stellmach's PADDI code as a template and 
    similarly adopts the time-stepping schemes from Roger Peyret's "Spectral 
    Methods for Incompressible Viscous Flow."

DEPENDENCIES

    CaTSM depends on the FFTW and NetCDF fortran libraries. It is recommended to
    use the following versions:

        FFTW: 3.3.9_1
        NetCDF: 4.8.0_1

INSTALL

    To install CaTSM, use the configure command:

        ./configure
        make

    This will compile the CaTSM executable in the main directory of the code. If 
    the dependencies are not in a standard place or if the fortran compiler does 
    not have a standard name, these can be specified through environment variables
    to configure. For example,

        ./configure FC=gfortran-11 FCFLAGS="-I/usr/local/include -L/usr/local/lib"

    Alternatively, the home directories of FFTW and NetCDF can be specified 
    manually with

        ./configure FFTW_HOME=/path/to/fftw NETCDF_HOME=/path/to/netcdf

RUN

    To run, CaTSM requires a single parameter file named "parameters" and can be 
    executed from the terminal without arguments. If the file is named something 
    other than parameters, the user can instead run

        CaTSM name_of_parameter_file

    The parameter file is a fortran namelist file containing three namelists: grid, 
    parameters, and io. Examples can be found in test/rt or test/sfrt for 
    a standard Rayleigh--Taylor problem without and with double-diffusion, 
    respectively. Additional parameters can be found in the grid_type object definition 
    in src/grid_module.F90, the params_type object definition in src/params_module.F90, 
    and the controllers_type object definition in src/IO/output_module.F90 for the three
    namelists, respectively.

OUTPUTS

    CaTSM outputs four files during a typical simulation. The names of these files
    can be specified using the io namelist. The number of steps in between outputs
    can also be specified using the io namelist. Files ending with ".nc" are in
    the NetCDF format.

    data.nc: A full 3D time record of the simulation in physical space.

    restart.nc: A spectral output at a single time to use as a restart

    profiles.nc: A time record of vertical profiles

    diag.csv: A CSV file containing global averages of critical quantities like
    the heat and salt fluxes and the rms values of the velocities/temperature/
    salinity perturbations.