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

Merge multiple files #31

Open
malmans2 opened this issue Feb 21, 2022 · 1 comment
Open

Merge multiple files #31

malmans2 opened this issue Feb 21, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@malmans2
Copy link
Member

We are only missing a script to merge multiple files.
I haven't tried it yet, but there's an open issue in the NEMO gitlab repo:
https://forge.nemo-ocean.eu/nemo/nemo/-/issues/14

Not sure if it has been fixed yet.

@malmans2 malmans2 added the enhancement New feature or request label Feb 21, 2022
@malmans2
Copy link
Member Author

malmans2 commented Feb 21, 2022

@atb299 @jdha I quickly tried merging multiple files, and it worked. I think the issue above has been fixed upstream.

Merging files created with XIOS multiple_file is the only thing that is missing in the workflow. I wanted to add and integrate scripts to do that, but it looks like Archer2 is down at the moment. Something similar is done here, although probably you already have scripts to merge multiple files:

# Rebuild
for FILE in *namelist_cfg; do
STRING=$(basename -- "$FILE")
PATTERN="domain_cfg"
PREFIX="${STRING/namelist_cfg/$PATTERN}"
if ./rebuild_nemo -n nam_rebuild -p "$SLURM_NTASKS" -d 1 -x 64 -y 64 -z 1 -t 1 "$PREFIX" "$SLURM_NTASKS"; then
rm "${PREFIX}"_[0-9][0-9][0-9][0-9].nc
else
rm "$PREFIX".nc
fi
done

We should probably also make use of --multi-prog as shown here: https://accowa.github.io/n01-pages/postproc/rebuild_nemo_example/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant