diff --git a/src/cosmology.c b/src/cosmology.c index a5034240d07b9b9bf401d470c0bacbf6962a8006..4da9528784b1fb7fdb04761b77a3c0056a32f41a 100644 --- a/src/cosmology.c +++ b/src/cosmology.c @@ -642,8 +642,12 @@ void cosmology_write_model(hid_t h_grp, const struct cosmology *c) { io_write_attribute_d(h_grp, "a_end", c->a_end); io_write_attribute_d(h_grp, "time_beg [internal units]", c->time_begin); io_write_attribute_d(h_grp, "time_end [internal units]", c->time_end); + io_write_attribute_d(h_grp, "Universe age [internal units]", c->time); + io_write_attribute_d(h_grp, "Lookback time [internal units]", + c->lookback_time); io_write_attribute_d(h_grp, "h", c->h); io_write_attribute_d(h_grp, "H0 [internal units]", c->H0); + io_write_attribute_d(h_grp, "H [internal units]", c->H); io_write_attribute_d(h_grp, "Hubble time [internal units]", c->Hubble_time); io_write_attribute_d(h_grp, "Omega_m", c->Omega_m); io_write_attribute_d(h_grp, "Omega_r", c->Omega_r); @@ -652,6 +656,11 @@ void cosmology_write_model(hid_t h_grp, const struct cosmology *c) { io_write_attribute_d(h_grp, "Omega_lambda", c->Omega_lambda); io_write_attribute_d(h_grp, "w_0", c->w_0); io_write_attribute_d(h_grp, "w_a", c->w_a); + io_write_attribute_d(h_grp, "w", c->w); + io_write_attribute_d(h_grp, "Redshift", c->z); + io_write_attribute_d(h_grp, "Scale-factor", c->a); + io_write_attribute_d(h_grp, "Critical density [internal units]", + c->critical_density); } #endif diff --git a/src/parallel_io.c b/src/parallel_io.c index 51c88e95396eb6af1ab7f7eb2d1ed48eada59e0d..1446a3010268f2d02042a6b6496d8dee4035a4c4 100644 --- a/src/parallel_io.c +++ b/src/parallel_io.c @@ -904,6 +904,7 @@ void prepare_file(struct engine* e, const char* baseName, long long N_total[6], io_write_attribute(h_grp, "Dimension", INT, &dimension, 1); io_write_attribute(h_grp, "Redshift", DOUBLE, &e->cosmology->z, 1); io_write_attribute(h_grp, "Scale-factor", DOUBLE, &e->cosmology->a, 1); + io_write_attribute_s(h_grp, "Code", "SWIFT"); /* GADGET-2 legacy values */ /* Number of particles of each type */ diff --git a/src/serial_io.c b/src/serial_io.c index dd623f946ce6ec32415586e5048979de3adb58fa..a088e71fbe0c15f5aa8503d55fae664d25fcbab1 100644 --- a/src/serial_io.c +++ b/src/serial_io.c @@ -812,6 +812,7 @@ void write_output_serial(struct engine* e, const char* baseName, io_write_attribute(h_grp, "Dimension", INT, &dimension, 1); io_write_attribute(h_grp, "Redshift", DOUBLE, &e->cosmology->z, 1); io_write_attribute(h_grp, "Scale-factor", DOUBLE, &e->cosmology->a, 1); + io_write_attribute_s(h_grp, "Code", "SWIFT"); /* GADGET-2 legacy values */ /* Number of particles of each type */ diff --git a/src/single_io.c b/src/single_io.c index 2170bcffc4ce3ab21f1edd168d1dc37b2b4af963..452c4fe27a983fd6c05733916131b962ef1f7939 100644 --- a/src/single_io.c +++ b/src/single_io.c @@ -666,6 +666,7 @@ void write_output_single(struct engine* e, const char* baseName, io_write_attribute(h_grp, "Dimension", INT, &dimension, 1); io_write_attribute(h_grp, "Redshift", DOUBLE, &e->cosmology->z, 1); io_write_attribute(h_grp, "Scale-factor", DOUBLE, &e->cosmology->a, 1); + io_write_attribute_s(h_grp, "Code", "SWIFT"); /* GADGET-2 legacy values */ /* Number of particles of each type */