1. Download the M-Map zip archive file from https://www.eoas.ubc.ca/~rich/map.html 2. Unpack the zip archive and its sunfolder in the path: /Applications/MATLAB_R2015a.app/toolbox/ 1) find the Applications folder, right click it and left click Open Applications ; 2) find the icon Matlab_R2015a, right click it and left click Show Package Contents ; 3) double click the folder toolbox ; 4) move the unpacked M-Map folder to the folder toolbox . 3. Open Matlab GUI, and run the following command: addpath /Applications/MATLAB_R2015a.app/toolbox/m_map 4. Update the cache file using the command: rehash toolboxcache 5. Finish! Test M-Map using the commands: m_proj('oblique mercator'); m_coast; m_grid; M_map_GettingStarted.pdf
1. Instead of starting with ./configure, use the configure options to tell the build system where you want the files to end up. For example: ./configure --prefix=/home/abhi/emacs --bindir=/home/abhi/bin will install all of emacs' support files under /home/abhi/emacs, and the emacs executables in /home/abhi/bin. If the latter is in your $PATH, which it usually is, then things should Just Work(sm). 2. After that you can make make install without worrying about the installation putting files other than in your home directory. (This is all based on your home directory being /home/abhi, of course. Edit as necessary.)
Install siesta and transiesta (siesta-3.2-pl-5.tar.gz) on the HLRN-smp system 1) load related modules module unload sw.mpp1 module load sw.smp1 module load intel.studio/14.0.1.106 module load openmpi/1.8.4-intel 2) cd siesta-3.0-b/Obj/ 3) sh ../Src/obj_setup.sh 4) ../Src/configure 5) edit arch.make (changes in red) according to cluster's configuration, posting it as follows: # # This file is part of the SIESTA package. # # Copyright (c) Fundacion General Universidad Autonoma de Madrid: # E.Artacho, J.Gale, A.Garcia, J.Junquera, P.Ordejon, D.Sanchez-Portal # and J.M.Soler, 1996- . # # Use of this software constitutes agreement with the full conditions # given in the SIESTA license, as signed by all legitimate users. # .SUFFIXES: .SUFFIXES: .f .F .o .a .f90 .F90 SIESTA_ARCH=x86_64-unknown-linux-gnu--Intel FPP= FPP_OUTPUT= FC=mpif90 RANLIB=ranlib SYS=nag SP_KIND=4 DP_KIND=8 KINDS=$(SP_KIND) $(DP_KIND) FFLAGS= -O3 -i-static FFLAGS_DEBUG= -g FPPFLAGS= -DFC_HAVE_FLUSH -DFC_HAVE_ABORT -DMPI -DGRID_DP -DPHI_GRID_SP #FPPFLAGS= -DFC_HAVE_FLUSH -DFC_HAVE_ABORT LDFLAGS= ARFLAGS_EXTRA= FCFLAGS_fixed_f= FCFLAGS_free_f90= FPPFLAGS_fixed_F= FPPFLAGS_free_F90= #BLAS_LIBS=libblas.a #LAPACK_LIBS=dc_lapack.a liblapack.a #BLACS_LIBS= #SCALAPACK_LIBS= BLAS_LIBS= -L/sw/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_blacs_lp64 -lmkl_intel_thread -liomp5 -lpthread -lmkl_sequential -lmkl_core -i-static LAPACK_LIBS=-L/sw/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64 -lmkl_sequential -lmkl_core BLACS_LIBS=-L/sw/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64 -lmkl_blacs_openmpi_lp64 SCALAPACK_LIBS=-L/sw/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64 -lmkl_scalapack_lp64 #COMP_LIBS=dc_lapack.a liblapack.a libblas.a COMP_LIBS= #NETCDF_LIBS= #NETCDF_INTERFACE= LIBS=$(SCALAPACK_LIBS) $(BLACS_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS) $(NETCDF_LIBS) #SIESTA needs an F90 interface to MPI #This will give you SIESTA's own implementation #If your compiler vendor offers an alternative, you may change #to it here. MPI_INTERFACE= libmpi_f90.a MPI_INCLUDE= /sw/comm/openmpi/1.8.4/smp1-intel/include #Dependency rules are created by autoconf according to whether #discrete preprocessing is necessary or not. .F.o: $(FC) -c $(FFLAGS) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_fixed_F) $ .F90.o: $(FC) -c $(FFLAGS) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_free_F90) $ .f.o: $(FC) -c $(FFLAGS) $(INCFLAGS) $(FCFLAGS_fixed_f) $ .f90.o: $(FC) -c $(FFLAGS) $(INCFLAGS) $(FCFLAGS_free_f90) $ make; (to get siesta executable) make clean; make transiesta (to get transiesta executable )
$ yum install r Loaded plugins: fastestmirror, priorities, refresh-packagekit, security You need to be root to perform this command. $ su 密码: # yum install r Loaded plugins: fastestmirror, priorities, refresh-packagekit, security Loading mirror speeds from cached hostfile * epel: mirrors.neusoft.edu.cn Setting up Install Process No package r available. * Maybe you meant: R Error: Nothing to do # yum install R Loaded plugins: fastestmirror, priorities, refresh-packagekit, security Loading mirror speeds from cached hostfile * epel: mirrors.neusoft.edu.cn Setting up Install Process Resolving Dependencies -- Running transaction check --- Package R.i686 0:3.0.2-1.el6 will be installed -- Processing Dependency: libRmath-devel = 3.0.2-1.el6 for package: R-3.0.2-1.el6.i686 -- Processing Dependency: R-java = 3.0.2-1.el6 for package: R-3.0.2-1.el6.i686 -- Processing Dependency: R-devel = 3.0.2-1.el6 for package: R-3.0.2-1.el6.i686 -- Running transaction check --- Package R-devel.i686 0:3.0.2-1.el6 will be installed -- Processing Dependency: R-java-devel = 3.0.2-1.el6 for package: R-devel-3.0.2-1.el6.i686 -- Processing Dependency: R-core-devel = 3.0.2-1.el6 for package: R-devel-3.0.2-1.el6.i686 --- Package R-java.i686 0:3.0.2-1.el6 will be installed --- Package libRmath-devel.i686 0:3.0.2-1.el6 will be installed -- Processing Dependency: libRmath = 3.0.2-1.el6 for package: libRmath-devel-3.0.2-1.el6.i686 -- Running transaction check --- Package R-core-devel.i686 0:3.0.2-1.el6 will be installed -- Processing Dependency: zlib-devel for package: R-core-devel-3.0.2-1.el6.i686 -- Processing Dependency: tk-devel for package: R-core-devel-3.0.2-1.el6.i686 -- Processing Dependency: texinfo-tex for package: R-core-devel-3.0.2-1.el6.i686 -- Processing Dependency: tcl-devel for package: R-core-devel-3.0.2-1.el6.i686 -- Processing Dependency: pcre-devel for package: R-core-devel-3.0.2-1.el6.i686 -- Processing Dependency: libX11-devel for package: R-core-devel-3.0.2-1.el6.i686 -- Processing Dependency: bzip2-devel for package: R-core-devel-3.0.2-1.el6.i686 --- Package R-java-devel.i686 0:3.0.2-1.el6 will be installed --- Package libRmath.i686 0:3.0.2-1.el6 will be installed -- Running transaction check --- Package bzip2-devel.i686 0:1.0.5-7.el6_0 will be installed --- Package libX11-devel.i686 0:1.5.0-4.el6 will be installed -- Processing Dependency: pkgconfig(xcb) = 1.1.92 for package: libX11-devel-1.5.0-4.el6.i686 -- Processing Dependency: pkgconfig(xproto) for package: libX11-devel-1.5.0-4.el6.i686 -- Processing Dependency: pkgconfig(xcb) for package: libX11-devel-1.5.0-4.el6.i686 -- Processing Dependency: pkgconfig(kbproto) for package: libX11-devel-1.5.0-4.el6.i686 --- Package pcre-devel.i686 0:7.8-6.el6 will be installed --- Package tcl-devel.i686 1:8.5.7-6.el6 will be installed --- Package texinfo-tex.i686 0:4.13a-8.el6 will be installed -- Processing Dependency: texinfo = 4.13a-8.el6 for package: texinfo-tex-4.13a-8.el6.i686 --- Package tk-devel.i686 1:8.5.7-5.el6 will be installed -- Processing Dependency: libXft-devel for package: 1:tk-devel-8.5.7-5.el6.i686 --- Package zlib-devel.i686 0:1.2.3-29.el6 will be installed -- Running transaction check --- Package libXft-devel.i686 0:2.3.1-2.el6 will be installed -- Processing Dependency: pkgconfig(xrender) for package: libXft-devel-2.3.1-2.el6.i686 -- Processing Dependency: pkgconfig(freetype2) for package: libXft-devel-2.3.1-2.el6.i686 -- Processing Dependency: pkgconfig(fontconfig) for package: libXft-devel-2.3.1-2.el6.i686 --- Package libxcb-devel.i686 0:1.8.1-1.el6 will be installed -- Processing Dependency: pkgconfig(xau) = 0.99.2 for package: libxcb-devel-1.8.1-1.el6.i686 --- Package texinfo.i686 0:4.13a-8.el6 will be installed --- Package xorg-x11-proto-devel.noarch 0:7.6-25.el6 will be installed -- Running transaction check --- Package fontconfig-devel.i686 0:2.8.0-3.el6 will be installed --- Package freetype-devel.i686 0:2.3.11-14.el6_3.1 will be installed --- Package libXau-devel.i686 0:1.0.6-4.el6 will be installed --- Package libXrender-devel.i686 0:0.9.7-2.el6 will be installed -- Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: R i686 3.0.2-1.el6 epel 20 k Installing for dependencies: R-core-devel i686 3.0.2-1.el6 epel 90 k R-devel i686 3.0.2-1.el6 epel 19 k R-java i686 3.0.2-1.el6 epel 20 k R-java-devel i686 3.0.2-1.el6 epel 20 k bzip2-devel i686 1.0.5-7.el6_0 base 250 k fontconfig-devel i686 2.8.0-3.el6 base 209 k freetype-devel i686 2.3.11-14.el6_3.1 base 364 k libRmath i686 3.0.2-1.el6 epel 104 k libRmath-devel i686 3.0.2-1.el6 epel 24 k libX11-devel i686 1.5.0-4.el6 base 1.0 M libXau-devel i686 1.0.6-4.el6 base 14 k libXft-devel i686 2.3.1-2.el6 base 19 k libXrender-devel i686 0.9.7-2.el6 base 16 k libxcb-devel i686 1.8.1-1.el6 base 174 k pcre-devel i686 7.8-6.el6 base 318 k tcl-devel i686 1:8.5.7-6.el6 base 162 k texinfo i686 4.13a-8.el6 base 660 k texinfo-tex i686 4.13a-8.el6 base 132 k tk-devel i686 1:8.5.7-5.el6 base 496 k xorg-x11-proto-devel noarch 7.6-25.el6 base 274 k zlib-devel i686 1.2.3-29.el6 base 44 k Transaction Summary ================================================================================ Install 22 Package(s) Total download size: 4.3 M Installed size: 14 M Is this ok : y Downloading Packages: (1/22): R-3.0.2-1.el6.i686.rpm | 20 kB 00:00 (2/22): R-core-devel-3.0.2-1.el6.i686.rpm | 90 kB 00:00 (3/22): R-devel-3.0.2-1.el6.i686.rpm | 19 kB 00:00 (4/22): R-java-3.0.2-1.el6.i686.rpm | 20 kB 00:00 (5/22): R-java-devel-3.0.2-1.el6.i686.rpm | 20 kB 00:00 (6/22): bzip2-devel-1.0.5-7.el6_0.i686.rpm | 250 kB 00:00 (7/22): fontconfig-devel-2.8.0-3.el6.i686.rpm | 209 kB 00:00 (8/22): freetype-devel-2.3.11-14.el6_3.1.i686.rpm | 364 kB 00:00 (9/22): libRmath-3.0.2-1.el6.i686.rpm | 104 kB 00:00 (10/22): libRmath-devel-3.0.2-1.el6.i686.rpm | 24 kB 00:00 (11/22): libX11-devel-1.5.0-4.el6.i686.rpm | 1.0 MB 00:01 (12/22): libXau-devel-1.0.6-4.el6.i686.rpm | 14 kB 00:00 (13/22): libXft-devel-2.3.1-2.el6.i686.rpm | 19 kB 00:00 (14/22): libXrender-devel-0.9.7-2.el6.i686.rpm | 16 kB 00:00 (15/22): libxcb-devel-1.8.1-1.el6.i686.rpm | 174 kB 00:00 (16/22): pcre-devel-7.8-6.el6.i686.rpm | 318 kB 00:00 (17/22): tcl-devel-8.5.7-6.el6.i686.rpm | 162 kB 00:00 (18/22): texinfo-4.13a-8.el6.i686.rpm | 660 kB 00:00 (19/22): texinfo-tex-4.13a-8.el6.i686.rpm | 132 kB 00:00 (20/22): tk-devel-8.5.7-5.el6.i686.rpm | 496 kB 00:00 (21/22): xorg-x11-proto-devel-7.6-25.el6.noarch.rpm | 274 kB 00:00 (22/22): zlib-devel-1.2.3-29.el6.i686.rpm | 44 kB 00:00 -------------------------------------------------------------------------------- Total 473 kB/s | 4.3 MB 00:09 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : xorg-x11-proto-devel-7.6-25.el6.noarch 1/22 Installing : 1:tcl-devel-8.5.7-6.el6.i686 2/22 Installing : zlib-devel-1.2.3-29.el6.i686 3/22 Installing : freetype-devel-2.3.11-14.el6_3.1.i686 4/22 Installing : fontconfig-devel-2.8.0-3.el6.i686 5/22 Installing : libXau-devel-1.0.6-4.el6.i686 6/22 Installing : libxcb-devel-1.8.1-1.el6.i686 7/22 Installing : libX11-devel-1.5.0-4.el6.i686 8/22 Installing : libXrender-devel-0.9.7-2.el6.i686 9/22 Installing : libXft-devel-2.3.1-2.el6.i686 10/22 Installing : 1:tk-devel-8.5.7-5.el6.i686 11/22 Installing : R-java-3.0.2-1.el6.i686 12/22 Installing : pcre-devel-7.8-6.el6.i686 13/22 Installing : bzip2-devel-1.0.5-7.el6_0.i686 14/22 Installing : libRmath-3.0.2-1.el6.i686 15/22 Installing : libRmath-devel-3.0.2-1.el6.i686 16/22 Installing : texinfo-4.13a-8.el6.i686 17/22 Installing : texinfo-tex-4.13a-8.el6.i686 18/22 Installing : R-core-devel-3.0.2-1.el6.i686 19/22 Installing : R-java-devel-3.0.2-1.el6.i686 20/22 Installing : R-devel-3.0.2-1.el6.i686 21/22 Installing : R-3.0.2-1.el6.i686 22/22 Verifying : R-java-devel-3.0.2-1.el6.i686 1/22 Verifying : libXrender-devel-0.9.7-2.el6.i686 2/22 Verifying : texinfo-4.13a-8.el6.i686 3/22 Verifying : libRmath-3.0.2-1.el6.i686 4/22 Verifying : bzip2-devel-1.0.5-7.el6_0.i686 5/22 Verifying : texinfo-tex-4.13a-8.el6.i686 6/22 Verifying : zlib-devel-1.2.3-29.el6.i686 7/22 Verifying : pcre-devel-7.8-6.el6.i686 8/22 Verifying : R-devel-3.0.2-1.el6.i686 9/22 Verifying : libXau-devel-1.0.6-4.el6.i686 10/22 Verifying : R-java-3.0.2-1.el6.i686 11/22 Verifying : freetype-devel-2.3.11-14.el6_3.1.i686 12/22 Verifying : 1:tcl-devel-8.5.7-6.el6.i686 13/22 Verifying : libXft-devel-2.3.1-2.el6.i686 14/22 Verifying : libX11-devel-1.5.0-4.el6.i686 15/22 Verifying : xorg-x11-proto-devel-7.6-25.el6.noarch 16/22 Verifying : 1:tk-devel-8.5.7-5.el6.i686 17/22 Verifying : R-core-devel-3.0.2-1.el6.i686 18/22 Verifying : libRmath-devel-3.0.2-1.el6.i686 19/22 Verifying : fontconfig-devel-2.8.0-3.el6.i686 20/22 Verifying : R-3.0.2-1.el6.i686 21/22 Verifying : libxcb-devel-1.8.1-1.el6.i686 22/22 Installed: R.i686 0:3.0.2-1.el6 Dependency Installed: R-core-devel.i686 0:3.0.2-1.el6 R-devel.i686 0:3.0.2-1.el6 R-java.i686 0:3.0.2-1.el6 R-java-devel.i686 0:3.0.2-1.el6 bzip2-devel.i686 0:1.0.5-7.el6_0 fontconfig-devel.i686 0:2.8.0-3.el6 freetype-devel.i686 0:2.3.11-14.el6_3.1 libRmath.i686 0:3.0.2-1.el6 libRmath-devel.i686 0:3.0.2-1.el6 libX11-devel.i686 0:1.5.0-4.el6 libXau-devel.i686 0:1.0.6-4.el6 libXft-devel.i686 0:2.3.1-2.el6 libXrender-devel.i686 0:0.9.7-2.el6 libxcb-devel.i686 0:1.8.1-1.el6 pcre-devel.i686 0:7.8-6.el6 tcl-devel.i686 1:8.5.7-6.el6 texinfo.i686 0:4.13a-8.el6 texinfo-tex.i686 0:4.13a-8.el6 tk-devel.i686 1:8.5.7-5.el6 xorg-x11-proto-devel.noarch 0:7.6-25.el6 zlib-devel.i686 0:1.2.3-29.el6 Complete! # r bash: r: command not found # R R version 3.0.2 (2013-09-25) -- Frisbee Sailing Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i686-redhat-linux-gnu (32-bit) R是自由软件,不带任何担保。 在某些条件下你可以将其自由散布。 用'license()'或'licence()'来看散布的详细条件。 R是个合作计划,有许多人为之做出了贡献. 用'contributors()'来看合作者的详细情况 用'citation()'会告诉你如何在出版物中正确地引用R或R程序包。 用'demo()'来看一些示范程序,用'help()'来阅读在线帮助文件,或 用'help.start()'通过HTML浏览器来看帮助文件。 用'q()'退出R. demo(graphics) demo(graphics) ---- ~~~~~~~~ Type Return to start : # Copyright (C) 1997-2009 The R Core Team require(datasets) require(grDevices); require(graphics) ## Here is some code which illustrates some of the differences between ## R and S graphics capabilities. Note that colors are generally specified ## by a character string name (taken from the X11 rgb.txt file) and that line ## textures are given similarly. The parameter bg sets the background ## parameter for the plot and there is also an fg parameter which sets ## the foreground color. x - stats::rnorm(50) opar - par(bg = white) plot(x, ann = FALSE, type = n) 按Return键来看下一个图: abline(h = 0, col = gray(.90)) lines(x, col = green4, lty = dotted) points(x, bg = limegreen, pch = 21) title(main = Simple Use of Color In a Plot, + xlab = Just a Whisper of a Label, + col.main = blue, col.lab = gray(.8), + cex.main = 1.2, cex.lab = 1.0, font.main = 4, font.lab = 3) ## A little color wheel. This code just plots equally spaced hues in ## a pie chart. If you have a cheap SVGA monitor (like me) you will ## probably find that numerically equispaced does not mean visually ## equispaced. On my display at home, these colors tend to cluster at ## the RGB primaries. On the other hand on the SGI Indy at work the ## effect is near perfect. par(bg = gray) pie(rep(1,24), col = rainbow(24), radius = 0.9) 按Return键来看下一个图: title(main = A Sample Color Wheel, cex.main = 1.4, font.main = 3) title(xlab = (Use this as a test of monitor linearity), + cex.lab = 0.8, font.lab = 3) ## We have already confessed to having these. This is just showing off X11 ## color names (and the example (from the postscript manual) is pretty cute. pie.sales - c(0.12, 0.3, 0.26, 0.16, 0.04, 0.12) names(pie.sales) - c(Blueberry, Cherry, + Apple, Boston Cream, Other, Vanilla Cream) pie(pie.sales, + col = c(purple,violetred1,green3,cornsilk,cyan,white)) 按Return键来看下一个图: title(main = January Pie Sales, cex.main = 1.8, font.main = 1) title(xlab = (Don't try this at home kids), cex.lab = 0.8, font.lab = 3) ## Boxplots: I couldn't resist the capability for filling the box. ## The use of color seems like a useful addition, it focuses attention ## on the central bulk of the data. par(bg=cornsilk) n - 10 g - gl(n, 100, n*100) x - rnorm(n*100) + sqrt(as.numeric(g)) boxplot(split(x,g), col=lavender, notch=TRUE) 按Return键来看下一个图: title(main=Notched Boxplots, xlab=Group, font.main=4, font.lab=1) ## An example showing how to fill between curves. par(bg=white) n - 100 x - c(0,cumsum(rnorm(n))) y - c(0,cumsum(rnorm(n))) xx - c(0:n, n:0) yy - c(x, rev(y)) plot(xx, yy, type=n, xlab=Time, ylab=Distance) 按Return键来看下一个图: polygon(xx, yy, col=gray) title(Distance Between Brownian Motions) ## Colored plot margins, axis labels and titles. You do need to be ## careful with these kinds of effects. It's easy to go completely ## over the top and you can end up with your lunch all over the keyboard. ## On the other hand, my market research clients love it. x - c(0.00, 0.40, 0.86, 0.85, 0.69, 0.48, 0.54, 1.09, 1.11, 1.73, 2.05, 2.02) par(bg=lightgray) plot(x, type=n, axes=FALSE, ann=FALSE) 按Return键来看下一个图: usr - par(usr) rect(usr , usr , usr , usr , col=cornsilk, border=black) lines(x, col=blue) points(x, pch=21, bg=lightcyan, cex=1.25) axis(2, col.axis=blue, las=1) axis(1, at=1:12, lab=month.abb, col.axis=blue) box() title(main= The Level of Interest in R, font.main=4, col.main=red) title(xlab= 1996, col.lab=red) ## A filled histogram, showing how to change the font used for the ## main title without changing the other annotation. par(bg=cornsilk) x - rnorm(1000) hist(x, xlim=range(-4, 4, x), col=lavender, main=) 按Return键来看下一个图: title(main=1000 Normal Random Variates, font.main=3) ## A scatterplot matrix ## The good old Iris data (yet again) pairs(iris , main=Edgar Anderson's Iris Data, font.main=4, pch=19) 按Return键来看下一个图: pairs(iris , main=Edgar Anderson's Iris Data, pch=21, + bg = c(red, green3, blue) ) 按Return键来看下一个图: ## Contour plotting ## This produces a topographic map of one of Auckland's many volcanic peaks. x - 10*1:nrow(volcano) y - 10*1:ncol(volcano) lev - pretty(range(volcano), 10) par(bg = lightcyan) pin - par(pin) xdelta - diff(range(x)) ydelta - diff(range(y)) xscale - pin /xdelta yscale - pin /ydelta scale - min(xscale, yscale) xadd - 0.5*(pin /scale - xdelta) yadd - 0.5*(pin /scale - ydelta) plot(numeric(0), numeric(0), + xlim = range(x)+c(-1,1)*xadd, ylim = range(y)+c(-1,1)*yadd, + type = n, ann = FALSE) 按Return键来看下一个图: usr - par(usr) rect(usr , usr , usr , usr , col=green3) contour(x, y, volcano, levels = lev, col=yellow, lty=solid, add=TRUE) box() title(A Topographic Map of Maunga Whau, font= 4) title(xlab = Meters North, ylab = Meters West, font= 3) mtext(10 Meter Contour Spacing, side=3, line=0.35, outer=FALSE, + at = mean(par(usr) ), cex=0.7, font=3) ## Conditioning plots par(bg=cornsilk) coplot(lat ~ long | depth, data = quakes, pch = 21, bg = green3) 按Return键来看下一个图: par(opar) x - c(1,2,3,4,5,6) x 1 2 3 4 5 6 plot(x) 按Return键来看下一个图: q() Save workspace image? : y #
Installation http://replicat.org/installation-windows Note:You may need to use the ReplicatorG preferences menu to manually specify where you’ve installed Python. Usage http://replicat.org/usage Note:ReplicatorG 每个小格 10mm*10mm
It's a pitty that root is not in repository anymore (applies for Ubuntu 11.04). Here is a way HOW-TO install root on Ubuntu Natty (x86): DEPENDENCIES: sudo apt-get install gcc g++ make binutils subversion dpkg-dev \ libx11-dev libxpm-dev libxft-dev libxext-dev OPTIONAL DEPENDENCIES: (I've this installed) sudo apt-get install cmake \ gsl-bin libgsl0-dev \ liblzma2 liblzma-dev \ libgmp3c2 libgmp3-dev \ libpcre3 libpcre3-dev \ zlib1g zlib1g-dev HOW TO INSTALL: wget ftp://root.cern.ch/root/root_v5.34.00.source.tar.gz tar -xzvpf root_v5.34.00.source.tar.gz cd root ./configure make sudo make install ## sudo needed at least for for /etc/root sudo cd root source bin/thisroot.sh root .Q // to quit root
1: NetCDF编译过程 cdnetcdf-4.1.3 ./configure --disable-dap --disable-netcdf-4 --prefix=/usr/local/netcdf ( 根据 http://hi.baidu.com/liuxiaogis/blog/item/6f662e38d5a03b3c96ddd81a.html 的说法,加上--disable-dap的原因是缺少一个‘curl’的lib, --disable-netcdf-4是报错中提出的解决办法 ) 但是连这一步都没有通过, ....................... checking whether ifort accepts -g... no checking for Fortran flag to compile .f90 files... unknown configure: error: Fortran could not compile .f90 files configure: error: ./configure failed for libcf 在 --prefix=/usr/local/netcdf之后加上FC=gfortran之后 ./configure --disable-dap --disable-netcdf-4--prefix=/usr/local/netcdfFC=gfortran 编译通过! 2: make 直接输入 make 出现 ....................... make : Nothing to be done for `all-am'. make : Leaving directory `/home/dinghao/netcdf-4.1.3/examples' make : Leaving directory `/home/dinghao/netcdf-4.1.3/examples' make : Entering directory `/home/dinghao/netcdf-4.1.3' make : Leaving directory `/home/dinghao/netcdf-4.1.3' make : Leaving directory `/home/dinghao/netcdf-4.1.3' 在/usr/local/netcdf/ 目录下没有出现任何东西!?confused! 3: make check 步骤 键入 make check 出现 ....................... ================== All 7 tests passed ================== make : Leaving directory `/home/dinghao/netcdf-4.1.3/examples/CXX' make : Leaving directory `/home/dinghao/netcdf-4.1.3/examples/CXX' make : Entering directory `/home/dinghao/netcdf-4.1.3/examples' make : Nothing to be done for `check-am'. make : Leaving directory `/home/dinghao/netcdf-4.1.3/examples' make : Leaving directory `/home/dinghao/netcdf-4.1.3/examples' make : Entering directory `/home/dinghao/netcdf-4.1.3' make : Leaving directory `/home/dinghao/netcdf-4.1.3' check 居然通过! 4: make install 步骤 键入 sudomake install 最后显示 ........................... make install-data-hook make : Entering directory `/home/dinghao/netcdf-4.1.3' +-------------------------------------------------------------+ | Congratulations! You have successfully installed netCDF! | | | | You can use script "nc-config" to find out the relevant | | compiler options to build your application. Enter | | | | nc-config --help | | | | for additional information. | | | | CAUTION: | | | | If you have not already run "make check", then we strongly | | recommend you do so. It does not take very long. | | | | Before using netCDF to store important data, test your | | build with "make check". | | | | NetCDF is tested nightly on many platforms at Unidata | | but your platform is probably different in some ways. | | | | If any tests fail, please see the netCDF web site: | | http://www.unidata.ucar.edu/software/netcdf/ | | | | NetCDF is developed and maintained at the Unidata Program | | Center. Unidata provides a broad array of data and software | | tools for use in geoscience education and research. | | http://www.unidata.ucar.edu | +-------------------------------------------------------------+ make : Leaving directory `/home/dinghao/netcdf-4.1.3' make : Leaving directory `/home/dinghao/netcdf-4.1.3' make : Leaving directory `/home/dinghao/netcdf-4.1.3' 说明安装成功! 5: 测试 下面是一个已编好的用来测试NetCDF的小程序simple_xy_wr(由刘情操提供 http://blog.sina.com.cn/s/blog_4b1d9e7b0100zg89.html ,特此鸣谢)或者用/netcdf-4.1.3/example/F90/里面的例子来测试: program simple_xy_wr use netcdf implicit none ! 定义数据文件的名称 character (len = *), parameter :: FILE_NAME = "simple_xy.nc" ! 写一个12*6的二维数据 integer, parameter :: NDIMS = 2 integer, parameter :: NX = 6, NY = 12 ! 当创建netCDF文件的时候,变量和维数都有一个对应的ID integer :: ncid, varid, dimids(NDIMS) integer :: x_dimid, y_dimid integer :: x, y ! 要保存到文件的数据数组 integer, dimension(:,:), allocatable :: data_out ! 为数据数组分配内存 allocate(data_out(NY, NX)) ! 随意往数据数组里写一些数据 do x = 1, NX do y = 1, NY data_out(y, x) = (x - 1) * NY + (y - 1) end do end do ! 创建netCDF文件,返回文件对应的ID,如果存在则覆盖,check子程序用来检验执行是否成功 call check( nf90_create(FILE_NAME, NF90_CLOBBER, ncid) ) ! 定义维数,返回一个对应的ID call check( nf90_def_dim(ncid, "x", NX, x_dimid) ) call check( nf90_def_dim(ncid, "y", NY, y_dimid) ) ! 把上面得到的ID写到一个存放ID的数组里,注意,在fortran中,数组是以列为主存放数据的 dimids = (/ y_dimid, x_dimid /) ! 定义变量,返回一个对应的ID call check( nf90_def_var(ncid, "data", NF90_INT, dimids, varid) ) ! 定义完成,关闭定义模式 call check( nf90_enddef(ncid) ) ! 写入数据 call check( nf90_put_var(ncid, varid, data_out) ) ! 关闭文件 call check( nf90_close(ncid) ) !提示写文件成功 print *, "*** SUCCESS writing example file simple_xy.nc! " contains subroutine check(status) integer, intent ( in) :: status if(status /= nf90_noerr) then print *, trim(nf90_strerror(status)) stop 2 end if end subroutine check end program simple_xy_wr 在主目录下键入 gfortran cel-test.f90 -I/usr/local/netcdf/include -L/usr/local/netcdf/lib -lnetcdff -o test ( cel-test.f90为程序名, test为编译后生成的 ) 编译通过! 然后运行test,键入 ./test 结果无法运行,出现 Attempting netcdf-4 operation on netcdf-3 file STOP 2 再次郁闷! 打开.zshrc, 即打开所用shell的配置文件 gedit .zshrc 在文件后面加上 export NETCDF=/usr/local/ export DYLD_LIBRARY_PATH=$NETCDF/lib:$DYLD_LIBRARY_PATH export LD_LIBRARY_PATH=$NETCDF/lib:$LD_LIBRARY_PATH export PATH=$NETCDF/bin:$PATH 重新启动shell,然后再编译,运行test,得到 0 12 24 36 *** SUCCESS writing example file simple_xy.nc! 大功告成! 备注:以下为各个步骤执行命令的解释: $ ./configure The configuration script will set up the Makefiles that will be used to build the NetCDF libraries and utilities. It will also set up the installation directory for the default location of /usr/local. If you would like to install the libraries in another location, use this configure command: $ ./configure --prefix=/your/desired/install/directory) $ make----Make the libraries When the configuration step completes successfully, you can build the libraries using ‘make’. $ make check-----Testing NetCDF on Linux* You can test your NetCDF libraries using ‘make check’. $ make install------Installing NetCDF on Linux* Install NetCDF libraries using ‘make install’. This will install the NetCDF libraries, include files, and utilities in the default location of /usr/local or the location specified in the configuration step with the --prefix= option References: 1:http://bbs.sciencenet.cn/home.php?mod=spaceuid=237238do=blogid=547593 2: http://blog.sina.com.cn/s/blog_4b1d9e7b0100zg89.html 3:http://blog.sina.com.cn/s/articlelist_1260232315_3_1.html
在网上搜集了最新的在Ubuntu 10.04 上安装iraf 步骤,这里列出来供大家安装iraf参考。 IRAF The version of iraf that we will install is v214. This one, unlike version v212 comes with the ecl terminal which allows autocompletion and using the up key to check previous commands. Okay, so, to begin with, we will install the tcsh package (that's in the universe repository) Code: sudo apt-get install tcsh Next, we make a folder were all of the iraf downloads will go (in order to keep things neat). Please keep yourself in the same terminal: Code: mkdir ~/iraf cd ~/iraf Then, we download the iraf files. These are: as.pcix.gen.gz, the architecture independent files ib.lnux.x86.gz, the linux dependent base files nb.lnux.x86.gz, the linux dependent noao files In the download directions, the v214 folder could be replaced by a more recent version in case it exists: Code: wget http://iraf.noao.edu/iraf/ftp/iraf/v214/PCIX/as.pcix.gen.gz wget http://iraf.noao.edu/iraf/ftp/iraf/v214/PCIX/ib.lnux.x86.gz wget http://iraf.noao.edu/iraf/ftp/iraf/v214/PCIX/nb.lnux.x86.gz Next, I make iraf's directory tree: Code: sudo mkdir -p /iraf/{irafbin/{bin.linux,noao.bin.linux},iraf/local} Next i add the iraf user (this will ask you many things. The only important one is the password, the rest could be left in blank. The user is added at the admin group so he can sudo when installing iraf): Code: sudo adduser iraf --home /iraf/iraf/local --shell /bin/csh --ingroup admin And I move the downloaded files to the /iraf/iraf directory, and grant all permissions on the directories to the iraf user: Code: sudo mv ~/iraf/* /iraf/iraf sudo chown iraf -R /iraf Now I login as the iraf user: Code: su iraf We extract the iraf files: Code: cd ~/irafwget http://hea-www.harvard.edu/RD/ds9/download/linux/ds9.linux.7.2.tar.gztar -zxf ds9.linux.7.2.tar.gzsudo mv ds9 /usr/local/binsudo chmod +x /usr/local/bin/ds9 此时可能对不同的版本修改linux.7.2 And we remove the unneccesary files: Code: rm /iraf/iraf/as.pcix.gen.gz rm /iraf/iraf/ib.lnux.x86.gz rm /iraf/iraf/nb.lnux.x86.gz And we prepare things for the installation (from this point it is essential to keep the same terminal open until the end of the installation): Code: setenv iraf /iraf/iraf cd $iraf/unix/hlib/ source irafuser.csh We first test the install, to do this we run (from the same terminal of the step before): Code: sudo ./install -n Prompting yes to everything should be enough. In any case, the proccess can get stuck in a loop where it asks if it should configure iraf-networking , fail at trying to configure it, and asking again. The error message you should receive is: Code:不进行网络设置就不会有此提示。 Checking that iraf networking is properly enabled ... os.zgtenv: cannot open ‘/usr/include/iraf.h’ *** The NETSTATUS task claims that networking is disabled. *** Please contact site support (iraf@noao.edu) with questions *** or check the Site Manager’s Guide for details on how to *** properly configure networking. To solve this simply say no at this point .在询问是否进行网络设置的时候,建议输入 n 后回车 If the installation test went fine, you can install everything by omitting the -n argument: Code: sudo ./install Having installed iraf successfully, you can exit from the iraf user's shell bi doing (closing the terminal will work too ): Code: exit x11iraf Next we install x11iraf which is needed for irafs graphical support. The version to be installed is 1.3.1, but this could be replaced for a newer one with no problem only by changing the download. We download x11iraf files to our downloads folder: Code: cd ~/iraf wget http://iraf.noao.edu/iraf/ftp/iraf/x11iraf/x11iraf-v1.3.1/x11iraf-v1.3.1-bin.linux.tar.gz We extract it and install it: Code: cat x11iraf-v1.3.1-bin.linux.tar.gz | gunzip | tar -xf - sudo ./install ds9 The proccess is simple, download the file, extract it, and copy and give write permission to the binary. We install with this version 5.6 of ds9, but just as in the other steps, this can easily be updated by changing the download address: Code: cd ~/iraf wget http://hea-www.harvard.edu/saord/download/ds9/linux/ds9.linux.5.6.tar.gz tar -zxf ds9.linux.5.6.tar.gz sudo mv ds9 /usr/local/bin sudo chmod +x /usr/local/bin/ds9 Start-up script For convenience, we will make a start-up script (created by michael hutchinson http://mjhutchinson.com/ ) that will open an xgterm with an ecl promt and ds9. We use gedit or this, but any text editor (for example kate in kde or vim) could be used: Code: sudo gedit /usr/local/bin/irafshell And next we add this to the file: Code: #!/bin/bash PID=`pidof ds9` if ; then ds9 fi pushd ~/iraf /dev/null xgterm -iconic -geometry 80x24 -sb -title IRAF -bg black -fg green -e ecl popd /dev/null Here, the -bg and -fg options indicate respectively background and font colors for the xgterm where iraf will be run. Some of the available colors are lemon chiffon, black, darkslategrey, linen, red, green, blue, cyan, yellow, purple, magenta and slategray. I personally prefer the black on green layout... Then, add execution permission to the script: Code: sudo chmod +x /usr/local/bin/irafshell With this, iraf can be run just by running the command irafshell. Running iraf First, I clean the ~/iraf folder (THIS COMMAND WILL DELETE EVERYTHING ON THE FOLDER): Code: rm -rf ~/iraf/* to run iraf, we create the login.cl and use irafshell command. When mkiraf asks for terminal type, select xgterm. Code: cd ~/iraf mkiraf irafshell If you get the error xgterm: no available ptys, Then follow this steps (if iraf started correctly, then you dont need to this): Code: wget ftp://iraf.noao.edu/pub/xgterm.fedora sudo mv xgterm.fedora /usr/local/bin/xgterm sudo chmod +x /usr/local/bin/xgterm ----------------------------------------------------------------------------------------------------------------------- ds9: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory To find out which package provides (or contains) a certain file in Ubuntu, you can use the apt-file command. First, make sure apt-file is installed. sudo apt-get install apt-file Now, using apt-file is simple enough. apt-file search filename-to-search.for This outputs a list of packages that provide a file named filename-to-search.for , thus allowing you to install the necessary package(s) using apt-get. Real-life answer In your case, you would need to run the following command: apt-file search libXss.so.1 This outputs the following: libxss1: /usr/lib/i386-linux-gnu/libXss.so.1 libxss1: /usr/lib/i386-linux-gnu/libXss.so.1.0.0 libxss1-dbg: /usr/lib/debug/usr/lib/i386-linux-gnu/libXss.so.1.0.0 This indicates that the package you need to install in this specific case is most likely libxss1 . So, to install it, run the following command: sudo apt-get install libxss1 Now, try running DS9 again, and you should find that the error message is now gone. ---------------------------------------------------------------------------------------------------------------------- And now you should be able to run the command irafshell with no problems. Icon! This is a suggestion made by Elias Pizarro. You can download the iraf icon and use it to show an iraf icon in your application list wich will execute the irafshell script. First, download the iraf icon: Code: cd /usr/share/pixmaps/ sudo wget http://iraf.noao.edu/iraf/web/images/iraf.gif Then, create the desktop entry: Code: gedit ~/.local/share/applications/iraf.desktop And add to the file this: Code: Encoding=UTF-8 Version=1.0 Terminal=false Type=Application Categories=Application;Office;Astronomy; Exec=irafshell Name=IRAF Comment=Image reduction and analysis facility Icon=/usr/share/pixmaps/iraf.gif install ,OK! 仅需复制窗口内的命令到终端即可完成安装! References: www.ubuntuforums.org/showthread.php?t=912583 http://hi.baidu.com/feifei_1014/item/058cb2f13db1dd703c198b6c 承蒙协助,谨致谢忱! 2010-08-04于河北兴隆 2014-03-29修改于BNU
PGPLOT working under Linux. Note that this is atwo step procedure: you need to install the graphic library first, and thendefine some environment variables that are needed in order to work comfortablywith PGPLOT. In this sense it is useful to check that the demo programs runproperly. Note that the previous command can take several minutes if the system detectsthe need of installing additional packages. The different versions of the PGPLOT library (libpgplot.* andlibcpgplot.*) are installed under: /opt/local/lib. The X11server is installed in /opt/local/bin/pgxwin_server, whereas auxiliaryfiles (including the demos) are placed under:/opt/local/share/pgplot. After the installation, make sure that the expected environment variables areproperly set (at least PGPLOT_DIR must exist; PGPLOT_DEV isalso quite useful). You can check this by executing: % echo %PGPLOT_DIR % echo %PGPLOT_DEV If the previous environment variables are not set, you can easily define them: % export PGPLOT_DIR=/opt/local/lib % export PGPLOT_DEV=/Xserve It is useful to introduce those definitions in the .bashrc file at thehome directory of the user. Execute any of the demos in order to check that everything is fine: % /opt/local/share/pgplot/examples/pgdemo1 % /opt/local/share/pgplot/examples/pgdemo2 % /opt/local/share/pgplot/examples/pgdemo3 ... Finally, compile your own code. For example, is gfortran was thefortran compiler employed to install PGPLOT, the following commandshould work: % gfortran -o outputFileName inputFotranFile.f -L/opt/local/lib -lpgplot-lX11 Note that you should use the same fortran compiler to install PGPLOT and tocompile your own files.In the above example the X11 library was assumed to be installed in/opt/local/lib. If this is not the case, include an extra-L/directory_path_to_libX11 in the compilation command before-lpgplot. (Mac users may find also useful the instructions provided by BenjaminWeiner ) Linux usersIn Linux I always download the original source code of PGPLOT from its homepage , and install the package manually (at the time of writting thesenotes, the latest version is pgplot5.2.tar.gz ).For this to work properly, theappropriate X11 files must be available in your machine. I also installgfortran as the Fortran compiler. Both tasks can be performed executing: Fedora: % sudo yum install libX11-devel % sudo yum install gcc-gfortran Ubuntu: % sudo apt-get install xorg-dev % sudo apt-get install gfortran CentOS: % sudo yum install libX11-devel % sudo yum install gcc-gfortran OpenSUSE: % sudo zypper install xorg-X11-devel % sudo zypper install gcc-fortran Debian: % sudo apt-get install libX11-dev % sudo apt-get install gfortran In order to install PGPLOT, I follow (with a minor but important modification:the use of gfortran instead of g77) the instructions given by T.J. Pearson toinstall this library under Linux, which can be summarized as follows: Download the distribution file pgplot5.2.tar.gz Decompress and extract the contents of the distribution file in a source directory. In this sense, I always place pgplot5.2.tar.gz under /usr/local/src. Note that for this opperation it is probably required that you have root privileges, unless you have write access to the directories.You can either log in as root (using su in Fedora and CentOS, or using sudo su in Ubuntu), or use sudo in front of the following commands: % cd /usr/local/src % mv ~/Downloads/pgplot5.2.tar.gz . % tar zxvf pgplot5.2.tar.gz The last command will create /usr/local/src/pgplot and subdirectories. Create the directory where PGPLOT will be actually installed: % mkdir /usr/local/pgplot % cd /usr/local/pgplot Copy the file drivers.list from the source directory to the installation directory: % cp /usr/local/src/pgplot/drivers.list . Edit that file and remove the exclamation mark (first column of each row) in front of the following graphic devices: /PS, /VPS, /CPS, /VCPS and /XServe. The resulting file is also available here: drivers.list . Create the makefile. From the installation directory /usr/local/pgplot execute: % /usr/local/src/pgplot/makemake /usr/local/src/pgplot linux g77_gcc_aout Edit the file makefile and change the line: FCOMPL=g77 by FCOMPL=gfortran Compile the source files: % make % make cpg % make clean Setting environment variables % sudo gedit ~/.bashrc ; add the following code : PATH=/usr/local/PGPLOT/bin:$PATH PGPLOT_DIR=/usr/local/pgplot/;export PGPLOT_DIR LD_LIBRARY_PATH=/usr/local/pgplot/;export LD_LIBRARY PGPLOT_FONT=/usr/local/pgplot/grfont.dat ;export PGPLOT_FONT PGPLOT_DEV=/xwine;export PGPLOT_DEV PGPLOT_LIB=-L /usr/X11R6/lib -lX11 -L /usr/local/pgplot/ -lpgplot;export PGPLOT_LIB % source .bashrc After the installation, make sure that the expected environment variables areproperly set (at least PGPLOT_DIR must exist; PGPLOT_DEV isalso quite useful): % export PGPLOT_DIR=/usr/local/pgplot % export PGPLOT_DEV=/Xserve It is useful to introduce those definitions in the .bashrc file at thehome directory of the user. Execute any of the demos in order to check that everything is fine: % /usr/local/pgplot/pgdemo1 % /usr/local/pgplot/pgdemo2 % /usr/local/pgplot/pgdemo3 ... Finally, compile your own code. For example, is gfortran was thefortran compiler employed to install PGPLOT, the following commandshould work: % gfortran -o outputFileName inputFotranFile.f -L/usr/local/pgplot-L/usr/X11/lib -lpgplot -lX11 Note that you should use the same fortran compiler to install PGPLOT and tocompile your own files.In the above example the X11 library was assumed to be installed in/usr/X11/lib. If this is not the case, include the actual directoryusing -L/directory_path_to_libX11 in the compilation instead of-L/usr/X11/lib above. 另X11下载地址(X11R6版本):http://pan.baidu.com/s/1mWT9K 或者 http://ftp.vim.org/pub/OpenBSD/2.2/pmax/X11/X11R6.tar.gz 参考地址: http://pendientedemigracion.ucm.es/info/Astrof/software/howto/howto-pgplot.html 2013-10-09 于BNU