Installation and running guide
#1
Installation

The code runs with python and uses the following libraries:
  • numpy
  • scipy
  • netCDF4 if you need to read netcdf4 model files
  • pyresample for faster interpolation of irregular grids (optional)
If you don't have python and the needed python libraries on your machine
you can download anaconda and follow the installation instructions.

To install swotsimulator:
  • global installation (may require root access):
Code:
   > cd [yourpath]/swotsimulator/
   > python setup.py install
or > pip install [yourpath]/swotsimulator

  •  local installation:
Code:
   > python setup.py install --home=your/local/path
or in a virtualenv > pip install [yourpath]/swotsimulator

  •  Uninstall:
Code:
   > sudo python setup.py install --record record_files.txt
   > cat record_files.txt | xargs sudo rm -rf
or > pip uninstall swotsimulator



Running

Run the SWOT simulator

Code:
   > swotsimulator [your params file]


Run the nadir alone:

Code:
   > nadirsimulator [your params file]



For example, to run the example do:
  • Open ./example/params_example.py and check that the directory path are correct, if needed modify path of dir_setup, indatadir, outdatadir  with your own path (the path of the simulator directory).
  • Run the simulator swotsimulator ./example/params_example.py

Note that if you have installed anaconda, use anaconda python for the installation and to run the simulator

The data provided in the example were produced by the Regional Ocean Modeling System (ROMS) off the Oregon coast developed by Dr. Yi Chao and his team



Testing

Outputs of the simulator can be tested using algorithm from the test directory. 

To run all tests, go to the test directory:

Code:
  > python run_all.py [your params file]




Documentation

- To build the documentation, in the doc directory:

    * Build html: make html

    * Build pdf: make latexpdf

  The build documentation files are located in doc/build/html and in doc/build/latex/


Forum Jump: