Skip to content

Commit

Permalink
Merge pull request #9 from EPCCed/data-generation
Browse files Browse the repository at this point in the history
coarsening done
  • Loading branch information
davedavemckay authored May 1, 2024
2 parents bab1e04 + d78e54a commit 2d361ba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions docs/data-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ Following the structure given in the [general data generation](ML_training.md) c

Edit line 17 (`for TRAJ_INDEX in {1..10}`) to give the desired number of trajectories. Edit `<account>` on line 9 and `x01` in lines containing paths for your project and submit via `sbatch fine_trajectories.sh`.

3. Coarsen selected simulation snapshots. ## check this
3. Coarsen selected simulation snapshots.

Fine-grained data must be coarsened to match the desired coarse-grained resolution. This can be done via interpolation for a general solution. Files in [files/coarsening](files/coarsening) perform this task.
Fine-grained data must be coarsened to match the desired coarse-grained resolution. This can be done via interpolation for a general solution. Files in [files/coarsening](files/coarsening) perform this task. Submit `submit-resize.sh` via `sbatch submit-resize.sh`.

4. Single-timestep coarse simulations.


2 changes: 1 addition & 1 deletion files/coarsening/resize_trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import restart

ID_TRAJ = sys.argv[1]
INPUT_PATH = f'/scratch/space1/d175/data/training/ground-truth/trajectory_{ID_TRAJ}'
INPUT_PATH = f'./{ID_TRAJ}'
BASE_PATH = Path(sys.argv[2])
num_timesteps = 1001

Expand Down
6 changes: 3 additions & 3 deletions files/coarsening/submit-resize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# activate conda environment for boutdata and xbout packages
conda activate boutsmartsim

cd /path/to/SiMLInt/files/coarsening
TRAJECTORY=17
OUTPUT_PATH=/path/to/${TRAJECTORY}
cd /scratch/space1/x01/data/my-scratch-data
TRAJECTORY=1
OUTPUT_PATH=${TRAJECTORY}/extracted
python resize_trajectory.py ${TRAJECTORY} ${OUTPUT_PATH}

0 comments on commit 2d361ba

Please sign in to comment.