libsim  Versione 7.1.6

◆ vol7d_serialize_optionparser()

subroutine vol7d_serialize_class::vol7d_serialize_optionparser ( class(vol7d_serialize), intent(inout)  this,
type(optionparser), intent(inout), optional  opt,
character(len=*), intent(in), optional  ext 
)
private

Method for adding the standard vol7d_serialize command-line options to a program.

An initialised object of the optionparser class is used for adding the relevant options, an extension is provided for formatting the options and the help messages. Alternatively the configurable options can be set directly since the corresponding members in the vol7d_serialize class are PUBLIC. In both cases the vol7d_serialize_parse method must be successively called in order to process the configurable options.

Definizione alla linea 216 del file vol7d_serialize_class.F03.

217 !! the raise_error subroutine is called, with possible program abort.
218 !! It should be called also in case the configurable parameters are
219 !! set directly rather than through command-line.
220 SUBROUTINE vol7d_serialize_parse(this, category)
221 CLASS(vol7d_serialize),INTENT(inout) :: this
222 INTEGER,INTENT(in),OPTIONAL :: category
223 
224 CALL parse_v7d_column(this%column, this%icolumn, '--'//trim(this%ext)//'-column', &
225  .false., category)
226 CALL parse_v7d_column(this%loop, this%looporder, '--'//trim(this%ext)//'-loop', &
227  .true., category)
228 
229 END SUBROUTINE vol7d_serialize_parse
230 
231 
232 ! internal sobroutine to parse a string like
233 ! 'time,timerange,level,ana,network,var,value' (ccol) transforming
234 ! into an integer array of the corresponding PARAMETER values defined
235 ! in vol7d_class (icol)
236 SUBROUTINE parse_v7d_column(ccol, icol, par_name, check_all, category)
237 CHARACTER(len=*),INTENT(in) :: ccol
238 INTEGER,INTENT(out) :: icol(:)
239 CHARACTER(len=*),INTENT(in) :: par_name
240 LOGICAL,INTENT(in) :: check_all
241 INTEGER,INTENT(in),OPTIONAL :: category
242 
243 INTEGER :: i, j, nc
244 INTEGER,POINTER :: w_s(:), w_e(:)
245 
246 nc = word_split(ccol, w_s, w_e, ',')
247 j = 0
248 icol(:) = -1
249 DO i = 1, min(nc, SIZE(icol))
250  SELECT CASE(ccol(w_s(i):w_e(i)))
251  CASE('time')

Generated with Doxygen.