Downloading and setting up the 2010 Test Case

The package containing the model codes, documentation and a ready-to-run test case for the year 2010 is available here

Note

Clicking on the links below will take you out of this website to the data. Use the back button to navigate back to these pages Browse and download

What’s in the package?

The contents are organized as follows:

bin        --  executables produced after compiling the sources
clim       --  climatology for model runs and assimilation
force      --  prebuilt atmospheric forcing
nlists     --  input files for running the system
nest       --  lateral boundary forcing files for 2010
obs        --  observations for assimilation
scripts    --  python scripts to run the hindcast
src        --  HYCOM and TSIS source codes
restart    --  model initial conditions for Jan 1, 2010
topo       --  contains all model grid definition files

Compiling the Test Case

Required Compilers and Libraries

The package requires a modern fortran compiler and support libraries to compile the sources. Before compiling the code on your computer, check to see if you have a working modern fortran (90 or later compiler), netCDF and Message Passing Interface (MPI) libraries installed (for parallel processing). The code has been tested with Intel, Portland Group and gfortran compilers. It might require tweaks for other compilers. If netCDF and MPI are installed in a non-standard location (e.g. not in /usr/local/), then the paths to netCDF library, and to its include/ directory must be provided.

Compiling the HYCOM ocean model

The first step in compiling the package is to compile the ocean model. The model sources are in the src/model folder. HYCOM requires that the number of processors and domain partitioning information be specified at compile time in the dimension.h file. By default the package comes configured for running on 32 processors using Intel compilers. The details of the compilers and libraries are included in the Makefile headers. For Intel compilers the file intelIFC in the source folder contains the compiler and library information as shown below:

#
# ---------------------------------------------------------------------
# common definitions for Intel Linux/IFC, MPI, real*8
# --------------------------------------------------------------------
# MACROS      DESCRIPTIONS:
#
# FC:         Fortran 90 compiler.
# FCFFLAGS:   Fortran 90 compilation flags.
# CC:         C compiler.
# CCFLAGS:    C compilation flags.
# CPP:        cpp preprocessor (may be implied by FC).
# CPPFLAGS:   cpp -D macro flags.
# LD:         Loader.
# LDFLAGS:    Loader flags.
# EXTRALIBS:  Extra local libraries (if any).
#
FC            = mpif90
FCFFLAGS      = -vec_report0 -O3 -msse3 -r8 -i_dynamic -w
CC            = gcc
CCFLAGS       = -O
CPP           = cpp -P
CPPFLAGS      = -DREAL8 -DMPI -DSERIAL_IO -DTIMER -DENDIAN_IO -I/opt/netcdf/include
LD            = $(FC)
LDFLAGS       = $(FCFFLAGS)
EXTRALIBS     =-L/opt/netcdf/lib -lnetcdff -lnetcdf

Edit the above file to reflect the local environment. Once this is done the model can be compiled as is by the following commands as shown in the example below:

ashwanth@n1:/raid/FS/GOMFS> cd src/model
ashwanth@n1:/raid/FS/GOMFS/src/model> make

This should produce the executable hycom. Once the executable is compiled it should be moved to the bin directory.

ashwanth@n1:/raid/FS/GOMFS/src/model> mv hycom ../../bin/.

Compiling the T-SIS assimilation codes

The next step in compiling the package is to compile the T-SIS codes. The sources are in the src/tsis folder. T-SIS is designed to be compiled once to run on any number of processors. By default the package comes configured for compiling using Intel compilers. The details are in the Makefile headers in the arch directory. The T-SIS code requires LAPACK. The code comes configured for using the Intel Math kernel Libraries. These have to be edited to suit the local environment

ashwanth@n1:/raid/FS/GOMFS/> cd src/tsis/arch

For Intel compilers the file ifort_x86_64_mpi in the source folder contains the compiler and library information as shown below:

F90   = mpif90
F77   = mpif90
CC    = gcc
CPP   = cpp -P
LD    = $(F90)
INC   = -I/usr/local/include -I/opt/intel/mkl/include
LIBS  = -L/usr/local/netcdf/lib64 -L/opt/intel/mkl/lib -lnetcdf -lnetcdff -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
FCFLAGS  = -g -O2 -convert big_endian -w $(INC)
CCFLAGS  = -O2
CPPFLAGS = -DMPI
LDFLAGS  = $(FCFLAGS)

Once the arch information is edited to reflect the local environment, the source is ready to be compiled as below:

ashwanth@n1:/raid/FS/GOMFS/src/tsis/src/> make

Once the code is compiled the executables “tsisx”, “setobs and “setclim” should be moved to the bin directory

Setting up and running the 2010 hindcast

The scripts directory contains several python scripts that glue the various components and moves data between the different components to produce a seamlessly functioning system. The only files that a user has to edit are the defs.py and the hindcast.py files.

Specifying the hindcast run environment

The defs.py file contains information on the top level the directory structure as shown below:

# defs.py defining filesystem locations
# version: 0.1
# July 2012
# Report bugs to: a.srinivasan@tendral.com
#############################################################
#Modify locations below to match your settings             #
#############################################################

