123

本文旨在介绍基于automatic installer的PALM model system (后面简称PALM) 在Linux 系统上的安装过程,PALM的详细信息参考[PALM官网](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```执行命令即可,功能全面,需要安装其他数据库。

2. [A simple manual installation method](https://palm.muk.uni-hannover.de/trac/wiki/doc/install/simple) 需要手动输入多条命令,虽然不需要安装其他数据库,但simple 不需要安装netcdf库,而netcdf库主要就是美国大气协会研究开发的网络通用数据格式,后期处理的时候netcdf库能够处理复杂的数据, simple installation 是无法处理的,因此对于需要模拟复杂条件下的大气边界层流动,不建议采用此方法安装。

3. [An advanced manual installation method](https://palm.muk.uni-hannover.de/trac/wiki/doc/install/advanced) 高级版本安装,可以支持远程服务器的连接。

本文主要介绍automatic installer安装方法。

# 二. Automatic installer所需安装条件:

1 The Bash-shell. 本文采用系统为Ubuntu 16.04

2 NetCDF 库,版本不低于3.6.4。该库的信息详见官网[http://www.unidata.ucar.edu](http://www.unidata.ucar.edu/)

3 FORTRAN 2003 编译器。本文采用Internet complier 2018 (for gfortran, 官方网站要求版本不低于 6.2.1, 之后会讲到,版本低于 6.2.1 仍能成功安装PALM)

4 Subversion, 在大部分Linux系统上已经集成

由于Ubuntu系统满足第1、3、4条件,所以仅需要安装Netcdf库,下面详细介绍该数据库的安装

#三. 基于GNU Fortran compiler的 PALM  automatic installer 安装

采用编译器即为GNU Fortran compiler 安装PALM,gfortran, netcdf库可以在Ubuntu 系统上使用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

```

即可安装成功, 运行一个案例,输入

```

source /home/annie/.bashrc      #配置环境变量#

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

```

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 227,428评论 6 531
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 98,024评论 3 413
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 175,285评论 0 373
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 62,548评论 1 307
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 71,328评论 6 404
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 54,878评论 1 321
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 42,971评论 3 439
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 42,098评论 0 286
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 48,616评论 1 331
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 40,554评论 3 354
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 42,725评论 1 369
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 38,243评论 5 355
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 43,971评论 3 345
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 34,361评论 0 25
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 35,613评论 1 280
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 51,339评论 3 390
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 47,695评论 2 370

推荐阅读更多精彩内容