As noted on the main ROMS Cygwin tutorial page, these instructions are deprecated because Cygwin now has gfortran available. The relevant sections relating to g95 are given below.
Install g95 (deprecated)
This Fortran compiler works in cygwin/Windows. In theory, you should be able to install other Fortran compilers instead, but I just didn't have luck with the others I tried. If you don't know what compiling is, read Compile ROMS below.
- Go to the g95-project website and download the G95 binaries. Or simply click here to start the download.
- Save it inside the cygwin folder (C:\cygwin in this tutorial).
- Now you have to open cygwin and go to the place where you saved the g95-x86-cygwin.tgz file. Here you need to know that cygwin uses the folder C:\cygwin\cygdrive as a pseudo-drive. When cygwin starts, you will be able to see all your files and folders that you have in your Windows-user root (i.e. C:\Users\Administrator\), but they will appear to be in a different location (i.e. /cygwin/cygdrive/c/Users/Administrator/ ). This is just cygwin's way to emulate a Linux-type hard-drive inside Windows.
- Cygwin's home directory, which is where cygwin opens by default is, in this example, /cygwin/cygdrive/c/Users/Administrator/ but when in it, cygwin abbreviates it as ~
- Cygwin's HOME directory (i.e. ~) = C:\Users\Administrator\ in Windows Explorer
- Cygwin's ROOT directory (i.e. /) = C:\cygwin\ in Windows Explorer
Open cygwin and go to the root directory. To do this type cd / (cd = command for: 'change directory'). Now that you are in the root directory, type ls (command for: "show contents of this directory"), you should see our recently downloaded g95-x86-cygwin.tgz file.
- Extract (or unzip) g95-x86-cygwin.tgz by typing:
- tar -xvzf g95-x86-cygwin.tgz
- Move g95-x86-cygwin.tgz to a safe location:
- cd ~
mv /g95-x86-cygwin.tgz software/
- This should install g95 in /usr/local/bin and its documentation in /usr/local/doc/g95
Install NetCDF (Deprecated configure line)
- CC=gcc FC=g95 F77=g95 CPPFLAGS='-DNDEBUG -DpgiFortran' \
FFLAGS=-fno-second-underscore FCFLAGS=-fno-second-underscore ./configure
Customizing the Build Script (Deprecated section)
- We are compiling in serial using the g95 compiler so make your build.bash match the following:
- export USE_MPI=