Hi!
Alas, I don't have the io routine used to produce the file, but I do have a
C program which translates the binary into an ascii file. This program
reveals the data structure for the binary which I think is what you are
after (its in the load_snapshot routine at the end). I'm actually unsure if
the softening lengths were dumped. I suppose I could recreate the "size" of
the particles with something like (mass / density)^(1/3) or something
similar...
If they are not in the file, is there a way to manually or artificially set
this parameter for a group of particles in SPLASH?
Thanks so much for your help,
Brandon
On Wednesday, July 16, 2014 4:57:45 PM UTC-6, [email protected] wrote:
>
> Hi Brandon,
>
> Looks like you have extra arrays in the file that are different from what
> splash assumes:
>
> ----------------------- SMS_SN_55_29_000 -----------------------
> >> reading default Gadget format <<
> cooling flag on : assuming Ne, Nh dumped before h
>
> ...
> ** FRIENDLY NEIGHBOUR WARNING! **
> It looks like you are using around 0.0 neighbours,
> corresponding to h = 0.00*(m/rho)^(1/3) in 3D:
> -------
>
> Seems that the smoothing lengths have not been read correctly from the
> file, presumably because you do not actually have Ne/Nh dumped, or you have
> some extra arrays in between? Can you send the io routine you use to write
> this file so I can see what the problem might be?
>
> I should point out that the best way to handle extra physics in GADGET is
> to output files in the block-labelled (tagged) format (format 2 in GADGET I
> believe) - then splash knows how to read any new arrays no matter how many
> you add.
>
> Daniel
>
> On 17 Jul 2014, at 5:12 am, bkwiggins77 via SPLASH users forum <
> [email protected] <javascript:>> wrote:
>
> > Hi!
> >
> > My name is Brandon Wiggins. I'm attempting to visualize a cosmic
> filament with this gadget dataset:
> >
> > https://www.dropbox.com/l/SLeOUOGFQsSuzolWtG0Xlq?
> >
> > I have attempted to visualize this in a rotation about the filament. I
> would like to apply some smoothing between particles in the filament so
> that it these particles do not appear as discrete points. Is there a way to
> do this in SPLASH? Both normalized and density-weighted interpolation are
> currently turned on in my attached visualization.
> >
> > Brandon
> >
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "SPLASH users forum" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected] <javascript:>.
> > To post to this group, send email to [email protected]
> <javascript:>.
> > Visit this group at http://groups.google.com/group/splash-users.
> > For more options, visit https://groups.google.com/d/optout.
> > <before2.gif>
>
>
--
You received this message because you are subscribed to the Google Groups
"SPLASH users forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/splash-users.
For more options, visit https://groups.google.com/d/optout.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define pi 3.1415927
#define m_H 1.6726e-24
#define k_B 1.3806e-16
#define Hubble 3.2407789e-18
#define G 6.672e-8
#define X 0.76
#define gamma 5.0/3.0
#define unit_length 3.085678e21
#define unit_mass 1.989e43
#define unit_energy 1.989e53
void load_snapshot(char *fname);
void allocate_memory(void);
struct io_header
{
int npart[6];
double mass[6];
double time;
double redshift;
int flag_sfr;
int flag_feedback;
int npartTotal[6];
int flag_cooling;
int num_files;
double BoxSize;
double Omega0;
double OmegaLambda;
double HubbleParam;
char fill[256-6*4-6*8-2*8-2*4-6*4-2*4-4*8];
} header;
struct particle_data
{
int ID;
float Pos[3];
float Vel[3];
float Mass;
float EgySpec;
float Density, Temp, nh, age, DM, HDII, LWrate, HM, v_tan, v_r;
float elec, HI, HII, HeI, HeII, HeIII, H2I, H2II, del_r;
float hsm, DI, DII, HDI, HIIheatrate, HeIIheatrate, HIIionrate;
float HeIIIheatrate, FosHII, sink, HeIIIionrate, HeIIionrate;
} *P;
int N_part;
int N_gas;
int main(int argc, char **argv)
{
int n, ncount;
int j = 0;
int entries = 0;
double mu = 0.0;
double num_rec_vir_total, alpha_B, emis_1640, emis_Ly, emis_H, center_x, center_y, center_z;
double lum_Ly_vir_total, lum_Ly_total, lum_1640_vir_total, lum_1640_total;
double lum_H_total, lum_H_vir_total, gal_time, escape_fraction, volume_vir;
double lum_Ly_here, dist_r, lum_H_here, lum_1640_here, num_rec_here, volume_here, v_tot;
double dist, random = 0.0;
FILE *outfile;
int ID_max;
printf("reading snapshot...\n");
load_snapshot("/scratch/jlj/SNAPS/SMS_SN_55_000");
outfile = fopen("/scratch/jlj/SNAPS/snap_SMS_SN_000", "w");
printf("time: %g\n", header.time);
printf("z: %g\n", header.redshift);
printf("%d %d %d %d %d %d %g %g %g %g %g %g %g %g %d %d %d %d %d %d %d %d %d %d %g %g %g %g\n", header.npart[0], header.npart[1], header.npart[2], header.npart[3], header.npart[4], header.npart[5], header.mass[0], header.mass[1], header.mass[2], header.mass[3], header.mass[4], header.mass[5], header.time, header.redshift, header.flag_sfr, header.flag_feedback, header.npartTotal[0], header.npartTotal[1], header.npartTotal[2], header.npartTotal[3], header.npartTotal[4], header.npartTotal[5], header.flag_cooling, header.num_files, header.BoxSize, header.Omega0, header.OmegaLambda, header.HubbleParam);
/*
for(n = 0; n < N_part; n++)
{
for(j = 0; j < 3; j++)
{
if(P[n].Pos[j] < 0.0 || P[n].Pos[j] > header.BoxSize || isnan(P[n].Pos[j]) == 1)
{
printf("moep!\n");
}
}
}
for(n = 0; n < N_part; n++)
{
for(j = 0; j < 3; j++)
{
if(P[n].Vel[j] < -1000.0 || P[n].Vel[j] > 1000.0 || isnan(P[n].Vel[j]) == 1)
{
printf("P[%d].Vel[%d] = %g\n", n, j, P[n].Vel[j]);
}
}
}
for(n = 0; n < N_part; n++)
{
if(P[n].ID < 1 || P[n].ID > N_part || isnan(P[n].ID) == 1)
{
printf("P[%d].ID = %d\n", n, P[n].ID);
}
}
for(n = 0; n < N_gas; n++)
{
if(header.mass[0] == 0.0)
{
P[n].Mass = P[n].Mass/header.HubbleParam*1.0e10;
}
else
{
P[n].Mass = header.mass[0]/header.HubbleParam*1.0e10;
}
}
for(n = N_gas; n < N_part; n++)
{
if(header.mass[0] == 0.0)
{
P[n].Mass = P[n].Mass/header.HubbleParam*1.0e10;
}
else
{
P[n].Mass = header.mass[1]/header.HubbleParam*1.0e10;
}
}
for(n = 0; n < N_part; n++)
{
if(P[n].Mass < 1.0e-4 || P[n].Mass > 17000.0 || isnan(P[n].Mass) == 1)
{
printf("P[%d].Mass = %g\n", n, P[n].Mass);
}
}
*/
ID_max = -1;
double nh_max = 0.e0;
double time_after_sn, Hub_time, SN_init_time, new_part, blast_mom, blast_ke, new_ke;
int hot_num = 0;
Hub_time = 5.e8 * pow((header.time * 10.e0), 1.5);
SN_init_time = 5.e8 * pow((0.0621e0 * 10.e0), 1.5);
time_after_sn = Hub_time - SN_init_time;
printf("time after SN (years) = %g\n.", time_after_sn);
ncount = 0;
for(n = 0; n < N_gas; n++)
{
mu = 4.0/(3.0*X+1.0+4.0*X*P[n].HII);
P[n].nh = P[n].Density*unit_mass/pow(unit_length,3.0)*pow(header.HubbleParam,2.0)/pow(header.time,3.0)*X/m_H;
P[n].Temp = P[n].EgySpec*unit_energy/unit_mass*mu*(gamma-1.0)*m_H/k_B;
dist = pow((((P[n].Pos[0]-504.479e0)*(P[n].Pos[0]-504.479e0)) + ((P[n].Pos[1]-491.445e0)*(P[n].Pos[1]-491.445e0)) + ((P[n].Pos[2]-496.506e0)*(P[n].Pos[2]-496.506e0))),0.5e0);
dist = dist * 1000.e0 / 16.e0 / 0.7e0; // Hardwired for z = 15 and h = 0.7 -- JLJ -- 9/25/12
if(P[n].Temp > 1.e5){
hot_num = hot_num + 1;
// printf("time after SN (years) = %g. hot_num = %d. Hot gas detected - temp = %g. nh = %g. n = %d. x,y,z = %g, %g, %g. elec = %g. SMS label (age) = %g. dist (phys pc) = %g.\n", time_after_sn, hot_num, P[n].Temp, P[n].nh, n, P[n].Pos[0], P[n].Pos[1], P[n].Pos[2], P[n].elec, P[n].age, dist);
}
/* if(P[n].nh > nh_max) { */
if(P[n].ID == 108246){
nh_max = P[n].nh;
ID_max = n;
// if(P[n].elec > 1.e-2){
// printf("Gas ionized!! nh = %g. n = %d. x,y,z = %g, %g, %g. elec = %g.\n", P[n].nh, n, P[n].Pos[0], P[n].Pos[1], P[n].Pos[2], P[n].elec);
//}
}
P[n].Temp = P[n].EgySpec*unit_energy/unit_mass*mu*(gamma-1.0)*m_H/k_B;
/* printf("line 190\n");*/
}
printf("nh_max = %g. elec = %g. temp = %g. H2 = %g. HII = %g.\n", nh_max, P[ID_max].elec, P[ID_max].Temp, P[ID_max].H2I, P[ID_max].HII);
printf("mass_max = %g. age = %g.\n", P[ID_max].Mass, P[ID_max].age);
// center_x = P[ID_max].Pos[0] + 0.0000e0;
// center_y = P[ID_max].Pos[1] + 0.0001e0;
//center_z = P[ID_max].Pos[2] + 0.0001e0;
center_x = 504.479e0;
center_y = 491.445e0;
center_z = 496.506e0;
// printf("center_x = %g\n", P[ID_max].Pos[0]);
// printf("center_y = %g\n", P[ID_max].Pos[1]);
// printf("center_z = %g\n", P[ID_max].Pos[2]);
// printf("ID of densest particle = %d.\n", P[ID_max].ID);
/*
printf("mass = %g\n", P[4000000].Mass/header.HubbleParam*1.0e10);
printf("mass = %g\n", P[3800000].Mass/header.HubbleParam*1.0e10);
printf("mass = %g\n", P[5000000].Mass/header.HubbleParam*1.0e10);
printf("mass = %g\n", P[5500000].Mass/header.HubbleParam*1.0e10);
*/
lum_Ly_total = 0.e0;
lum_H_total = 0.e0;
lum_1640_total = 0.e0;
lum_Ly_vir_total = 0.e0;
lum_H_vir_total = 0.e0;
lum_1640_vir_total = 0.e0;
num_rec_vir_total = 0.e0;
volume_vir = 0.e0;
blast_mom = 0.e0;
new_part = 0.e0;
new_ke = 0.e0;
blast_ke = 0.e0;
for(n = 0; n < N_gas; n++)
{
P[n].del_r = sqrt((P[n].Pos[0]-center_x)*(P[n].Pos[0]-center_x) + (P[n].Pos[1]-center_y)*(P[n].Pos[1]-center_y) + (P[n].Pos[2]-center_z)*(P[n].Pos[2]-center_z))*1.e3*header.time/0.7e0;
/* Here, calculate the accretion rate as v_r / r ! -- JJ (1/13/10) */
P[n].v_r = sqrt(header.time) * ((P[n].Pos[0]-center_x)*(P[n].Vel[0]) + (P[n].Pos[1]-center_y)*(P[n].Vel[1]) + (P[n].Pos[2]-center_z)*(P[n].Vel[2])) / (P[n].del_r / (1.e3 * header.time / 0.7e0));
v_tot = sqrt(header.time) * sqrt(pow(P[n].Vel[0], 2.e0) + pow(P[n].Vel[1], 2.e0) + pow(P[n].Vel[2], 2.e0));
if(P[n].del_r < 12.e3)// && P[n].elec > 5.e-4)
{
new_part = 120.e0 * P[n].v_r;
blast_mom = blast_mom + new_part;
new_ke = 0.5e0 * 120.e0 * 2.e33 * P[n].v_r * P[n].v_r * 1.e10;
blast_ke = blast_ke + new_ke;
// grav_pot = grav_pot + ;
}
/* P[n].acc_time = -1.e0 * 3.e13 * P[n].del_r / v_r; */
/* Now convert to years! */
/* P[n].acc_time = P[n].acc_time / 3.14e7; */
/* if(P[n].acc_time < 0.e0)
{
P[n].acc_time = -1.e0 * P[n].acc_time;
}*/
/* Here we calculate the specific angular momentum and tangential velocity of particles -- JJ -- 3/15/10 */
/* x_phys = 1.e3 * header.time * (P[n].Pos[0] - center_x) / 0.7e0; */ /* in parsec physical */
/* y_phys = 1.e3 * header.time * (P[n].Pos[1] - center_y) / 0.7e0;
z_phys = 1.e3 * header.time * (P[n].Pos[2] - center_z) / 0.7e0; */
/* l_spec = sqrt(pow((y_phys * - *),2.e0) + pow((),2.e0) + pow((),2.e0)); */
P[n].v_tan = sqrt(pow(v_tot, 2.e0) - pow(P[n].v_r, 2.e0));
if(P[n].Temp > 0.e0)
{
/* if(P[n].Temp < 2500.e0){
emis_Ly = 2.7e-25 * 33.e0;
emis_H = 2.2e-25 * 3.041e0;
emis_1640 = 3.02e-24 * 5.786e0;
alpha_B = 7.72e-13;
}
if(P[n].Temp > 2500.e0 && P[n].Temp < 7500.e0){
emis_Ly = 1.54e-25 * 32.5e0;
emis_H = 2.2e-25 * 3.041e0;
emis_1640 = 3.02e-24 * 5.786e0;
alpha_B = 4.54e-13;
}*/
if(P[n].Temp < 15000.e0){
emis_Ly = 8.3e-26 * 32.7e0;
emis_H = 1.23e-25 * 2.86e0;
emis_1640 = 1.52e-24 * 6.474e0;
alpha_B = 2.59e-13;
}
/* Use only these two lines, as temps are wrong */
if(P[n].Temp > 15000.e0){
emis_Ly = 4.21e-26 * 34.e0;
emis_H = 0.658e-25 * 2.747e0;
emis_1640 = 0.729e-24 * 7.351e0;
alpha_B = 2.55e-13;
}
volume_here = (P[n].Mass * 1.e10 * 2.e33 / 0.7e0) / (1.7e-24 * P[n].nh);
/* Get the emissivities from Osterbrock, Tables 4.1, 4.2, 4.4, and 4.5 ; case B for all but Ly_alpha.*/
lum_Ly_here = emis_Ly * volume_here * P[n].elec * P[n].HII * P[n].nh * P[n].nh;
lum_H_here = emis_H * volume_here * P[n].elec * P[n].HII * P[n].nh * P[n].nh;
lum_1640_here = emis_1640 * volume_here * P[n].elec * P[n].HeIII * P[n].nh * P[n].nh * 0.0789e0;
lum_Ly_total = lum_Ly_total + lum_Ly_here;
lum_H_total = lum_H_total + lum_H_here;
lum_1640_total = lum_1640_total + lum_1640_here;
num_rec_here = alpha_B * volume_here * P[n].elec * P[n].HII * P[n].nh * P[n].nh;
dist_r = sqrt((P[n].Pos[0]-503.67e0)*(P[n].Pos[0]-503.67e0) + (P[n].Pos[1]-492.31e0)*(P[n].Pos[1]-492.31e0) + (P[n].Pos[2]-497.73e0)*(P[n].Pos[2]-497.73e0))*header.time/0.7e0;
if(dist_r < 0.05e0) {
lum_Ly_vir_total = lum_Ly_vir_total + lum_Ly_here;
lum_H_vir_total = lum_H_vir_total + lum_H_here;
lum_1640_vir_total = lum_1640_vir_total + lum_1640_here;
volume_vir = volume_vir + volume_here;
/* Count # of recombinations per second within the virial radius, to get f_esc */
num_rec_vir_total = num_rec_vir_total + num_rec_here;
}
random = rand();
if(random*(1.e0/RAND_MAX) < 0.0001e0){
printf("Mass = %g.\n", P[n].Mass);
}
/* if((random*(1.0/RAND_MAX) < 0.2e0 && P[n].del_r < 150.e0)) */
/* Used the above line up to 4/12/10 -- Now set up for DirectBH_RT snapshots, so as to plot out to larger radii! -- JJ */
if(random*(1.0/RAND_MAX) < 1.1e0)
/* if(P[n].del_r < 1000.e0) */
{
/* fprintf(outfile,"%15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g\n", P[n].Pos[0],P[n].Pos[1],P[n].Pos[2],P[n].Temp,P[n].nh,P[n].elec,P[n].H2I,P[n].HDI, P[n].HeIII);
*/
fprintf(outfile,"%15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g\n", P[n].Pos[0], P[n].Pos[1], P[n].Pos[2], P[n].Temp, P[n].nh, P[n].elec, P[n].H2I, P[n].del_r, P[n].HeI, P[n].HeII, P[n].HeIII, P[n].HII, P[n].age, P[n].v_r);
ncount = ncount + 1;
}
/* if(P[n].ID == 19897000)
{
printf("density above 1000 - nh = %g. (xyz) = (%g, %g, %g). HIIflag = %g. ID = %d.\n", P[n].nh, P[n].Pos[0], P[n].Pos[1], P[n].Pos[2], P[n].HIIflag, P[n].ID);
}*/
}
}
fclose(outfile);
gal_time = 5.4e8*(pow(header.time * 10.e0, 1.5e0) - pow(0.0643e0 * 10.e0, 1.5e0));
printf("ncount: %d\n", ncount);
printf("Momentum of blast = %g MSun km s^-1\n", blast_mom);
printf("KE of blast = %g erg\n", blast_ke);
// printf("Total Ly_alpha luminosity (erg s^-1) = %g.\n", lum_Ly_total);
// printf("Total H_alpha luminosity (erg s^-1) = %g.\n", lum_H_total);
//printf("Total He1640 luminosity (erg s^-1) = %g.\n", lum_1640_total);
//printf("1 kpc Ly_alpha luminosity (erg s^-1) = %g.\n", lum_Ly_vir_total);
//printf("1 kpc H_alpha luminosity (erg s^-1) = %g.\n", lum_H_vir_total);
//printf("1 kpc He1640 luminosity (erg s^-1) = %g.\n", lum_1640_vir_total);
//printf("1 kpc number of recombinations = %g.\n", num_rec_vir_total);
//printf("Total number of ionizing photons (for 2500 10 MSol case) = 1.66e51.\n");
//escape_fraction = (1.66e51 - num_rec_vir_total)/ 1.66e51;
//printf("escape fraction = %g.\n", escape_fraction);
//printf("age of starburst = %g.\n", gal_time);
//printf("volume_vir = %g. Volume within 1 kpc = 1.12e65 cm^3.\n", volume_vir);
printf("done!\n");
}
void allocate_memory(void)
{
if(!(P = (struct particle_data *)malloc(N_part*sizeof(struct particle_data))))
{
fprintf(stderr, "failed to allocate memory.\n");
exit(0);
}
}
void load_snapshot(char *fname)
{
FILE *fd;
char buf[200];
int i = 0;
int n = 0;
int sizeofheader = 256;
int pc = 0;
int pc_new = 0;
#define SKIP fread(&sizeofheader, sizeof(int), 1, fd);
sprintf(buf, "%s", fname);
if(!(fd = fopen(buf, "r")))
{
printf("can't open file `%s`\n", buf);
exit(0);
}
SKIP;
fread(&header, sizeof(header), 1, fd);
SKIP;
for(i = 0, N_part = 0; i < 5; i++)
{
N_part += header.npart[i];
}
N_gas = header.npart[0];
allocate_memory();
SKIP;
for(i = 0, pc_new = pc; i < 6; i++)
{
for(n = 0; n < header.npart[i]; n++)
{
fread(&P[pc_new].Pos[0], sizeof(float), 3, fd); //reading off positions
pc_new++;
}
}
SKIP;
SKIP;
for(i = 0, pc_new = pc; i < 6; i++)
{
for(n = 0; n < header.npart[i]; n++)
{
fread(&P[pc_new].Vel[0], sizeof(float), 3, fd); //reading off velocities
pc_new++;
}
}
SKIP;
SKIP;
for(i = 0, pc_new = pc; i < 6; i++)
{
for(n = 0; n < header.npart[i]; n++)
{
fread(&P[pc_new].ID, sizeof(int), 1, fd); //Reading off particle ID (these are all the same--gas)
pc_new++;
}
}
SKIP;
if(header.mass[0] == 0.0)
{
SKIP;
for(i = 0, pc_new = pc; i < 6; i++)
{
for(n = 0; n < header.npart[i]; n++)
{
fread(&P[pc_new].Mass, sizeof(float), 1, fd); //reading off mass
pc_new++;
}
}
SKIP;
}
SKIP;
for(n = 0, pc_new = pc; n < header.npart[0]; n++)
{
fread(&P[pc_new].EgySpec, sizeof(float), 1, fd); //reading off specific energy
pc_new++;
}
SKIP;
SKIP;
for(n = 0, pc_new = pc; n < header.npart[0]; n++)
{
fread(&P[pc_new].Density, sizeof(float), 1, fd); //reading off number density
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].elec, sizeof(float), 1, fd); //reading off free electron fraction
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HI, sizeof(float), 1, fd); // Neutral Hydrogen fraction
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HII, sizeof(float), 1, fd); //Hydrogen II fraction
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HeI, sizeof(float), 1, fd); //Helium I fraction
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HeII, sizeof(float), 1, fd); //Helium II fraction
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HeIII, sizeof(float), 1, fd); //Helium III fraction
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].H2I, sizeof(float), 1, fd); //Molecular Hydrogen fraction
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].H2II, sizeof(float), 1, fd); // reading off more chemistry stuff
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HM, sizeof(float), 1, fd); // even more chemistry stuff
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].hsm, sizeof(float), 1, fd); // yay chemistry!
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].DI, sizeof(float), 1, fd); //Deuterium I fraction
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].DII, sizeof(float), 1, fd); // Deuterium II fraction
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HDI, sizeof(float), 1, fd); // chemistry stuff
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].DM, sizeof(float), 1, fd); // Is DM dark matter?
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HDII, sizeof(float), 1, fd);
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].FosHII, sizeof(float), 1, fd);
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].sink, sizeof(float), 1, fd);
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HIIheatrate, sizeof(float), 1, fd);
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HeIIheatrate, sizeof(float), 1, fd);
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HeIIIheatrate, sizeof(float), 1, fd);
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].LWrate, sizeof(float), 1, fd);
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HIIionrate, sizeof(float), 1, fd);
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HeIIionrate, sizeof(float), 1, fd);
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HeIIIionrate, sizeof(float), 1, fd);
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].age, sizeof(float), 1, fd);
pc_new++;
}
SKIP;
/* SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HIIflag, sizeof(float), 1, fd);
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HeIIflag, sizeof(float), 1, fd);
pc_new++;
}
SKIP;
SKIP;
for(n=0, pc_new=pc; n<header.npart[0];n++)
{
fread(&P[pc_new].HeIIIflag, sizeof(float), 1, fd);
pc_new++;
}
SKIP;*/
/*
SKIP;
for(n = 0, pc_new = pc; n < header.npart[0]; n++)
{
fread(&P[pc_new].Hsml, sizeof(float), 1, fd);
pc_new++;
}
SKIP;
SKIP;
for(n = 0, pc_new = pc; n < header.npart[0]; n++)
{
fread(&P[pc_new].H2I, sizeof(float), 1, fd);
fread(&P[pc_new].HII, sizeof(float), 1, fd);
fread(&P[pc_new].DII, sizeof(float), 1, fd);
fread(&P[pc_new].HDI, sizeof(float), 1, fd);
fread(&P[pc_new].HeII, sizeof(float), 1, fd);
fread(&P[pc_new].HeIII, sizeof(float), 1, fd);
pc_new++;
}
SKIP;
SKIP;
for(n = 0, pc_new = pc; n < header.npart[0]; n++)
{
fread(&P[pc_new].dummy, sizeof(float), 1, fd);
pc_new++;
}
SKIP;
*/
fclose(fd);
}