Skip to content

Commit

Permalink
Merge pull request #32 from marshallward/update
Browse files Browse the repository at this point in the history
MOM 5.1 Update
  • Loading branch information
timleslie committed Feb 23, 2014
2 parents c1753bb + b0cc9ef commit 0c5fc44
Show file tree
Hide file tree
Showing 1,147 changed files with 71,122 additions and 122,283 deletions.
71 changes: 71 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@

Where to start
~~~~~~~~~~~~~~
A good place to start is the "doc" directory, where you
will find "user" guides for the MOM.

How to run the MOM tests
~~~~~~~~~~~~~~~~~~~~~~~~~
MOM tests provided in exp directory divide in two types,
both using the GFDL shared infrastructure (FMS) :

1. Solo models : Run stand alone MOM Ocean model.
2. Coupled models: Run MOM coupled with GFDL ice model
(besides null versions of atmosphere and land models).

To run Solo models:
a. cd to exp and run mom4p1_solo_compile.csh first.
b. Modify the 'name' variable in the script
mom4p1_solo_run.csh to be the name of the test you
want to run. A list of available tests is included in the script.
c. Get the required input data for the test from GFDL ftp site.
You can get the info by running the script mom4p1_solo_run.csh
and following the instructions.
d. Run mom4p1_solo_run.csh
e. The results go into subdir name/workdir

To run Coupled models:
Do the same steps above to mom4p1_coupled_compile.csh and mom4p1_coupled_run.csh

To run EBM models:
Do the same steps above to mom4p1_ebm_compile.csh and mom4p1_ebm_run.csh



Warning: The Solo and Coupled run scripts have been tested only on 10 and 24, ia64
processors respectively.
Warning: Some of these tests require a large disk space to save the input data.
Choose a partition with enough space (1-2 G) to untar the code and data bundels.
Warning: If you want to use the same root directory for all three experiments we suggest to
compile in the order of increasing complexity: solo -> coupled -> ebm .
You may have to remove some of the existing .o and .mod files
if you want to compile ebm experiment after the coupled experiment.
E.g., you probably have to: cd ../exec; rm mpp*.o mpp*.mod fms_io*.o fms_io*.mod

Note: IBM platform users might want to add the following line to the top of the run scripts
setenv LDR_CNTRL MAXDATA=0xD0000000@DSA


Note: The compile scripts provide the basic capability to use static memory allocation
which might be faster on some platforms. In that case you need to adjust the values
of domain bounds properly according to the number of processors and layout.


Summary of directory contents
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bin/
-- mkmf script for creating Makefiles
-- template files for the mkmf script
-- assorted other scripts

exp/
-- all MOM experiments (test cases)

src/
-- source code for all models

src/postprocessing/
-- source code for postprocessing programs

src/preprocessing/
-- source code for preprocessing programs
Binary file added bin/.prepare_pubrel.csh.swp
Binary file not shown.
6 changes: 3 additions & 3 deletions bin/diag_table_chk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#! /usr/bin/perl

# $Author: fms $
# $Revision: 17.0 $
# $Date: 2009/08/10 20:51:27 $
# $Author: Niki.Zadeh $
# $Revision: 1.1.2.1 $
# $Date: 2013/12/18 17:47:53 $

# Perl script to parse the diag_table. Count the number of files to
# be used, and the max number of fields per file used.
Expand Down
3 changes: 3 additions & 0 deletions bin/environs.ibm.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export OMP_NUM_THREADS=1
export BG_APPTHREADDEPTH=1

15 changes: 15 additions & 0 deletions bin/environs.ncrc2.gnu
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
source $MODULESHOME/init/csh
module use -a /ncrc/home2/fms/local/modulefiles
module unload PrgEnv-pgi PrgEnv-pathscale PrgEnv-intel PrgEnv-gnu PrgEnv-cray
module unload netcdf fre fre-commands
module load PrgEnv-gnu
module load hdf5/1.8.8
module load netcdf/4.2.0
module list
setenv MPICH_MAX_SHORT_MSG_SIZE 8000
setenv KMP_STACKSIZE 512m
setenv NC_BLKSZ 1M

setenv mpirunCommand "aprun -n"
setenv PATH ${PATH}:.

2 changes: 1 addition & 1 deletion bin/environs.ncrc2.intel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
source $MODULESHOME/init/csh
module rm PrgEnv-pgi PrgEnv-pathscale netcdf
module load PrgEnv-intel/4.0.30
module load PrgEnv-intel
module swap intel intel/12.0.5.220
module load hdf5/1.8.7
module load netcdf/4.1.3
Expand Down
2 changes: 2 additions & 0 deletions bin/environs.workstation.gfort
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
setenv mpirunCommand "mpirun -np"

17 changes: 17 additions & 0 deletions bin/environs.workstation.intel
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
source $MODULESHOME/init/csh
module use -a /home/fms/local/modulefiles
module purge
module load ifort.11.0.074
module load icc.11.0.074
module load idb.10.1.35
module load hdf5-1.8.3
module load netcdf-4.0.1
setenv OMP_NUM_THREADS 1
#
setenv NC_BLKSZ 64K
setenv FMS_ARCHIVE /archive/fms
setenv PATH ${PATH}:.
setenv netcdf3_inc_dir "/usr/local/netcdf-3.6.2/include"
setenv netcdf3_lib_dir "/usr/local/netcdf-3.6.2/lib"
setenv mpirunCommand "mpirun -np"

2 changes: 1 addition & 1 deletion bin/list_files_with_tag
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Returns list of files under CVS control, relative to current
# directory, which can be updated or checked out with the tag tagname.
#Modified to also list files not currently checked out (arl, 4/2002)
#Version: $Id: list_files_with_tag,v 10.0 2003/10/27 22:46:40 fms Exp $
#Version: $Id: list_files_with_tag,v 1.1.2.1 2013/12/18 17:47:54 Niki.Zadeh Exp $

#test that a tagname was given as an argument
if( "$#ARGV" ne "0" ) {
Expand Down
4 changes: 2 additions & 2 deletions bin/list_paths
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/csh -ef
# $Id: list_paths,v 10.1 2010/05/19 18:42:43 fms Exp $
# $Id: list_paths,v 1.1.2.1 2013/12/18 17:47:54 Niki.Zadeh Exp $
#-----------------------------------------------------------------------
# list_paths: CVS administrative script
#
Expand Down Expand Up @@ -93,6 +93,6 @@ echo "<title>Documentation in current working directory</title>" > $ou
echo "<h1>Documentation in current working directory</h1>" >> $outdoc
sort -u $doc | awk '{print "<p><a href=\"" $1 "\">" $1 "</a>"}' >> $outdoc
echo '<p><hr><small>This file was automatically generated by list_paths.' >> $outdoc
echo '$Revision: 10.1 $ $Date: 2010/05/19 18:42:43 $' >> $outdoc
echo '$Revision: 1.1.2.1 $ $Date: 2013/12/18 17:47:54 $' >> $outdoc

rm -f $doc $src
6 changes: 3 additions & 3 deletions bin/mkmf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ sub ensureTrailingSlash {
local $/ = '/'; chomp @_[0]; @_[0] .= '/';
}

my $version = '$Id: mkmf,v 16.1 2010/05/19 18:49:19 fms Exp $ ';
my $version = '$Id: mkmf,v 1.1.2.1 2013/12/18 17:47:54 Niki.Zadeh Exp $ ';

# initialize variables: use getopts for these
getopts( 'a:I:c:dfm:o:l:p:t:vx' ) || die "\aSyntax: $0 [-a abspath] [-c cppdefs] [-d] [-f] [-m makefile] [-o otherflags] ][-p program] [-t template] [-v] [-x] [-I \"space separated include dirs\"] [targets]\n";
Expand Down Expand Up @@ -106,8 +106,8 @@ if ( $opt_c ) {
$cppdefs_xlf =~ s/,/\\,/g; # escape any commas already there
$cppdefs_xlf =~ s/\s+/,/g; # replace whitespace with commas
&print_formatted_list("CPPDEFS_XLF = $cppdefs_xlf");
$compile_cmd{'.F'} = q/$(FC) $(CPPDEFS_XLF) $(FFLAGS) -c/;
$compile_cmd{'.F90'} = q/$(FC) $(CPPDEFS_XLF) $(FFLAGS) -c/;
$compile_cmd{'.F'} = q/$(FC) $(CPPDEFS_XLF) $(FFLAGS) $(OTHERFLAGS) -c/;
$compile_cmd{'.F90'} = q/$(FC) $(CPPDEFS_XLF) $(FFLAGS) $(OTHERFLAGS) -c/;
}
&print_formatted_list("CPPDEFS = $opt_c") if $opt_c;
}
Expand Down
6 changes: 3 additions & 3 deletions bin/mkmf.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--$Id: mkmf.html,v 10.0 2003/10/27 22:46:40 fms Exp $ -->
<!--$Id: mkmf.html,v 1.1.2.1 2013/12/18 17:47:54 Niki.Zadeh Exp $ -->
<!-- using template.html
substitute AAA with the file
substitute BBB with exact path to RCS/CVS file -->
Expand Down Expand Up @@ -286,7 +286,7 @@ <h2>mkmf - a tool for making makefiles</h2>
following <tt>Makefile</tt>:

