Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update IC links #408

Merged
merged 12 commits into from
Jan 24, 2025
20 changes: 14 additions & 6 deletions example/test_problem/ELBDM/DiskHeating/download_ic.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
filename=disk-heating-ic
#!/bin/bash

curl https://girder.hub.yt/api/v1/item/6645cffcff473673ea91b24d/download -o ${filename}.tgz
tar -zxvf ${filename}.tgz
rm ${filename}.tgz
ln -s ${filename}/UM_IC_0.4_M7 UM_IC
ln -s ${filename}/PAR_IC_0.4_M7_low_res DiskHeatingParticleIC
LOCAL_FILENAME="disk-heating-ic"
FILE_ID="677dd2d0999605c485c8de8f"
FILE_SHA256="5c981ffe1f0cd85237b51e9e2872e8047dad8a87e0419575255e4c1d5d8cf17a"

# 1 download
curl https://hub.yt/api/v1/item/${FILE_ID}/download -o "${LOCAL_FILENAME}.tgz"

# 2. compare sha256sum
! [ `sha256sum ${LOCAL_FILENAME}.tgz | awk '{print $1}'` = "${FILE_SHA256}" ] && echo "File broken: ${LOCAL_FILENAME}.tgz"

# 3. unzip and link
tar -zxvf ${LOCAL_FILENAME}.tgz
rm ${LOCAL_FILENAME}.tgz
ln -s ${LOCAL_FILENAME}/UM_IC_0.4_M7 UM_IC
ln -s ${LOCAL_FILENAME}/PAR_IC_0.4_M7_low_res DiskHeatingParticleIC
17 changes: 12 additions & 5 deletions example/test_problem/ELBDM/HaloMerger/download_ic.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
filename=HALO_IC_m22_1_Mh_4e9
link=https://girder.hub.yt/api/v1/item/65e5251f1613cd89a1dfe902/download
#!/bin/bash

LOCAL_FILENAME="HALO_IC_m22_1_Mh_4e9"
FILE_ID="677cc8db999605c485c8de83"
FILE_SHA256="acbd85842de65ff2360c7f3a1d1101c6f4f8939f430c3f61b8bc5f6f9a72fe94"

curl ${link} -o ${filename}
# 1. download
curl https://hub.yt/api/v1/item/${FILE_ID}/download -o "${LOCAL_FILENAME}"

ln -s ${filename} HALO_IC_Halo1
ln -s ${filename} HALO_IC_Halo2
# 2. compare sha256sum
! [ `sha256sum ${LOCAL_FILENAME} | awk '{print $1}'` = "${FILE_SHA256}" ] && echo "File broken: ${LOCAL_FILENAME}"

# 3. link
ln -s ${LOCAL_FILENAME} HALO_IC_Halo1
ln -s ${LOCAL_FILENAME} HALO_IC_Halo2
20 changes: 14 additions & 6 deletions example/test_problem/ELBDM/IsolatedHalo/download_ic.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
filename=UM_IC_run05-halo08-lv4
link=https://use.yt/upload/d75aa595
#!/bin/bash

curl -L ${link} -o ${filename}.tgz
tar -zxvf ${filename}.tgz
rm ${filename}.tgz
LOCAL_FILENAME="UM_IC_run05-halo08-lv4"
FILE_ID="677cbad6999605c485c8de77"
FILE_SHA256="7ed91ba48a9aec139e0574629b689090ae43496fb957c6822c7ec1bd1217e22e"

ln -s ${filename} UM_IC
# 1. download
curl https://hub.yt/api/v1/item/${FILE_ID}/download -o "${LOCAL_FILENAME}.tgz"

# 2. compare sha256sum
! [ `sha256sum ${LOCAL_FILENAME}.tgz | awk '{print $1}'` = "${FILE_SHA256}" ] && echo "File broken: ${LOCAL_FILENAME}.tgz"

