 
 
! This file is AUTOGENERATED!!!!
! Do not edit this file; edit m_wcml_quantity.m4 and regenerate.
!
!
module m_wcml_parameter

  use m_common_realtypes, only: sp, dp
  use FoX_wxml, only: xmlf_t
  use FoX_wxml, only: xml_NewElement, xml_AddAttribute
  use FoX_wxml, only: xml_EndElement
  use m_wcml_stml, only: stmAddValue

  implicit none
  private

  interface cmlAddparameter
     module procedure parameterCmplxDpSca
     module procedure parameterCmplxDpArrSi
     module procedure parameterCmplxDpArrSh
     module procedure parameterCmplxDpMatSi
     module procedure parameterCmplxDpMatSh
     module procedure parameterCmplxSpSca
     module procedure parameterCmplxSpArrSi
     module procedure parameterCmplxSpArrSh
     module procedure parameterCmplxSpMatSi
     module procedure parameterCmplxSpMatSh
     module procedure parameterRealDpSca
     module procedure parameterRealDpArrSi
     module procedure parameterRealDpArrSh
     module procedure parameterRealDpMatSi
     module procedure parameterRealDpMatSh
     module procedure parameterRealSpSca
     module procedure parameterRealSpArrSi
     module procedure parameterRealSpArrSh
     module procedure parameterRealSpMatSi
     module procedure parameterRealSpMatSh
     module procedure parameterIntSca
     module procedure parameterIntArrSi
     module procedure parameterIntArrSh
     module procedure parameterIntMatSi
     module procedure parameterIntMatSh
     module procedure parameterLgSca
     module procedure parameterLgArrSi
     module procedure parameterLgArrSh
     module procedure parameterLgMatSi
     module procedure parameterLgMatSh
     module procedure parameterChSca
     module procedure parameterChArrSi
     module procedure parameterChArrSh
     module procedure parameterChMatSi
     module procedure parameterChMatSh

  end interface cmlAddparameter

  public :: cmlAddparameter

