netcdf_io Module

  • The Purdue Swiftest Team - David A. Minton, Carlisle A. Wishard, Jennifer L.L. Pouplin, and Jacob R. Elliott
  • 182 statements
  • Source File

Base type definitions. This allows the collision and encounter modules to be defined before the swiftest module. This derived datatype stores the NetCDF ID values for each of the variables included in the NetCDF data file. This is used as the base class defined in base


Uses

  • module~~netcdf_io~~UsesGraph module~netcdf_io netcdf_io globals globals module~netcdf_io->globals module~base base module~netcdf_io->module~base module~base->globals module~coarray coarray module~base->module~coarray module~coarray->globals

Used by

  • module~~netcdf_io~~UsedByGraph module~netcdf_io netcdf_io module~encounter encounter module~encounter->module~netcdf_io module~s_netcdf_io_implementations s_netcdf_io_implementations module~s_netcdf_io_implementations->module~netcdf_io module~swiftest swiftest module~swiftest->module~netcdf_io module~swiftest->module~encounter module~collision collision module~swiftest->module~collision module~s_collision_check s_collision_check module~s_collision_check->module~swiftest module~s_collision_check->module~collision module~symba symba module~s_collision_check->module~symba module~s_swiftest_orbel s_swiftest_orbel module~s_swiftest_orbel->module~swiftest module~whm whm module~whm->module~swiftest module~s_fraggle_generate s_fraggle_generate module~s_fraggle_generate->module~swiftest module~fraggle fraggle module~s_fraggle_generate->module~fraggle module~s_fraggle_generate->module~symba module~s_operator_cross s_operator_cross module~s_operator_cross->module~swiftest module~collision->module~encounter module~s_encounter_util s_encounter_util module~s_encounter_util->module~encounter module~s_encounter_util->module~swiftest module~s_symba_gr s_symba_gr module~s_symba_gr->module~swiftest module~s_symba_gr->module~symba module~s_tides_step_rot s_tides_step_rot module~s_tides_step_rot->module~swiftest module~fraggle->module~swiftest module~symba->module~swiftest module~helio helio module~symba->module~helio module~s_collision_util s_collision_util module~s_collision_util->module~swiftest module~s_collision_util->module~collision module~rmvs rmvs module~rmvs->module~swiftest module~rmvs->module~whm module~s_symba_step s_symba_step module~s_symba_step->module~swiftest module~s_symba_step->module~symba module~s_swiftest_user s_swiftest_user module~s_swiftest_user->module~swiftest module~s_rmvs_encounter_check s_rmvs_encounter_check module~s_rmvs_encounter_check->module~swiftest module~s_rmvs_encounter_check->module~rmvs module~s_helio_kick s_helio_kick module~s_helio_kick->module~swiftest module~s_helio_kick->module~helio module~s_symba_util s_symba_util module~s_symba_util->module~swiftest module~s_symba_util->module~fraggle module~s_symba_util->module~symba module~s_coarray_collect s_coarray_collect module~s_coarray_collect->module~swiftest module~s_swiftest_gr s_swiftest_gr module~s_swiftest_gr->module~swiftest module~s_swiftest_io s_swiftest_io module~s_swiftest_io->module~swiftest module~s_swiftest_io->module~symba module~s_fraggle_util s_fraggle_util module~s_fraggle_util->module~swiftest module~s_fraggle_util->module~fraggle module~s_symba_kick s_symba_kick module~s_symba_kick->module~swiftest module~s_symba_kick->module~symba module~s_swiftest_discard s_swiftest_discard module~s_swiftest_discard->module~swiftest module~s_symba_encounter_check s_symba_encounter_check module~s_symba_encounter_check->module~swiftest module~s_symba_encounter_check->module~symba module~s_symba_drift s_symba_drift module~s_symba_drift->module~swiftest module~s_symba_drift->module~symba module~s_swiftest_drift s_swiftest_drift module~s_swiftest_drift->module~swiftest module~bindings_module bindings_module module~bindings_module->module~swiftest module~s_collision_regime s_collision_regime module~s_collision_regime->module~swiftest module~s_collision_regime->module~collision module~s_swiftest_coarray s_swiftest_coarray module~s_swiftest_coarray->module~swiftest module~s_rmvs_step s_rmvs_step module~s_rmvs_step->module~swiftest module~s_rmvs_step->module~rmvs module~s_rmvs_discard s_rmvs_discard module~s_rmvs_discard->module~swiftest module~s_rmvs_discard->module~rmvs module~s_swiftest_driver s_swiftest_driver module~s_swiftest_driver->module~swiftest module~s_helio_step s_helio_step module~s_helio_step->module~swiftest module~s_helio_step->module~helio module~s_shgrav_accel s_shgrav_accel module~s_shgrav_accel->module~swiftest module~shgrav shgrav module~s_shgrav_accel->module~shgrav module~s_swiftest_obl s_swiftest_obl module~s_swiftest_obl->module~swiftest module~s_swiftest_obl->module~shgrav module~s_rmvs_kick s_rmvs_kick module~s_rmvs_kick->module~swiftest module~s_rmvs_kick->module~rmvs module~s_encounter_check s_encounter_check module~s_encounter_check->module~encounter module~s_encounter_check->module~swiftest module~s_encounter_io s_encounter_io module~s_encounter_io->module~encounter module~s_encounter_io->module~swiftest program~main main program~main->module~swiftest module~s_helio_gr s_helio_gr module~s_helio_gr->module~swiftest module~s_helio_gr->module~helio module~s_helio_util s_helio_util module~s_helio_util->module~swiftest module~s_helio_util->module~helio module~s_shgrav_pot s_shgrav_pot module~s_shgrav_pot->module~swiftest module~s_shgrav_pot->module~shgrav module~s_walltime s_walltime module~s_walltime->module~swiftest module~s_rmvs_util s_rmvs_util module~s_rmvs_util->module~swiftest module~s_rmvs_util->module~rmvs module~helio->module~swiftest module~helio->module~whm module~s_symba_discard s_symba_discard module~s_symba_discard->module~swiftest module~s_symba_discard->module~symba module~s_whm_coord s_whm_coord module~s_whm_coord->module~swiftest module~s_whm_coord->module~whm module~s_whm_gr s_whm_gr module~s_whm_gr->module~swiftest module~s_whm_gr->module~whm module~s_coarray_clone s_coarray_clone module~s_coarray_clone->module~swiftest module~whm_drift whm_drift module~whm_drift->module~swiftest module~whm_drift->module~whm module~s_whm_util s_whm_util module~s_whm_util->module~swiftest module~s_whm_util->module~whm module~s_whm_step s_whm_step module~s_whm_step->module~swiftest module~s_whm_step->module~whm module~s_swiftest_util s_swiftest_util module~s_swiftest_util->module~swiftest module~s_swiftest_util->module~whm module~s_swiftest_util->module~fraggle module~s_swiftest_util->module~symba module~s_swiftest_util->module~rmvs module~s_swiftest_util->module~helio module~s_helio_drift s_helio_drift module~s_helio_drift->module~swiftest module~s_helio_drift->module~helio module~s_swiftest_kick s_swiftest_kick module~s_swiftest_kick->module~swiftest module~s_whm_kick s_whm_kick module~s_whm_kick->module~swiftest module~s_whm_kick->module~whm module~s_collision_generate s_collision_generate module~s_collision_generate->module~swiftest module~s_collision_generate->module~collision module~s_collision_io s_collision_io module~s_collision_io->module~swiftest module~s_collision_io->module~collision module~s_collision_resolve s_collision_resolve module~s_collision_resolve->module~swiftest module~s_collision_resolve->module~collision module~shgrav->module~swiftest module~s_tides_kick_getacch s_tides_kick_getacch module~s_tides_kick_getacch->module~swiftest

