°Ê²¼¤Ï Unix ¥·¥¹¥Æ¥à¤Ë netCDF ¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ëºÝ¤Î´Êñ¤Ê¼ê°ú¤¤Ç¤¹. ¾Ü¤·¤¤¤³¤È¤Ï unidata NetCDF ¤ÎNetCDF Installation and Porting Guide ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤.
unidata ¤«¤é netCDF 3.6.2 ¤ò¼èÆÀ¤·¤Þ¤¹. ¥ß¥é¡¼¥µ¥¤¥È (ÅÅǾ¥µ¡¼¥Ð) ¤«¤é¤â¼èÆÀ¤Ç¤¤Þ¤¹.
tar.gz ¤òŸ³«¤·, Ÿ³«¤·¤¿¥Ç¥£¥ì¥¯¥È¥ê¤Ë°ÜÆ°¤·¤Þ¤¹.
$ tar xvfz netcdf-3.6.2.tar.gz $ cd netcdf-3.6.2
´Ä¶ÊÑ¿ô FC ¤Ë»ÈÍѤ¹¤ë¥³¥ó¥Ñ¥¤¥é¤Î¥³¥Þ¥ó¥É¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤. Î㤨¤Ð, g95 ¤òÍøÍѤ¹¤ë¾ì¹ç¤Ï°Ê²¼¤Î¤è¤¦¤Ë»ØÄꤷ¤Þ¤¹.
sh, bash ¤Î¾ì¹ç
$ FC=g95 ; export FC
csh, tcsh ¤Î¾ì¹ç
$ setenv FC g95
ÆÃÄê¤Î¥³¥ó¥Ñ¥¤¥é¤Ë¤ª¤¤¤Æ¤Ï¤½¤Î¾¤Î´Ä¶ÊÑ¿ô¤Î»ØÄê¤âɬÍפˤʤê¤Þ¤¹.
°Ê²¼¤Î¤è¤¦¤Ë´Ä¶ÊÑ¿ô¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤. g95 ¤Ë´Ø¤¹¤ë¾ðÊó¤Ï¤³¤Á¤é [The G95 project]
FC=g95 CC=gcc CPPFLAGS=-Df2cFortran
°Ê²¼¤Î¤è¤¦¤Ë´Ä¶ÊÑ¿ô¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤.
FC=frt CC=fcc CXX=FCC CPPFLAGS=-DNAGf90Fortran FCFLAGS=-Am F90FLAGS=-Am am_cv_CC_dependencies_compiler_type=none
°Ê²¼¤Î¤è¤¦¤Ë´Ä¶ÊÑ¿ô¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤.
FC=ifort CPPFLAGS="-DNDEBUG -DpgiFortran"
°Ê²¼¤Î¤è¤¦¤Ë´Ä¶ÊÑ¿ô¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤. ¤Ê¤ª, 3.6.1 ¤Ç¤Î¥Ó¥ë¥É¤Ï ³Îǧ¤µ¤ì¤Æ¤¤¤Þ¤¹¤¬, 3.6.2 ¤Ç¤Ï³Îǧ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó. IBM XL Fortran ¤Ë´Ø¤¹¤ë¾ðÊó¤Ï¤³¤Á¤é [¥é¥¤¥Ö¥é¥ê | ¥µ¥Ý¡¼¥È].
F90=xlf90 F90FLAGS=-qsuffix=f=f90 ARFLAGS="-X64 cru"
IBM XL Fortran ¤ò AIX ¾å¤ÇÆ°¤«¤¹ºÝ¤Ë¤Ï Known Problems with the netCDF 3.6.0 Distribution ¤Î¾ðÊó¤¬Ìò¤ËΩ¤Ä¤«¤â¤·¤ì¤Þ¤»¤ó.
°Ê²¼¤Î¤è¤¦¤Ë´Ä¶ÊÑ¿ô¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤. (¥³¥ó¥Ñ¥¤¥é¤Î¥³¥Þ¥ó¥É̾¤Ï f90 ¤À¤È¤·¤Þ¤¹). ¤Ê¤ª, 3.6.1 ¤Ç¤Î¥Ó¥ë¥É¤Ï³Îǧ¤µ¤ì¤Æ¤¤¤Þ¤¹¤¬, 3.6.2 ¤Ç¤Ï³Îǧ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó.
FC=f90 F90=f90 CC=cc CPP=cpp CXX= F90FLAGS="-nohugeary -i,L" ARFLAGS="-X64 cru"
°Ê²¼¤Î¤è¤¦¤Ë´Ä¶ÊÑ¿ô¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤. 3.6.3 ¤Ç¤Î¥Ó¥ë¥É¤¬³Îǧ¤µ¤ì¤Æ¤¤¤Þ¤¹. PGI Fortran ¤Ë´Ø¤¹¤ë¾ðÊó¤Ï¤³¤Á¤é [The Portland Group]
FC=pgf90 CC=pgcc CPP=cpp CXX= CPPFLAGS='-DpgiFortran' FFLAGS="-O -w"
°Ê²¼¤Î¤è¤¦¤Ë´Ä¶ÊÑ¿ô¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤. (¥³¥ó¥Ñ¥¤¥é¤Î¥³¥Þ¥ó¥É̾¤Ï gfortran ¤À¤È¤·¤Þ¤¹). 3.6.3 ¤Ç¤Î¥Ó¥ë¥É¤¬³Îǧ¤µ¤ì¤Æ¤¤¤Þ¤¹. GNU Fortran ¤Ë´Ø¤¹¤ë¾ðÊó¤Ï¤³¤Á¤é [GCC, the GNU Compiler Collection]
FC=gfortran
configure ¤ò¼Â¹Ô¤·, make check, make install ¤ò½ç¤Ë¼Â¹Ô¤·¤Þ¤¹.
$ ./configure $ make check $ make install
configure ¥¹¥¯¥ê¥×¥È¤Ï¥¤¥ó¥¹¥È¡¼¥ë¤ËɬÍפʥġ¼¥ë¤ò¥Ñ¥¹¤«¤é
¸¡º÷¤·¤Þ¤¹. ¥¤¥ó¥¹¥È¡¼¥ë¾ì½ê¤òÊѤ¨¤¿¤¤¾ì¹ç¤Ï --prefix
¥ª¥×¥·¥ç¥ó¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤. Î㤨¤Ð, ¥é¥¤¥Ö¥é¥ê¤ò /usr/local/lib
°Ê²¼¤Ë, ¥Ø¥Ã¥À¡¼¥Õ¥¡¥¤¥ë¤ò /usr/local/include
¤Ë,
¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤ò /usr/local/bin
°Ê²¼¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë
¾ì¹ç¤Ë¤Ï, °Ê²¼¤Î¤è¤¦¤Ë¥ª¥×¥·¥ç¥ó¤òÄɲ䷤Ƥ¯¤À¤µ¤¤.
$ ./configure --prefix=/usr/local
¥Ç¥Õ¥©¥ë¥È¤Î¥¤¥ó¥¹¥È¡¼¥ëÀè¤Ï, configure ¤ò¼Â¹Ô¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î ¿Æ¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¹.
¶¦Í¥é¥¤¥Ö¥é¥ê¤òºîÀ®¤¹¤ë¾ì¹ç¤Ï, °Ê²¼¤Î¤è¤¦¤Ë --enable-shared ¥ª¥×¥·¥ç¥ó¤ò »ØÄꤷ¤Þ¤¹. ¤¿¤À¤·, ¤³¤Î¾ì¹ç¤Ë¤Ï¥é¥¤¥Ö¥é¥ê¥Õ¥¡¥¤¥ë¤¬ C ÍÑ (libnetcdf.a) ¤È Fortran ÍÑ (libnetcdff.a) ¤È 2 ¤Ä¤Ëʬ¤«¤ì¤Æ¥Ó¥ë¥É¤µ¤ì¤Þ¤¹. ½¾¤Ã¤Æ ¥Ó¥ë¥É¤·¤¿ netCDF Fortran ¥é¥¤¥Ö¥é¥ê¤ò»ÈÍѤ¹¤ëºÝ¤Ë¤Ï, libnetcdf.a ¤È libnetcdff.a ¤ÎξÊý¤Î¥é¥¤¥Ö¥é¥ê¤Ë¥ê¥ó¥¯¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹.
$ ./configure --enable-shared
¤Ê¤ª, configure ¤Î¥ª¥×¥·¥ç¥ó¤Ï --help
¥ª¥×¥·¥ç¥ó¤Ç³Îǧ¤Ç¤¤Þ¤¹.
$ ./configure --help
¤â¤·¤â¤³¤ì¤Ç¥¤¥ó¥¹¥È¡¼¥ë¤Ç¤¤Ê¤¤¾ì¹ç¤Ë¤Ï, NetCDF Installation and Porting Guide ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤.