Arquivo mensais:maio 2012

Compilando WRF serial no Debian Squeeze

Todos os programas/dependencias usando neste tutorial podem ser encontrado facilmente usando o Google, porem você pode fazer download deles aqui: http://tadeucruz.com/WRF/src . Estou colocando todos os programas neste diretório para facilitar e garantir a compilação do WRF. Faça o download de todos os arquivos que se encontra no link acima e salve em uma única pasta.

Importante, todos os programas compilados vão ser estar na pasta /home/tadeucruz/wrf/stuff/, então se deseja mudar o local de instalação modifique substitui todos os /home/tadeucruz/wrf/stuff/ pela a pasta desejada.

1 – Instalação das dependências do Debian.

apt-get install gfortran gfortran-4.4-multilib csh build-essential libcloog-ppl0

2 – Instalação do HDF5 e suas dependências:

tar xvfz szip-2.1.tar.gz
cd szip-2.1
./configure --prefix=/home/tadeucruz/wrf/stuff/
make
make check
make install
cd ..
tar xvfz zlib-1.2.6.tar.gz
cd zlib-1.2.6
./configure --prefix=/home/tadeucruz/wrf/stuff
make
make check
make install
cd ..
tar xvfj hdf5-1.8.8.tar.bz2
cd hdf5-1.8.8
./configure --prefix=/home/tadeucruz/wrf/stuff/ --with-zlib=/home/tadeucruz/wrf/stuff --with-szip=/home/tadeucruz/wrf/stuff --enable-fortran --enable-cxx
make
make check
make install

3 – Instalação do NETCDF:

tar xvfz netcdf-4.1.3.tar.gz
cd netcdf-4.1.3
LD_LIBRARY_PATH=/home/tadeucruz/wrf/stuff/lib/:$LD_LIBRARY_PATH CPPFLAGS=-I/home/tadeucruz/wrf/stuff/include LDFLAGS=-L/home/tadeucruz/wrf/stuff/lib ./configure --prefix=/home/tadeucruz/wrf/stuff
make
make check
make install
cd ..

4 – Instalação do WRFV3.

tar xvfz WRFV3.3.1.TAR.gz
cd WRFV3
export NETCDF=/home/tadeucruz/wrf/stuff/
export WRF_EM_CORE=1
export WRF_NMM_CORE=0
./configure
#Resposta serial usando o gfortran e logo depois escolha a opção 1
./compile em_real
cd ..

5 – Instalação do WPS e suas dependências:

tar xvfz libpng-1.5.8.tar.gz
cd libpng-1.5.8
CPPFLAGS=-I/home/tadeucruz/wrf/stuff/include LDFLAGS=-L/home/tadeucruz/wrf/stuff/lib ./configure --prefix=/home/tadeucruz/wrf/stuff/
make
make check
make install
cd ..

unzip jasper-1.900.1.zip
cd jasper-1.900.1/
./configure --prefix=/home/tadeucruz/wrf/stuff/
make
make check
make install
cd ..
tar xvfz ncl_ncarg-6.0.0.tar.gz
cd ncl_ncarg-6.0.0/
cp config/LINUX.64.GNU config/LINUX
./Configure -v
#http://tadeucruz.com/WRF/Compilando-NCL.mp4
make Everything
make install

cd ..
export NCARG_ROOT=/home/tadeucruz/wrf/stuff/
export PATH=$NCARG_ROOT/bin:$PATH
export NETCDF=/home/tadeucruz/wrf/stuff/
tar xvfz WPSV3.3.1.TAR.gz
cd WPS
./configure
#Escolher Serial no GRIB2 usando gfortran.
./compile
cd ..

6 – Pronto você já tem o WRF pronto para ser executado, porem antes de poder fazer isso você tem que exportar algumas variáveis de ambientes.

LD_LIBRARY_PATH_WRF=/home/tadeucruz/wrf/stuff/lib/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH_WRF:$LD_LIBRARY_PATH
export NCARG_ROOT=/home/tadeucruz/wrf/stuff/
export PATH=$NCARG_ROOT/bin:$PATH
ulimit -s unlimited