Contents


Interfaces

interface

  • public module module subroutine netcdf_io_check(status, call_identifier)

    Arguments

    TypeIntentOptionalAttributesName
    integer, intent(in) :: status

    The status code returned by a NetCDF function

    character(len=*), intent(in), optional :: call_identifier

    String that indicates which calling function caused the error for diagnostic purposes

interface

  • public module module subroutine netcdf_io_close(self)

    Arguments

    TypeIntentOptionalAttributesName
    class(netcdf_parameters), intent(inout) :: self

    Parameters used to identify a particular NetCDF dataset

interface

  • public module module subroutine netcdf_io_find_idslot(self, id, idslot)

    Arguments

    TypeIntentOptionalAttributesName
    class(netcdf_parameters), intent(inout) :: self

    Parameters used to identify a particular NetCDF dataset

    integer(kind=I4B), intent(in) :: id

    The value of id to search for

    integer(kind=I4B), intent(out) :: idslot

    The index of the id slot where this data belongs

interface

  • public module module subroutine netcdf_io_find_tslot(self, t, tslot)

    Arguments

    TypeIntentOptionalAttributesName
    class(netcdf_parameters), intent(inout) :: self

    Parameters used to identify a particular NetCDF dataset

    real(kind=DP), intent(in) :: t

    The value of time to search for

    integer(kind=I4B), intent(out) :: tslot

    The index of the time slot where this data belongs

