登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 风往北吹 于 2016-10-20 20:51 编辑
镇图惊艳一下各位
代码量
1>刚开始的时候遇见“UVCDAT”,我是想哭的。因为,它确实很强大,几乎包含了气象常用的所有Python库。那时候,特别麻烦,无论是服务器还是自己的笔记本都是各种搞不定。与之相关的库看的眼花,出了错很难找到,折腾了好久好久,中间有大力出奇迹的时候,uvcdat的操作框可以弹出来,接着干啥啥出错。所以,最后放弃了。
感受下与之相关的库!!!
2>再后来我也对它再次动过心,然而还是不友善,我需要的其实也只是eofs2中的两个库(cdms2 / cdutil),可还是这能奢望。其实我默默的关注着UVCDAT,寄希望于他们的团队能够给力一些。结果你猜.......
3>心诚则灵,N多繁琐的步骤化为一句话,这个得益于conda的一键式解决方案。神马问题只要是预想得到的,没有搞不定的复杂N多库。
现在的指令:
UV-CDAT is installed via Anaconda [size=18.018px]
1>conda create -n uvcdat -c uvcdat uvcdat hdf5=1.8.16 pyqt=4.11.3 jpeg=8
2>source activate uvcdat
以前必须条件和指令如下:
There are two ways to install UV-CDAT on your system; method 1 is to download a binary release of the application (available here), and method 2 is to do a full build from source. We strongly recommend the binary installation; it's a lot faster and easier to do, especially if you're not comfortable with the command line. It also requires a lot fewer pieces of software to be installed; almost everything gets bundled with the binary installation. This guide will walk you through installation on your system using both methods (binary and source). System RequirementsFirst, let's start with the bare minimum you need to actually be able to install UV-CDAT. Note: Fink/MacPort Fink/MacPort, while useful, confuse our build system. You should remove ALL reference to /sw and /opt/local from your environment. The safest way to proceed is to actually move /sw or/opt/local before building UVCDAT (sudo mv /sw /sw_back or sudo mv /opt/local /opt/local_back). Once you've finished installing, you can safely move the directories back. Requirements for All Installations- OSX 10.9 or greater for Binary, OSX10.8.5 or greater for Source
- Xquartz (2.7.8)
- gfortran (4.6 < version < 5.0)
- Mac gfortran
- Change directory cd /
- Run sudo tar xvf ~/Downloads/gfortran-4.9.2-Mac.tar.gz
- Qt (4.8.x)
Requirements for Source InstallInstalling from Binary- Download the most recent release of UV-CDAT
- Move the binary to /
sudo mv UV-CDAT-2.4.1-Mac.tar.gz / - Change directory to /
cd / - Extract the binary from the archive
sudo tar xzf UV-CDAT-2.4.1-Mac.tar.gz - That's it! You're all done installing. Skip on down to Run UV-CDAT.
Installing from Source- Go to the directory you want to download UV-CDAT's source code to
cd ~ - Clone UV-CDAT
git clone git://github.com/UV-CDAT/uvcdat - Create a build directory
mkdir build-uvcdat - Change directory to the build directory
cd build-uvcdat - Initialize the build scripts using CMake
cmake ../uvcdat
- To install to a specific location, you can use (e.g. /usr/local/uvcdat/2.4.1):
cmake ../uvcdat -DCMAKE_INSTALL_PREFIX="/path/to/install/uvcdat" - Other build options are documented here
- Run make
make -j4 - Once it finishes building, you're all done! UV-CDAT will be installed either in the build-uvcdat/install folder or at whatever path you provided in the -DCMAKE_INSTALL_PREFIX argument to cmake.
Run UVCDAT- Set up the UV-CDAT environment for your current shell session
source /usr/local/uvcdat/2.4.1/bin/setup_runtime.sh (orsetup_runtime.csh, for cshell users) - Start UV-CDAT
uvcdat
4>先分享一下自己的心得体会,Python的优雅之处不一一介绍。至于使用和如何搞定这种一键式安装(Linux、MacOS)大同小异。Win暂时没有!
最后,对于想入门Python的建议关注:Anaconda、Atom/sublime text。能够让你的编程变为一种美的体验。
另外,UVCDAT的使用后续再跟进。~~~~~~~
|