#= INSTALL guide of deepconv/arare
#
# Authors:: SUGIYAMA Ko-ichiro, ODAKA Masatsugu
# Version:: $Id: INSTALL,v 1.12 2009-03-10 14:27:17 yamasita Exp $
# Tag Name: $Name: arare4-20100306 $
# Copyright:: Copyright (C) GFD Dennou Club, 2006. All rights reserved.
# License:: See COPYRIGHT[link:COPYRIGHT]
#
########################################################################
#
=begin JA

= deepconv/arare 󥹥ȡ

#*  ̰ϯ,  ,  ã
#  * 2009/03/06  ( ã) ǽ
#  * 2008/01/17  ( ) ǽ
#  * 2007/10/19  ( ) ǽ
#  * 2006/10/30  ( ) ǽ
#  * 2006/09/29  ( ) ǽ
#  * 2006/09/20  ( ) ǽ
#  * 2006/09/12  ( ) ǽ
#  * 2006/03/16  ( ̰ϯ) ǽ
#  * 2005/04/26  ( ) ǽ
#  * 2005/04/22  ( ̰ϯ) ǽ
#  * 2005/04/19  ( ̰ϯ) 
#  * 2005/01/31  ( ) 

(1) ((<ưĶ>))
(2) ((<ѥɬפʥեȥ>))
(3) ((<󥹥ȡμ>))
(4) ((<ĥ꡼ʲμפʥեȥǥ쥯ȥ>))

=end JA

=begin EN

= Deepconv/arare installation guide

#* Ko-ichiro Sugiyama, Masatsugu Odaka, Tatsuya Yamashita
#  * 2009/03/06  (Tatsuya Yamashita) Update
#  * 2007/10/19  (Masatsugu Odaka) Update
#  * 2006/10/30  (Masatsugu Odaka) Update
#  * 2006/09/29  (Masatsugu Odaka) Update
#  * 2006/09/20  (Masatsugu Odaka) Update
#  * 2006/09/12  (Masatsugu Odaka) Update
#  * 2006/03/16  (Ko-ichiro Sugiyama) Update
#  * 2005/04/26  (Masatsugu Odaka) Update
#  * 2005/04/22  (Ko-ichiro Sugiyama) Update
#  * 2005/04/19  (Ko-ichiro Sugiyama) Update
#  * 2005/01/31  (Masatsugu Odaka) Initial release

(1) ((<Supported system>))
(2) ((<Required softwares>))
(3) ((<Installation>))
(4) ((<Major files and directories in source tree>))


=end EN

=begin JA

== ưĶ

2009 ǯ 03  06 , ʲδĶǤưǧƤޤ.

