Changes between Initial Version and Version 1 of PDAF_parse


Ignore:
Timestamp:
Mar 27, 2026, 6:43:24 PM (4 days ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PDAF_parse

    v1 v1  
     1= PDAF_parse =
     2
     3This page documents the routine `PDAF_parse` of PDAF, which was introduced with PDAF V3.1.
     4
     5The routine provides functionality of common line parsing. Before PDAF V3.1, the template files contained a file `parser_mpi.F90`, which provided this functionality. This file is no longer required with PDAF V3.1.
     6
     7The interface is:
     8{{{
     9  SUBROUTINE PDAF_parse(handle, value)
     10
     11    CHARACTER(len=32), INTENT(in) :: handle     ! String defining variable to be parsed
     12    VARIABLETYPE, INTENT(inout) :: value        ! Value of the variable, where VARIABLETYPE can be
     13                                                ! INTEGER, REAL, CHARACTER(len=*), INTEGER
     14}}}
     15
     16The typical use in the source code is to e.g. parse the ensemble size `dim_ens`
     17{{{
     18   handle='dim_ens'
     19   CALL PDAF_parse(handle, dim_ens)
     20}}}
     21where the specification on the command line would be, to e.g. set the ensemble size to 4:
     22{{{
     23   -dim_ens 4
     24}}}
     25(The template and tutorial codes use this in the file `init_pdaf_parse.F90`)
     26
     27Notes:
     28* The subroutine can parse variables of different types
     29* Only single values or strings canbe parse; there is no parsing for arrays
     30* The general syntax on the command line is `-HANDLE VALUE`