# 3. unzip and link
tar -zxvf ${LOCAL_FILENAME}.tgz
rm ${LOCAL_FILENAME}.tgz
ln -s ${LOCAL_FILENAME} UM_IC
17 changes: 13 additions & 4 deletions example/test_problem/ELBDM/LSS/download_ic.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
filename=Music_InitCondition_z3200_L1.4_N0256_s1002
link=https://use.yt/upload/4dec54c9
#!/bin/bash

curl -L ${link} -o ${filename}
ln -s ${filename} UM_IC
LOCAL_FILENAME="Music_InitCondition_z3200_L1.4_N0256_s1002"
FILE_ID="6780d8d6999605c485c8dea0"
FILE_SHA256="114fd2a0d37e70ba7bd06907c878bd1c752ea76882ad1833af165696eef8cf9d"

# 1. download
curl https://hub.yt/api/v1/item/${FILE_ID}/download -o "${LOCAL_FILENAME}"

# 2. compare sha256sum
! [ `sha256sum ${LOCAL_FILENAME} | awk '{print $1}'` = "${FILE_SHA256}" ] && echo "File broken: ${LOCAL_FILENAME}"

# 3. link
ln -s ${LOCAL_FILENAME} UM_IC
17 changes: 13 additions & 4 deletions example/test_problem/ELBDM/LSS_Hybrid/download_heavy_halo_ic.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
filename=Music_InitCondition_z99_L2.8_N0256_HeavyHalo
link=https://use.yt/upload/4587e2e6
#!/bin/bash

curl -L ${link} -o ${filename}
ln -sf ${filename} UM_IC_wave_heavy
LOCAL_FILENAME="Music_InitCondition_z100_L2.8_N0256_HeavyHalo"
FILE_ID="6780d9d2999605c485c8dea9"
FILE_SHA256="2f15920763e6189abd81b6f39fd283ebeeb6b6b90dbbce0eb898d098ef4b497d"

# 1. download
curl https://hub.yt/api/v1/item/${FILE_ID}/download -o "${LOCAL_FILENAME}"

# 2. compare sha256sum
! [ `sha256sum ${LOCAL_FILENAME} | awk '{print $1}'` = "${FILE_SHA256}" ] && echo "File broken: ${LOCAL_FILENAME}"

# 3. link
ln -sf ${LOCAL_FILENAME} UM_IC_wave_heavy
python3 elbdm_wave_to_hybrid_IC.py -input UM_IC_wave_heavy -output UM_IC_hybrid_heavy -resolution 256
ln -sf UM_IC_hybrid_heavy UM_IC
21 changes: 16 additions & 5 deletions example/test_problem/ELBDM/LSS_Hybrid/download_light_halo_ic.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
filename=Music_InitCondition_z99_L2.8_N0064_LightHalo
link=https://use.yt/upload/a67d8dd1
#!/bin/bash

LOCAL_FILENAME="Music_InitCondition_z100_L2.8_N0064_LightHalo"
FILE_ID="6780d97e999605c485c8dea6"
FILE_SHA256="89e1626405e38e3bd756167e3c06719f193456aa8e7d210ddfd13246df0e1a91"

# 1. clean
rm UM_IC*
curl -L ${link} -o ${filename}
python3 elbdm_rescale_periodic_IC.py -input ${filename} -output Music_InitCondition_z99_L2.8_N0256_LightHalo -n_in 64 -n_out 256
ln -sf Music_InitCondition_z99_L2.8_N0256_LightHalo UM_IC_wave_light

# 2. download
curl https://hub.yt/api/v1/item/${FILE_ID}/download -o "${LOCAL_FILENAME}"

# 3. compare sha256sum
! [ `sha256sum ${LOCAL_FILENAME} | awk '{print $1}'` = "${FILE_SHA256}" ] && echo "File broken: ${LOCAL_FILENAME}"

# 4. link
python3 elbdm_rescale_periodic_IC.py -input ${LOCAL_FILENAME} -output Music_InitCondition_z100_L2.8_N0256_LightHalo -n_in 64 -n_out 256
ln -sf Music_InitCondition_z100_L2.8_N0256_LightHalo UM_IC_wave_light
python3 elbdm_wave_to_hybrid_IC.py -input UM_IC_wave_light -output UM_IC_hybrid_light -resolution 256
ln -sf UM_IC_hybrid_light UM_IC
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
filename=spectral_tables.zip
link=https://use.yt/upload/66f39405
#!/bin/bash

