Difference between revisions of "ROMS UNSW2008"

From WikiROMS
Jump to navigationJump to search
(New page: John Wilkin - work in progress Borrowing heavily from David's cygwin tutorial Objective is to assume a UNIX environment with everything avaiable, and go through the steps of setting up a...)   (change visibility)
 
Line 1: Line 1:
John Wilkin - work in progress
Configuring and running ROMS:
'''
John Wilkin - this is work in progress'''


Borrowing heavily from David's cygwin tutorial
A tutorial will be held at the UNSW Computer Labs on Monday March immediately prior to the ROMS Sydney 2008 User Workshop at the Sydney Institute of Marine Sciences.


Objective is to assume a UNIX environment with everything avaiable, and go through the steps of setting up a test case (upwelling) and then a realisic example (latte_c)
This tutorial assumes basic knowledge of working in a UNIX environment, and that the essential components required to compile and execute RMS are installed on the host computer network.


The discovery process (what files are missing and what are the erro messages) will be incldued.
In the course of the tutorial, we cover how to download the code, configure it for a set of applications, and run the model.  


My plan is to update this on the day as we discover student questions during the actual tutorial.  
This wiki page borrows heavily from David's Robertson's '''Installing ROMS under Cygwin''' tutorial.
 
This wiki entry will be updated on tutorial day as we discover the questions that arise when a set of novice users approach using ROMS for the first time.  
 
__TOC__


==Download ROMS==
==Download ROMS==

Revision as of 23:02, 11 March 2009

Configuring and running ROMS: John Wilkin - this is work in progress

A tutorial will be held at the UNSW Computer Labs on Monday March immediately prior to the ROMS Sydney 2008 User Workshop at the Sydney Institute of Marine Sciences.

This tutorial assumes basic knowledge of working in a UNIX environment, and that the essential components required to compile and execute RMS are installed on the host computer network.

In the course of the tutorial, we cover how to download the code, configure it for a set of applications, and run the model.

This wiki page borrows heavily from David's Robertson's Installing ROMS under Cygwin tutorial.

This wiki entry will be updated on tutorial day as we discover the questions that arise when a set of novice users approach using ROMS for the first time.

Download ROMS

This section assumes you have registered on the ROMS portal and obtained your ROMS username/password as indicated in the Register section.

  • Create a roms folder and change into it.
cd ~
mkdir roms
cd roms
  • Check out the ROMS source code replacing 'bruce' with the ROMS user name you registered with.
svn checkout --username bruce https://www.myroms.org/svn/src/trunk
  • You will see many lines stream by. When it finishes, type ls. You have a folder named trunk that contains the ROMS source code.

The disk space available on the UNSW Computer Lab machines is quite limited, so for the purposes of this tutorial we have downloaded the ROMS source code to /tmp/jwilkin/src on host matht001. Instructions below will explain how to point the build.bash script that compiles ROMS to this directory.

Customizing the Build Script

The ROMS source code comes with a build script in the ROMS/Bin directory. Examples written with bash (build.bash) and csh (build.sh) are provided. The UNSW Computer Lab machines are configured to use bash as the default login shell, so we will work with build.bash. A full description of the build script can be found here.

  • In your home directory, or in whichever directory you want to organize your ROMS projects, create a new folder named Projects and change into it.
mkdir Projects
cd Projects
  • Create a folder named Upwelling and change into it. 'Upwelling' is the name of the ROMS test case we are going to compile and run.
mkdir Upwelling
cd Upwelling
  • Copy the build.bash file distributed with ROMS to your Projects/Upwelling directory.
cp /tmp/jwilkin/src/ROMS/Bin/build.bash .
  • Open the build.bash script you just copied into your Upwelling directory using your preferred text editor, e.g. vi.
vi build.bash


Next we need to configre a few options inside build.bash so that it finds the various directores withere the source code and your Porject is located.

  • Scroll down until you find MY_ROOT_DIR and MY_ROOT_DIR. Set them as follows (replacing 'joeroms' with your ROMS user name).
export MY_ROOT_DIR=/home/joeroms/roms
export MY_PROJECT_DIR=${MY_ROOT_DIR}/Projects/Upwelling
  • Now set MY_ROMS_SRC to:
export MY_ROMS_SRC=${MY_ROOT_DIR}/trunk
  • Make sure that MY_CPP_FLAGS is not set. I had to comment out one line with the # symbol like so:
#export MY_CPP_FLAGS="-DNPZD_POWELL"
  • We are compiling in serial using the g95 compiler so make your build.bash match the following:
export USE_MPI=
export USE_MPIF90=
export FORT=g95
  • You will need to add the following two lines anywhere above the line that reads cd ${MY_ROMS_SRC}
export NETCDF_INCDIR=/usr/local/include
export NETCDF_LIBDIR=/usr/local/lib
  • Save and close the build.bash file.


  • Copy ocean_upwelling.in file into the Upwelling directory you just created.
cp ../../trunk/ROMS/External/ocean_upwelling.in .