#
# gt4f90io Installation Guide in RD (Ruby Document) format
#
#   For instruction of installing gt4f90io, see "INSTALL.htm.en"
#   (written in English) or  "INSTALL.htm" (written in Japanese)
#   included in "gt4f90io" TGZ package available from
#   http://www.gfd-dennou.org/arch/gt4f90io.
#   Otherwise, see this file directly, or generate
#   above mentioned html files with "make guide" 
#   in current directory after installing  rdtool
#   <http://www2.pos.to/~tosh/ruby/rdtool/>.

=begin TOPLINK
[((<English|URL:INSTALL.htm.en>)) |
((<Japanese|URL:INSTALL.htm>))]
[((<GFD Dennou Club|URL:http://www.gfd-dennou.org>)) |
((<Gtool4 Project|URL:http://www.gfd-dennou.org/arch/gtool4>))]
=end TOPLINK

=begin JA

= gt4f90io CXg[KCh
* X  (morikawa), Lc pi (toyoda),  k (odakker)
  * $Id: INSTALL,v 1.8 2005/06/21 19:22:56 morikawa Exp $

=end JA
=begin EN

= gt4f90io Installation Guide
* Yasuhiro MORIKAWA (morikawa), Eizi TOYODA (toyoda), Masatsugu ODAKA (odakker)
  * $Id: INSTALL,v 1.8 2005/06/21 19:22:56 morikawa Exp $

=end EN

=begin JA
== 

̃vO͈ȉ̊ł̓mFĂ܂.

=end JA

=begin EN
== Operation Environment

This program is operated by following environments.

=end EN

=begin

  * ((<"Debian GNU/Linux 3.0, 3.1 "|URL:http://www.debian.org/      >)) +
    ((<Fujitsu Fortran Version 5.0 (in JAPANESE)|URL:http://www.fqs.co.jp/fort-c/>))

  * ((<"Debian GNU/Linux 3.0, 3.1 "|URL:http://www.debian.org/      >)) +
    ((<Intel Fortran 8.0 (8.0.039ȍ~) |URL:http://www.intel.com/software/products/compilers/flin/>))

  * ((<"Debian GNU/Linux 3.0, 3.1"|URL:http://www.debian.org/      >)) +
    ((<Intel Fortran 8.1     |URL:http://www.intel.com/software/products/compilers/flin/>))

  * ((<"Debian GNU/Linux 3.0, 3.1"|URL:http://www.debian.org/      >)) +
    ((<GNU Fortran 95 (g95)       |URL:http://g95.sourceforge.net/>))

  * NEC SX-6 + FORTRAN90/SX

=end

=begin JA
== o̓t@C`

gt4f90io ͈ȉ̃t@C`T|[g܂.

  * ((<gtool4 netCDF K|URL:doc/data-gt4ncconv.htm>))
    ɏ] netCDF t@C

܂, ȉ̃t@C`T|[gƂȂƍlĂ܂.

  * GrADS iq_f[^
  * GRIB
  * ̑ʂׂ̂nf[^

=end JA

=begin EN
== Input Output Data Format

gt4f90io support following data format.

  * NetCDF file conformed with
    ((<gtool4 netCDF conventions (in JAPANESE)|URL:doc/data-gt4ncconv.htm>))

=end EN


=begin JA
== RpCɕKvȃCu

gt4f90io 𗘗p邽߂ɂ, ȉ̃\tgEFA
OɃCXg[ĂKv܂.

* ((<netCDF|URL:http://www.gfd-dennou.org/arch/netcdf>))
  (o[W 3.5.0, 3.6.0)
  * ((<3.6.0  TGZ|URL:http://www.gfd-dennou.org/arch/netcdf/unidata-mirror/netcdf-3.6.0-p1.tar.gz>)),
    deb pbP[W [((<Fujitsu ver5, ssl2|URL:http://www.gfd-dennou.org/arch/spmodel/debian/spml/sarge/spml-ssl2-ffc5_0.3.0-10_i386.deb>)) |
    ((<Intel ver8.1, lapack|URL:http://www.gfd-dennou.org/arch/spmodel/debian/spml/sarge/spml-lapack-ifc8.1_0.3.0-10_i386.deb>))]

  * CXg[KCh
    * [((<Unidata { NetCDFNCbNCXg[KCh (p) |URL:http://my.unidata.ucar.edu/content/software/netcdf/docs/netcdf-install/Quick-Instructions-for-Installing-NetCDF-on-Unix.html#Quick-Instructions-for-Installing-NetCDF-on-Unix>))
      |
      ((<({)|URL:./INSTALL_netcdf.htm>)) ]
      * [((<Unidata {Ƃ̃CXg[KCh̖ڎ|URL:http://my.unidata.ucar.edu/content/software/netcdf/docs/netcdf-install/index.html>))]

netCDF  Debian pbP[WCXg[ꍇ, ((* netcdfg-dev *))
pbP[WKvɂȂ܂. (apt-get œł͂ł).

hLg𐶐邽߂ɂ͈ȉ̃\tgEFA
OɃCXg[ĂKv܂. ,
((<gt4f90io  TGZ pbP[W|URL:http://www.gfd-dennou.org/arch/gtool4/gt4f90io/gt4f90io_current.tgz>))
肷ꍇɂ͊ɐς݂ł.

* ((<ruby|URL:http://www.ruby-lang.org/>))
* ((<rdtool|URL:http://www2.pos.to/~tosh/ruby/rdtool/ja/>))
#* ((<rdoc|URL:http://rdoc.sourceforge.net/>))
#* ((<rd2latex-lib|URL:http://shugo.net/archive/rd2latex/>))

=end JA
=begin EN

== Libraries needed for compile

To use gt4f90io, following softwares should be installed.

* ((<netCDF|URL:http://my.unidata.ucar.edu/content/software/netcdf/index.html>))
  (version 3.5.0 or 3.6.0)
  * ((<Version 3.6.0 TGZ|URL:http://www.gfd-dennou.org/arch/netcdf/unidata-mirror/netcdf-3.6.0-p1.tar.gz>)),
    deb package [((<Fujitsu ver5|URL:http://www.gfd-dennou.org/arch/spmodel/debian/netcdf/sarge/netcdf-ffc5_3.6.0-2_i386.deb>)) |
    ((<Intel ver8.1|URL:http://www.gfd-dennou.org/arch/spmodel/debian/netcdf/sarge/netcdf-ifc8.1_3.6.0-p1-1_i386.deb>))]

  * Installation Guide
    * [((<Quick Instructions for Installing (Unidata)|URL:http://my.unidata.ucar.edu/content/software/netcdf/docs/netcdf-install/Quick-Instructions-for-Installing-NetCDF-on-Unix.html#Quick-Instructions-for-Installing-NetCDF-on-Unix>))]
      * [((<NetCDF Installation and Porting Guide (Unidata)|URL:http://my.unidata.ucar.edu/content/software/netcdf/docs/netcdf-install/index.html>))]

If you use above Debian package to install netCDF, you need
((* "netcdfg-dev" *)) package too. (Parhaps you can get by "apt-get").

Following softwares should be installed for generating documentations.
But, if you get from
((<gt4f90io TGZ package|URL:http://www.gfd-dennou.org/arch/gtool4/gt4f90io/gt4f90io_current.tgz>)),
documentations are already generated.

* ((<ruby|URL:http://www.ruby-lang.org/>))
* ((<rdtool|URL:http://www2.pos.to/~tosh/ruby/rdtool/en/>))
#* ((<rdoc|URL:http://rdoc.sourceforge.net/>))
#* ((<rd2latex-lib|URL:http://shugo.net/archive/rd2latex/>))

=end EN


=begin JA
== RpC̎
=end JA
=begin EN
== Compile source code
=end EN

=begin JA
=== TGZ pbP[W̓WJ

KȍƃfBNgŃ\[XA[JCuWJ܂.
\[X gt4f90io-((|o[W|)) ƂfBNgɓWJ܂.

	$ tar xvzf gt4f90io-current.tgz

=end JA
=begin EN
=== Extract TGZ Package

Make an empty directory, and extract archive.
A directory `gt4f90io-((|version|))'
created at the current working directory.

	$ tar xvzf gt4f90io-current.tgz

=end EN


=begin JA
=== Fortran RpC̎w

ϐ ((* FC *)) Ɏgp Fortran RpCw肵Ă.
ȉ, pRpC frt ̏ꍇł.

* sh, bash ̏ꍇ

	$ export FC=frt

* csh, tcsh ̏ꍇ

	$ setenv FC frt

œKfobÔ߂̃IvV͊ϐ ((* FFLAGS *))
ɐݒ肵Ă. ȉ frt ̍
񉻂̂߂̃IvVł.

* sh, bash ̏ꍇ

	$ export FFLAGS="-Kfast,parallel"

* csh, tcsh ̏ꍇ

	$ setenv FFLAGS "-Kfast,parallel"

=end JA
=begin EN
=== Specify Fortran Compiler

Specify Fortran compiler to environmental variable ((* FC *)).
For example, if you use "frt",

* sh, bash

	$ export FC=frt

* csh, tcsh

	$ setenv FC frt

Specify Fortran compiler options for optimization and debug to
environmental variable ((* FFLAGS *)).
For example, if you set options for automatic optimization and
automatic parallelization to "frt",

* sh, bash

	$ export FFLAGS="-Kfast,parallel"

* csh, tcsh

	$ setenv FFLAGS "-Kfast,parallel"

=end EN


=begin JA
=== Config.mk ̍쐬

WJꂽfBNgɈړ, (({ ./configure }))s܂.
(({ --with-netcdf= })) ɂ netcdf CũpXw肵܂.
(ȉ̗ /usr/local/netcdf/lib/libnetcdf.a ɃCu
ꍇ̂̂ł).
̃R}hɂ (({ Config.mk })) t@C܂.

	$ ./configure --with-netcdf=/usr/local/netcdf/lib/libnetcdf.a

(({ Config.mk })) t@CƓ, (({config.cache}))
t@C쐬, IvV̏񂪕ێ܂.
I (({config.cache})) ǂݍ܂邽, ēx (({ ./configure }))
ۂ͑ÕIvVp܂. OȑÕIvVݒ
jꍇɂ͈ȉ̃R}hpĂ.

    $ make distclean

Debian GNU/Linux  Fujitsu Fortran 𗘗pĂꍇɂ,
Config.cache.debian-ffc*  (({config.cache})) Ɉړ
(({ ./configure })) R}hs邾ŎI
Cüʒuݒ肳܂.

    $ cp Config.cache.debian-ffc5 config.cache
    $ ./configure


Ȃ, CXg[RpC̃IvVύXꍇ,
ȉ̂悤 (({ --help })) IvV邱Ƃ,
w\ȃIvVXg\܂.

	$ ./configure --help

ȃIvVɊւĂ̐ł.

:(({--with-netcdf=}))((|ARG|))
  ((|ARG|))  ((<RpCɕKvȃCu>)) 
  netCDF Cuw肵܂. KIɎw肷Kv܂.

:(({--prefix=}))((|ARG|))
  ((|ARG|)) ɃCu⃂W[, st@C̃CXg[
  fBNg̃vtBbNXw肵܂.
  ftHg (({ /usr/local/gt4f90io })) ł.

:(({--libdir=}))((|ARG|))
  ((|ARG|)) ɃCũCXg[̃fBNgw肵܂.
  ftHg (({ /usr/local/gt4f90io/lib })) ł.

:(({--includedir=}))((|ARG|))
  ((|ARG|)) ɃW[t@C̃CXg[̃fBNg
  w肵܂. ftHg (({ /usr/local/gt4f90io/include })) ł.

:(({--bindir=}))((|ARG|))
  ((|ARG|)) Ɏst@C̃CXg[̃fBNgw肵܂.
  ftHg (({ /usr/local/gt4f90io/bin })) ł.

:(({--with-docdir=}))((|ARG|))
  ((|ARG|)) ɃhLgt@C̃CXg[w肵܂.
  ftHg (({ /usr/local/gt4f90io/doc })) ł.

:(({--with-fc=}))((|ARG|))
  Fortran RpCw肵܂. ϐ $FC D悳܂.
  (({config.cache})) ɐݒ肳ꂽ̂㏑ۂɗpĂ.
  (x (({config.cache}))  Fortran RpCw肳,
  ϐ $FC ͖܂).

:(({--with-fflags=}))((|ARG|))
  Fortran ̃fobOœK̃IvVw肵܂.
  ϐ $FFLAGS w肳ꍇ, ̃IvV
  ^̂܂, SăRpC̃IvVƂĎw肳܂.
  (dɒӂĂ).

:(({--with-gt4libname=}))((|ARG|))
  ((|ARG|))  gt4f90io ̃Cuw肵܂.
  Cu (({lib}))((|<ARG>|))(({.a})) ƂȂ܂.
  ftHg (({ gt4f90io })) ł, ̍ۂ̃Cu
  (({ libgt4f90io.a })) ƂȂ܂.

:(({--with-gt4suffix=}))((|ARG|))
  ((|ARG|)) ɂ̓CXg[fBNg, Cu,
  st@C̖ɂڔw肵܂.
  Ⴆ, SăftHg̐ݒ (({ ffc5 })) Ǝw肷,
  CXg[̃fBNg̃vtBbNX
  (({ /usr/local/gt4f90io-ffc5 })), Cu
  (({ libgt4f90io-ffc5.a })), CXg[st@C
  (({ gt4frt.ffc5 })), (({ gt4config.ffc5 })) ̂悤
  Ȃ܂.

:(({--with-lang_conform_check=}))((|ARG|))
  ((|ARG|)) ɌKiw肷邱Ƃ, RpCɌKi
  `FbNs悤, IvVǉ܂.  "(({95}))"
  ̂ݎw\ł. RpCɂĂ͎wł܂.

:(({--enable-debug}))
  ̃IvVw肷邱Ƃ, RpCsɃfobObZ[W
  o͂IvVǉ܂.
  RpCɂĂ͎wł܂.

:(({--with-abort=}))((|ARG|))
  ((|ARG|))  (({abort, errtra-setrcd, exit, setrcd, stop})) ̂ꂩ
  w肷邱Ƃ, Iɗp Fortran ̓֐ύX邱Ƃ
  \ł. ftHg (({ abort })) ł.

  : abort
    Fortran ̓Tu[` abort ŏI܂.

  : errtra-setrcd
    Fujitsu Fortran  ERRTRA T[rXTu[`Ăяo,
    ݎs̃vOPʂ܂ł̃g[XobN}bvo͂,
    I܂. Fujitsu Fortran  SETRCD T[rXTu[`ɂ,
    AR[h 13 ݒ肵, IR[hƂ 3 ݒ肵܂.

  : exit
    Fortran ̓Tu[` exit ŏI܂.

  : setrcd
    Fujitsu Fortran  SETRCD T[rXTu[`Ăяo,
    Fortran ̕AR[hƂ 3 ݒ肵ďI܂.

  : stop
    Fortran ̓֐ stop ŏI܂.

=end JA
=begin EN

=== Create `Config.mk'

Move created directroy, and excute `(({ ./configure }))'.

If your path of netCDF library is `/usr/local/netcdf/lib/libnetcdf.a',
you should set options as follow.

A configure file `Config.mk' created at the current working directory.

	$ ./configure --with-netcdf=/usr/local/netcdf/lib/libnetcdf.a

(({config.cache})) is also created with (({ Config.mk })).
This file stores arguments of options.
When you execute (({ ./configure })) again, (({config.cache})) is loaded
automatically. 
If you nullify previous settings, do following command.

    $ make distclean

If you use Fujitsu Fortran compiler in Debian GNU/Linux,
copy "Config.cache.debian-ffc*" to (({config.cache})) and
execute (({ ./configure })). So, locations of libraries are
specified automatically.

    $ cp Config.cache.debian-ffc5 config.cache
    $ ./configure

If you want to change directory to which the library and the module, etc.
are installed, please set (({ --help })) option as follow. Available
options are showed.

	$ ./configure --help

Descriptions about principal options are listed below.

:(({--with-netcdf=}))((|ARG|))
  Specify netCDF library in ((<Libraries needed for compile>)) to ((|ARG|)).
  You must specify explicitly.

:(({--prefix=}))((|ARG|))
  Specify prefix to ((|ARG|)).
  Default value is (({ /usr/local/gt4f90io })).

:(({--libdir=}))((|ARG|))
  Specify directory to which the library is installed to ((|ARG|)).
  Default value is (({ /usr/local/gt4f90io/lib })).

:(({--includedir=}))((|ARG|))
  Specify directory to which the module is installed to ((|ARG|)).
  Default value is (({ /usr/local/gt4f90io/include })).

:(({--bindir=}))((|ARG|))
  Specify directory to which the executable file is installed to ((|ARG|)).
  Default value is (({ /usr/local/gt4f90io/bin })).

:(({--with-docdir=}))((|ARG|))
  Specify directory to which the documentation file is installed to ((|ARG|)).
  Default value is (({ /usr/local/gt4f90io/doc })).

:(({--with-fc=}))((|ARG|))
  Specify Fortran compiler. This option have priority over
  shell variable "$FC".
  Use when you want to override (({config.cache})).
  (Once (({config.cache})) is created, shell variable "$FC" is ignored).

:(({--with-fflags=}))((|ARG|))
  Specify options for debug and optimization.
  Shell variables "$FFLAGC" and "$FCFLAGS" are used too when
  compiled and linked.

:(({--with-gt4libname=}))((|ARG|))
  Specify gt4f90io library name to ((|ARG|)).
  Library name becomes (({lib}))((|<ARG>|))(({.a})) .
  Default value is (({ gt4f90io })), so library name becomes
  (({ libgt4f90io.a })) .

:(({--with-gt4suffix=}))((|ARG|))
  Specify suffix of installdir, library name, executable files to((|ARG|)).
  For example, you specify (({ ffc5 })) when others are default,
  prefix of installdir becomes (({ /usr/local/gt4f90io-ffc5 })),
  library name becomes (({ libgt4f90io-ffc5.a })),
  executable files become (({ gt4frt.ffc5 })), (({ gt4config.ffc5 })).

:(({--with-lang_conform_check=}))((|ARG|))
  Specify language standard to ((|ARG|)).
  And when you compile source code, check the language standard conformance.
  Now, "(({95}))" is valid.
  The compiler that can be used is limited.

:(({--enable-debug}))
  When you compile source code and execute binary file, output debug
  messages.
  The compiler that can be used is limited.

:(({--with-abort=}))((|ARG|))
  Specify one of (({abort, errtra-setrcd, exit, setrcd, stop})) to
  ((|ARG|)).
  Default value is (({ abort })).

  : abort
    Stop by intrinsic subroutine "abort".

  : errtra-setrcd
    Stop by Fujitsu Fortran service subroutine "ERRTRA".
    And outputs error trace back map.

  : exit
    Stop by intrinsic subroutine "exit".

  : setrcd
    Stop by Fujitsu Fortran service subroutine "SETRCD".
    And outputs error trace back map.

  : stop
    Stop by intrinsic subroutine "stop".

=end EN


=begin JA
=== Config.mk ̕ҏW

ɍ킹 (({ Config.mk })) 蓮ŕҏWĂ.

   FC          : Fortran RpC

   SYSFFLAGS   : RpCENɕKvȃtO
                 (Fortran RpCsɕKvȃIvV)

   SYSLDFLAGS  : NɕKvȃtO

   SYSLDLIBS   : NɕKvȃCu

   F90MODTYPE  : W[̓n

   DEST_LIB    : gt4f90io CuCXg[fBNg

   DEST_INC    : gt4f90io W[CXg[fBNg

   DEST_BIN    : gt4f90io st@CCXg[fBNg

   DEST_DOC    : gt4f90io hLgt@CCXg[fBNg



   MODS        : W[t@Cgq

   AR          : A[JCuR}h

=end JA
=begin EN
=== Edit `Config.mk'

Edit `(({Config.mk}))' manually, if you want to change.

   FC          : Fortran Compiler

   SYSFFLAGS   : Flags needed when compiled and linked

   SYSLDFLAGS  : Flags needed when linked

   SYSLDLIBS   : Libraries needed when linked

   F90MODTYPE  : Information of Modules
                 (std.mod, HP.mod, fqs.mod, intel.d, hitachi.f90)

   DEST_LIB    : Directory to which the library file is installed

   DEST_INC    : directory to which the module files are installed

   DEST_BIN    : directory to which the executable files are installed

   DEST_DOC    : directory to which the documantation files are installed


   MODS        : Extensions of Module Files used when "make clean"

   AR          : Archive command


=end EN

=begin JA
=== \[XR[h̃RpC

JgfBNgňȉ̃R}hsĂ.

	$ make
=end JA
=begin EN
=== Compile source code

In current directory, execute following command.

	$ make
=end EN


=begin JA
=== hLg̐

}jAƃR[ht@X̃RpC̓JgfBNg
ɂ, ȉ̃R}hsĂ.
((<gt4f90io  TGZ pbP[W|URL:http://www.gfd-dennou.org/arch/gtool4/gt4f90io/gt4f90io_current.tgz>))
肷ꍇɂ͊ɐς݂ł.

	$ make doc
=end JA
=begin EN
=== Generate documentations

To generate documentations, execute following command in current directory.
If you get from
((<gt4f90io TGZ package|URL:http://www.gfd-dennou.org/arch/gtool4/gt4f90io/gt4f90io_current.tgz>)),
documentations are already generated.

	$ make doc
=end EN

=begin JA
== CXg[̎

JgfBNgňȉ̃R}hsĂ.
VXëɃCXg[ꍇɂ͊ǗҌ
Kvł. (ftHg̏ꍇ̓VXëɃCXg[܂).

	# make install

hLgCXg[ꍇɂ͈ȉ̃R}hs܂.

	# make install-doc

=end JA
=begin EN
== Install Procedure

In current directory, execute following command.
If you install to system, you need to be administrator.
(By default, you install to system).

	# make install

If you want to install documentation files, execute following command.

	# make install-doc

=end EN



=begin JA
== eXgvOs̎菇

JgfBNgɂ, ȉ̃R}hsĂ.
G[
"(({ *** Compilation and installation are succeeded !! *** }))"
ƂbZ[W\΃CXg[͊ł.

	$ make test-installed

=end JA
=begin EN
== Execute test programs

In current directry, execute following command.
If message "(({ *** Compilation and installation are succeeded !! *** }))"
are showed without error, installation is completed.

	$ make test-installed

=end EN

=begin HTML
<hr></hr>
=end HTML
