Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # https://tuxcoder.wordpress.com/2015/01/07/install-wrf-model-in-ubuntu-linux/
- #!/bin/sh
- # uncomment this if you don't have enough RAM and you don't have SWAP
- # sudo fallocate -l 4G /swapfile
- # sudo chmod 600 /swapfile
- # sudo mkswap /swapfile
- # sudo swapon /swapfile
- # Update ubuntu
- apt-get update && apt-get upgrade -y
- # Install dependencies
- 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
- # ulimit -n, tidak usah dilakukan apabila tidak memiliki akses root atau tidak login sebagai root
- echo "ulimit -n 65535" >> ~/.bashrc
- # Download source code WRF
- wget -c http://www2.mmm.ucar.edu/wrf/src/WRFV3.7.TAR.gz
- #extract
- tar xzf WRFV3.7.TAR.gz
- cd WRFV3
- # Set variable, cukup sekali aja
- echo "export NETCDF=/usr" >> ~/.bashrc
- echo "export WRFIO_NCD_LARGE_FILE_SUPPORT=1" >> ~/.bashrc
- echo "export PHDF5=/usr" >> ~/.bashrc
- echo "export JASPERLIB=/usr" >> ~/.bashrc
- echo "export JASPERINC=/usr" >> ~/.bashrc
- # download chem
- wget -c http://www2.mmm.ucar.edu/wrf/src/WRFV3-Chem-3.7.TAR.gz
- tar xzf WRFV3-Chem-3.7.TAR.gz
- echo "export WRF_CHEM=1" >> ~/.bashrc
- source ~/.bashrc
- # compile WRF Chem. Jalankan pakai screen
- ./configure
- #you can choose 35 for dm+sm GNU GCC and 1 for basic nesting
- ./compile em_real >& log.compile
- cd ..
- # Download WPS
- wget -c http://www2.mmm.ucar.edu/wrf/src/WPSV3.7.TAR.gz
- tar xzf WPSV3.7.TAR.gz
- cd WPS
- # compile WPS
- ./configure
- # You can choose 3 for dm
- ./compile >& log.compile
- cd ..
- # Jika banyak error, install libjasper-dev
- # source https://forum.kde.org/viewtopic.php?f=64&t=122998
- # jika kena undefined reference to GOMP bla bla bla tambahkan -lgomp setelah -lnetcdf di variabel WRF_LIB di file configure.wps
- # http://forum.wrfforum.com/viewtopic.php?f=20&t=5672
- # png.h: No such file or directory
- # masalah: belum install libpng-dev
- # solusi: apt-get install libpng-dev
- # ARWPOST
- wget -c http://www2.mmm.ucar.edu/wrf/src/ARWpost_V3.tar.gz
- tar xzf ARWpost_V3.tar.gz
- cd ARWpost
- ./configure
- # pilih gfortran (untuk versi ini, pilih 3
- ./compile >& log.compile
- # Error Invalid character in name at (1) module_get_file_names.f:2.3:
- # masalah: comment dianggap sebagai source code
- # solusi:
- # nano configure.arwp
- # search CPP
- # hapus -C
- # http://forum.wrfforum.com/viewtopic.php?f=30&t=7181
- # http://forum.wrfforum.com/viewtopic.php?f=5&t=6086
- # Error undefined reference to 'nf_bla bla bla'
- # masalah: library netcdf belom fix
- # Solusi:
- # nano src/Makefile
- # ubah "-L$(NETCDF)/lib -I$(NETCDF)/include -lnetcdf" jadi " -L$(NETCDF)/lib -I$(NETCDF)/include -lnetcdff -lnetcdf"
- # source: http://forum.wrfforum.com/viewtopic.php?f=31&t=5398
- # WRF Chem tidak perlu. Sudah di atas
- # cd WRFV3
- # wget -c http://www2.mmm.ucar.edu/wrf/src/WRFV3-Chem-3.7.TAR.gz
- # tar xzf WRFV3-Chem-3.7.TAR.gz
- # export WRF_CHEM=1
- # ./configure
- # ./compile em_real >& log.compile
- # Bersih bersih
- # cd
- # 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
- # apt-get autoremove
- # rm -r WRF*
- # rm -r ARW*
- # rm -r WPS*
- # nano .bashrc
- # hapus ulimit ke bawah
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement