The idea here is to use the module construct to encapsulate IO subroutines. These subroutines become available to a program by including the use statement after the main program statement. For example,
program myIOtest
use gadget_io_mod
implicit none
The naming convention for the input subroutines is,
gadgetread_[gas]<blockname><nfiles>
where blockname is one of {pos,vel,id,mass,u,rho,ye,xHI,hsml,sfr}, nfiles is one of {1,N}, and "gas" is only present if blockname is one of {u,rho,ye,xHI,hsml,sfr}. For example, the routine to read positions from a whole snapshot is gadgetread_posN() and the routine to read gas electron fractions from a single file is gadgetread_gasye1(). See the documentation for further description of the arguments.
1.5.5