Skip to content
Extraits de code Groupes Projets
Valider 713db86e rédigé par Antoine Barthélemy's avatar Antoine Barthélemy
Parcourir les fichiers

tools to store/synchronize BDY files

parent d1645dc3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
#!/bin/bash
# This script should be used to synchronize BDY ocean forcing files from "storage" to the
# machines where NEMO is to be run. It should be called on the target machine as:
#
# ./synchronize_atmospheric_forcing_files.bash forcing configuration machine
forcing=$1
configuration=$2
machine=$3
# check the forcing
if ! [[ "$forcing" =~ ^(oras5|placeholder)$ ]]
then
echo "\"$forcing\" is not a supported forcing."
exit
fi
# check the configuration
if ! [[ "$configuration" =~ ^(eANT025|placeholder)$ ]]
then
echo "\"$configuration\" is not a supported configuration."
exit
fi
# adjust to the machine
if [ "$machine" = "lemaitre3" ]
then
destination_path=/scratch/ucl/elic/barthele/
storage_ssh_access=storage
elif [ "$machine" = "lucia" ]
then
destination_path=/gpfs/scratch/acad/limhr/barthele/
storage_ssh_access=storageVcism
else
echo "\"$machine\" is not a supported machine."
exit
fi
# do the synchronization
synchronize () {
rsync -avh --delete --progress \
${storage_ssh_access}:/home/elic/barthele/reanalyses/ocean/$forcing/bdy_for_$configuration \
${destination_path}/reanalyses/ocean/$forcing/bdy_for_$configuration
}
if [ "$machine" = "lucia" ]
then
# comment:
# - special care is required, otherwise "rsync" messes up the permissions and group memberships
# - formulation suggested by PYB: rsync -uva --no-g --chmod=Dg+s my_folder lucia:/destination
# - herebelow, another option based on "sg" is used
# required to make things available in "sg"
export storage_ssh_access forcing configuration destination_path
export -f synchronize
# using "sg"
sg limhr synchronize
else
synchronize
fi
#!/bin/bash #!/bin/bash
# This script can be used to send on "storage" the files from the atmosphere reanalysis ERA5 that # This script can be used to send on "storage" the files from the atmosphere reanalysis ERA5 that
# have been prepared for use as forcing in NEMO. # have been prepared for use as atmospheric forcing in NEMO.
rsync -avh --progress /cofast/barthele/reanalyses/atmosphere/era5/drowned/*.nc \ rsync -avh --progress /cofast/barthele/reanalyses/atmosphere/era5/drowned/*.nc \
storage:~/reanalyses/atmosphere/era5/drowned/ storage:~/reanalyses/atmosphere/era5/drowned/
#!/bin/bash
# This script can be used to send on "storage" the BDY files (used to force regional
# configurations of NEMO) that have been generated from the ocean reanalysis ORAS5.
rsync -avh --progress /cofast/barthele/reanalyses/ocean/oras5/bdy_for_eANT025/*.nc \
storage:~/reanalyses/ocean/oras5/bdy_for_eANT025/
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter