Mac
- Step 1: Install a FORTRAN compiler.
The preferred compiler would be gfortran found here: http://gcc.gnu.org/wiki/GFortranBinaries#MacOS OR http://hpc.sourceforge.net
But it may or may not be required to have additional library files associated with g77. Ignore installing g77 on your first attempt to compile krc on a mac, but compile g77 if errors associated with missing library files show up during the compilation.
http://www.webmo.net/support/fortran_osx.html
download the g77 compiler called g77-intel-bin.tar.gz (Intel Mac only) Then open a terminal window, go to the place where g77-intel-bin.tar.gz is located.
Type:
gunzip g77-intel-bin.tar.gz
sudo tar -xvf g77-intel-bin.tar -C /
GOOD NEWS: No modifications of Makefile are required for version 2.3.2 (was not the case with older versions)
- Step 2: Put the zipped krc file where you want it to be run from
- Step 3: Unzip krc
- Step 4:
IF YOU ARE NOT USING KRC WITH DAVINCI, IGNORE THIS STEP, GO TO Step 5
IF YOU ARE USING KRC WITH THE DAVINCI INTERFACE:
Some default krc variables must be modified. open /krc/src/krccom.inc OR/AND krcc8m.f
Find the lines where MAXN1,MAXN2,MAXN3,MAXN4,MAXN5,MAXNH,KOMMON are defined and replace with:
PARAMETER (MAXN1 =1000) ! dimension of layers
PARAMETER (MAXN2 =86400) ! dimension of times of day: 384=24*16
PARAMETER (MAXN3 =16) ! dimension of iteration days
PARAMETER (MAXN4 =37) ! dimension of latitudes
PARAMETER (MAXN5 =2161) ! dimension of saved seasons #Uncomment it if necessary
PARAMETER (MAXNH =9600) ! dimension of saved times of day
PARAMETER (KOMMON=512000000) ! 4-byte words
Save and quit
- Step 5: Now go to /krc/src/cfiles and type:
make
Usually there are some minor-looking warnings; ignore them for now
- Step 6: Now go to /krc/src/ and type:
make
Sometimes, there are some minor-looking warnings; ignore them for now
- Step 7: Go back to /krc/src/cfiles and type:
make
There should be no warnings this time
- Step 8: Go back to /krc/src/ and type:
make
There should be no warnings this time. Screen should indicate " 'krc' is up to date "
- Step 9: in Makefile, a few modifications ma be necessary:
REPLACE: HHKLIB=/mars/u/krios/krc/builds/3.2.1/ # top of libraries to use WITH: HHKLIB=~/Applications/krc03_02_01b/krc_3.2.1.r12877/ #SP 03/25/2015
REPLACE: b2b.o: /mars/u/krios/krc/builds/3.2.1/src/b2b.f WITH: b2b.o: ~/Applications/krc03_02_01/krc_3.2.1.r12877/src/b2b.f #SP 03/25/2015
REPLACE: catime.o: /mars/u/krios/krc/builds/3.2.1/src/catime.f WITH: catime.o: ~/Applications/krc03_02_01/krc_3.2.1.r12877/src/catime.f
REPLACE: white1.o: /mars/u/krios/krc/builds/3.2.1/src/white1.f WITH: white1.o: ~/Applications/krc03_02_01/krc_3.2.1.r12877/src/white1.f