Changeset 1708 in lmdz_wrf
- Timestamp:
- Dec 11, 2017, 6:21:58 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/documentation/install.html
r1556 r1708 62 62 <LI>Now all the scripts are held in ${HOME}/PyNCplot. It might be desirable to set an environment variable to make life easier: 63 63 <DIV CLASS="codetxt">$ export pyHOME=${HOME}/PyNCplot</DIV> 64 <LI>Finally one need to compile the Fortran modules using the same python to run the scripts. This is done using a standard `Makefile' and the tool <A CLASS="la" HREF="https://docs.scipy.org/doc/numpy-dev/f2py/" TARGET="_blank">f2py</A> to link Fortran compiled codes to python. There are different versions for different LMD/IPSL and French HPC machines. For a standard linux 64-bits machine (debain 7) there is one example as `Makefile.foudre'. Follow the instructions there in after linking the appropriated file:</LI> 65 <DIV CLASS="codetxt"> 66 $ ln -s Makefile.[machine].[compiler] ./Makefile 67 </DIV> 68 <LI>In order to create a python 'library' from the fortran codes, one need to follow these steps (example for machine called `foudre')</LI> 69 <OL> 70 <LI>Preparing the fortran-python bridge of the `diagnostics' related module</LI> 64 <LI>Finally one need to compile the Fortran modules using the same python to run the scripts. This is done using a standard `Makefile' and the tool <A CLASS="la" HREF="https://docs.scipy.org/doc/numpy-dev/f2py/" TARGET="_blank">f2py</A> to link Fortran compiled codes to python. There are different versions for different LMD/IPSL and French HPC machines. For a standard linux 64-bits machine (debain 9 with gcc compilers) there is one example as `Makefile.rayo'. Take one and specify a series of different variables specifically for the given machine 71 65 <DIV CLASS="codetxt"> 72 $ f2py -m module_ForDiag -h module_ForDiag.pyf module_generic.F90 module_ForDiagnosticsVars.F90 module_ForDiagnostics.F90 >& run_f2py_ForDiag_wrapper.log 66 FC = gfortran # Fortran compiler 67 F2PY = /usr/bin/f2py # Path to the f2py tool 68 NCLIBFOLD = /usr/lib/x86_64-linux-gnu # Path to netcdf libraries 69 NCINCFOLD = /usr/include # Path to netcdf includes 73 70 </DIV> 74 <LI> Creation of the binary objects of the Fortran codes</LI>71 <LI>Then one only needs to link the Makefile and compile</LI> 75 72 <DIV CLASS="codetxt"> 76 $ make 77 </DIV> 78 <LI>Creation of the fortran-python `diagnostics' related module</LI> 79 <DIV CLASS="codetxt"> 80 $ f2py -m module_ForDiag -c --f90exec=/usr/bin/gfortran-4.7 module_ForDiag.pyf module_generic.F90 module_ForDiagnosticsVars.F90 module_ForDiagnostics.F90 >& run_f2py_ForDiag_compile.log 81 </DIV> 82 <LI>Preparing the fortran-python bridge of the `interpolation' related module</LI> 83 <DIV CLASS="codetxt"> 84 $ f2py -m module_ForInt -h module_ForInt.pyf module_generic.F90 module_ForInterpolate.F90 >& run_f2py_ForInt_wrapper.log 85 </DIV> 86 <LI>Creation of the fortran-python `diagnostics' related module</LI> 87 <DIV CLASS="codetxt"> 88 $ f2py -m module_ForInt -c --f90exec=/usr/bin/gfortran-4.7 module_ForInt.pyf module_generic.F90 module_ForInterpolate.F90 >& run_f2py_ForInt_compile.log 73 $ ln -s Makefile.[machine].[compiler] ./Makefile<BR> 74 $ make >& run_make.log 89 75 </DIV> 90 76 <LI>At the end one should have: </LI> 91 <PRE><CODE> 92 module_ForDiag.so 93 module_ForInt.so 77 <UL> 78 <LI><PRE><CODE>DistriCorrection</CODE></PRE>: Complete fortran program to correct data by moving values within quantiles of the distribution</LI> 79 <LI><PRE><CODE>interpolate</CODE></PRE>: Complete fortran program to interpolate data using nearest-neighbors and weighted distances</LI> 80 <LI><PRE><CODE>module_ForDef.so</CODE></PRE>: python-callable package of fortran's definitions of variables</LI> 81 <LI><PRE><CODE>module_ForDistriCorrect.so</CODE></PRE>: python-callable package of fortran's correction of the distribution by moving values within quantiles of the distribution</LI> 82 <LI><PRE><CODE>module_ForSci.so</CODE></PRE>: python-callable package of fortran's scientific/mathematical all purpose functions</LI> 83 <LI><PRE><CODE>module_ForDiag.so</CODE></PRE>: python-callable package of fortran's computation of meteorological diagnostics</LI> 84 <LI><PRE><CODE>module_ForInt.so</CODE></PRE>: python-callable package of fortran's interpolation subroutines</LI> 85 <LI><PRE><CODE>trajectories_overlap</CODE></PRE>: Complete fortran program to define enclosed regions on a given 2D field and compute their trajectories following a maximum-overlaping criteria</LI> 94 86 </CODE></PRE> 95 87 </OL>
Note: See TracChangeset
for help on using the changeset viewer.