<p><pre>
# Makefile created by mkmf $Id: mkmf.html,v 10.0 2003/10/27 22:46:40 fms Exp $
# Makefile created by mkmf $Id: mkmf.html,v 1.1.2.1 2013/12/18 17:47:54 Niki.Zadeh Exp $


.DEFAULT:
Expand Down Expand Up @@ -348,7 +348,7 @@ <h2>mkmf - a tool for making makefiles</h2>
The new Makefile looks like this:

<p><pre>
# Makefile created by mkmf $Id: mkmf.html,v 10.0 2003/10/27 22:46:40 fms Exp $
# Makefile created by mkmf $Id: mkmf.html,v 1.1.2.1 2013/12/18 17:47:54 Niki.Zadeh Exp $


.DEFAULT:
Expand Down
2 changes: 1 addition & 1 deletion bin/mkmf.template.gfdl_ws_64.gnu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: gnu.mk,v 1.1.2.1.2.1 2012/03/07 15:08:54 sdu Exp $
# $Id: mkmf.template.gfdl_ws_64.gnu,v 1.1.2.1 2013/12/18 17:47:54 Niki.Zadeh Exp $
# template for the Intel fortran compiler
# typical use with mkmf
# mkmf -t template.ifc -c"-Duse_libMPI -Duse_netCDF" path_names /usr/local/include
Expand Down
184 changes: 184 additions & 0 deletions bin/mkmf.template.gfdl_ws_64.gnu.debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
# $Id: mkmf.template.gfdl_ws_64.gnu.debug,v 1.1.2.1 2013/12/18 17:47:54 Niki.Zadeh Exp $
# template for the Intel fortran compiler
# typical use with mkmf
# mkmf -t template.ifc -c"-Duse_libMPI -Duse_netCDF" path_names /usr/local/include
############
# commands #
############
FC = gfortran
CC = gcc
LD = gfortran $(MAIN_PROGRAM)
#########
# flags #
#########
DEBUG = on
REPRO =
VERBOSE =
OPENMP =

MAKEFLAGS += --jobs=$(shell grep '^processor' /proc/cpuinfo | wc -l)

FPPFLAGS :=

FFLAGS := -fcray-pointer -fdefault-real-8 -Waliasing -ffree-line-length-none -fno-range-check
FFLAGS += -I/net2/nnz/opt/netcdf-4.1.1/include
#FFLAGS += -I/home/fms/local/opt/netcdf/4.1.1-gnu-4/include
#The above fails with USE netcdf, ONLY: NF_FILL_REAL => NF90_FILL_REAL
# 1
# Fatal Error: Parse error when checking module version for file 'netcdf.mod' opened at (1)
#
#FFLAGS += $(shell nc-config --fflags)
#
FFLAGS += -I/net2/nnz/opt/mpich2-1.3_ifort11_x64/include
#FFLAGS += -I/usr/local/x64/mpich2-1.2.1p1/include # I do not trust this package, mpirun does not work
#$(shell pkg-config --cflags-only-I mpich2-c)
FFLAGS_OPT = -O2
FFLAGS_REPRO =
FFLAGS_DEBUG = -O0 -g -W -fbounds-check
FFLAGS_OPENMP = -fopenmp
FFLAGS_VERBOSE =

CFLAGS := -D__IFC
CFLAGS += $(shell nc-config --cflags)
CFLAGS += -I/net2/nnz/opt/netcdf-4.1.1/include -I/net2/nnz/opt/mpich2-1.3_ifort11_x64/include
#CFLAGS += $(shell pkg-config --cflags-only-I mpich2-c)
CFLAGS_OPT = -O2
CFLAGS_OPENMP = -fopenmp
CFLAGS_DEBUG = -O0 -g

# Optional Testing compile flags. Mutually exclusive from DEBUG, REPRO, and OPT
# *_TEST will match the production if no new option(s) is(are) to be tested.
FFLAGS_TEST = -O2
CFLAGS_TEST = -O2

LDFLAGS :=
LDFLAGS_OPENMP := -fopenmp
LDFLAGS_VERBOSE :=

ifneq ($(REPRO),)
CFLAGS += $(CFLAGS_REPRO)
FFLAGS += $(FFLAGS_REPRO)
endif
ifneq ($(DEBUG),)
CFLAGS += $(CFLAGS_DEBUG)
FFLAGS += $(FFLAGS_DEBUG)
else ifneq ($(TEST),)
CFLAGS += $(CFLAGS_TEST)
FFLAGS += $(FFLAGS_TEST)
else
CFLAGS += $(CFLAGS_OPT)
FFLAGS += $(FFLAGS_OPT)
endif