interface

  • public module module subroutine netcdf_io_get_idvals(self)

    Arguments

    TypeIntentOptionalAttributesName
    class(netcdf_parameters), intent(inout) :: self

    Parameters used to identify a particular NetCDF dataset

interface

  • public module module subroutine netcdf_io_sync(self)

    Arguments

    TypeIntentOptionalAttributesName
    class(netcdf_parameters), intent(inout) :: self

    Parameters used to identify a particular NetCDF dataset


Derived Types

type, public, abstract :: netcdf_parameters

Components

TypeVisibilityAttributesNameInitial
integer(kind=I4B), public :: BE_varid

ID for the system binding energy variable

integer(kind=I4B), public :: E_collisions_varid

ID for the energy lost in collisions variable

character, public :: E_collisions_varname ="E_collisions"

name of the escaped angular momentum y variable

integer(kind=I4B), public :: E_untracked_varid

ID for the energy that is untracked due to loss (due to mergers and body energy for escaped bodies)

character, public :: E_untracked_varname ="E_untracked"

name of the energy that is untracked due to loss (due to mergers and body energy for escaped bodies)

integer(kind=I4B), public :: GMescape_varid

ID for the G*Mass of bodies that escape the system

character, public :: GMescape_varname ="GMescape"

name of the G*Mass of bodies that escape the system

integer(kind=I4B), public :: Gmass_varid

ID for the G*mass variable

character, public :: Gmass_varname ="Gmass"

name of the G*mass variable

integer(kind=I4B), public :: Ip_varid

ID for the axis principal moment of inertia variable

character, public :: Ip_varname ="Ip"

name of the principal moment of inertial variable

integer(kind=I4B), public :: KE_orb_varid

ID for the system orbital kinetic energy variable

integer(kind=I4B), public :: KE_rot_varid

ID for the system rotational kinetic energy variable

integer(kind=I4B), public :: L_escape_varid

ID for the escaped angular momentum vector variable

character, public :: L_escape_varname ="L_escape"

name of the escaped angular momentum vector variable

integer(kind=I4B), public :: L_orbit_varid

ID for the system orbital angular momentum vector variable

character, public :: L_orbit_varname ="L_orbit"

name of the orbital angular momentum vector variable

integer(kind=I4B), public :: L_rot_varid

ID for the system rotational angular momentum vector variable

character, public :: L_rot_varname ="L_rot"

name of the rotational angular momentum vector variable

integer(kind=I4B), public :: PE_varid

ID for the system potential energy variable

integer(kind=I4B), public :: Q_varid

ID for the energy dissipation variable

integer(kind=I4B), public :: TE_varid

ID for the system binding energy variable

integer(kind=I4B), public :: a_varid

ID for the semimajor axis variable

character, public :: a_varname ="a"

name of the semimajor axis variable

character, public :: be_varname ="BE"

name of the system binding energy variable

integer(kind=I4B), public :: c_lm_varid

ID for the c_lm aqrray

character, public :: c_lm_varname ="c_lm"

name for the c_lm array

integer(kind=I4B), public :: cape_varid

ID for the eccentric/hyperbolic anomaly variable

character, public :: cape_varname ="cape"

name of the eccentric/hyperbolic anomaly variable

integer(kind=I4B), public :: capm_varid

ID for the mean anomaly variable

character, public :: capm_varname ="capm"

name of the mean anomaly variable

integer(kind=I4B), public :: capom_varid

ID for the long. asc. node variable

character, public :: capom_varname ="capom"

name of the long. asc. node variable

character, public :: collision_id_dimname ="collision_id"

name of the collision id variable

integer(kind=I4B), public :: collision_id_varid

Netcdf ID for the origin collision ID

integer(kind=I4B), public :: discard_body_id_varid

ID for the id of the other body involved in the discard

character, public :: discard_body_id_varname ="discard_body_id"

name of the id of the other body involved in the discard

