Changeset 944
- Timestamp:
- Apr 27, 2013, 3:47:01 PM (12 years ago)
- Location:
- trunk/UTIL/PYTHON
- Files:
-
- 3 added
- 1 deleted
- 6 edited
- 5 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/README.INSTALL
r723 r944 1 ########################### 2 ############ README.INSTALL 3 ########################### 1 #################################### 2 ## README.INSTALL ## 3 ## if you are outside LMD or IPSL ## 4 ## e.g. on your laptop ## 5 #################################### 4 6 5 This README describes the required steps to install the python distribution and packages necessary to run the graphical routines. 7 This README describes the required steps to install the necessary python distribution and packages. 8 This is only an example. The necessary python libraries (numpy, matplotlib, etc...) can also be installed one by one. 6 9 7 10 ---------------- … … 10 13 11 14 "The Enthought Python Distribution (EPD) provides scientists with a comprehensive set of tools to perform rigorous data analysis and visualization." 12 EPD includes a distribution of Python and a set of libraries for plots and data analysis. It is free for academics , and can be downloaded at:15 EPD includes a distribution of Python and a set of libraries for plots and data analysis. It is free for academics. 13 16 14 http://download.enthought.com/epd-7.1/ 15 16 Different versions are available. 17 e.g. different versions are available. 17 18 64 bit version for linux: epd-7.1-2-rh5-x86_64.sh (recommended) 18 19 32 bit version for linux is also available if the above fails: epd-7.1-2-rh5-x86.sh … … 37 38 Note that a version of python was probably already installed on your machine, in /usr/bin/. Make sure that "which python" gets you the correct path to EPD python after you sourced your .env_pers.ksh. 38 39 39 LMD routines for python plots are on the svn repository in YOUR_SVN_INSTALL/trunk/UTIL/PYTHON/. You must declare the $PYTHONPATH environment variable to point to these routines. For example: 40 export PYTHONPATH=/san0/bwhitelmd/SVN/trunk/UTIL/PYTHON/ 41 42 Finally, you might want to add $PYTHONPATH to your $PATH so that the main scripts can be called from anywhere in command line. 43 44 ------------------------------ 45 Step 4/- Read the README.PP ;) 46 ------------------------------ 47 48 NB: To use the movie capability, you will have to install mencoder. 49 NB: To use advance interpolation methods for GCM and mesoscale files, you will have to compile fortran routines with f2py (or compile those independently). 50 51 ########################### 52 ############ README.INSTALL.LMD 53 ########################### 40 ################################### 41 ## README.INSTALL ## 42 ## if you are inside LMD or IPSL ## 43 ## e.g. on your laptop ## 44 ################################### 54 45 55 46 If you work on LMD or IPSL computers, you don't necessarily need to install EPD. 56 57 [NB: You don't necessarily need to download pp.py sources either but in case58 you would like to try modifications of the code please use the command59 svn co http://svn.lmd.jussieu.fr/Planeto/trunk/UTIL/PYTHON60 and change PYTHONPATH accordingly in the lines given in what follows]61 47 62 48 ------------------------- … … 66 52 A. Spiga installed on his account a version of EPD. 67 53 --> Add the following lines to your env_pers.ksh, then source the file. You're OK! 68 --> (ask for an installation of mencoder if you'd like to use movie capabilities)69 54 70 55 ##################################### … … 76 61 fi 77 62 fi 78 PYTHONPATH=/donnees/aslmd/MODELES/UTIL/PYTHON/79 export PYTHONPATH80 PATH=$PYTHONPATH:$PATH81 63 ##################################### 82 64 -
trunk/UTIL/PYTHON/api/api.F90
r943 r944 1 link ../../ MESOSCALE/LMD_MM_MARS/SRC/POSTPROC/api.F901 link ../../../MESOSCALE/LMD_MM_MARS/SRC/POSTPROC/api.F90 -
trunk/UTIL/PYTHON/mcd/examples/exampleascii.py
r943 r944 1 #! /usr/bin/ python1 #! /usr/bin/env python 2 2 3 3 from mcd import mcd -
trunk/UTIL/PYTHON/mcd/frozen_myplot.py
r942 r944 252 252 ### ... note, anomaly is only computed over d1 and d2 for the moment 253 253 import numpy as np 254 from mymath import max,mean,min,sum,getmask254 from frozen_mymath import max,mean,min,sum,getmask 255 255 csmooth = 12 ## a fair amount of grid points (too high results in high computation time) 256 256 if redope is not None: … … 437 437 ## Author: AC + AS 438 438 def reduce_zaxis (input,ax=None,yint=False,vert=None,indice=None): 439 from mymath import max,mean439 from frozen_mymath import max,mean 440 440 from scipy import integrate 441 441 import numpy as np … … 869 869 import numpy as np 870 870 import matplotlib as mpl 871 from mymath import max871 from frozen_mymath import max 872 872 meanlon = 0.5*(wlon[0]+wlon[1]) 873 873 meanlat = 0.5*(wlat[0]+wlat[1]) … … 972 972 def calculate_bounds(field,vmin=None,vmax=None): 973 973 import numpy as np 974 from mymath import max,min,mean974 from frozen_mymath import max,min,mean 975 975 ind = np.where(field < 9e+35) 976 976 fieldcalc = field[ ind ] # la syntaxe compacte ne marche si field est un tuple … … 993 993 ## Author: AS 994 994 def bounds(what_I_plot,zevmin,zevmax): 995 from mymath import max,min,mean995 from frozen_mymath import max,min,mean 996 996 ### might be convenient to add the missing value in arguments 997 997 #what_I_plot[ what_I_plot < zevmin ] = zevmin#*(1. + 1.e-7) … … 1006 1006 ## Author: AS 1007 1007 def nolow(what_I_plot): 1008 from mymath import max,min1008 from frozen_mymath import max,min 1009 1009 lim = 0.15*0.5*(abs(max(what_I_plot))+abs(min(what_I_plot))) 1010 1010 print "NO PLOT BELOW VALUE ", lim … … 1476 1476 ## Handles calls to specific computations (e.g. wind norm, enrichment factor...) 1477 1477 def select_getfield(zvarname=None,znc=None,ztypefile=None,mode=None,ztsat=None,ylon=None,ylat=None,yalt=None,ytime=None,analysis=None): 1478 from mymath import get_tsat1478 from frozen_mymath import get_tsat 1479 1479 1480 1480 ## Specific variables are described here: … … 1578 1578 import numpy as np 1579 1579 from scipy import ndimage 1580 from mymath import array2image,image2array1580 from frozen_mymath import array2image,image2array 1581 1581 1582 1582 varinfile = nc.variables.keys() -
trunk/UTIL/PYTHON/mcd/mcd.py
r943 r944 9 9 import numpy as np 10 10 import matplotlib.pyplot as mpl 11 import myplot11 import frozen_myplot as myplot 12 12 13 13 -
trunk/UTIL/PYTHON/mcd/mcdtest.py
r859 r944 6 6 query = mcd() 7 7 8 query.toversion5()8 #query.toversion5() 9 9 query.loct = 12. 10 10 … … 20 20 query.printextvar(95) 21 21 22 end23 22 24 23 query.viking1() -
trunk/UTIL/PYTHON/planetoplot_v1/README.PP
r943 r944 14 14 The program pp.py works on virtually any NETCDF file. 15 15 If not, please contact us, it is usually an easy fix to make it work. 16 17 NB: To use the movie capability, you will have to install mencoder. 18 NB: To use advance interpolation methods for GCM and mesoscale files, you will have to compile fortran routines with f2py (or compile those independently). 16 19 17 20 ************************************
Note: See TracChangeset
for help on using the changeset viewer.