=== Linux on x86

 * Debian GNU/Linux 5.0 (lenny) + g95 + LAPACK + mpich2

 * Debian GNU/Linux 5.0 (lenny) + ifort (ver.11.0) + lapack + mpich2

 * Debian GNU/Linux 4.0 (etch) + 
   ((<FQS Fortran90|URL:http://software.fujitsu.com/jp/fortranc/>)) (ver.5) 
   + LAPACK	

 * Debian GNU/Linux 4.0 (etch) + g95 + LAPACK

=== Mac OS on Intel Mac

 * Mac OS 10.5 + g95 + LAPACK

=== 緿׻

 * CRAY XT4 + PGI compiler + LAPACK
 * Ω SR11000 + ΩŬ Fortran + LAPACK/MATRIX
 * NEC SX6 + sxf90 + LAPACK
 * NEC SX8 + sxf90 + LAPACK

=end JA
=begin EN
== Supported system

Deepconv can be compiled and run on following platforms (2009-03-06).

=== Linux on x86

 * Debian GNU/Linux 5.0 (lenny) + g95 + LAPACK + mpich2

 * Debian GNU/Linux 5.0 (lenny) + ifort (ver.11.0) + LAPACK + mpich2

 * Debian GNU/Linux 4.0 (etch) + 
   ((<FQS Fortran90|URL:http://www.fqs.co.jp/fort-c/>)) (ver.5) 
   + LAPACK	

 * Debian GNU/Linux 4.0 (etch) + g95 + LAPACK

=== Mac OS on Intel Mac

 * Mac OS 10.5 + g95 + LAPACK

=== Super Computer System 

 * CRAY XT4 + PGI compiler + LAPACK
 * HITACHI SR11000 + HITACHI Optimized Fortran + LAPACK/MATRIX
 * NEC SX6 + sxf90 + LAPACK
 * NEC SX8 + sxf90 + LAPACK

=end EN

=begin JA
== ѥɬפʥեȥ

deepconv/arare 򥤥󥹥ȡȼ¹ԤˤϰʲΥեȥ˥󥹥ȡ
Ƥɬפޤ. 


: ((<netCDF|URL:http://www.unidata.ucar.edu/software/netcdf/>)) (С 3.6.x)

  饳ѥ뤹
  * ((< TGZ|URL:http://www.gfd-dennou.org/library/netcdf/unidata-mirror/>))

    [((<Unidata ܲ NetCDFå󥹥ȡ륬 (Ѹ) |URL:http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-install/Quick-Instructions-for-Installing-NetCDF-on-Unix.html#Quick-Instructions-for-Installing-NetCDF-on-Unix>))]

    [((<Unidata ܲȤΥ󥹥ȡ륬ɤܼ|URL:http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-install/index.html>))]
  
#  Debian GNU/Linux ѤƤ,  ХʥѥåѤ
#
#  * debian ѥå
#    [((<FQS Fortran90 ver5|URL:http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou/netcdf/>)) |
#    ((<Intel ifc ver9|URL:http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou/netcdf/>)) |
#    ((<g95|URL:http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou/netcdf-g95/>))]

#    嵭 deb ѥå¾ netCDF  Development kit 
#    (netcdfg-dev ѥå) ⥤󥹥ȡ뤹ɬפޤ.

: ((<gtool5 饤֥|URL:http://www.gfd-dennou.org/library/gtool/>))

  饳ѥ뤹
  * ((<gtool5 TGZ|URL:http://www.gfd-dennou.org/library/gtool/gtool5/gtool5_current.tgz>))
    [((<󥹥ȡ륬ɤܼ|URL:http://www.gfd-dennou.org/library/gtool/gtool5/gtool5_current/INSTALL.htm>))]

#  Debian GNU/Linux ѤƤ, 
#  ХʥѥåѤ
#
#  * debian ѥå 
#    [((<URL:http://www.gfd-dennou.org/library/gtool/debian.htm>))]



: LAPACK/BLAS

  饳ѥ뤹
  * ((<LAPACK  TGZ|URL:http://www.netlib.org/lapack/>)) 
  * ((<BLAS  TGZ|URL:http://www.netlib.org/blas/>)) 

#  Debian GNU/Linux ѤƤ, 
#  ХʥѥåѤ
#
#  * debian ѥå 
#    [((<FQS Fortran90 ver5 |URL:http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou/lapack-ffc5/sarge/>))
#    |
#    ((<g95 |URL:http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou/lapack-g95/sarge/>))]


== ɥȤΥѥɬפʥեȥ

deepconv/arare ΥɥȤ, ǥΥǥ LaTex,  
ɥե󥹤 RD, RDOC (Ruby Document) ѤƵҤƤޤ.

ΥɥȤϥĥ꡼ǤϥѥѤȤʤäƤޤ,
ɥȤκƥѥԤˤ, ʲΥեȥɬפǤ.

* LaTeX ȤΥե
  * ASCII pTeX ʤ
  * dennou-sty-6 ((<"http://www.gfd-dennou.org/library/cc-env/TeXmacro/dennou/"|URL:http://www.gfd-dennou.org/library/cc-env/TeXmacro/dennou/>))
  * dennou-sty-6 б latex2html ((<"http://www.gfd-dennou.org/library/cc-env/latex2html/"|URL:http://www.gfd-dennou.org/library/cc-env/latex2html/>))

* ruby/rd
  * rdtool ((<"http://raa.ruby-lang.org/project/rdtool/"|URL:http://raa.ruby-lang.org/project/rdtool/>))
  * rd2html-ext ((<"http://raa.ruby-lang.org/project/rd2html-ext/"|URL:http://raa.ruby-lang.org/project/rd2html-ext/>))
  * ((<"RDOC Fortran90/95 ɲϵǽ"|URL:http://www.gfd-dennou.org/library/dcmodel/rdoc-f95/>)) 


Debian GNU/Linux Ѥ, ʲΥХʥѥåɬפȤʤޤ.
* librd-html-ext-ruby1.8
* rdtool
* rdoc 
* ((<rdoc-f95|URL:http://www.gfd-dennou.org/library/dcmodel/rdoc-f95/debian/>))
* ((<dennou-sty-6|URL:http://www.gfd-dennou.org/library/cc-env/TeXmacro/dennou/>))

=end JA
=begin EN

== Required softwares

: ((<netCDF|URL:http://www.unidata.ucar.edu/software/netcdf/>)) (version 3.6.x)

  For user who builds binary from source archive
  * ((<TGZ file of netCDF|URL:http://www.gfd-dennou.org/library/netcdf/unidata-mirror/>))

    [((<NetCDF quick installation guide|URL:http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-install/Quick-Instructions-for-Installing-NetCDF-on-Unix.html#Quick-Instructions-for-Installing-NetCDF-on-Unix>))]

    [((<Index of installation guide|URL:http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-install/index.html>))]

  
  For Debian GNU/Linux users
  * debian packages
    [((<compiled by FQS Fortran90 ver5|URL:http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou/netcdf/sarge/>)) |
    ((<compiled by Intel ifc ver9|URL:http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou/netcdf/sarge/>)) |
    ((<compiled by g95|URL:http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou/netcdf-g95/sarge/>))]

    In addition to these package, netCDF development kit packages (netcdfg-dev)
    is also required.


: ((<gt4f90io|URL:http://www.gfd-dennou.org/library/gtool/>))

  For user who builds binary from source archive
  * ((<TGZ file of gt4f90io|URL:http://www.gfd-dennou.org/library/gtool4/gt4f90io/gt4f90io_current.tgz>))
    [((<Index of installation guide|URL:http://www.gfd-dennou.org/library/gtool4/gt4f90io/gt4f90io_current/INSTALL.htm>))]

  For Debian GNU/Linux 3.1 (sarge) users
  * debian package [((<URL:http://www.gfd-dennou.org/library/gtool4/debian.htm.en>))]



: LAPACK/BLAS

  For user who builds binary from source archive
  * ((<TGZ file of LAPACK|URL:http://www.netlib.org/lapack/>)) 
  * ((<TGZ file of BLAS |URL:http://www.netlib.org/blas/>)) 

  For Debian GNU/Linux 3.1 (sarge) users
  * debian package 
    [((<compiled by FQS Fortran90 ver5|URL:http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou/lapack-ffc5/sarge/>))
    |
    ((<compiled by g95|URL:http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou/lapack-g95/sarge/>))]


== Required softwares to build documentation 

Documentations of deepconv/arare are written by using LaTex, RD, and RDOC (Ruby Document). 

All documentations in source tree are already compiled. If you recompile 
documentations, following softwares are requaired.

* LaTeX and style files
  * ASCII pTeX 
  * dennou-sty-6 ((<"http://www.gfd-dennou.org/library/cc-env/TeXmacro/dennou/"|URL:http://www.gfd-dennou.org/library/cc-env/TeXmacro/dennou/>))
  * latex2html with dennou-sty-6 style((<"http://www.gfd-dennou.org/library/cc-env/latex2html/"|URL:http://www.gfd-dennou.org/library/cc-env/latex2html/>))

* ruby/rd
  * rdtool ((<"http://raa.ruby-lang.org/project/rdtool/"|URL:http://raa.ruby-lang.org/project/rdtool/>))
  * rd2html-ext ((<"http://raa.ruby-lang.org/project/rd2html-ext/"|URL:http://raa.ruby-lang.org/project/rd2html-ext/>))
  * ((<"Enhanced version of RDoc Fortran 90/95 parser"|URL:http://www.gfd-dennou.org/library/dcmodel/rdoc-f95/>)) 


If you use Debian GNU/Linux on x86, followng packages are required:
* librd-html-ext-ruby1.8
* rdtool
* rdoc 
* ((<rdoc-f95|URL:http://www.gfd-dennou.org/library/dcmodel/rdoc-f95/debian/>))
* ((<dennou-sty-6|URL:http://www.gfd-dennou.org/library/cc-env/TeXmacro/dennou/>))

=end EN

=begin JA
== 󥹥ȡμ

=== 

wget ʤɤǥ

  $ wget http://www.gfd-dennou.org/library/deepconv/arare/arare4_current.tgz

=== tgz եŸ, ǥ쥯ȥؤΰư

  $ tar -xzvf arare4_current.tgz
  $ cd arare4-YYYYMMDD


=== Ķѿ

ѥꤹ. 

  $ export FC=(ѥ̾)

㤨 g95 ξ, 

  $ export FC=g95

Ȥ. 
׻Ԥˤ 

  $ export FC=mpif90

Ȥ.


=== Mkinclude κ

Ÿ, configure ¹Ԥ Mkinclude ե.

  $ ./configure \
    --with-netcdf=(netCDF 饤֥եХѥ) \	
    --with-gtool5=(gtool5 饤֥եХѥ) \
    --with-lapack=(LAPACK 饤֥եХѥ) \
    --with-blas=(BLAS 饤֥եХѥ) 

㤨 Debian ѥåѤƤ, 

  $ ./configure \
    --with-netcdf=/usr/lib/libnetcdf-g95.a \
    --with-gtool5=/usr/lib/gtool5-g95/lib/libgtool5.a \
    --with-lapack=/usr/lib/liblapack-g95.a \
    --with-blas=/usr/lib/libblas-g95.a

Ȥɤ.

׻Ԥˤ, gtool5  mpif90 ǥѥ뤷Ƥ.


ǥեȤǤ׻饤֥Ȥ LAPACK  BLAS Ѥ褦
ʤäƤ. ¾Υ饤֥Ѥ, Ķѿ LINSOLV 
ꤷ, ʲΤ褦˼¹Ԥ.

  $ LINSOLV=(׻饤֥̾) ./configure \
    --with-netcdf=(netCDF 饤֥եХѥ) \	
    --with-gtool5=(gtool5 饤֥եХѥ) \
    --with-library=(Ѥ׻饤֥եХѥ) 

 Mkinclude γƥޥǧ, 󥹥ȡδĶˤ碌
ŬԽ.

  ) 2009 ǯ 03  11 , LAPACK, BLAS ʳ׻饤֥
  ȤѲǽʤΤ, HITACHI SR11000 ˥󥹥ȡ뤵Ƥ 
  MATRIX Ǥ. Ѥ LINSOLV=matrix ꤹ.


=== Υѥ

ѥ GNU make ѤƹԤ. 
	
==== 2 ׻Ԥʤ

: (1) ༡

ĥ꡼ľ

        $ make

¹ԤȥľΰʲΥǥ쥯ȥ˼¹ԥեȥ饤֥,
⥸塼ե뤬Ÿ.

	./lib		饤֥ libarare.a Ǽ
	./bin		¹ԥե뤬Ǽ
	./include	Ƽ *.mod ե뤬Ǽ

bin ʲˤϼμ¹ԥե뤬Ǽ.

	arare           2 ήǥ
	arare_jupiter   2 ήǥ(βȿθ)
	randomset	ꥳޥ (2 ǥ)

: (2) ༡( 2 ʬŷήη׻Ԥʤ)

ĥ꡼ľ

        $ make mmc

¹ԤȥľΰʲΥǥ쥯ȥ˼¹ԥեȥ饤֥,
⥸塼ե뤬Ÿ.

	./lib		饤֥ libarare.a Ǽ
	./bin		¹ԥե뤬Ǽ
	./include	Ƽ *.mod ե뤬Ǽ

bin ʲˤϼμ¹ԥե뤬Ǽ.

	arare           2 ήǥ()
	randomset	ꥳޥ (2 ǥ)


: (3) 

ĥ꡼ľ

        $ make mpi

¹ԤȥľΰʲΥǥ쥯ȥ˼¹ԥեȥ饤֥,
⥸塼ե뤬Ÿ.

	./lib		饤֥ libarare.a Ǽ
	./bin		¹ԥե뤬Ǽ
	./include	Ƽ *.mod ե뤬Ǽ

bin ʲˤϼμ¹ԥե뤬Ǽ.

	ararempi        2 ήǥ(mpi )
	randomset	ꥳޥ (2 ǥ)


==== 3 ׻Ԥʤ

ĥ꡼ľ

        $ make 3d

¹ԤȥľΰʲΥǥ쥯ȥ˼¹ԥեȥ饤֥,
⥸塼ե뤬Ÿ.

	./lib		饤֥ libarare.a Ǽ
	./bin		¹ԥե뤬Ǽ
	./include	Ƽ *.mod ե뤬Ǽ

bin ʲˤϼμ¹ԥե뤬Ǽ.

	arare_3d        3 ήǥ(絤)   2009 ǯ 03  11 , ȯ.
	arare_3d_dry    3 ήǥ(絤)
	randomset_3d	ꥳޥ (3 ǥ)




=== ɥȤΥѥ

==== 󥹥ȡμ, Ѥμȥɥե

	$ make doc  

==== ǥΥǥ

	$ make latex2html


=end JA
=begin EN

== Installation 

=== Setting of environment variable

Set an environment variable of a compiler.

  $ export FC=(compiler name)

=== Make Mkinclude file

Execute configure script at the top directory of source tree.

  $ ./configure \
    --with-netcdf=(netCDF library file) \	
    --with-gtool5=(gtool5 library file) \
    --with-lapack=(LAPACK library file) \
    --with-blas=(BLAS library file) 

If you want to use other library of linear algebra, 
specify the library name to LINSOLV and execute configure script as follows.

  $ LINSOLV=(Name of the linear algebra library) ./configure \
    --with-netcdf=(netCDF library file) \	
    --with-gtool5=(gtool5 library file) \
    --with-library=(Linear algebra library file) 


And the confirm Mkinclude and modify suitable for your platform.

  Note) Supported linear algebra library except for LAPACK/BLAS is 
  only MATRIX on HITACHI SR11000. In this case, specify LINSOLV="matrix". 


=== Compile

Execute "make" command at the top directory of source tree.

	$ make 
  

=== Compile documentation file 

Execute "make doc" at the top directory of source tree to build
installation guide, code reference and tutorial.

	$ make doc  

Execute "make latex2html" at the top directory of source tree to build
html documentation file of physical model and discritization method.

	$ make latex2html


=end EN

=begin JA
== 󥤥󥹥ȡμ

src ǥ쥯ȥʲΥ֥ȥե, ¹ԥեξõ

	$ make clean

Ȥ.

󥹥ȡμ, Ѥμȥɥե󥹤ξõ

	$ make clean.doc

Ȥ. ǥΥǥξõ

	$ make clean.latex2html

Ȥ. 


	$ make clean.all

Ȥ, 嵭Τ٤Ƥ Mkinclude ե뤬õ.

=end JA
=begin EN
== Uninstall

Execute "make clean" to remove binary files.

	$ make clean

Execute "make doc" at the top directory of source tree to remove
installation guide, code reference and tutorial.

	$ make clean.doc

Execute "make latex2html" at the top directory of source tree to remove
html documentation file of physical model and discritization method.

	$ make clean.latex2html

All of them and Mkinclude are removed by "make clean.all". 

	$ make clean.all

=end EN

=begin JA
== ĥ꡼ʲμפʥեȥǥ쥯ȥ

   COPYRIGHT	 饤
   INSTALL.rd	 󥹥ȡ
   Makefile	 Makefile
   Mkinclude	 Makefile  include ե (configure )

   arare-earth.conf	ץ NAMELIST ե(ϵ)
   arare-jupiter.conf	ץ NAMELIST ե(, С 1)
   arare-jupiter2.conf	ץ NAMELIST ե(, С 2)
   arare-mmc.conf	ץ NAMELIST ե(ή)
   arare_3d.conf	ץ NAMELIST ե(3 )

   bin/		 ¹ԥեǼǥ쥯ȥ (ѥ˺)
   css/		 륷ȳǼǥ쥯ȥ
   doc/		 ɥȳǼǥ쥯ȥ
      dai1bu/	 ǥǼǥ쥯ȥ
      dai2bu/	 ΥǥǼǥ쥯ȥ
      code_reference/	 ɥե󥹳Ǽǥ쥯ȥ
   include/	 ⥸塼Ǽǥ쥯ȥ (ѥ˺)
   lib/		 饤֥Ǽǥ쥯ȥ (ѥ˺)
   src/		 ɳǼǥ쥯ȥ
       Makefile  Makefile
       chemdat/  ؼλꤪʪͤȷ׻
       dynamic/  ϳز
       env/      ܾȾν
       io/       
       main/     ץ, , ̤η׻
       moist/    ʪ
       physics/  ʪ
       setup/    
       util/     ʿʬ黻, ׻벼׻

   src-mmc/	 ɳǼǥ쥯ȥ(ή)
       Makefile  Makefile
       chemdat/  ؼλꤪʪͤȷ׻
       dynamic/  ϳز
       env/      ܾȾν
       io/       
       main/     ץ, , ̤η׻
       moist/    ʪ
       physics/  ʪ
       setup/    
       util/     ʿʬ黻, ׻벼׻

   sysmake/      Mkinclude Υƥץ졼֤ (ѻͽ)
       Mkinclude.ffc  ffc ѤΥƥץ졼
       Mkinclude.g95  g95 ѤΥƥץ졼

   tools/	Ϥ䳨Τ˻Ȥġ뷲

=end JA
=begin EN

== Major files and directories in source tree

   COPYRIGHT	 Licence file
   INSTALL.rd	 This file
   Makefile	 Makefile
   Mkinclude	 Include file for Makefile (made by configure script)

   arare-earth.conf	Sample of NAMELIST file (for the Earth)
   arare-jupiter.conf	Sample of NAMELIST file (for Jupiter, Version 1)
   arare-jupiter2.conf	Sample of NAMELIST file (for Jupiter, Version 2)
   arare-mmc.conf	Sample of NAMELIST file (for the Martian Moist Convection)
   arare_3d.conf	Sample of NAMELIST file (for 3D)

   bin/		 Binary file directory
   css/		 CSS file directory
   doc/		 Documentation directory
      dai1bu/	 Documentation of physical model 
      dai2bu/	 Documentation of method of discritization
      code_reference/	 Code reference
      tutorial/  Tutorial
   include/	 Mod file directory
   lib/		 Library file directory
   src/		 Source code directory
       Makefile  Makefile
       chemdat/  Setup for chemical data
       dynamic/  Dynamical process
       env/      Setup for initial condition
       io/       Input/Output
       main/     Main program
       moist/    Moist process
       physics/  Physical processes
       setup/    Initial setup
       util/     Low level routines

   src-mmc/		 Source code directory for calculation of Martian Moist Convection
       Makefile  Makefile
       chemdat/  Setup for chemical data
       dynamic/  Dynamical process
       env/      Setup for initial condition
       io/       Input/Output
       main/     Main program
       moist/    Moist process
       physics/  Physical processes
       setup/    Initial setup
       util/     Low level routines

   sysmake/      Mkinclude template-file directory (obsolete)
       Mkinclude.ffc  for FQS Fortran90 compiler on Linux
       Mkinclude.g95  for g95

   tools/	 Tools for draw figure and analysis


=end EN

