本文旨在介紹基于automatic installer的PALM model system (后面簡(jiǎn)稱PALM) 在Linux 系統(tǒng)上的安裝過程,PALM的詳細(xì)信息參考[PALM官網(wǎng)](https://palm.muk.uni-hannover.de/trac/wiki) 。如下所示:
#一. 安裝方法:
PALM提供了三種安裝方法:
1. [An automatic installer](https://palm.muk.uni-hannover.de/trac/wiki/doc/install/automatic) ,下載 [palm_ installer](https://palm.muk.uni-hannover.de/trac/raw-attachment/wiki/doc/install/automatic/palm_installer "Attachment 'palm_installer' in doc/install/automatic"),在終端輸入```bash palm_installer```執(zhí)行命令即可,功能全面,需要安裝其他數(shù)據(jù)庫。
2. [A simple manual installation method](https://palm.muk.uni-hannover.de/trac/wiki/doc/install/simple) 需要手動(dòng)輸入多條命令,雖然不需要安裝其他數(shù)據(jù)庫,但simple 不需要安裝netcdf庫,而netcdf庫主要就是美國(guó)大氣協(xié)會(huì)研究開發(fā)的網(wǎng)絡(luò)通用數(shù)據(jù)格式,后期處理的時(shí)候netcdf庫能夠處理復(fù)雜的數(shù)據(jù), simple installation 是無法處理的,因此對(duì)于需要模擬復(fù)雜條件下的大氣邊界層流動(dòng),不建議采用此方法安裝。
3. [An advanced manual installation method](https://palm.muk.uni-hannover.de/trac/wiki/doc/install/advanced) 高級(jí)版本安裝,可以支持遠(yuǎn)程服務(wù)器的連接。
本文主要介紹automatic installer安裝方法。
# 二. Automatic installer所需安裝條件:
1 The Bash-shell. 本文采用系統(tǒng)為Ubuntu 16.04
2 NetCDF 庫,版本不低于3.6.4。該庫的信息詳見官網(wǎng)[http://www.unidata.ucar.edu](http://www.unidata.ucar.edu/)
3 FORTRAN 2003 編譯器。本文采用Internet complier 2018 (for gfortran, 官方網(wǎng)站要求版本不低于 6.2.1, 之后會(huì)講到,版本低于 6.2.1 仍能成功安裝PALM)
4 Subversion, 在大部分Linux系統(tǒng)上已經(jīng)集成
由于Ubuntu系統(tǒng)滿足第1、3、4條件,所以僅需要安裝Netcdf庫,下面詳細(xì)介紹該數(shù)據(jù)庫的安裝
#三. 基于GNU Fortran compiler的 PALM? automatic installer 安裝
采用編譯器即為GNU Fortran compiler 安裝PALM,gfortran, netcdf庫可以在Ubuntu 系統(tǒng)上使用APT工具安裝,輸入如下代碼即可完成PALM安裝的配置工作 (https://palm.muk.uni-hannover.de/trac/ticket/565#no1):
```
sudo apt-get install subversion cmake gfortran mpich libmpich-dev libnetcdff-dev netcdf-bin libfftw3-dev? libnetcdf-dev
```
然后輸入
```
bash palm_installer
```
即可安裝成功, 運(yùn)行一個(gè)案例,輸入
```
source /home/annie/.bashrc? ? ? #配置環(huán)境變量#
cd /home/annie/palm/current_version? # 回到palm工作文件夾#
palmrun -d example_cbl -a "d3#" -h "default" -X "4" -T "4"
```
顯示如下
```
annie@ubuntu1:~/palm/current_version$ palmrun -d example_cbl -a "d3#" -h "default" -X "4" -T 4
*** palmrun? 1.0 Rev: 3043 $
? ? will be executed.? ? Please wait ...
? ? Reading the configuration file...
? ? Reading the I/O files...
? *** INFORMATIVE: additional source code directory
? ? ? "/home/annie/palm/current_version/JOBS/example_cbl/USER_CODE"
? ? ? does not exist or is not a directory.
? ? ? No source code will be used from this directory!
#------------------------------------------------------------------------#
| palmrun? 1.0 Rev: 3043 $? ? ? ? ? 2018年 06月 29日 星期五 10:07:17 CST |
|? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| called on:? ? ? ? ? ? ? ubuntu1? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| host identifier:? ? ? ? default (execute on IP: 127.0.0.1)? ? ? ? ? ? |
| running in:? ? ? ? ? ? ? interactive run mode? ? ? ? ? ? ? ? ? ? ? ? ? |
| number of cores:? ? ? ? 4? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| tasks per node:? ? ? ? ? 4 (number of nodes: 1)? ? ? ? ? ? ? ? ? ? ? ? |
|? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| cpp directives:? ? ? ? ? -cpp -D__fftw -D__gfortran -D__parallel -DMPI |
|? ? ? ? ? ? ? ? ? ? ? ? ? _REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2D |
|? ? ? ? ? ? ? ? ? ? ? ? ? OUBLE_PRECISION -D__netcdf? ? ? ? ? ? ? ? ? ? |
| compiler options:? ? ? ? -Ofast -ffree-line-length-none -I /usr/includ |
|? ? ? ? ? ? ? ? ? ? ? ? ? e -I /usr/include? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| linker options:? ? ? ? ? -Ofast -ffree-line-length-none /usr/lib/x86_6 |
|? ? ? ? ? ? ? ? ? ? ? ? ? 4-linux-gnu/libnetcdff.so /usr/lib/x86_64-lin |
|? ? ? ? ? ? ? ? ? ? ? ? ? ux-gnu/libfftw3.so? ? ? ? ? ? ? ? ? ? ? ? ? ? |
|? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| run identifier:? ? ? ? ? example_cbl? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| activation string list:? d3#? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
#------------------------------------------------------------------------#
>>> everything o.k. (y/n) ?? y
***? PALMRUN will now continue to execute on this machine
? *** creating executable and other sources for the local host
? *** nothing to compile for this run
? *** executable and other sources created
? *** changed to temporary directory: /home/annie/palm/current_version/tmp/example_cbl.23896
? *** providing INPUT-files:
? ----------------------------------------------------------------------------
? >>> INPUT: /home/annie/palm/current_version/JOBS/example_cbl/INPUT/example_cbl_p3d? to? PARIN
? *** INFORMATIVE: some optional INPUT-files are not present
? ----------------------------------------------------------------------------
? *** all INPUT-files provided
? *** execution of INPUT-commands:
? ----------------------------------------------------------------------------
? >>> export ATP_ENABLED=1
? >>> export MPICH_GNI_BTE_MULTI_CHANNEL=disabled
? >>> ulimit -s unlimited
? ----------------------------------------------------------------------------
? *** execution starts in directory
? ? ? "/home/annie/palm/current_version/tmp/example_cbl.23896"
? ----------------------------------------------------------------------------
? *** execute command:
? ? ? "mpirun -n 4 ./palm"
? ? ? ... reading environment parameters from ENVPAR? ? ? --- finished
? ? ? ... reading NAMELIST parameters from PARIN? ? ? --- finished
? ? ? ... creating virtual PE grids + MPI derived data types? ? ? --- finished
? ? ? ... checking parameters? ? ? --- finished
? ? ? ... allocating arrays? ? ? --- finished
? ? ? ... initializing with constant profiles? ? ? --- finished
? ? ? ... initializing statistics, boundary conditions, etc.? ? ? --- finished
? ? ? ... creating initial disturbances? ? ? --- finished
? ? ? ... calling pressure solver? ? ? --- finished
? ? ? ... initializing surface layer? ? ? --- finished
? ? ? --- leaving init_3d_model
? ? ? --- starting timestep-sequence
? ? ? [XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX]? 0.0 left
? ? ? --- finished time-stepping
? ? ? ... calculating cpu statistics? ? ? --- finished
? ----------------------------------------------------------------------------
? *** execution finished
*** post-processing: now executing "mpirun -n 1 ./combine_plot_fields.x" ...
*** combine_plot_fields ***
? ? uncoupled run
? ? NetCDF output enabled
? ? no XY-section data available
? ? NetCDF output enabled
? ? no XZ-section data available
? ? no YZ-section data available
?
? ? no 3D-data file available
? *** execution of OUTPUT-commands:
? ----------------------------------------------------------------------------
? >>> [[ -f LIST_PROFIL_1D ]] && cat LIST_PROFIL_1D >> LIST_PROFILE
? >>> [[ -f LIST_PROFIL ]] && cat LIST_PROFIL >> LIST_PROFILE
? >>> [[ -f PARTICLE_INFOS/_0000 ]] && cat PARTICLE_INFOS/* >> PARTICLE_INFO
? ----------------------------------------------------------------------------
? *** saving OUTPUT-files:
? ----------------------------------------------------------------------------
? >>> OUTPUT: RUN_CONTROL? to
? ? ? ? ? ? ? /home/annie/palm/current_version/JOBS/example_cbl/MONITORING/example_cbl_rc.002
? >>> OUTPUT: HEADER? to
? ? ? ? ? ? ? /home/annie/palm/current_version/JOBS/example_cbl/MONITORING/example_cbl_header.002
? >>> OUTPUT: CPU_MEASURES? to
? ? ? ? ? ? ? /home/annie/palm/current_version/JOBS/example_cbl/MONITORING/example_cbl_cpu.002
? >>> OUTPUT: DATA_1D_PR_NETCDF? to
? ? ? ? ? ? ? /home/annie/palm/current_version/JOBS/example_cbl/OUTPUT/example_cbl_pr.002.nc
? >>> OUTPUT: DATA_1D_TS_NETCDF? to
? ? ? ? ? ? ? /home/annie/palm/current_version/JOBS/example_cbl/OUTPUT/example_cbl_ts.002.nc
? >>> OUTPUT: DATA_2D_XY_NETCDF? to
? ? ? ? ? ? ? /home/annie/palm/current_version/JOBS/example_cbl/OUTPUT/example_cbl_xy.002.nc
? >>> OUTPUT: DATA_2D_XZ_NETCDF? to
? ? ? ? ? ? ? /home/annie/palm/current_version/JOBS/example_cbl/OUTPUT/example_cbl_xz.002.nc
? >>> OUTPUT: DATA_2D_XZ_AV_NETCDF? to
? ? ? ? ? ? ? /home/annie/palm/current_version/JOBS/example_cbl/OUTPUT/example_cbl_av_xz.002.nc
? ----------------------------------------------------------------------------
? *** all OUTPUT-files saved
```