Outputs, logs
==============

Once your job is launched, two repositories should appear:

* ``${CHOME}/job_${CEXPER}``
* ``${CWORK}/rundir``

``${CHOME}``, ``${CWORK}`` being variables you specified in 
``myenv_mypath.sh``. 
The first is where jobs and logs are put. The second is where 
your job is running and where outputs/restarts are stored:

* ``${CEXPER}_execute``: running directory, here you can find all the files 
  used to run your simulation
* ``${CEXPER}_output``: output directory, here you should find the output of 
  the different models if the run was successful
* ``${CEXPER}_restart``: restart directory, here you should find the restarts 
  files, they are used for the next job if ``RESTART_FLAG`` is set to ``True``. 

In those repositories, you will find one folder per job. 
Meaning if the simulation is 12 jobs long, you will have 12 folders named with 
dates of each job.

In case of error during your job, check the log files in: 
``${CHOME}/job_${CEXPER}`` for the job log, 
or in ``${CWORK}/rundir/${CEXPER}_execute`` for the model and oasis logs:

* ``out_run.txt``: general log
* ``rsl.error.0000 rsl.out.0000 rsl.error.000* rsl.out.000*``: WRF logs
* ``croco.log``: CROCO log
* ``grid.out  ounf.out  prnc.wind.out strt.out log.ww3``: WW3 logs
* ``nout.000000 debug.root.01 debug.root.02``: OASIS logs

Typical issues that you can encounter are:

* Files not found: check your file names, paths, check ``myenv_mypath.sh``, 
  ``mynamelist.sh``
* Inconsistency in exchanged variables: check OASIS ``namcouple``, especially 
  variable names
* Inconsistent dimensions of the grids of the different files: check the model 
  grid files, the OASIS grids and masks files, the OASIS remapping weight files, 
  as well as the models and OASIS namelists. NB: OASIS grids, masks and rmp* 
  files are not recomputed if they already exist in your directory (make sure 
  to clean in case of error)
* Model blow up: check the model log files. If blow up is due to CFL issue 
  (unrealistic speed, or segmentation fault), decrease the model time step in 
  ``mynamelist.sh`` but be careful to keep consistency between the coupling 
  time step and model time steps (they should be multiples)