integer(kind=I4B), public :: discard_rh_varid

ID for the heliocentric position vector of the body at the time of discard variable

character, public :: discard_rh_varname ="discard_rh"

name of the heliocentric position vector of the body at the time of discard variable

integer(kind=I4B), public :: discard_time_varid

ID for the time of discard variable

character, public :: discard_time_varname ="discard_time"

name of the time of discard variable

integer(kind=I4B), public :: discard_vh_varid

ID for the heliocentric velocity vector of the body at the time of discard variable

character, public :: discard_vh_varname ="discard_vh"

name of the heliocentric velocity vector of the body at the time of discard variable

integer(kind=I4B), public :: e_varid

ID for the eccentricity variable

character, public :: e_varname ="e"

name of the eccentricity variable

integer(kind=I4B), public :: f_varid

ID for the true anomaly variable

character, public :: f_varname ="f"

name of the true anomaly variable

character, public :: file_name

Name of the output file

integer(kind=I4B), public :: gr_pseudo_vh_varid

ID for the heliocentric pseudovelocity vector variable (used in GR)

character, public :: gr_pseudo_vh_varname ="gr_pseudo_vh"

name of the heliocentric pseudovelocity vector variable (GR)

integer(kind=I4B), public :: id

ID for the output file

integer(kind=I4B), public :: id_varid

ID for the id variable

character, public :: id_varname ="id"

name of the particle id variable

integer(kind=I4B), public :: idslot =1

The current id slot that gets passed to the NetCDF reader/writer

integer(kind=I4B), public, dimension(:), allocatable:: idvals

Array of id values in this NetCDF file

integer(kind=I4B), public :: inc_varid

ID for the inclination variable

character, public :: inc_varname ="inc"

name of the inclination variable

integer(kind=I4B), public :: j2rp2_varid

ID for the j2 variable

character, public :: j2rp2_varname ="j2rp2"

name of the j2rp2 variable

integer(kind=I4B), public :: j4rp4_varid

ID for the j4 variable

character, public :: j4rp4_varname ="j4rp4"

name of the j4pr4 variable

integer(kind=I4B), public :: k2_varid

ID for the Love number variable

character, public :: k2_varname ="k2"

name of the Love number variable

character, public :: ke_orbit_varname ="KE_orbit"

name of the system orbital kinetic energy variable

character, public :: ke_rot_varname ="KE_rot"

name of the system rotational kinetic energy variable

integer(kind=I4B), public :: l_dim_max =6

Maximum value of the l dimension

integer(kind=I4B), public :: l_dimid

ID for the l dimension for c_lm

character, public :: l_dimname ="l"

name of l dimension for c_lm

integer(kind=I4B), public :: l_varid

ID for the l variable

integer(kind=I4B), public :: lam_varid

ID for the mean longitude variable

character, public :: lam_varname ="lam"

name of the mean longitude variable

logical, public :: lc_lm_exists =.false.

Logical flag to indicate whether or not the c_lm array was present in an old file.

logical, public :: lfile_is_open =.false.

Flag indicating that the linked file is currently open

logical, public :: lpseudo_vel_exists =.false.

Logical flag to indicate whether or not the pseudovelocity vectors were present in an old file.

integer(kind=I4B), public :: m_dim_max =6

Maximum value of the m dimension

integer(kind=I4B), public :: m_dimid

ID for the m dimension for c_lm

character, public :: m_dimname ="m"

name of m dimension for c_lm

integer(kind=I4B), public :: m_varid

ID for the m variable

integer(kind=I4B), public :: mass_varid

ID for the mass variable

character, public :: mass_varname ="mass"

name of the mass variable

integer(kind=I4B), public :: max_idslot =0

Records the last index value of id in the NetCDF file

integer(kind=I4B), public :: max_tslot =0

Records the last index value of time in the NetCDF file

integer(kind=I4B), public :: name_dimid

ID for the particle name dimension

character, public :: name_dimname ="name"

name of the particle name dimension

integer(kind=I4B), public :: name_varid

ID for the particle name variable

integer(kind=I4B), public :: npl_varid

ID for the number of active massive bodies variable

character, public :: npl_varname ="npl"

name of the number of active massive bodies variable

integer(kind=I4B), public :: nplm_varid

ID for the number of active fully interacting massive bodies variable (SyMBA)

character, public :: nplm_varname ="nplm"

name of the number of active fully interacting massive bodies variable (SyMBA)

