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

Create tar_create.sh #18

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions tar_create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
#SBATCH --account=<ACCOUNT>
#SBATCH --job-name=tarcreate
#SBATCH --partition=shared
#SBATCH --nodes=1
#SBATCH --output=<LOG-PATH>/tarcreate.%j.o
#SBATCH --error=<LOG-PATH>/tarcreate.%j.o
#SBATCH --mem=6GB
#SBATCH --time=12:00:00
#SBATCH --mail-user=<EMAIL>
#SBATCH --mail-type=ALL

cd <ZARR-FILE>
for var in u v w temp qc qv qi qr cloud_num tke theta_v pres rho div;
do
echo $var
tar_creator -i ${var}/ -t <ZARR-FILENAME-WITHOUT-ENDING>.${var}.{:03d}.tar -s 33554432000
done

tar_creator -i time height height_bnds .zmetadata .zattrs .zgroup -t <ZARR-FILENAME-WITHOUT-ENDING>.coords.{:03d}.tar -s 33554432000

for var in u v w temp qc qv qi qr cloud_num tke theta_v pres rho div coords;
do
echo $var
tar_referencer -t <ZARR-FILENAME-WITHOUT-ENDING>.${var}.???.tar -p <ZARR-FILENAME-WITHOUT-ENDING>.${var}.tar.preffs
done

#in a last step the preffs files need to be combined