libsim Versione 7.1.11

◆ vol7d_serialize_optionparser()

subroutine 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.
220SUBROUTINE vol7d_serialize_parse(this, category)
221CLASS(vol7d_serialize),INTENT(inout) :: this
222INTEGER,INTENT(in),OPTIONAL :: category
223
224CALL parse_v7d_column(this%column, this%icolumn, '--'//trim(this%ext)//'-column', &
225 .false., category)
226CALL parse_v7d_column(this%loop, this%looporder, '--'//trim(this%ext)//'-loop', &
227 .true., category)
228
229END 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)
236SUBROUTINE parse_v7d_column(ccol, icol, par_name, check_all, category)
237CHARACTER(len=*),INTENT(in) :: ccol
238INTEGER,INTENT(out) :: icol(:)
239CHARACTER(len=*),INTENT(in) :: par_name
240LOGICAL,INTENT(in) :: check_all
241INTEGER,INTENT(in),OPTIONAL :: category
242
243INTEGER :: i, j, nc
244INTEGER,POINTER :: w_s(:), w_e(:)
245
246nc = word_split(ccol, w_s, w_e, ',')
247j = 0
248icol(:) = -1
249DO i = 1, min(nc, SIZE(icol))
250 SELECT CASE(ccol(w_s(i):w_e(i)))
251 CASE('time')

Generated with Doxygen.