LOCAL_FILENAME="spectral_tables.zip"
FILE_ID="6780d950999605c485c8dea3"
FILE_SHA256="304fb4d098d6ad6f6533f137fc78a4d05d2abf7c239392be29f694503410247f"

# 1. clean
rm -r spectral_tables*
curl -L ${link} -o ${filename}
unzip ${filename}

# 2. download
curl https://hub.yt/api/v1/item/${FILE_ID}/download -o "${LOCAL_FILENAME}"

# 3. compare sha256sum
! [ `sha256sum ${LOCAL_FILENAME} | awk '{print $1}'` = "${FILE_SHA256}" ] && echo "File broken: ${LOCAL_FILENAME}"

# 4. unzip
unzip ${LOCAL_FILENAME}
rm ${LOCAL_FILENAME}
hyschive marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,26 @@ LOCAL_FILENAME1="HI"
LOCAL_FILENAME2="CloudyData_UVB=HM2012.h5"
FILE_ID1="677e4757999605c485c8de92"
FILE_ID2="677ca211999605c485c8de6c"
FILE_SHA256_1="8ab54870656585b280b3085c6aa8d9e62f6969ba05123fc25c9a7549bcdd32a2"
FILE_SHA256_2="8715f1b39e90a7296ec2adcd442fa13a3d45d2ad021c6fa2fae9e4ab7a4700b2"


# file download
curl https://hub.yt/api/v1/item/${FILE_ID1}/download -o "${LOCAL_FILENAME1}.tar.gz"
curl https://hub.yt/api/v1/item/${FILE_ID2}/download -o "${LOCAL_FILENAME2}"

# compare sha256sum
! [ `sha256sum ${LOCAL_FILENAME1}.tar.gz | awk '{print $1}'` = "${FILE_SHA256_1}" ] && echo "File broken: ${LOCAL_FILENAME1}.tar.gz"
! [ `sha256sum ${LOCAL_FILENAME2} | awk '{print $1}'` = "${FILE_SHA256_2}" ] && echo "File broken: ${LOCAL_FILENAME2}"

