爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 12896|回复: 4

[混合编程] 介绍面向对象的气候建模与诊断软件包-CliMT

[复制链接]

新浪微博达人勋

发表于 2013-12-28 16:07:48 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
本帖最后由 hillside 于 2013-12-28 16:10 编辑

        现在介绍瑞典斯德哥尔摩大学的面向对象的气候建模与诊断软件包CliMT,本帖附件中的软件亦可自行从网页下载。  
       说明:本帖只是介绍,未曾用过。  
                                                                 http://people.su.se/~rcaba/climt/
CliMT: An object-oriented Climate Modeling and diagnostics Toolkit

                               
登录/注册后可看大图
CliMT is a Python-based software component toolkit providing a flexible problem-solving environment for climate science problems.
CliMT consists of two layers:
  • a library of climate modeling components (radiative and convective schemes, dynamical cores etc.), mostly in Fortran.
  • a Python superstructure providing standardized access to each component and allowing coupling of components to form time-dependent models.
The Python structure, summarized in this diagram, is fairly simple and lightweight. It also provides for file input/output in NetCDF format and for graphical display (including runtime monitoring of model fields, as in the screenshot above) using Matplotlib.
CliMT is aimed at a broad audience. Because the accent is on simplicity and intuitiveness, it is accessible to undergraduate or even high-school students. On the other hand, it uses state-of-the-art components, and so is suitable for full-blown research projects.
News8-Feb-2013
Version 0.6.14. Includes a simple treatment of sea ice developed by Ray Pierrehumbert. See CliMT/lib/examples/arctic_column.py for an example.
3-Feb-2012
Version 0.6.9. This version introduces a --lite option at installation time which installs CliMT_lite, a reduced version of CliMT consisting only of the interface to the NCAR CCM3 radiation scheme which is used in Ray Pierrehumbert's book Principles of Planetary Climate. See the Installation section below for more details.
20-Dec-2010
Version 0.6.8 released, some bug fixes and updated tutorial material.
25-Jun-2010
Version 0.6.7 released. This version is compatible with the python netCDF4 interface, which comes standard with Enthought Python.
3-Jun-2009
Version 0.6.6 released. Contains some bug fixes for the CAM3 scheme. This scheme now reproduces CAM3 model output to ~0.1 Wm-2.
9-Apr-2009
Version 0.6.5 released. Contains some bug fixes for the CAM3 scheme; the most important being that LW cloud forcing now has the correct sign.
12-Feb-2009
Version 0.6.4 released. This version incorporates the NCAR Community Atmosphere Model (CAM3) radiation scheme, which improves on the CCM3 scheme.
13-Mar-2008
Version 0.6.3 is out. This version is compatible with both PyNio and ScientificPython NetCDF interfaces.
Note: when you install ScientificPython, make sure to add the --numpy flag to the build command.
2-Feb-2008
Version 0.6 is out. This version introduces some important changes:
  • uses numpy, and no longer supports Numeric
  • uses the python distutils build process, instead of make as in older versions
  • uses PyNio for NetCDF I/O
For information on earlier versions, see here.
DownloadCurrent version is 0.6.14 (08 February 2013) Download
InstallationRequirements:
  • Python 2.5 or higher.
  • Numpy 1.3 or higher
  • GNU gcc
  • A Fortran 90 compiler
  • The NetCDF libraries

The following are optional; without them, core CliMT will still work but you will lose some functionality:

A painless way of getting everything you need to run CliMT is to first install Enthought Python, a "kitchen-sink included" distribution which is free to academic/research users. Binary distributions of the freeware GNU Fortran 90 compiler (gfortran) for Mac OSX and Unix are available here.
To install CliMT:
  • tar xvzf climt.tar.gz
  • cd CliMT
  • edit the section marked "Resolution" near the top of setup.py, set the desired number of longitude (IM), latitude (JM) and vertical (KM) gridpoints.
  • edit "NC_LIB" near the top of setup.py to point to the location of your NetCDF library
  • edit "NC_INC" near the top of setup.py to point to the location of your NetCDF include files
  • python setup.py install

To install CliMT_lite, follow the above procedure but replace the last step with

  python setup.py install --lite

For information on the compilers available on your platform, do

  f2py -c --help-fcompiler

To build with a different compiler, do

  python setup.py install --fcompiler=compiler

where compiler is one of the choices offered by f2py above.

To install in a location different from the default, do

  python setup.py install --prefix=dir

and the package will install in dir/lib/python2.x/site-packages.
Compilers and platforms
The distribution should build out-of-the-box on the following
  • Mac OS X Intel 10.4 and higher, GNU gfortran or Intel ifort
  • Mac OS X PPC 10.4, GNU gfortran
  • Linux x86_64, GNU gfortran or Intel ifort
On other systems, your mileage may vary; please contact me if you have installation difficulties.
Note: As of numpy 1.0.4, the distutils tool cannot handle the OS X/ifort combination. To successfully compile on this platform, you need to edit the filenumpy-root/numpy/distutils/fcompiler/intel.py (where numpy-root is the directory where numpy is installed) and change the line


  'linker_so' : ["", "-shared"],
to
  'linker_so' : ["", "-bundle -undefined dynamic_lookup"],
Using CliMTOne day I will take a sabbatical and write a complete tutorial and users guide. For now, the best way to learn to use CliMT is to look at the example scripts in CliMT/lib/examples. In particular:
  • tutorial.py provides a basic introduction to the use of CliMT as a diagnostic tool.
  • radiative_convective_equilibrium.py provides a simple example of the use of the federation class, which links modules together to form a time-stepping model--in this case, a single-column radiative-convective model.
  • held_hou.py demonstrates the use of the axisymmetric dynamical core. Note the #PBS flags at the top--you can submit CliMT python jobs directly to the PBS queue on a cluster.
Detailed information about the arguments required by each component is avaible using the Python help() function (e.g. help(climt.radiation) will print usage information for the radiation module).
Python is also a good language for CGI scripting, so you can easily build web interfaces to CliMT applications. Here is an example of CliMT used in a CGI script, and here is the script in action.
AuthorsCliMT is developed by Rodrigo Caballero, with contributions from Jonathan Mitchell and Mike Steder.

CliMT began as a project of the Climate Systems Center at the Department of the Geophysical Sciences, University of Chicago, with funding from NSF Information Technology Research grant ATM-0121028.




climt-0.6.14.tar.gz

19.2 MB, 下载次数: 25, 下载积分: 金钱 -5

密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-12-28 18:04:44 | 显示全部楼层
感谢分享  不过好像win7系统不能用
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2013-12-28 21:10:14 | 显示全部楼层
kongfeng0824 发表于 2013-12-28 18:04
感谢分享  不过好像win7系统不能用

按页面如下的提示看,win7可能需要安装成Linux双系统,cygwin没准也能试试。不过,最后一句中,作者鼓励在其他系统中遇到安装困难时与他联系。
Compilers and platforms
The distribution should build out-of-the-box on the following

Mac OS X Intel 10.4 and higher, GNU gfortran or Intel ifort
Mac OS X PPC 10.4, GNU gfortran
Linux x86_64, GNU gfortran or Intel ifort
On other systems, your mileage may vary; please contact me if you have installation difficulties.
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-8-29 16:20:52 | 显示全部楼层
英文的,得好好学习!
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-10-4 16:39:24 | 显示全部楼层
在linux还没装上,有点郁闷~~~
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表