1.最大区别还是在字符串yinyong
>>>str='abcde' >>>print str[0:3] abc
注意是不包括第4个字符(码标3)的!
>>>x=5; y=0.34 >>>print 'hello%*.1f' % (x,y) hello 0.3
https://www.cmascenter.org/smoke/documentation/4.0/html/ch12s02.html
先找到release timeline
https://www.cmascenter.org/download/release_calendar.cfm
找到最新版本,比如我们看到4.0,进入后可以发现下载链接
https://www.cmascenter.org/download/forms/step_1.cfm
https://www.cmascenter.org/help/model_docs/porting_guide.cfm
选择好后,进入下载页,下载安装脚本(Installation script)、源码包以及测试例子数据三个内容。(其实他们用github托管哦)
之后follow 12.3(非常重要一章)进行安装
https://www.cmascenter.org/smoke/documentation/4.0/html/ch12s03.html
设置
环境变量指向安装路径,可以将安装脚本和压缩包放入同一路径下,将这个路径设置为安装路径。SMK_HOME
在smoke_install.csh最前面加入
setenv SMK_HOME `pwd`
不需要source,直接csh运行即可。如果顺利编译,会显示
NOTE: AUTO_DELETE script setting is not set. Default is N to not delete I/O API intermediate and output files Creating inventory list files... Installation completed successfully. Please follow the instructions in Section 4.3 of the SMOKE User's Manual to run the nctox test case. https://www.cmascenter.org/smoke/documentation/4.0/html/
再后follow 4.3去run测试用例
https://www.cmascenter.org/smoke/documentation/4.0/html/ch04s03.html
出现错误
mrggrid.abmp.nctox.20050710.us12-nc.log: *** ERROR ABORT in subroutine MRGGRID
后来发现执行语句4.0ug里居然少一个!smk_rateperhour_nctox.csh
更改后正常。
When porting cam3, in configure process we meet the error like cannot find “ncdf_xxxx”
In fact, this is not a very serious error because we are using brand new netcdf (after 2012 in fact) that it requires -lnetcdff to link to fortran lib instead of only -lnetcdf
Change the makefile template, search -lnetcdf and append -lnetcdff to it when using FC
http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg11396.html
When finishing compiling, use SLURM method to submit the task with openMP configure, get the error
18 READ_NAMELIST: Namelist read returns -1 19 ENDRUN: called without a message string
It seems that the model cannot lock the namelist position.
So I’ve found that the script moved the cam.exe out of the bld dir after compiling. So it maybe the cam exe cannot find the inside namelist file. Actually it is true!
After moving the exe in, another problem occurs
18 READ_NAMELIST: Namelist read returns 19 19 ENDRUN: called without a message string
What the hell with 19 code??? Google and got this
http://www.ladon.iqfr.csic.es/intel/doc/main_for/mergedProjects/bldaps_for/ug1l_rt_errors.htm
severe (19): Invalid reference to variable in NAMELIST input
FOR$IOS_INVREFVAR. One of the following conditions occurred:
|
It’s possibly that some variables cannot be recognized by the exe.
Find it one by one, stop_option and stop_n!!!!
OMG, CAM3 even doesn’t have these two namelist variables!
After deleting that and configuring the running period by NELAPSE, the world back to normal.