contains

  subroutine parameterCmplxDpSca &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    complex(dp), intent(in)   :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterCmplxDpSca

  subroutine parameterCmplxSpSca &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    complex(sp), intent(in)   :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterCmplxSpSca

  subroutine parameterRealDpSca &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    real(dp), intent(in)   :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterRealDpSca

  subroutine parameterRealSpSca &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    real(sp), intent(in)   :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterRealSpSca

  subroutine parameterIntSca &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units)

    type(xmlf_t), intent(inout)              :: xf
    integer, intent(in)   :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterIntSca

  subroutine parameterLgSca &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role)

    type(xmlf_t), intent(inout)              :: xf
    logical, intent(in)   :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role


    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterLgSca

  subroutine parameterChSca &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units)

    type(xmlf_t), intent(inout)              :: xf
    character(len=*), intent(in)   :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in) , optional  :: units

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterChSca


  subroutine parameterCmplxDpArrSi &
    (xf, value,nitems,  ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    complex(dp), intent(in) , dimension(:)  :: value
    integer, intent(in) :: nitems
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value(:nitems), units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterCmplxDpArrSi

  subroutine parameterCmplxSpArrSi &
    (xf, value,nitems,  ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    complex(sp), intent(in) , dimension(:)  :: value
    integer, intent(in) :: nitems
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value(:nitems), units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterCmplxSpArrSi

  subroutine parameterRealDpArrSi &
    (xf, value,nitems,  ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    real(dp), intent(in) , dimension(:)  :: value
    integer, intent(in) :: nitems
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value(:nitems), units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterRealDpArrSi

  subroutine parameterRealSpArrSi &
    (xf, value,nitems,  ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    real(sp), intent(in) , dimension(:)  :: value
    integer, intent(in) :: nitems
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value(:nitems), units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterRealSpArrSi

  subroutine parameterIntArrSi &
    (xf, value,nitems,  ref, title, id, convention, dictRef, constraint, name, role, units)

    type(xmlf_t), intent(inout)              :: xf
    integer, intent(in) , dimension(:)  :: value
    integer, intent(in) :: nitems
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value(:nitems), units=units)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterIntArrSi

  subroutine parameterLgArrSi &
    (xf, value,nitems,  ref, title, id, convention, dictRef, constraint, name, role)

    type(xmlf_t), intent(inout)              :: xf
    logical, intent(in) , dimension(:)  :: value
    integer, intent(in) :: nitems
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role


    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value(:nitems))
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterLgArrSi

  subroutine parameterChArrSi &
    (xf, value,nitems,  ref, title, id, convention, dictRef, constraint, name, role, units)

    type(xmlf_t), intent(inout)              :: xf
    character(len=*), intent(in) , dimension(:)  :: value
    integer, intent(in) :: nitems
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in) , optional  :: units

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value(:nitems), units=units)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterChArrSi


  subroutine parameterCmplxDpArrSh &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    complex(dp), intent(in) , dimension(:)  :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterCmplxDpArrSh

  subroutine parameterCmplxSpArrSh &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    complex(sp), intent(in) , dimension(:)  :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterCmplxSpArrSh

  subroutine parameterRealDpArrSh &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    real(dp), intent(in) , dimension(:)  :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterRealDpArrSh

  subroutine parameterRealSpArrSh &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    real(sp), intent(in) , dimension(:)  :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterRealSpArrSh

  subroutine parameterIntArrSh &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units)

    type(xmlf_t), intent(inout)              :: xf
    integer, intent(in) , dimension(:)  :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterIntArrSh

  subroutine parameterLgArrSh &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role)

    type(xmlf_t), intent(inout)              :: xf
    logical, intent(in) , dimension(:)  :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role


    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterLgArrSh

  subroutine parameterChArrSh &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units)

    type(xmlf_t), intent(inout)              :: xf
    character(len=*), intent(in) , dimension(:)  :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in) , optional  :: units

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterChArrSh


  subroutine parameterCmplxDpMatSi &
    (xf, value,nrows, ncols,  ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    complex(dp), intent(in) , dimension(:,:)  :: value
    integer, intent(in) :: nrows
    integer, intent(in) :: ncols
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value(:nrows, :ncols), units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterCmplxDpMatSi

  subroutine parameterCmplxSpMatSi &
    (xf, value,nrows, ncols,  ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    complex(sp), intent(in) , dimension(:,:)  :: value
    integer, intent(in) :: nrows
    integer, intent(in) :: ncols
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value(:nrows, :ncols), units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterCmplxSpMatSi

  subroutine parameterRealDpMatSi &
    (xf, value,nrows, ncols,  ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    real(dp), intent(in) , dimension(:,:)  :: value
    integer, intent(in) :: nrows
    integer, intent(in) :: ncols
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value(:nrows, :ncols), units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterRealDpMatSi

  subroutine parameterRealSpMatSi &
    (xf, value,nrows, ncols,  ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    real(sp), intent(in) , dimension(:,:)  :: value
    integer, intent(in) :: nrows
    integer, intent(in) :: ncols
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value(:nrows, :ncols), units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterRealSpMatSi

  subroutine parameterIntMatSi &
    (xf, value,nrows, ncols,  ref, title, id, convention, dictRef, constraint, name, role, units)

    type(xmlf_t), intent(inout)              :: xf
    integer, intent(in) , dimension(:,:)  :: value
    integer, intent(in) :: nrows
    integer, intent(in) :: ncols
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value(:nrows, :ncols), units=units)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterIntMatSi

  subroutine parameterLgMatSi &
    (xf, value,nrows, ncols,  ref, title, id, convention, dictRef, constraint, name, role)

    type(xmlf_t), intent(inout)              :: xf
    logical, intent(in) , dimension(:,:)  :: value
    integer, intent(in) :: nrows
    integer, intent(in) :: ncols
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role


    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value(:nrows, :ncols))
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterLgMatSi

  subroutine parameterChMatSi &
    (xf, value,nrows, ncols,  ref, title, id, convention, dictRef, constraint, name, role, units)

    type(xmlf_t), intent(inout)              :: xf
    character(len=*), intent(in) , dimension(:,:)  :: value
    integer, intent(in) :: nrows
    integer, intent(in) :: ncols
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in) , optional  :: units

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value(:nrows, :ncols), units=units)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterChMatSi


  subroutine parameterCmplxDpMatSh &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    complex(dp), intent(in) , dimension(:,:)  :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterCmplxDpMatSh

  subroutine parameterCmplxSpMatSh &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    complex(sp), intent(in) , dimension(:,:)  :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterCmplxSpMatSh

  subroutine parameterRealDpMatSh &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    real(dp), intent(in) , dimension(:,:)  :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterRealDpMatSh

  subroutine parameterRealSpMatSh &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units, fmt)

    type(xmlf_t), intent(inout)              :: xf
    real(sp), intent(in) , dimension(:,:)  :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units
    character(len=*), intent(in), optional :: fmt

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units, fmt=fmt)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterRealSpMatSh

  subroutine parameterIntMatSh &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units)

    type(xmlf_t), intent(inout)              :: xf
    integer, intent(in) , dimension(:,:)  :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in)   :: units

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterIntMatSh

  subroutine parameterLgMatSh &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role)

    type(xmlf_t), intent(inout)              :: xf
    logical, intent(in) , dimension(:,:)  :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role


    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterLgMatSh

  subroutine parameterChMatSh &
    (xf, value, ref, title, id, convention, dictRef, constraint, name, role, units)

    type(xmlf_t), intent(inout)              :: xf
    character(len=*), intent(in) , dimension(:,:)  :: value
    character(len=*), intent(in), optional :: ref
    character(len=*), intent(in), optional :: title
    character(len=*), intent(in), optional :: id
    character(len=*), intent(in), optional :: convention
    character(len=*), intent(in), optional :: dictRef
    character(len=*), intent(in), optional :: constraint
    character(len=*), intent(in), optional :: name
    character(len=*), intent(in), optional :: role

    character(len=*), intent(in) , optional  :: units

    call xml_NewElement(xf, "parameter")
    if (present(ref)) call xml_addAttribute(xf, "ref", ref)
    if (present(title)) call xml_addAttribute(xf, "title", title)
    if (present(id)) call xml_addAttribute(xf, "id", id)
    if (present(convention)) call xml_addAttribute(xf, "convention", convention)
    if (present(dictRef)) call xml_addAttribute(xf, "dictRef", dictRef)
    if (present(constraint)) call xml_addAttribute(xf, "constraint", constraint)
    if (present(name)) call xml_addAttribute(xf, "name", name)
    if (present(role)) call xml_addAttribute(xf, "role", role)

    call stmAddValue(xf=xf, value=value, units=units)
    call xml_EndElement(xf, "parameter")
 
  end subroutine parameterChMatSh


end module m_wcml_parameter

