12.07.2015 Views

VLIDORT User's Guide

VLIDORT User's Guide

VLIDORT User's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

and carried on with this default. If there is a fatal error during the execution of <strong>VLIDORT</strong>, thenthe model will bypass any further calculation and exit with an error message and 3 error traces toindicate the source of the error. In this case, the STATUS_CALCULATION integer output willhave the value <strong>VLIDORT</strong>_SERIOUS. There are no warnings here; all errors in execution arefatal. More details on the exception handling are in section 4.5.program main_<strong>VLIDORT</strong>! Module files for <strong>VLIDORT</strong>USE <strong>VLIDORT</strong>_PARSUSE <strong>VLIDORT</strong>_IO_DEFSUSE <strong>VLIDORT</strong>_INPUTSUSE <strong>VLIDORT</strong>_MASTERS! Negate implicit typingimplicit none! Status declarationsINTEGER :: STATUS_INPUTCHECK, STATUS_CALCULATION! Initialize status variables to 0STATUS_INPUTCHECK=0; STATUS_CALCULATION=0! Determine File-read Control variables in Input Structurescall <strong>VLIDORT</strong>_INPUT_MASTER &(‘<strong>VLIDORT</strong>.inp’, & ! Input<strong>VLIDORT</strong>_FixIn, & ! Outputs<strong>VLIDORT</strong>_ModIn, & ! Outputs<strong>VLIDORT</strong>_InputStatus ) ! Outputs! Set number of threads (e.g. number of wavelengths)nthreads = 8! Assign Physical (Optical property) input variables for all threads:call USER_<strong>VLIDORT</strong>_PREPARE! Start thread loop; this can be put in OPEN_MP environmentsdo i = 1, nthreads! <strong>VLIDORT</strong> master call and error checkcall <strong>VLIDORT</strong>_MASTER ( &<strong>VLIDORT</strong>_FixIn, &<strong>VLIDORT</strong>_ModIn, &<strong>VLIDORT</strong>_Sup, &<strong>VLIDORT</strong>_Out )call <strong>VLIDORT</strong>_WRITE_STATUS ( &STATUS_FILE_NAME, &STATUS_FILE_UNIT, &STATUS_FILE_FLAG, &<strong>VLIDORT</strong>_Out%Status )! End thread or wavelength loopend do! finishwrite user-defined output arraysstop62

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!