Dear All,
Lets see the procedure on how to install ESMF and ESMFPy package using gcc, gfotran, Ubuntu and Python.
You can read more about ESMF https://www.earthsystemcog.org/projects/esmf/
I downloaded esmf_6_3_0rp1_src.tar.gz file from here.
I used Ubuntu 14.04 LTS 64-bit OS to install the ESMF and ESMFPy package.
Login as root, sudo may not work if your target installation path would be /usr/local.
After extracted the above said package then go to that directory.
# root@Ocean:/home/tuxcoder/esmf
Copy paste the following environmental variables in your terminal.
NOTE : you have to change the source directory as per your system path. i.e. ESMF_DIR.
Then you have to provide netcdf4 include path. If you didnt install netcdf4 already then you may read my previous post here.
export ESMF_DIR=/home/tuxcoder/esmf export ESMF_INSTALL_PREFIX=/usr/local/esmf export ESMF_OS=Linux export ESMF_NETCDF="local" export ESMF_COMM=mpiuni export ESMF_F90COMPILER=gfortran export ESMF_CXXCOMPILER=g++ export ESMF_TESTEXHAUSTIVE=on export ESMF_TESTSHAREDOBJ=on export ESMF_NETCDF_INCLUDE=/usr/local/netcdf4/include export ESMF_NETCDF_LIBS="-lnetcdf -lnetcdff" export ESMF_NETCDF_LIBPATH=/usr/local/netcdf4/lib export ESMF_BOPT=O3
After exported all the above environmental variables, then you can do make all followed by make install.
# make all # make install # make installcheck
Now we installed ESMF package in our system.
Lets install ESMFPy in our system python by pointing ESMF package by following steps.
# cd /home/tuxcoder/esmf/src/addon/ESMPy/ # python setup.py build --ESMFMKFILE=/usr/local/esmf/lib/libO3/Linux.gfortran.64.mpiuni.default/<a href="http://esmf.mk">esmf.mk</a> # python setup.py install
Thats it! We successfully installed ESMF and ESMFPy in our gcc, gforatran, Linux based system.
To use ESMFPy, issue the following command.
tuxcoder@Ocean:~$ python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ESMF >>>
Regards,
Arulalan.T

thanks for all you do
LikeLike