ifneq ($(OPENMP),)
CFLAGS += $(CFLAGS_OPENMP)
FFLAGS += $(FFLAGS_OPENMP)
LDFLAGS += $(LDFLAGS_OPENMP)
endif

ifneq ($(VERBOSE),)
CFLAGS += $(CFLAGS_VERBOSE)
FFLAGS += $(FFLAGS_VERBOSE)
LDFLAGS += $(LDFLAGS_VERBOSE)
endif

ifeq ($(NETCDF),3)
# add the use_LARGEFILE cppdef
ifneq ($(findstring -Duse_netCDF,$(CPPDEFS)),)
CPPDEFS += -Duse_LARGEFILE
endif
endif

LIBS := $(shell nc-config --flibs) -L/net2/nnz/opt/mpich2-1.3_ifort11_x64/lib -lmpich -lmpl -lpthread
#$(shell pkg-config --libs mpich2-f90) #does not work
LDFLAGS += $(LIBS)

#---------------------------------------------------------------------------
# you should never need to change any lines below.

# see the MIPSPro F90 manual for more details on some of the file extensions
# discussed here.
# this makefile template recognizes fortran sourcefiles with extensions
# .f, .f90, .F, .F90. Given a sourcefile <file>.<ext>, where <ext> is one of
# the above, this provides a number of default actions:

# make <file>.opt create an optimization report
# make <file>.o create an object file
# make <file>.s create an assembly listing
# make <file>.x create an executable file, assuming standalone
# source
# make <file>.i create a preprocessed file (for .F)
# make <file>.i90 create a preprocessed file (for .F90)

# The macro TMPFILES is provided to slate files like the above for removal.

RM = rm -f
SHELL = /bin/csh -f
TMPFILES = .*.m *.B *.L *.i *.i90 *.l *.s *.mod *.opt

.SUFFIXES: .F .F90 .H .L .T .f .f90 .h .i .i90 .l .o .s .opt .x

.f.L:
$(FC) $(FFLAGS) -c -listing $*.f
.f.opt:
$(FC) $(FFLAGS) -c -opt_report_level max -opt_report_phase all -opt_report_file $*.opt $*.f
.f.l:
$(FC) $(FFLAGS) -c $(LIST) $*.f
.f.T:
$(FC) $(FFLAGS) -c -cif $*.f
.f.o:
$(FC) $(FFLAGS) -c $*.f
.f.s:
$(FC) $(FFLAGS) -S $*.f
.f.x:
$(FC) $(FFLAGS) -o $*.x $*.f *.o $(LDFLAGS)
.f90.L:
$(FC) $(FFLAGS) -c -listing $*.f90
.f90.opt:
$(FC) $(FFLAGS) -c -opt_report_level max -opt_report_phase all -opt_report_file $*.opt $*.f90
.f90.l:
$(FC) $(FFLAGS) -c $(LIST) $*.f90
.f90.T:
$(FC) $(FFLAGS) -c -cif $*.f90
.f90.o:
$(FC) $(FFLAGS) -c $*.f90
.f90.s:
$(FC) $(FFLAGS) -c -S $*.f90
.f90.x:
$(FC) $(FFLAGS) -o $*.x $*.f90 *.o $(LDFLAGS)
.F.L:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -c -listing $*.F
.F.opt:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -c -opt_report_level max -opt_report_phase all -opt_report_file $*.opt $*.F
.F.l:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -c $(LIST) $*.F
.F.T:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -c -cif $*.F
.F.f:
$(FC) $(CPPDEFS) $(FPPFLAGS) -EP $*.F > $*.f
.F.i:
$(FC) $(CPPDEFS) $(FPPFLAGS) -P $*.F
.F.o:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -c $*.F
.F.s:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -c -S $*.F
.F.x:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -o $*.x $*.F *.o $(LDFLAGS)
.F90.L:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -c -listing $*.F90
.F90.opt:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -c -opt_report_level max -opt_report_phase all -opt_report_file $*.opt $*.F90
.F90.l:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -c $(LIST) $*.F90
.F90.T:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -c -cif $*.F90
.F90.f90:
$(FC) $(CPPDEFS) $(FPPFLAGS) -EP $*.F90 > $*.f90
.F90.i90:
$(FC) $(CPPDEFS) $(FPPFLAGS) -P $*.F90
.F90.o:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -c $*.F90
.F90.s:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -c -S $*.F90
.F90.x:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -o $*.x $*.F90 *.o $(LDFLAGS)

0 comments on commit 0c5fc44

Please sign in to comment.