integer(kind=I4B), public :: ntp_varid

ID for the number of active test particles variable

character, public :: ntp_varname ="ntp"

name of the number of active test particles variable

integer(kind=I4B), public :: omega_varid

ID for the arg. of periapsis variable

character, public :: omega_varname ="omega"

name of the arg. of periapsis variable

integer(kind=I4B), public :: origin_rh_varid

ID for the origin position vector variable

character, public :: origin_rh_varname ="origin_rh"

name of the heliocentric position vector of the body at the time of origin variable

integer(kind=I4B), public :: origin_time_varid

ID for the origin time

character, public :: origin_time_varname ="origin_time"

name of the time of origin variable

integer(kind=I4B), public :: origin_type_varid

ID for the origin type

character, public :: origin_type_varname ="origin_type"

name of the origin type variable

integer(kind=I4B), public :: origin_vh_varid

ID for the origin velocity vector component

character, public :: origin_vh_varname ="origin_vh"

name of the heliocentric velocity vector of the body at the time of origin variable

integer(kind=I4B), public :: out_type

output type (will be assigned either NF90_DOUBLE or NF90_FLOAT, depending on the user parameter)

character, public :: pe_varname ="PE"

name of the system potential energy variable

integer(kind=I4B), public :: ptype_varid

ID for the particle type variable

character, public :: ptype_varname ="particle_type"

name of the particle type variable

character, public :: q_varname ="Q"

name of the energy dissipation variable

integer(kind=I4B), public :: radius_varid

ID for the radius variable

character, public :: radius_varname ="radius"

name of the radius variable

integer(kind=I4B), public :: rh_varid

ID for the heliocentric position vector variable

character, public :: rh_varname ="rh"

name of the heliocentric position vector variable

integer(kind=I4B), public :: rhill_varid

ID for the hill radius variable

character, public :: rhill_varname ="rhill"

name of the hill radius variable

integer(kind=I4B), public :: rot_varid

ID for the rotation vector variable

character, public :: rot_varname ="rot"

name of the rotation vector variable

integer(kind=I4B), public :: rotphase_varid

ID for the rotation phase variable

character, public :: rotphase_varname ="rotphase"

name of the rotation phase variable

integer(kind=I4B), public, dimension(2):: sign_coords =[-1, 1]

The sign dimension coordinate labels

integer(kind=I4B), public :: sign_dimid

ID for sign dimension

character, public :: sign_dimname ="sign"

name of the sign dimension for c_lm

integer(kind=I4B), public :: sign_varid

ID for sign variable

character(len=1), public, dimension(3):: space_coords =["x", "y", "z"]

The space dimension coordinate labels

integer(kind=I4B), public :: space_dimid

ID for the space dimension

character, public :: space_dimname ="space"

name of the space dimension

integer(kind=I4B), public :: space_varid

ID for the space variable

integer(kind=I4B), public :: status_varid

ID for the status variable

character, public :: status_varname ="status"

name of the particle status variable

integer(kind=I4B), public :: str_dimid

ID for the character string dimension

character, public :: str_dimname ="string32"

name of the character string dimension

character, public :: te_varname ="TE"

name of the system binding energy variable

integer(kind=I4B), public :: time_dimid

ID for the time dimension

character, public :: time_dimname ="time"

name of the time dimension

integer(kind=I4B), public :: time_varid

ID for the time variable

integer(kind=I4B), public :: tslot =1

The current time slot that gets passed to the NetCDF reader/writer

integer(kind=I4B), public :: varpi_varid

ID for the long. of periapsis variable

character, public :: varpi_varname ="varpi"

name of the long. of periapsis variable

integer(kind=I4B), public :: vh_varid

ID for the heliocentric velocity vector variable

character, public :: vh_varname ="vh"

name of the heliocentric velocity vector variable

Type-Bound Procedures

procedure, public :: close => netcdf_io_close

Closes an open NetCDF file

procedure, public :: find_idslot => netcdf_io_find_idslot

Finds the id dimension index for a given value of id

procedure, public :: find_tslot => netcdf_io_find_tslot

Finds the time dimension index for a given value of t

procedure, public :: get_idvals => netcdf_io_get_idvals

Gets the valid id numbers currently stored in this dataset

procedure, public :: sync => netcdf_io_sync

Syncrhonize the disk and memory buffer of the NetCDF file (e.g. commit the frame files stored in memory to disk)