TLDIR="/raid/FS/GOMFS"
BIN="/raid/FS/GOMFS/bin"
dbnlst="/raid/FS/GOMFS/nlists"
dbclim="/raid/FS/GOMFS/clim"
dbnst="/raid/FS/GOMFS/nest"
dbfrc="/raid/FS/GOMFS/force"
mgfile="/raid/FS/GOMFS/topo/gridinfo.nc"

The above file has to be edited to specify the top-level directory. For example if the package is unpacked in /home/john, TLDIR should be specified as: TLDIR=”/home/john/GOMFS. Similarly the other locations should be specified to match the local settings.

Editing the Master run script

The next file to edit is hindcast.py which controls the entire system:

#!/usr/bin/python
# hindcast.py driver script to control the assimilation system
# version: 0.1
# July 2012
# Report bugs to: a.srinivasan@tendral.com
import sys
import datetime as dt
from  defs    import *
from  limits  import dolimits
from  hycom   import dohycom
from  clean   import do_hindcast_clean
from  assim   import doprep,doanal
from arch2nc  import doarch2nc

format = '%Y%m%d'

#############################################################
#Modify start date no of days and the number of processors  #
#############################################################

dtgs=dt.datetime.strptime(str(20100101), format)
ndays=365
npes_hycom=32
npes_tsis=32

#############################################################
# End of user modifications  #
#############################################################


dtgref=dt.datetime.strptime(str(19001231), format)
jdateDiff = dtgs - dtgref
je=jdateDiff.days
jd_start=je
adtg=dtgs


for day in range(jd_start, jd_start+ndays):
        start=day
        end=start+1
        dolimits(scr_dir,start,end)
        dohycom(scr_dir,npes_hycom)

        # do assimilation

        adtg=adtg+dt.timedelta(days=1)
        sadtg=adtg.strftime('%Y%m%d')
        doprep(scr_dir,sadtg)
        doanal(scr_dir,npes_rls)
        do_hindcast_clean(scr_dir)

# convert outputs to diagnostic netcdf format

        doarch2nc(scr_dir,cdtg)

sys.exit(0)

The only lines requiring user modifications are the start date and the number of processors listed below:

dtgs=dt.datetime.strptime(str(20100101), format)
ndays=365
npes_hycom=32
npes_tsis=32

Once this is set the system is ready for running and can be launched as

ashwanth@n1:/raid/FS/GOMFS/scripts> ./hindcast.py >& hindcast.log &

That’s it! This should run the hindcast for 2010. A scratch folder will be created where the model will run and produce outputs. These can be moved to a location of your choice.

Input Parameters for the model and assimilation

HYCOM Input Parameters

The HYCOM model uses a text file called “blkdat.input” which contains the input parameters such as domain size, time steps etc. The file used for the hindcast is listed below:

Normally the default file in the package should be sufficient but if modifications are necessary then the HYCOM documentation at (www.hycom.org) should be consulted.

T-SIS Input Parameters

The assimilation component is controlled by a tsis.nlist name list. The version used for the hindcast is listed below for reference.

=====================T-SIS MASTER NAMELIST=========================

The model and first guess file name

&model_data_type
model='hycom'
FileName='restart_out'
/

The observation location on disk

&obs_database_location
sla_data_location='/GOMFS/obs/altim/'
sst_data_location='/GOMFS/obs/sst'
insitu_data_location='/GOMFS/obs/insitu'
clim_data_location='/GOMFS/clim/'
fclim_profile_location='/GOMFS/clim/gom_gdem_profile_locations'
/

The observation window (can be different from model domain)

&obs_window
lnmn=-97.5
lnmx=-77.0
ltmn=18.10
ltmx=31.0
/

The ensemble location and number of members

&ensnml
ensloc='/GOMFS/BASIS'
enslist='/GOMFS/BASIS/ens.list'
ntotalmembers=108
/

Three analysis parameters for each analysis variable:

1)      acdepth the critical depth to stop assimilation when the local depth is less than this value
2)      arlocal is the localization radius
3)      acovscl is a scaling parameter to strengthen or decrease the covariance between variables


&anlp

#! sla analysis parameters
acdepth(2)=2.0
arlocal(2)=50.0
acovscl(2)=0.7

#! sst analysis parameters
acdepth(2)=2.0
arlocal(2)=50.0
acovscl(2)=0.7

#! sss analysis parameters
acdepth(3)=100.0
arlocal(3)=150.0
acovscl(3)=0.7

#! tem analysis parameters
acdepth(4)=100.0
arlocal(4)=150.0
acovscl(4)=0.7

#! sal analysis parameters
acdepth(5)=100.0
arlocal(5)=150.0
acovscl(5)=0.7

#! thk analysis parameters
acdepth(6)=100.0
arlocal(6)=150.0
acovscl(6)=0.7

#! den analysis parameters
acdepth(7)=100.0
arlocal(7)=150.0
acovscl(7)=0.7

#! uvl analysis parameters
acdepth(8)=100.0
arlocal(8)=150.0
acovscl(8)=0.7

#! vvl analysis parameters
acdepth(9)=100.0
arlocal(9)=150.0
acovscl(9)=0.7