link_bathymetries.sh 1.1 KB

123456789101112131415161718192021222324252627
  1. # The script links the bathymetries from the Earth Science department repository to the bathymetries folder.
  2. set -xuve
  3. # WARNING! dirty workaround
  4. [ -d /gpfs/projects/bsc32/models/ ] && REPOSITORY_PATH=/gpfs/projects/bsc32/models/
  5. [ -d /project/spesiccf/shared/models ] && REPOSITORY_PATH=/project/spesiccf/shared/models
  6. NEMO_REPOSITORY_PATH=$REPOSITORY_PATH/nemo/v3.6/inidata/nemo/
  7. if [[ ! -d bathymetries ]];then
  8. mkdir -p bathymetries
  9. fi
  10. # Linking NEMO resolutions
  11. for res in ORCA2 ORCA1 ORCA025 ORCA12 ; do
  12. [ -f ${NEMO_REPOSITORY_PATH}/${res}L[0-9][0-9]/bathy_meter.nc ] && ln -sf ${NEMO_REPOSITORY_PATH}/${res}L[0-9][0-9]/bathy_meter.nc bathymetries/nemo_bathy_meter_$res.nc || echo "${NEMO_REPOSITORY_PATH}/${res}L[0-9][0-9]/bathy_meter.nc not found"
  13. done
  14. # Linking ECE resolutions
  15. ECE_REPOSITORY_PATH=$REPOSITORY_PATH/ecearth/v3.2.2/inidata/nemo/initial/
  16. for res in ORCA1 ORCA025; do
  17. [ -f ${ECE_REPOSITORY_PATH}/${res}L[0-9][0-9]/bathy_meter.nc ] && ln -sf ${ECE_REPOSITORY_PATH}/${res}L[0-9][0-9]/bathy_meter.nc bathymetries/ece_bathy_meter_$res.nc || echo "${ECE_REPOSITORY_PATH}/${res}L[0-9][0-9]/bathy_meter.nc not found"
  18. done
  19. set +xuve