CESM2代码下载

这半年忙着毕业写论文,好久好久好久不更新了∠( °ω°)/ ,今天准备开个新坑 ๑乛◡乛๑,学习一下CESM(Community Earth System Model),它是一个完全耦合的全球气候模型,可用于地球过去、现在和未来气候状态的模拟。

1 安装CESM2依赖的库

首先安装一些依赖的库,具体参考官网:
Introduction (CESM2.2)
CESM2代码下载_第1张图片
这里其实和我之前写的教程WRF/CMAQ 安装教程有很多重复的部分,就不过多赘述了,另外lapack和blas的安装可以参考:lapack和blas安装教程;Cmake的安装可以参考:Linux安装CMake;ESMF的安装可以参考:CESM2移植全攻略

注意:
1.NetCDF必须使用与CESM相同的Fortran编译器构建(我都用的intel)。
2.Parallel-netCDF(pnetcdf)是可选的。如果使用pnetcdf,则应该使用1.7.0或更高版本。它是一个文件格式与netCDF兼容的库,并通过MPI-IO提供更高的性能。pnetcddf通过设置Makefile中的$PNETCDF_PATH变量来启用。

2 CESM2代码下载

接下来就是下载CESM2的代码了,

{navigate to your home or work directory}
git clone https://github.com/ESCOMP/CESM.git src_cesm2_3_beta08
cd src_cesm2_3_beta08
git tag --list '*beta08*'  #to see options of tags
git checkout cesm2_3_beta08
./manage_externals/checkout_externals

前面都好好的,到这里就下载不动了ㄟ( ▔, ▔ )ㄏ ,看了一下官网的说明Downloading CESM2 (CESM2.2):

Access to the code requires both git and Subversion client software in
place that is compatible with GitHub and our Subversion server
software. You will need access to the command line clients, git (v1.8
or greater) and svn (v1.8 or greater but less than v1.11). Currently,
our Subversion server software is at version 1.8.17. For more
information or to download open source tools, visit Subversion and git
downloads.

原来需要git(v1.8或更高版本)和svn(v1.8或更高版本,但低于v1.11)。
查了一下git的版本符合要求(git --version),但是svn版本有点低(svn --version),于是更新了一下,参考了【Linux】centos7.x 升级svn版本到指定版本
(P.S. 因为毕业了,暂时莫得服务器用(;´д`)ゞ,所以这里用的是我之前的CentOS7虚拟机)
更新完了再重新:

./manage_externals/checkout_externals

结果:

ERROR: In directory
    /home/pc/src_cesm2_3_beta08/components 
Process did not run successfully; returned status 128:
    git clone --quiet https://github.com/ESCOMP/ctsm/ clm 
See above for output from failed command.

em…冲个浪找到:
安装CESM记录里面有:
CESM2代码下载_第2张图片

git config --global http.sslverify “false”
git config --global url.“https://”.insteadOf git://

再试一下

./manage_externals/checkout_externals

又有报错(╬ ̄皿 ̄):

ERROR: Failed with output:
       fatal: bad config value for 'http.sslverify' in /home/pc/.gitconfig

继续冲浪找到fatal bad boolean config value ‘false;‘ for ‘http.sslverify‘解决问题(~ ̄▽ ̄)~ :

[pc@localhost src_cesm2_3_beta08]$ ./manage_externals/checkout_externals
Processing externals description file : Externals.cfg
Checking status of externals: ccs_config, cam, cice, cice6, cmeps, cdeps, cpl7, share, mct, parallelio, cime, cism, clm, fms, mom, mosart, pop, rtm, ww3, ww3dev, 
Checking out externals: ccs_config, cime, cam, Processing externals description file : Externals_CAM.cfg
Checking out externals: chem_proc, atmos_phys, atmos_cubed_sphere, mpas, carma, clubb, cosp2, pumas, pumas-frozen, silhs, 
cdeps, Processing externals description file : Externals_CDEPS.cfg
Checking out externals: fox, genf90, 
cice, cice6, Processing externals description file : Externals.cfg
Checking out externals: cice, 
cism, Processing externals description file : Externals_CISM.cfg
Checking out externals: source_cism, 
clm, Processing externals description file : Externals_CLM.cfg
Checking out externals: fates, 
cmeps, cpl7, mosart, pop, Processing externals description file : Externals_POP.cfg
Checking out externals: cvmix, marbl, 
rtm, ww3, mct, parallelio, share, 
[pc@localhost src_cesm2_3_beta08]$ ls
ccs_config          cime_config         doc            manage_externals
ChangeLog           CODE_OF_CONDUCT.md  Externals.cfg  README.rst
ChangeLog_template  components          libraries      share
cime                describe_version    LICENSE.txt

成功后可以用以下命令检查组件的情况:

[pc@localhost src_cesm2_3_beta08]$ ./manage_externals/checkout_externals -S
Processing externals description file : Externals.cfg
Processing externals description file : Externals_CAM.cfg
Processing externals description file : Externals.cfg
Processing externals description file : .gitmodules
Processing submodules description file : .gitmodules
Processing externals description file : Externals_CDEPS.cfg
Processing externals description file : Externals_CISM.cfg
Processing externals description file : Externals_CLM.cfg
Processing externals description file : Externals_POP.cfg
Checking status of externals: ccs_config, cam, chem_proc, carma, cosp2, clubb, silhs, pumas, pumas-frozen, atmos_phys, atmos_cubed_sphere, mpas, cice, cice6, cice, icepack, cmeps, cdeps, fox, genf90, cpl7, share, mct, parallelio, cime, cism, source_cism, clm, fates, fms, mom, mosart, pop, cvmix, marbl, rtm, ww3, ww3dev, 
    ./ccs_config
    ./cime
    ./components/cam
    ./components/cam/chem_proc
    ./components/cam/src/atmos_phys
    ./components/cam/src/dynamics/fv3/atmos_cubed_sphere
    ./components/cam/src/dynamics/mpas/dycore
    ./components/cam/src/physics/carma/base
    ./components/cam/src/physics/clubb
    ./components/cam/src/physics/cosp2/src
    ./components/cam/src/physics/pumas
    ./components/cam/src/physics/pumas-frozen
    ./components/cam/src/physics/silhs
    ./components/cdeps
    ./components/cdeps/fox
    ./components/cdeps/share/genf90
    ./components/cice
    ./components/cice6
    ./components/cice6/src
    ./components/cice6/src/icepack
    ./components/cism
    ./components/cism/source_cism
    ./components/clm
    ./components/clm/src/fates
    ./components/cmeps
    ./components/cpl7
e-o ./components/mom
    ./components/mosart
    ./components/pop
    ./components/pop/externals/CVMix
    ./components/pop/externals/MARBL
    ./components/rtm
    ./components/ww3
e-o ./components/ww3dev
e-o ./libraries/FMS
    ./libraries/mct
    ./libraries/parallelio
    ./share
[pc@localhost src_cesm2_3_beta08]$

终于下载下来好啦ヾ(o・ω・)ノ

你可能感兴趣的:(CESM,Linux,linux,CESM)