User guide
From OCG Test Wiki
The forecasting system contains two components:
- the ROMS model and all programs to create the necessary forcing files. This component is called the West Florida Shelf Forecasting System or WFSFCS.
- The web-based visualization program (called pyocean)
Contents |
[edit] The West Florida Shelf Forecasting System
The West Florida Shelf Forecasting System (WFSFCS) is essentially written in octave scripts and shell scripts. Octave is a high-level scripting language for numerical computing. The scripts can also be executed without change in Matlab. It contains also some Python and Fortran code. The following filename extensions are used:
| Extension | Language |
|---|---|
| .m | Octave/Matlab |
| .sh | bash shell scripts |
| .py | Python |
[edit] Prerequisites
The following software need to be installed to run the WFSFCS:
- blas
- lapack
- Octave 2.9.13 or higher
- octcdf 1.0.1 or higher
- curl 7.12 or higher
- qhull
- loadgrib
- opendap and libnc-dap (http://www.opendap.org/download/index.html)
- wgrib2 from http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/
All these programs are open-source. Some are already available in Linux distributions. The compilation page contains some instructions to compile these packages from source.
[edit] Downloading
Source code is available under CVS and can be downloaded by:
export CVSROOT=:pserver:abarth@ocgmod1.marine.usf.edu:/var/cvs cvs checkout WFSFCS
[edit] Directory structure
The directory WFSFCS contains the following sub-folders:
- bin
- Shell and Python scripts and Fortran executables
- Conf
- configuration files defining, e.g., the directory where the model will run
- Fortran
- Fortran source files
- Octave
- Octave-specific files
- Scripts
- Octave/Matlab scripts
- roms-2.0_op4
- ROMS code without tides
- roms-2.0_op5
- ROMS code with tides
[edit] Compilation
To compile the ROMS model without tides:
cd roms-2.0_op4 make -f Makefile-hostname
To compile the ROMS model with tides:
cd ../roms-2.0_op5 make -f Makefile-hostname
To compile some Fortran utilities:
cd ../Fortran make FORT=ifort make install
Octave functions: Grib import:
cd Octave/loadgrid make
Curl backend (included in octave since at least octave 2.9.12):
cd Octave/urlwrite make
UFill for spatial extrapolation:
cd Octave/UFill FLIBS="-L/opt/intel/fc/9.0/lib -lifcore_pic -lguide" make FC=ifort octave --eval test_ufill
[edit] Installation
In the folder Conf there is a file named 'wfsfcs.cron'. This file contains all necessary instructions to make the forecast system run every day. The crontab can be installed by:
crontab wfsfcs.cron
This will replace any existing crontab. The shell script get_ncep_an.sh downloads the NCEP analysis every day at 6:06 PM and the shell script wfs_run_cronjob.sh launches the model run at 0:05 AM.
[edit] Output files
All files are created in the directory $model_op_root (this variable is defined in WFSFCS/Conf/globals.sh). Every day a directory named B<YEAR><MONTH><DAY> is created. This file contains the folowing subdirectories and files:
- Atmo
- all atmospheric forcing files
- Atmo/atm.nc
- NetCDF file with a forcing fields from NCEP
- Atmo/oi_sst.nc
- NetCDF file with the OI SST
- Log
- log files of the whole process
- IC
- initial condition
- IC/IC.nc
- NetCDF file with the initial condition, either ROMS of the previous forecast or HYCOM
- IC/HAB_*.txt
- Text file with the initial position for the HAB forecasts in the HAB data format.
- Run
- Model run without tides
- Run/WFS_avr.nc
- Daily averages for the model run
- Run/WFS_flt.nc
- Drifter trajectories
- RunTides
- like the folder Run but with tides.
[edit] Launching the model scripts explicitly
Use the same environment as the cronjon. To find which variables are defined by the cronjob, type:
crontab -l
You will see:
PATH=/home/abarth/WFSFCS/Conf:/home/abarth/WFSFCS/bin:/opt/python2.4/bin:/home/abarth/Python/pyocean/:/usr/local/bin:/bin:/usr/bin: PYTHONPATH=/home/abarth/Python LD_LIBRARY_PATH=/opt/intel/cc/9.0/lib [....]
Execute the lines setting the PATH, PYTHONPATH and LD_LIBRARY_PATH. Run the system with:
wfs_run.sh $(mjd 20070921)
The date is given here in YYYYMMDD format. The command mjd computes the Modified Julian Day number.