Navigating the source code bundle

From ccrmwiki
Revision as of 18:10, 22 December 2014 by Yjzhang (talk | contribs)
Jump to: navigation, search

You can find a lot of useful information/files in the source code bundle. In general, each directory has a readme type file.

We use v4.1 as an example to explain the structure inside.

cmake

The README inside explains how to use cmake (needs to be installed on your system) to build SCHISM. See [1]for more details.

mk

The files in this dir are local configuration settings used by src/Makefile. If your group happens to have a Make.defs.*, you can simply symlink it:

ln -sf Make.defs.HZG Make.defs.local (I'm using 'HZG' as an example here)

If you cannot find your local environment here, you can use one of the files as a starting point and add your own env in Make.defs.local.

Edit Make.defs.local (which is invoked by ../src/Makefile) to toggle on/off optional modules inside. Then cd ../src and make (to make sure you purge previous options, do make clean first).

test

This dir has all the test cases used to benchmark each version of SCHISM

src
The source code dir has the following subirs and files:
  • All modules: Core, Driver, Hydro, EcoSim, ICM, OilSpill-Jung, ParMetis-3.1.-Sep2010, Sediment, and WWMII
  • GNU make files: Makefile
  • cmake files: CMakeLists.txt
  • beta_notes: this file details all the changes in input file format for each version
  • Utility: this dir contains a lot of useful utility code. The header of each program generally has info on its purpose and instructions on how to use it.
    • ACE: source code and install notes for ACE tools; see [2] for more details.
    • ArcGIS: some scripts to massage SCHISM grid and outputs into ArcGIS
    • Combining_Scripts: FORTRAN and perl scripts used to gather outputs from SCHISM (e.g., outputs/?_0000_elev.61 etc) into one binary file (?_elev.61)
    • Grid_Scripts: FORTRAN codes to interpolate depths from DEM files in either structured grid (raster) or unstructured grid format. While xmgredit5 can do similar things, these scripts are mostly for interpolating from very large DEM files.
    • NCOM: scripts to read NCOM outputs and prepare hotstart.in and salt_nu.in, temp_nu.in, and Z0 components on the boundary in bctides.in.
    • OneWayNestScripts: scripts for 1-way nesting, by preparing *3D.th (elevation, horizontal velocity, salinity and temperature boundary condition) that can be used for the 'small-domain' run.
    • Particle_Tracking: particle tracking code that uses SCHISM's outputs for 3D tracking
    • Post-Processing-Fortran: FORTRAN codes for extracting time series at selected 3D points (including transects). You can easily modify these codes for your own purposes.
    • Sflux_nc: matlab scripts useful for preparing your own .nc files for sflux/. NARR_util/ has scripts to prepare .nc files from NCEP's NARR products.
    • SMS: scripts to convert between .2dm of SMS and .gr3
    • Vis_Matlab: matlab scripts for viz. We suggest you use this for presentations/publications, and use ACE tools for daily research.