# file unzip
tar xzvf ${LOCAL_FILENAME1}.tar.gz
mv ${LOCAL_FILENAME1}/* ./
rm -rf ${LOCAL_FILENAME1}
rm ${LOCAL_FILENAME1}.tar.gz

# Input_* soft links
ln -s ./Input_Options/Input__Flag_Jeans.high-res Input__Flag_Jeans
ln -s ./Input_Options/Input__Flag_ParMassCell.high-res Input__Flag_ParMassCell
ln -s ./Input_Options/Input__Flag_Rho.high-res Input__Flag_Rho
ln -s ./Input_Options/Input__Parameter.high-res Input__Parameter
ln -fs ./Input_Options/Input__Flag_Jeans.high-res Input__Flag_Jeans
ln -fs ./Input_Options/Input__Flag_ParMassCell.high-res Input__Flag_ParMassCell
ln -fs ./Input_Options/Input__Flag_Rho.high-res Input__Flag_Rho
ln -fs ./Input_Options/Input__Parameter.high-res Input__Parameter
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
#!/bin/bash

LOCAL_FILENAME1="LOW"
LOCAL_FILENAME2="CloudyData_UVB=HM2012.h5"
FILE_ID1="677ca225999605c485c8de6f"
FILE_ID2="677ca211999605c485c8de6c"
FILE_SHA256_1="8fd18d016f5af665d31d853a394c9089503df225f4c256eb1163c9a7b4e94644"
FILE_SHA256_2="8715f1b39e90a7296ec2adcd442fa13a3d45d2ad021c6fa2fae9e4ab7a4700b2"

# file download
wget --no-check-certificate -O ./LOW.tar.gz https://www.dropbox.com/sh/1xzt1rysy9v3a9l/AAAMlJBQG1OQFW4cjhp11Ex6a/LOW.tar.gz?dl=1
wget --no-check-certificate -O ./CloudyData_UVB=HM2012.h5 https://github.com/grackle-project/grackle_data_files/raw/main/input/CloudyData_UVB=HM2012.h5
curl https://hub.yt/api/v1/item/${FILE_ID1}/download -o "${LOCAL_FILENAME1}.tar.gz"
curl https://hub.yt/api/v1/item/${FILE_ID2}/download -o "${LOCAL_FILENAME2}"

# compare sha256sum
! [ `sha256sum ${LOCAL_FILENAME1}.tar.gz | awk '{print $1}'` = "${FILE_SHA256_1}" ] && echo "File broken: ${LOCAL_FILENAME1}.tar.gz"
! [ `sha256sum ${LOCAL_FILENAME2} | awk '{print $1}'` = "${FILE_SHA256_2}" ] && echo "File broken: ${LOCAL_FILENAME2}"

# file unzip
tar xzvf LOW.tar.gz
mv LOW/*.dat ./
rmdir LOW
rm LOW.tar.gz
tar xzvf ${LOCAL_FILENAME1}.tar.gz
mv ${LOCAL_FILENAME1}/*.dat ./
rmdir ${LOCAL_FILENAME1}
rm ${LOCAL_FILENAME1}.tar.gz

# Input_* soft links
ln -s ./Input_Options/Input__Flag_Jeans.low-res Input__Flag_Jeans
ln -s ./Input_Options/Input__Flag_ParMassCell.low-res Input__Flag_ParMassCell
ln -s ./Input_Options/Input__Flag_Rho.low-res Input__Flag_Rho
ln -s ./Input_Options/Input__Parameter.low-res Input__Parameter
ln -fs ./Input_Options/Input__Flag_Jeans.low-res Input__Flag_Jeans
ln -fs ./Input_Options/Input__Flag_ParMassCell.low-res Input__Flag_ParMassCell
ln -fs ./Input_Options/Input__Flag_Rho.low-res Input__Flag_Rho
ln -fs ./Input_Options/Input__Parameter.low-res Input__Parameter
11 changes: 4 additions & 7 deletions example/test_problem/Hydro/CDM_LSS/download_ic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

LOCAL_FILENAME="PAR_IC"
FILE_ID="677c92db999605c485c8de69"
FILE_SHA256="46e27324953bcd7b4eecaecd395b6cf6ccbf662e65a12c935b3823abd8119be3"

# 1. Download through `curl`
# 1. download
curl https://hub.yt/api/v1/item/${FILE_ID}/download -o ${LOCAL_FILENAME}

# 2. download through `girder`
API_URL="https://girder.hub.yt/api/v1"

# girder-cli --api-url ${API_URL} download --parent-type item ${FILE_ID} temp
# mv temp/${LOCAL_FILENAME} ./
# rmdir temp
# 2. compare sha256sum
! [ `sha256sum ${LOCAL_FILENAME} | awk '{print $1}'` = "${FILE_SHA256}" ] && echo "File broken: ${LOCAL_FILENAME}"
19 changes: 15 additions & 4 deletions example/test_problem/Hydro/ClusterMerger/download_ic.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
filename=gamer_ic_merging_cluster.tgz
curl -L https://use.yt/upload/cceea6c4 -o $filename
tar -zxvf $filename
rm $filename
#!/bin/bash

LOCAL_FILENAME="gamer_ic_merging_cluster.tgz"
FILE_ID="677caaec999605c485c8de74"
FILE_SHA256="a233a892818504cf15e188bca862e22250bb1f3e09155740e45d272e4ab5f1c1"

# 1. download
curl https://hub.yt/api/v1/item/${FILE_ID}/download -o "${LOCAL_FILENAME}"

# 2. compare sha256sum
! [ `sha256sum ${LOCAL_FILENAME} | awk '{print $1}'` = "${FILE_SHA256}" ] && echo "File broken: ${LOCAL_FILENAME}"

# 3. unzip
tar -zxvf ${LOCAL_FILENAME}
rm ${LOCAL_FILENAME}
Loading