Fprep_agrif.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #!/bin/bash
  2. #set -x
  3. set -o posix
  4. #set -u
  5. #set -e
  6. #+
  7. #
  8. # ==============
  9. # Fprep_agrif.sh
  10. # ==============
  11. #
  12. # ---------------------
  13. # Preparation for AGRIF
  14. # ---------------------
  15. #
  16. # SYNOPSIS
  17. # ========
  18. #
  19. # ::
  20. #
  21. # $ Fprep_agrif.sh
  22. #
  23. #
  24. # DESCRIPTION
  25. # ===========
  26. #
  27. #
  28. # Prepare directories for AGRIF and copy files needed
  29. #
  30. # Compile the conv
  31. #
  32. # EXAMPLES
  33. # ========
  34. #
  35. # ::
  36. #
  37. # $ ./Fprep_agrif.sh CONFIG_NAME
  38. #
  39. #
  40. # TODO
  41. # ====
  42. #
  43. # option debug
  44. #
  45. #
  46. # EVOLUTIONS
  47. # ==========
  48. #
  49. # $Id: Fprep_agrif.sh 3294 2012-01-28 16:44:18Z rblod $
  50. #
  51. #
  52. #
  53. # * creation
  54. #
  55. #-
  56. #- AGRIF conv
  57. if [ "$AGRIFUSE" == 1 ]; then
  58. #-MPI for AGRIF
  59. if [ ! -f ${MAIN_DIR}/EXTERNAL/AGRIF/nemo_mpi.h ];then
  60. echo '#if defined key_mpp_mpi' > ${MAIN_DIR}/EXTERNAL/AGRIF/nemo_mpi.h
  61. echo '#define AGRIF_MPI' >> ${MAIN_DIR}/EXTERNAL/AGRIF/nemo_mpi.h
  62. echo '#endif' >> ${MAIN_DIR}/EXTERNAL/AGRIF/nemo_mpi.h
  63. fi
  64. #- CONV
  65. fcm build ${COMPIL_DIR}/conv.cfg || exit 1
  66. #C_COMPILER=${CC-cc}
  67. #gmake CC=${C_COMPILER} -C ${MAIN_DIR}/EXTERNAL/AGRIF/LIB
  68. #- AGRIF sources
  69. [ ! -d $2/$1/OPAFILES ] && mkdir $2/$1/OPAFILES
  70. [ ! -d $2/$1/OPAFILES/AGRIF_INC ] && mkdir $2/$1/OPAFILES/AGRIF_INC
  71. [ ! -d $2/$1/OPAFILES/AGRIF_MODELFILES ] && mkdir $2/$1/OPAFILES/AGRIF_MODELFILES
  72. cp -f -r ${MAIN_DIR}/EXTERNAL/AGRIF/agrif_opa.in $2/$1/OPAFILES/
  73. #cp -f -r ${MAIN_DIR}/EXTERNAL/AGRIF/conv $2/$1/OPAFILES/
  74. cp -f -r $2/$1/AGRIFLIB/bin/conv $2/$1/OPAFILES/
  75. fi