Advertisement
akhfa

Install WRF 3.7 Ubuntu 14.04 64 bit Fix

Aug 14th, 2015
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.23 KB | None | 0 0
  1. # https://tuxcoder.wordpress.com/2015/01/07/install-wrf-model-in-ubuntu-linux/
  2. #!/bin/sh
  3.  
  4. # uncomment this if you don't have enough RAM and you don't have SWAP
  5. # sudo fallocate -l 4G /swapfile
  6. # sudo chmod 600 /swapfile
  7. # sudo mkswap /swapfile
  8. # sudo swapon /swapfile
  9.  
  10. # Update ubuntu
  11. apt-get update && apt-get upgrade -y
  12.  
  13. # Install dependencies
  14. sudo apt-get install -y m4 csh netcdf-bin hdf4-tools hdf5-tools zlib* jasper libjasper-dev libpng-dev build-essential ncl-ncarg gfortran libnetcdf-dev mpich libnetcdf-dev libnetcdff-dev
  15. # ulimit -n, tidak usah dilakukan apabila tidak memiliki akses root atau tidak login sebagai root
  16. echo "ulimit -n 65535" >> ~/.bashrc
  17.  
  18. # Download source code WRF
  19. wget -c http://www2.mmm.ucar.edu/wrf/src/WRFV3.7.TAR.gz
  20.  
  21. #extract
  22. tar xzf WRFV3.7.TAR.gz
  23. cd WRFV3
  24.  
  25. # Set variable, cukup sekali aja
  26. echo "export NETCDF=/usr" >> ~/.bashrc
  27. echo "export WRFIO_NCD_LARGE_FILE_SUPPORT=1" >> ~/.bashrc
  28. echo "export PHDF5=/usr" >> ~/.bashrc
  29. echo "export JASPERLIB=/usr" >> ~/.bashrc
  30. echo "export JASPERINC=/usr" >> ~/.bashrc
  31.  
  32. # download chem
  33. wget -c http://www2.mmm.ucar.edu/wrf/src/WRFV3-Chem-3.7.TAR.gz
  34. tar xzf WRFV3-Chem-3.7.TAR.gz
  35. echo "export WRF_CHEM=1" >> ~/.bashrc
  36. source ~/.bashrc
  37.  
  38. # compile WRF Chem. Jalankan pakai screen
  39. ./configure
  40. #you can choose 35 for dm+sm GNU GCC and 1 for basic nesting
  41. ./compile em_real >& log.compile
  42. cd ..
  43.  
  44. # Download WPS
  45. wget -c http://www2.mmm.ucar.edu/wrf/src/WPSV3.7.TAR.gz
  46. tar xzf WPSV3.7.TAR.gz
  47. cd WPS
  48.  
  49. # compile WPS
  50. ./configure
  51. # You can choose 3 for dm
  52. ./compile >& log.compile
  53. cd ..
  54.  
  55. # Jika banyak error, install libjasper-dev
  56. # source https://forum.kde.org/viewtopic.php?f=64&t=122998
  57.  
  58. # jika kena undefined reference to GOMP bla bla bla tambahkan -lgomp setelah -lnetcdf di variabel WRF_LIB di file configure.wps
  59. # http://forum.wrfforum.com/viewtopic.php?f=20&t=5672
  60.  
  61. # png.h: No such file or directory
  62. # masalah: belum install libpng-dev
  63. # solusi: apt-get install libpng-dev
  64.  
  65. # ARWPOST
  66. wget -c http://www2.mmm.ucar.edu/wrf/src/ARWpost_V3.tar.gz
  67. tar xzf ARWpost_V3.tar.gz
  68. cd ARWpost
  69. ./configure
  70. # pilih gfortran (untuk versi ini, pilih 3
  71. ./compile >& log.compile
  72.  
  73. # Error  Invalid character in name at (1) module_get_file_names.f:2.3:
  74. # masalah: comment dianggap sebagai source code
  75. # solusi:
  76.     # nano configure.arwp
  77.     # search CPP
  78.     # hapus -C
  79. # http://forum.wrfforum.com/viewtopic.php?f=30&t=7181
  80. # http://forum.wrfforum.com/viewtopic.php?f=5&t=6086
  81.  
  82. # Error undefined reference to 'nf_bla bla bla'
  83. # masalah: library netcdf belom fix
  84. # Solusi:
  85. # nano src/Makefile
  86. #  ubah "-L$(NETCDF)/lib -I$(NETCDF)/include -lnetcdf" jadi " -L$(NETCDF)/lib -I$(NETCDF)/include -lnetcdff -lnetcdf"
  87. # source: http://forum.wrfforum.com/viewtopic.php?f=31&t=5398
  88.  
  89. # WRF Chem tidak perlu. Sudah di atas
  90. # cd WRFV3
  91. # wget -c http://www2.mmm.ucar.edu/wrf/src/WRFV3-Chem-3.7.TAR.gz
  92. # tar xzf WRFV3-Chem-3.7.TAR.gz
  93. # export WRF_CHEM=1
  94. # ./configure
  95. # ./compile em_real >& log.compile
  96.  
  97. # Bersih bersih
  98. # cd
  99. # apt-get purge m4 csh netcdf-bin hdf4-tools hdf5-tools zlib* jasper libjasper-dev libpng-dev build-essential ncl-ncarg gfortran libnetcdf-dev mpich
  100. # apt-get autoremove
  101. # rm -r WRF*
  102. # rm -r ARW*
  103. # rm -r WPS*
  104. # nano .bashrc
  105. # hapus ulimit ke bawah
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement