1. 다운로드

- wget https://github.com/wrf-model/WRF/archive/v4.2.tar.gz

#다른 버전이 필요하면 https://github.com/wrf-model/WRF/releases 에서 다운로드

#참고 : https://github.com/wrf-model

 

2. 압축 풀기 / 디렉터리 이동

- tar -xvzf WRF-4.2.tar.gz

- cd WRF-4.2

 

3. configure

- ./configure

#시스템에 맞는 옵션 선택(하드웨어가 Intel이면 Intel 컴파일러 추천)

#Compile for nesting? 은 보통 Basic (1번)

 

- vi configure.wrf

#수정해야할 내용이 있다면 편집기로 수정 후 저장

#주로 컴파일 옵션 수정. 기본으로 해도 무방한데 계산속도 차이가 날 수는 있어요.

 

4. compile

- ./compile (-j 20) em_real

#컴파일시 j 옵션 기본값은 2이고, 최대 20까지 줄 수 있다. 16이었나..? 4나 8정도로 줘도 빨리 끝납니다.

#화면에 컴파일 로그를 출력(확인) 하면서 로그를 남기려면 tee 명령 이용

- ./compile em_real 2>&1 | tee compile.log (2>&1 : 표준에러를 표준 출력으로 리다이렉션)

- ./compile em_real | tee compile.log

 

#WPS 설치시에도 동일하게 진행하면 된다. WPS는 configure 파일이 configure.wps

 

#WRFIO_NCD_LARGE_FILE_SUPPORT 가 기본으로 설정되어 있어요.

더보기

Settings listed above are written to configure.wrf.
If you wish to change settings, please edit that file.
If you wish to change the default options, edit the file:
     arch/configure.defaults
NetCDF users note:
 This installation of NetCDF supports large file support.  To DISABLE large file
 support in NetCDF, set the environment variable WRFIO_NCD_NO_LARGE_FILE_SUPPORT
 to 1 and run configure again. Set to any other value to avoid this message.
  

Testing for NetCDF, C and Fortran compiler

This installation of NetCDF is 64-bit
                 C compiler is 64-bit
           Fortran compiler is 64-bit
              It will build in 64-bit

이 옵션은 대용량 netcdf 파일(2GB 이상) IO 작업관련된 옵션이고, 3버전대에서는 기본 꺼져있고 4버전대는 해당 flag가 켜져 있습니다.

'Study > Linux' 카테고리의 다른 글

파일 atime, ctime, mtime  (0) 2022.03.13
GCC compiler (GNU Compiler Collection compiler) 설치  (0) 2021.03.05
자주 사용하는 리눅스 명령어  (0) 2020.02.08