io Module

pysunrunner.io.nlast_info(w_dir=None, datatype=None)[source]

Prints the information of the last step of the simulation as obtained from out files

Inputs:

w_dir – path to the directory which has the dbl.out(or flt.out) and the data

datatype – If the data is of ‘float’ type then datatype = ‘flt’ else by default the datatype is set to ‘dbl’ (Double precision).

Outputs:

This function returns a dictionary with following keywords -

nlast – The ns for the last file saved.

time – The simulation time for the last file saved.

dt – The time step dt for the last file.

Nstep – The Nstep value for the last file saved.

Usage:

In case the data is ‘float’.

wdir = /path/to/data/directory

import pyPLUTO as pp

A = pp.nlast_info(w_dir=wdir,datatype='float')

pysunrunner.io.read_time(w_dir=None, datatype=None)[source]

read the dbl.out file to get the time information for each dump

Inputs:

w_dir – path to the directory which has the dbl.out(or flt.out) and the data

datatype – If the data is of ‘float’ type then datatype = ‘flt’ else by default the datatype is set to ‘dbl’ (Double precision).

Outputs:

This function returns a dictionary with following keywords -

nlast – The ns for the last file saved.

time – The simulation time for the last file saved.

dt – The time step dt for the last file.

Nstep – The Nstep value for the last file saved.

Usage:

In case the data is ‘float’.

wdir = /path/to/data/directory

import pyPLUTO as pp

A = pp.nlast_info(w_dir=wdir,datatype='float')