• Home
  • Research
  • Members
  • Publications
  • Visit
  • MISC
  • About Taysun

Journal Review

Link to google sheet


(not) useful info

RAMSES_HDF5


bitbucket page: https://bitbucket.org/tkimm_yonsei/ramses_hdf5/src/master/

[kimm@seurat ]$ cd ~/soft/ [kimm@seurat ]$ wget http://cascade.yonsei.ac.kr/files/hdf5-1.10.5.tar [kimm@seurat ]$ tar xvf hdf5-1.10.5.tar [kimm@seurat ]$ cd hdf5-1.10.5 [kimm@seurat ]$ ./configure --prefix=$HOME/soft/hdf5-1.10.5/ --enable-fortran [kimm@seurat ]$ make [kimm@seurat ]$ make install [kimm@seurat ]$ cd ~/soft [kimm@seurat ]$ wget http://cascade.yonsei.ac.kr/files/ramses_hdf5.tar [kimm@seurat ]$ tar xvf ramses_hdf5 [kimm@seurat ]$ cd ramses_hdf5 [kimm@seurat ramses_hdf5]$ make
# Now copy a batch script [kimm@seurat ramses_hdf5]$ cp sh/backup_hdf.sh [YOUR_WORKING_DIRECTORY] [kimm@seurat ramses_hdf5]$ cd !$ [kimm@seurat WORKING_DIR]$
# Make sure that your backup_hdf.sh has a correct option 5 RAMSES_HDF5=$HOME/soft/ramses_hdf5/ramses_hdf5 6 7 8 MP0=0 # initial mass field exists?? 9 MET=1 # metallicity field exists? 10 PREC=4 # want to save the data space? if not, set it to 8 11 NEW_RAMSES=.true.
# Reading HDF5 files with IDL [kimm@seurat WORKING_DIR]$ idl
 IDL> rd_ram,cell=cell,info=info,part=part,nout=18
 IDL> help,cell,info,part,/st
# Reading HDF5 files with Python In [1]: import h5py as hp In [2]: f = hp.File('ramses_00001.h5','r') # Ramses hdf5 files contains two groups, part and cell, and one dataset info. In [3]: list(f.keys()) Out[3]: ['cell', 'info', ‘part'] # Cell info -> cell, Particle info (DM + star) -> part In [4]: Part = f['part'] In [5]: list(Part.keys()) Out[5]: ['id',mp', 'npart', 'tp', 'vxp', 'vyp', 'vzp', 'xpart', 'ypart', 'zp', 'zpart'] # If you want to use cgs units, multiply a conversion factor using info # code unit -> cgs unit # unit_d : mass density # unit_nH : number density # unit_T2 : Temperature / mu (mean molecular weight) # unit_l : length # unit_t : time In [6]: redshift = 1/data.info["aexp"]-1 In [7]: Info=f['info'] In [8]: unit_d = Info['unit_d'] In [9]: unit_l = Info['unit_l'] # For example, a particle mass in units of solar mass, In [10]: mp = Part['mp']*unit_d*unit_l**3./1.989e33

© All rights reserved. | Design by TEMPLATED and modified by Lizzie