123

作者: 小鹿HIT | 来源:发表于2022-09-28 11:49 被阅读0次

    本文旨在介绍基于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

    ```

    相关文章

      网友评论

          本文标题:123

          本文链接:https://www.haomeiwen.com/subject/lplcartx.html