/* File: _wdm_libmodule.c
 * This file is auto-generated with f2py (version:2).
 * f2py is a Fortran to Python Interface Generator (FPIG), Second Edition,
 * written by Pearu Peterson <pearu@cens.ioc.ee>.
 * Generation date: Thu Nov  7 13:57:52 2019
 * Do not edit this file directly unless you know what you are doing!!!
 */

#ifdef __cplusplus
extern "C" {
#endif

/*********************** See f2py2e/cfuncs.py: includes ***********************/
#include "Python.h"
#include <stdarg.h>
#include "fortranobject.h"
#include <string.h>

/**************** See f2py2e/rules.py: mod_rules['modulebody'] ****************/
static PyObject *_wdm_lib_error;
static PyObject *_wdm_lib_module;

/*********************** See f2py2e/cfuncs.py: typedefs ***********************/
typedef char * string;

/****************** See f2py2e/cfuncs.py: typedefs_generated ******************/
/*need_typedefs_generated*/

/********************** See f2py2e/cfuncs.py: cppmacros **********************/
\
#define FAILNULL(p) do {                                            \
    if ((p) == NULL) {                                              \
        PyErr_SetString(PyExc_MemoryError, "NULL pointer found");   \
        goto capi_fail;                                             \
    }                                                               \
} while (0)

#define STRINGMALLOC(str,len)\
    if ((str = (string)malloc(sizeof(char)*(len+1))) == NULL) {\
        PyErr_SetString(PyExc_MemoryError, "out of memory");\
        goto capi_fail;\
    } else {\
        (str)[len] = '\0';\
    }

#if defined(PREPEND_FORTRAN)
#if defined(NO_APPEND_FORTRAN)
#if defined(UPPERCASE_FORTRAN)
#define F_FUNC(f,F) _##F
#else
#define F_FUNC(f,F) _##f
#endif
#else
#if defined(UPPERCASE_FORTRAN)
#define F_FUNC(f,F) _##F##_
#else
#define F_FUNC(f,F) _##f##_
#endif
#endif
#else
#if defined(NO_APPEND_FORTRAN)
#if defined(UPPERCASE_FORTRAN)
#define F_FUNC(f,F) F
#else
#define F_FUNC(f,F) f
#endif
#else
#if defined(UPPERCASE_FORTRAN)
#define F_FUNC(f,F) F##_
#else
#define F_FUNC(f,F) f##_
#endif
#endif
#endif
#if defined(UNDERSCORE_G77)
#define F_FUNC_US(f,F) F_FUNC(f##_,F##_)
#else
#define F_FUNC_US(f,F) F_FUNC(f,F)
#endif

#define rank(var) var ## _Rank
#define shape(var,dim) var ## _Dims[dim]
#define old_rank(var) (PyArray_NDIM((PyArrayObject *)(capi_ ## var ## _tmp)))
#define old_shape(var,dim) PyArray_DIM(((PyArrayObject *)(capi_ ## var ## _tmp)),dim)
#define fshape(var,dim) shape(var,rank(var)-dim-1)
#define len(var) shape(var,0)
#define flen(var) fshape(var,0)
#define old_size(var) PyArray_SIZE((PyArrayObject *)(capi_ ## var ## _tmp))
/* #define index(i) capi_i ## i */
#define slen(var) capi_ ## var ## _len
#define size(var, ...) f2py_size((PyArrayObject *)(capi_ ## var ## _tmp), ## __VA_ARGS__, -1)

#ifdef DEBUGCFUNCS
#define CFUNCSMESS(mess) fprintf(stderr,"debug-capi:"mess);
#define CFUNCSMESSPY(mess,obj) CFUNCSMESS(mess) \
    PyObject_Print((PyObject *)obj,stderr,Py_PRINT_RAW);\
    fprintf(stderr,"\n");
#else
#define CFUNCSMESS(mess)
#define CFUNCSMESSPY(mess,obj)
#endif

#ifndef max
#define max(a,b) ((a > b) ? (a) : (b))
#endif
#ifndef min
#define min(a,b) ((a < b) ? (a) : (b))
#endif
#ifndef MAX
#define MAX(a,b) ((a > b) ? (a) : (b))
#endif
#ifndef MIN
#define MIN(a,b) ((a < b) ? (a) : (b))
#endif

#if defined(PREPEND_FORTRAN)
#if defined(NO_APPEND_FORTRAN)
#if defined(UPPERCASE_FORTRAN)
#define F_WRAPPEDFUNC(f,F) _F2PYWRAP##F
#else
#define F_WRAPPEDFUNC(f,F) _f2pywrap##f
#endif
#else
#if defined(UPPERCASE_FORTRAN)
#define F_WRAPPEDFUNC(f,F) _F2PYWRAP##F##_
#else
#define F_WRAPPEDFUNC(f,F) _f2pywrap##f##_
#endif
#endif
#else
#if defined(NO_APPEND_FORTRAN)
#if defined(UPPERCASE_FORTRAN)
#define F_WRAPPEDFUNC(f,F) F2PYWRAP##F
#else
#define F_WRAPPEDFUNC(f,F) f2pywrap##f
#endif
#else
#if defined(UPPERCASE_FORTRAN)
#define F_WRAPPEDFUNC(f,F) F2PYWRAP##F##_
#else
#define F_WRAPPEDFUNC(f,F) f2pywrap##f##_
#endif
#endif
#endif
#if defined(UNDERSCORE_G77)
#define F_WRAPPEDFUNC_US(f,F) F_WRAPPEDFUNC(f##_,F##_)
#else
#define F_WRAPPEDFUNC_US(f,F) F_WRAPPEDFUNC(f,F)
#endif

#define STRINGFREE(str) do {if (!(str == NULL)) free(str);} while (0)

#define STRINGCOPYN(to,from,buf_size)                           \
    do {                                                        \
        int _m = (buf_size);                                    \
        char *_to = (to);                                       \
        char *_from = (from);                                   \
        FAILNULL(_to); FAILNULL(_from);                         \
        (void)strncpy(_to, _from, sizeof(char)*_m);             \
        _to[_m-1] = '\0';                                      \
        /* Padding with spaces instead of nulls */              \
        for (_m -= 2; _m >= 0 && _to[_m] == '\0'; _m--) {      \
            _to[_m] = ' ';                                      \
        }                                                       \
    } while (0)


/************************ See f2py2e/cfuncs.py: cfuncs ************************/
static int f2py_size(PyArrayObject* var, ...)
{
  npy_int sz = 0;
  npy_int dim;
  npy_int rank;
  va_list argp;
  va_start(argp, var);
  dim = va_arg(argp, npy_int);
  if (dim==-1)
    {
      sz = PyArray_SIZE(var);
    }
  else
    {
      rank = PyArray_NDIM(var);
      if (dim>=1 && dim<=rank)
        sz = PyArray_DIM(var, dim-1);
      else
        fprintf(stderr, "f2py_size: 2nd argument value=%d fails to satisfy 1<=value<=%d. Result will be 0.\n", dim, rank);
    }
  va_end(argp);
  return sz;
}

static int int_from_pyobj(int* v,PyObject *obj,const char *errmess) {
    PyObject* tmp = NULL;
    if (PyInt_Check(obj)) {
        *v = (int)PyInt_AS_LONG(obj);
        return 1;
    }
    tmp = PyNumber_Int(obj);
    if (tmp) {
        *v = PyInt_AS_LONG(tmp);
        Py_DECREF(tmp);
        return 1;
    }
    if (PyComplex_Check(obj))
        tmp = PyObject_GetAttrString(obj,"real");
    else if (PyString_Check(obj) || PyUnicode_Check(obj))
        /*pass*/;
    else if (PySequence_Check(obj))
        tmp = PySequence_GetItem(obj,0);
    if (tmp) {
        PyErr_Clear();
        if (int_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp); return 1;}
        Py_DECREF(tmp);
    }
    {
        PyObject* err = PyErr_Occurred();
        if (err==NULL) err = _wdm_lib_error;
        PyErr_SetString(err,errmess);
    }
    return 0;
}

static int string_from_pyobj(string *str,int *len,const string inistr,PyObject *obj,const char *errmess) {
    PyArrayObject *arr = NULL;
    PyObject *tmp = NULL;
#ifdef DEBUGCFUNCS
fprintf(stderr,"string_from_pyobj(str='%s',len=%d,inistr='%s',obj=%p)\n",(char*)str,*len,(char *)inistr,obj);
#endif
    if (obj == Py_None) {
        if (*len == -1)
            *len = strlen(inistr); /* Will this cause problems? */
        STRINGMALLOC(*str,*len);
        STRINGCOPYN(*str,inistr,*len+1);
        return 1;
    }
    if (PyArray_Check(obj)) {
        if ((arr = (PyArrayObject *)obj) == NULL)
            goto capi_fail;
        if (!ISCONTIGUOUS(arr)) {
            PyErr_SetString(PyExc_ValueError,"array object is non-contiguous.");
            goto capi_fail;
        }
        if (*len == -1)
            *len = (PyArray_ITEMSIZE(arr))*PyArray_SIZE(arr);
        STRINGMALLOC(*str,*len);
        STRINGCOPYN(*str,PyArray_DATA(arr),*len+1);
        return 1;
    }
    if (PyString_Check(obj)) {
        tmp = obj;
        Py_INCREF(tmp);
    }
#if PY_VERSION_HEX >= 0x03000000
    else if (PyUnicode_Check(obj)) {
        tmp = PyUnicode_AsASCIIString(obj);
    }
    else {
        PyObject *tmp2;
        tmp2 = PyObject_Str(obj);
        if (tmp2) {
            tmp = PyUnicode_AsASCIIString(tmp2);
            Py_DECREF(tmp2);
        }
        else {
            tmp = NULL;
        }
    }
#else
    else {
        tmp = PyObject_Str(obj);
    }
#endif
    if (tmp == NULL) goto capi_fail;
    if (*len == -1)
        *len = PyString_GET_SIZE(tmp);
    STRINGMALLOC(*str,*len);
    STRINGCOPYN(*str,PyString_AS_STRING(tmp),*len+1);
    Py_DECREF(tmp);
    return 1;
capi_fail:
    Py_XDECREF(tmp);
    {
        PyObject* err = PyErr_Occurred();
        if (err==NULL) err = _wdm_lib_error;
        PyErr_SetString(err,errmess);
    }
    return 0;
}


/********************* See f2py2e/cfuncs.py: userincludes *********************/
/*need_userincludes*/

/********************* See f2py2e/capi_rules.py: usercode *********************/


/* See f2py2e/rules.py */
extern void F_FUNC(timcvt,TIMCVT)(int*);
extern void F_FUNC(timdif,TIMDIF)(int*,int*,int*,int*,int*);
extern void F_FUNC(wdflcl,WDFLCL)(int*,int*);
extern void F_WRAPPEDFUNC(wdckdt,WDCKDT)(int*,int*,int*);
extern void F_FUNC(wdbsac,WDBSAC)(int*,int*,int*,int*,int*,string*,int*);
extern void F_FUNC(wdbsai,WDBSAI)(int*,int*,int*,int*,int*,int*,int*);
extern void F_FUNC(wdbsar,WDBSAR)(int*,int*,int*,int*,int*,float*,int*);
extern void F_FUNC(wdbsgc,WDBSGC)(int*,int*,int*,int*,string*,int*);
extern void F_FUNC(wdbsgi,WDBSGI)(int*,int*,int*,int*,int*,int*);
extern void F_FUNC(wdbsgr,WDBSGR)(int*,int*,int*,int*,float*,int*);
extern void F_FUNC(wddsrn,WDDSRN)(int*,int*,int*,int*);
extern void F_FUNC(wddscl,WDDSCL)(int*,int*,int*,int*,int*,int*);
extern void F_FUNC(wddsdl,WDDSDL)(int*,int*,int*);
extern void F_FUNC(wdlbax,WDLBAX)(int*,int*,int*,int*,int*,int*,int*,int*,int*);
extern void F_FUNC(wdbopn,WDBOPN)(int*,string,int*,int*,size_t);
extern void F_FUNC(wdtget,WDTGET)(int*,int*,int*,int*,int*,int*,int*,int*,float*,int*);
extern void F_FUNC(wdtput,WDTPUT)(int*,int*,int*,int*,int*,int*,int*,int*,float*,int*);
extern void F_FUNC(wtfndt,WTFNDT)(int*,int*,int*,int*,int*,int*,int*);
/*eof externroutines*/

/******************** See f2py2e/capi_rules.py: usercode1 ********************/


/******************* See f2py2e/cb_rules.py: buildcallback *******************/
/*need_callbacks*/

/*********************** See f2py2e/rules.py: buildapi ***********************/

/*********************************** timcvt ***********************************/
static char doc_f2py_rout__wdm_lib_timcvt[] = "\
timcvt(date)\n\nWrapper for ``timcvt``.\
\n\nParameters\n----------\n"
"date : in/output rank-1 array('i') with bounds (6)";
/* extern void F_FUNC(timcvt,TIMCVT)(int*); */
static PyObject *f2py_rout__wdm_lib_timcvt(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int *date = NULL;
  npy_intp date_Dims[1] = {-1};
  const int date_Rank = 1;
  PyArrayObject *capi_date_tmp = NULL;
  int capi_date_intent = 0;
  PyObject *date_capi = Py_None;
  static char *capi_kwlist[] = {"date",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "O:_wdm_lib.timcvt",\
    capi_kwlist,&date_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable date */
  date_Dims[0]=6;
  capi_date_intent |= F2PY_INTENT_INOUT;
  capi_date_tmp = array_from_pyobj(NPY_INT,date_Dims,date_Rank,capi_date_intent,date_capi);
  if (capi_date_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_wdm_lib_error,"failed in converting 1st argument `date' of _wdm_lib.timcvt to C/Fortran array" );
  } else {
    date = (int *)(PyArray_DATA(capi_date_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(date);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("");
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  if((PyObject *)capi_date_tmp!=date_capi) {
    Py_XDECREF(capi_date_tmp); }
  }  /*if (capi_date_tmp == NULL) ... else of date*/
  /* End of cleaning variable date */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of timcvt *******************************/

/*********************************** timdif ***********************************/
static char doc_f2py_rout__wdm_lib_timdif[] = "\
nvals = timdif(date1,date2,tcode,tstep)\n\nWrapper for ``timdif``.\
\n\nParameters\n----------\n"
"date1 : input rank-1 array('i') with bounds (6)\n"
"date2 : input rank-1 array('i') with bounds (6)\n"
"tcode : input int\n"
"tstep : input int\n"
"\nReturns\n-------\n"
"nvals : int";
/* extern void F_FUNC(timdif,TIMDIF)(int*,int*,int*,int*,int*); */
static PyObject *f2py_rout__wdm_lib_timdif(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int *date1 = NULL;
  npy_intp date1_Dims[1] = {-1};
  const int date1_Rank = 1;
  PyArrayObject *capi_date1_tmp = NULL;
  int capi_date1_intent = 0;
  PyObject *date1_capi = Py_None;
  int *date2 = NULL;
  npy_intp date2_Dims[1] = {-1};
  const int date2_Rank = 1;
  PyArrayObject *capi_date2_tmp = NULL;
  int capi_date2_intent = 0;
  PyObject *date2_capi = Py_None;
  int tcode = 0;
  PyObject *tcode_capi = Py_None;
  int tstep = 0;
  PyObject *tstep_capi = Py_None;
  int nvals = 0;
  static char *capi_kwlist[] = {"date1","date2","tcode","tstep",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOO:_wdm_lib.timdif",\
    capi_kwlist,&date1_capi,&date2_capi,&tcode_capi,&tstep_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable date1 */
  date1_Dims[0]=6;
  capi_date1_intent |= F2PY_INTENT_IN;
  capi_date1_tmp = array_from_pyobj(NPY_INT,date1_Dims,date1_Rank,capi_date1_intent,date1_capi);
  if (capi_date1_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_wdm_lib_error,"failed in converting 1st argument `date1' of _wdm_lib.timdif to C/Fortran array" );
  } else {
    date1 = (int *)(PyArray_DATA(capi_date1_tmp));

  /* Processing variable date2 */
  date2_Dims[0]=6;
  capi_date2_intent |= F2PY_INTENT_IN;
  capi_date2_tmp = array_from_pyobj(NPY_INT,date2_Dims,date2_Rank,capi_date2_intent,date2_capi);
  if (capi_date2_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_wdm_lib_error,"failed in converting 2nd argument `date2' of _wdm_lib.timdif to C/Fortran array" );
  } else {
    date2 = (int *)(PyArray_DATA(capi_date2_tmp));

  /* Processing variable tcode */
    f2py_success = int_from_pyobj(&tcode,tcode_capi,"_wdm_lib.timdif() 3rd argument (tcode) can't be converted to int");
  if (f2py_success) {
  /* Processing variable tstep */
    f2py_success = int_from_pyobj(&tstep,tstep_capi,"_wdm_lib.timdif() 4th argument (tstep) can't be converted to int");
  if (f2py_success) {
  /* Processing variable nvals */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(date1,date2,&tcode,&tstep,&nvals);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("i",nvals);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  /* End of cleaning variable nvals */
  } /*if (f2py_success) of tstep*/
  /* End of cleaning variable tstep */
  } /*if (f2py_success) of tcode*/
  /* End of cleaning variable tcode */
  if((PyObject *)capi_date2_tmp!=date2_capi) {
    Py_XDECREF(capi_date2_tmp); }
  }  /*if (capi_date2_tmp == NULL) ... else of date2*/
  /* End of cleaning variable date2 */
  if((PyObject *)capi_date1_tmp!=date1_capi) {
    Py_XDECREF(capi_date1_tmp); }
  }  /*if (capi_date1_tmp == NULL) ... else of date1*/
  /* End of cleaning variable date1 */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of timdif *******************************/

/*********************************** wdflcl ***********************************/
static char doc_f2py_rout__wdm_lib_wdflcl[] = "\
retcod = wdflcl(wdmsfl)\n\nWrapper for ``wdflcl``.\
\n\nParameters\n----------\n"
"wdmsfl : input int\n"
"\nReturns\n-------\n"
"retcod : int";
/* extern void F_FUNC(wdflcl,WDFLCL)(int*,int*); */
static PyObject *f2py_rout__wdm_lib_wdflcl(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int wdmsfl = 0;
  PyObject *wdmsfl_capi = Py_None;
  int retcod = 0;
  static char *capi_kwlist[] = {"wdmsfl",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "O:_wdm_lib.wdflcl",\
    capi_kwlist,&wdmsfl_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable wdmsfl */
    f2py_success = int_from_pyobj(&wdmsfl,wdmsfl_capi,"_wdm_lib.wdflcl() 1st argument (wdmsfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable retcod */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&wdmsfl,&retcod);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("i",retcod);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  /* End of cleaning variable retcod */
  } /*if (f2py_success) of wdmsfl*/
  /* End of cleaning variable wdmsfl */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of wdflcl *******************************/

/*********************************** wdckdt ***********************************/
static char doc_f2py_rout__wdm_lib_wdckdt[] = "\
wdckdt = wdckdt(wdmsfl,dsn)\n\nWrapper for ``wdckdt``.\
\n\nParameters\n----------\n"
"wdmsfl : input int\n"
"dsn : input int\n"
"\nReturns\n-------\n"
"wdckdt : int";
/* extern void F_WRAPPEDFUNC(wdckdt,WDCKDT)(int*,int*,int*); */
static PyObject *f2py_rout__wdm_lib_wdckdt(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int wdckdt = 0;
  int wdmsfl = 0;
  PyObject *wdmsfl_capi = Py_None;
  int dsn = 0;
  PyObject *dsn_capi = Py_None;
  static char *capi_kwlist[] = {"wdmsfl","dsn",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OO:_wdm_lib.wdckdt",\
    capi_kwlist,&wdmsfl_capi,&dsn_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable wdmsfl */
    f2py_success = int_from_pyobj(&wdmsfl,wdmsfl_capi,"_wdm_lib.wdckdt() 1st argument (wdmsfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dsn */
    f2py_success = int_from_pyobj(&dsn,dsn_capi,"_wdm_lib.wdckdt() 2nd argument (dsn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable wdckdt */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
  (*f2py_func)(&wdckdt,&wdmsfl,&dsn);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("i",wdckdt);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  /* End of cleaning variable wdckdt */
  } /*if (f2py_success) of dsn*/
  /* End of cleaning variable dsn */
  } /*if (f2py_success) of wdmsfl*/
  /* End of cleaning variable wdmsfl */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of wdckdt *******************************/

/*********************************** wdbsac ***********************************/
static char doc_f2py_rout__wdm_lib_wdbsac[] = "\
retcod = wdbsac(wdmsfl,dsn,messfl,saind,salen,saval)\n\nWrapper for ``wdbsac``.\
\n\nParameters\n----------\n"
"wdmsfl : input int\n"
"dsn : input int\n"
"messfl : input int\n"
"saind : input int\n"
"salen : input int\n"
"saval : input rank-1 array('S') with bounds (salen)\n"
"\nReturns\n-------\n"
"retcod : int";
/* extern void F_FUNC(wdbsac,WDBSAC)(int*,int*,int*,int*,int*,string*,int*); */
static PyObject *f2py_rout__wdm_lib_wdbsac(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,int*,string*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int wdmsfl = 0;
  PyObject *wdmsfl_capi = Py_None;
  int dsn = 0;
  PyObject *dsn_capi = Py_None;
  int messfl = 0;
  PyObject *messfl_capi = Py_None;
  int saind = 0;
  PyObject *saind_capi = Py_None;
  int salen = 0;
  PyObject *salen_capi = Py_None;
  string *saval = NULL;
  npy_intp saval_Dims[1] = {-1};
  const int saval_Rank = 1;
  PyArrayObject *capi_saval_tmp = NULL;
  int capi_saval_intent = 0;
  PyObject *saval_capi = Py_None;
  int retcod = 0;
  static char *capi_kwlist[] = {"wdmsfl","dsn","messfl","saind","salen","saval",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOO:_wdm_lib.wdbsac",\
    capi_kwlist,&wdmsfl_capi,&dsn_capi,&messfl_capi,&saind_capi,&salen_capi,&saval_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable wdmsfl */
    f2py_success = int_from_pyobj(&wdmsfl,wdmsfl_capi,"_wdm_lib.wdbsac() 1st argument (wdmsfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dsn */
    f2py_success = int_from_pyobj(&dsn,dsn_capi,"_wdm_lib.wdbsac() 2nd argument (dsn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable messfl */
    f2py_success = int_from_pyobj(&messfl,messfl_capi,"_wdm_lib.wdbsac() 3rd argument (messfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable saind */
    f2py_success = int_from_pyobj(&saind,saind_capi,"_wdm_lib.wdbsac() 4th argument (saind) can't be converted to int");
  if (f2py_success) {
  /* Processing variable saval */
  ;
  capi_saval_intent |= F2PY_INTENT_IN;
  capi_saval_tmp = array_from_pyobj(NPY_STRING,saval_Dims,saval_Rank,capi_saval_intent,saval_capi);
  if (capi_saval_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_wdm_lib_error,"failed in converting 6th argument `saval' of _wdm_lib.wdbsac to C/Fortran array" );
  } else {
    saval = (string *)(PyArray_DATA(capi_saval_tmp));

  /* Processing variable retcod */
  /* Processing variable salen */
    f2py_success = int_from_pyobj(&salen,salen_capi,"_wdm_lib.wdbsac() 5th argument (salen) can't be converted to int");
  if (f2py_success) {
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&wdmsfl,&dsn,&messfl,&saind,&salen,saval,&retcod);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("i",retcod);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  } /*if (f2py_success) of salen*/
  /* End of cleaning variable salen */
  /* End of cleaning variable retcod */
  if((PyObject *)capi_saval_tmp!=saval_capi) {
    Py_XDECREF(capi_saval_tmp); }
  }  /*if (capi_saval_tmp == NULL) ... else of saval*/
  /* End of cleaning variable saval */
  } /*if (f2py_success) of saind*/
  /* End of cleaning variable saind */
  } /*if (f2py_success) of messfl*/
  /* End of cleaning variable messfl */
  } /*if (f2py_success) of dsn*/
  /* End of cleaning variable dsn */
  } /*if (f2py_success) of wdmsfl*/
  /* End of cleaning variable wdmsfl */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of wdbsac *******************************/

/*********************************** wdbsai ***********************************/
static char doc_f2py_rout__wdm_lib_wdbsai[] = "\
retcod = wdbsai(wdmsfl,dsn,messfl,saind,salen,saval)\n\nWrapper for ``wdbsai``.\
\n\nParameters\n----------\n"
"wdmsfl : input int\n"
"dsn : input int\n"
"messfl : input int\n"
"saind : input int\n"
"salen : input int\n"
"saval : input rank-1 array('i') with bounds (salen)\n"
"\nReturns\n-------\n"
"retcod : int";
/* extern void F_FUNC(wdbsai,WDBSAI)(int*,int*,int*,int*,int*,int*,int*); */
static PyObject *f2py_rout__wdm_lib_wdbsai(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int wdmsfl = 0;
  PyObject *wdmsfl_capi = Py_None;
  int dsn = 0;
  PyObject *dsn_capi = Py_None;
  int messfl = 0;
  PyObject *messfl_capi = Py_None;
  int saind = 0;
  PyObject *saind_capi = Py_None;
  int salen = 0;
  PyObject *salen_capi = Py_None;
  int *saval = NULL;
  npy_intp saval_Dims[1] = {-1};
  const int saval_Rank = 1;
  PyArrayObject *capi_saval_tmp = NULL;
  int capi_saval_intent = 0;
  PyObject *saval_capi = Py_None;
  int retcod = 0;
  static char *capi_kwlist[] = {"wdmsfl","dsn","messfl","saind","salen","saval",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOO:_wdm_lib.wdbsai",\
    capi_kwlist,&wdmsfl_capi,&dsn_capi,&messfl_capi,&saind_capi,&salen_capi,&saval_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable wdmsfl */
    f2py_success = int_from_pyobj(&wdmsfl,wdmsfl_capi,"_wdm_lib.wdbsai() 1st argument (wdmsfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dsn */
    f2py_success = int_from_pyobj(&dsn,dsn_capi,"_wdm_lib.wdbsai() 2nd argument (dsn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable messfl */
    f2py_success = int_from_pyobj(&messfl,messfl_capi,"_wdm_lib.wdbsai() 3rd argument (messfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable saind */
    f2py_success = int_from_pyobj(&saind,saind_capi,"_wdm_lib.wdbsai() 4th argument (saind) can't be converted to int");
  if (f2py_success) {
  /* Processing variable saval */
  ;
  capi_saval_intent |= F2PY_INTENT_IN;
  capi_saval_tmp = array_from_pyobj(NPY_INT,saval_Dims,saval_Rank,capi_saval_intent,saval_capi);
  if (capi_saval_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_wdm_lib_error,"failed in converting 6th argument `saval' of _wdm_lib.wdbsai to C/Fortran array" );
  } else {
    saval = (int *)(PyArray_DATA(capi_saval_tmp));

  /* Processing variable retcod */
  /* Processing variable salen */
    f2py_success = int_from_pyobj(&salen,salen_capi,"_wdm_lib.wdbsai() 5th argument (salen) can't be converted to int");
  if (f2py_success) {
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&wdmsfl,&dsn,&messfl,&saind,&salen,saval,&retcod);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("i",retcod);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  } /*if (f2py_success) of salen*/
  /* End of cleaning variable salen */
  /* End of cleaning variable retcod */
  if((PyObject *)capi_saval_tmp!=saval_capi) {
    Py_XDECREF(capi_saval_tmp); }
  }  /*if (capi_saval_tmp == NULL) ... else of saval*/
  /* End of cleaning variable saval */
  } /*if (f2py_success) of saind*/
  /* End of cleaning variable saind */
  } /*if (f2py_success) of messfl*/
  /* End of cleaning variable messfl */
  } /*if (f2py_success) of dsn*/
  /* End of cleaning variable dsn */
  } /*if (f2py_success) of wdmsfl*/
  /* End of cleaning variable wdmsfl */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of wdbsai *******************************/

/*********************************** wdbsar ***********************************/
static char doc_f2py_rout__wdm_lib_wdbsar[] = "\
retcod = wdbsar(wdmsfl,dsn,messfl,saind,salen,saval)\n\nWrapper for ``wdbsar``.\
\n\nParameters\n----------\n"
"wdmsfl : input int\n"
"dsn : input int\n"
"messfl : input int\n"
"saind : input int\n"
"salen : input int\n"
"saval : input rank-1 array('f') with bounds (salen)\n"
"\nReturns\n-------\n"
"retcod : int";
/* extern void F_FUNC(wdbsar,WDBSAR)(int*,int*,int*,int*,int*,float*,int*); */
static PyObject *f2py_rout__wdm_lib_wdbsar(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,int*,float*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int wdmsfl = 0;
  PyObject *wdmsfl_capi = Py_None;
  int dsn = 0;
  PyObject *dsn_capi = Py_None;
  int messfl = 0;
  PyObject *messfl_capi = Py_None;
  int saind = 0;
  PyObject *saind_capi = Py_None;
  int salen = 0;
  PyObject *salen_capi = Py_None;
  float *saval = NULL;
  npy_intp saval_Dims[1] = {-1};
  const int saval_Rank = 1;
  PyArrayObject *capi_saval_tmp = NULL;
  int capi_saval_intent = 0;
  PyObject *saval_capi = Py_None;
  int retcod = 0;
  static char *capi_kwlist[] = {"wdmsfl","dsn","messfl","saind","salen","saval",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOO:_wdm_lib.wdbsar",\
    capi_kwlist,&wdmsfl_capi,&dsn_capi,&messfl_capi,&saind_capi,&salen_capi,&saval_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable wdmsfl */
    f2py_success = int_from_pyobj(&wdmsfl,wdmsfl_capi,"_wdm_lib.wdbsar() 1st argument (wdmsfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dsn */
    f2py_success = int_from_pyobj(&dsn,dsn_capi,"_wdm_lib.wdbsar() 2nd argument (dsn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable messfl */
    f2py_success = int_from_pyobj(&messfl,messfl_capi,"_wdm_lib.wdbsar() 3rd argument (messfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable saind */
    f2py_success = int_from_pyobj(&saind,saind_capi,"_wdm_lib.wdbsar() 4th argument (saind) can't be converted to int");
  if (f2py_success) {
  /* Processing variable saval */
  ;
  capi_saval_intent |= F2PY_INTENT_IN;
  capi_saval_tmp = array_from_pyobj(NPY_FLOAT,saval_Dims,saval_Rank,capi_saval_intent,saval_capi);
  if (capi_saval_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_wdm_lib_error,"failed in converting 6th argument `saval' of _wdm_lib.wdbsar to C/Fortran array" );
  } else {
    saval = (float *)(PyArray_DATA(capi_saval_tmp));

  /* Processing variable retcod */
  /* Processing variable salen */
    f2py_success = int_from_pyobj(&salen,salen_capi,"_wdm_lib.wdbsar() 5th argument (salen) can't be converted to int");
  if (f2py_success) {
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&wdmsfl,&dsn,&messfl,&saind,&salen,saval,&retcod);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("i",retcod);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  } /*if (f2py_success) of salen*/
  /* End of cleaning variable salen */
  /* End of cleaning variable retcod */
  if((PyObject *)capi_saval_tmp!=saval_capi) {
    Py_XDECREF(capi_saval_tmp); }
  }  /*if (capi_saval_tmp == NULL) ... else of saval*/
  /* End of cleaning variable saval */
  } /*if (f2py_success) of saind*/
  /* End of cleaning variable saind */
  } /*if (f2py_success) of messfl*/
  /* End of cleaning variable messfl */
  } /*if (f2py_success) of dsn*/
  /* End of cleaning variable dsn */
  } /*if (f2py_success) of wdmsfl*/
  /* End of cleaning variable wdmsfl */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of wdbsar *******************************/

/*********************************** wdbsgc ***********************************/
static char doc_f2py_rout__wdm_lib_wdbsgc[] = "\
saval,retcod = wdbsgc(wdmsfl,dsn,saind,salen)\n\nWrapper for ``wdbsgc``.\
\n\nParameters\n----------\n"
"wdmsfl : input int\n"
"dsn : input int\n"
"saind : input int\n"
"salen : input int\n"
"\nReturns\n-------\n"
"saval : rank-1 array('S') with bounds (salen)\n"
"retcod : int";
/* extern void F_FUNC(wdbsgc,WDBSGC)(int*,int*,int*,int*,string*,int*); */
static PyObject *f2py_rout__wdm_lib_wdbsgc(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,string*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int wdmsfl = 0;
  PyObject *wdmsfl_capi = Py_None;
  int dsn = 0;
  PyObject *dsn_capi = Py_None;
  int saind = 0;
  PyObject *saind_capi = Py_None;
  int salen = 0;
  PyObject *salen_capi = Py_None;
  string *saval = NULL;
  npy_intp saval_Dims[1] = {-1};
  const int saval_Rank = 1;
  PyArrayObject *capi_saval_tmp = NULL;
  int capi_saval_intent = 0;
  int retcod = 0;
  static char *capi_kwlist[] = {"wdmsfl","dsn","saind","salen",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOO:_wdm_lib.wdbsgc",\
    capi_kwlist,&wdmsfl_capi,&dsn_capi,&saind_capi,&salen_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable wdmsfl */
    f2py_success = int_from_pyobj(&wdmsfl,wdmsfl_capi,"_wdm_lib.wdbsgc() 1st argument (wdmsfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dsn */
    f2py_success = int_from_pyobj(&dsn,dsn_capi,"_wdm_lib.wdbsgc() 2nd argument (dsn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable saind */
    f2py_success = int_from_pyobj(&saind,saind_capi,"_wdm_lib.wdbsgc() 3rd argument (saind) can't be converted to int");
  if (f2py_success) {
  /* Processing variable salen */
    f2py_success = int_from_pyobj(&salen,salen_capi,"_wdm_lib.wdbsgc() 4th argument (salen) can't be converted to int");
  if (f2py_success) {
  /* Processing variable retcod */
  /* Processing variable saval */
  saval_Dims[0]=salen;
  capi_saval_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_saval_tmp = array_from_pyobj(NPY_STRING,saval_Dims,saval_Rank,capi_saval_intent,Py_None);
  if (capi_saval_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_wdm_lib_error,"failed in converting hidden `saval' of _wdm_lib.wdbsgc to C/Fortran array" );
  } else {
    saval = (string *)(PyArray_DATA(capi_saval_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&wdmsfl,&dsn,&saind,&salen,saval,&retcod);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("Ni",capi_saval_tmp,retcod);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  }  /*if (capi_saval_tmp == NULL) ... else of saval*/
  /* End of cleaning variable saval */
  /* End of cleaning variable retcod */
  } /*if (f2py_success) of salen*/
  /* End of cleaning variable salen */
  } /*if (f2py_success) of saind*/
  /* End of cleaning variable saind */
  } /*if (f2py_success) of dsn*/
  /* End of cleaning variable dsn */
  } /*if (f2py_success) of wdmsfl*/
  /* End of cleaning variable wdmsfl */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of wdbsgc *******************************/

/*********************************** wdbsgi ***********************************/
static char doc_f2py_rout__wdm_lib_wdbsgi[] = "\
saval,retcod = wdbsgi(wdmsfl,dsn,saind,salen)\n\nWrapper for ``wdbsgi``.\
\n\nParameters\n----------\n"
"wdmsfl : input int\n"
"dsn : input int\n"
"saind : input int\n"
"salen : input int\n"
"\nReturns\n-------\n"
"saval : rank-1 array('i') with bounds (salen)\n"
"retcod : int";
/* extern void F_FUNC(wdbsgi,WDBSGI)(int*,int*,int*,int*,int*,int*); */
static PyObject *f2py_rout__wdm_lib_wdbsgi(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int wdmsfl = 0;
  PyObject *wdmsfl_capi = Py_None;
  int dsn = 0;
  PyObject *dsn_capi = Py_None;
  int saind = 0;
  PyObject *saind_capi = Py_None;
  int salen = 0;
  PyObject *salen_capi = Py_None;
  int *saval = NULL;
  npy_intp saval_Dims[1] = {-1};
  const int saval_Rank = 1;
  PyArrayObject *capi_saval_tmp = NULL;
  int capi_saval_intent = 0;
  int retcod = 0;
  static char *capi_kwlist[] = {"wdmsfl","dsn","saind","salen",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOO:_wdm_lib.wdbsgi",\
    capi_kwlist,&wdmsfl_capi,&dsn_capi,&saind_capi,&salen_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable wdmsfl */
    f2py_success = int_from_pyobj(&wdmsfl,wdmsfl_capi,"_wdm_lib.wdbsgi() 1st argument (wdmsfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dsn */
    f2py_success = int_from_pyobj(&dsn,dsn_capi,"_wdm_lib.wdbsgi() 2nd argument (dsn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable saind */
    f2py_success = int_from_pyobj(&saind,saind_capi,"_wdm_lib.wdbsgi() 3rd argument (saind) can't be converted to int");
  if (f2py_success) {
  /* Processing variable salen */
    f2py_success = int_from_pyobj(&salen,salen_capi,"_wdm_lib.wdbsgi() 4th argument (salen) can't be converted to int");
  if (f2py_success) {
  /* Processing variable retcod */
  /* Processing variable saval */
  saval_Dims[0]=salen;
  capi_saval_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_saval_tmp = array_from_pyobj(NPY_INT,saval_Dims,saval_Rank,capi_saval_intent,Py_None);
  if (capi_saval_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_wdm_lib_error,"failed in converting hidden `saval' of _wdm_lib.wdbsgi to C/Fortran array" );
  } else {
    saval = (int *)(PyArray_DATA(capi_saval_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&wdmsfl,&dsn,&saind,&salen,saval,&retcod);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("Ni",capi_saval_tmp,retcod);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  }  /*if (capi_saval_tmp == NULL) ... else of saval*/
  /* End of cleaning variable saval */
  /* End of cleaning variable retcod */
  } /*if (f2py_success) of salen*/
  /* End of cleaning variable salen */
  } /*if (f2py_success) of saind*/
  /* End of cleaning variable saind */
  } /*if (f2py_success) of dsn*/
  /* End of cleaning variable dsn */
  } /*if (f2py_success) of wdmsfl*/
  /* End of cleaning variable wdmsfl */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of wdbsgi *******************************/

/*********************************** wdbsgr ***********************************/
static char doc_f2py_rout__wdm_lib_wdbsgr[] = "\
saval,retcod = wdbsgr(wdmsfl,dsn,saind,salen)\n\nWrapper for ``wdbsgr``.\
\n\nParameters\n----------\n"
"wdmsfl : input int\n"
"dsn : input int\n"
"saind : input int\n"
"salen : input int\n"
"\nReturns\n-------\n"
"saval : rank-1 array('f') with bounds (salen)\n"
"retcod : int";
/* extern void F_FUNC(wdbsgr,WDBSGR)(int*,int*,int*,int*,float*,int*); */
static PyObject *f2py_rout__wdm_lib_wdbsgr(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,float*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int wdmsfl = 0;
  PyObject *wdmsfl_capi = Py_None;
  int dsn = 0;
  PyObject *dsn_capi = Py_None;
  int saind = 0;
  PyObject *saind_capi = Py_None;
  int salen = 0;
  PyObject *salen_capi = Py_None;
  float *saval = NULL;
  npy_intp saval_Dims[1] = {-1};
  const int saval_Rank = 1;
  PyArrayObject *capi_saval_tmp = NULL;
  int capi_saval_intent = 0;
  int retcod = 0;
  static char *capi_kwlist[] = {"wdmsfl","dsn","saind","salen",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOO:_wdm_lib.wdbsgr",\
    capi_kwlist,&wdmsfl_capi,&dsn_capi,&saind_capi,&salen_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable wdmsfl */
    f2py_success = int_from_pyobj(&wdmsfl,wdmsfl_capi,"_wdm_lib.wdbsgr() 1st argument (wdmsfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dsn */
    f2py_success = int_from_pyobj(&dsn,dsn_capi,"_wdm_lib.wdbsgr() 2nd argument (dsn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable saind */
    f2py_success = int_from_pyobj(&saind,saind_capi,"_wdm_lib.wdbsgr() 3rd argument (saind) can't be converted to int");
  if (f2py_success) {
  /* Processing variable salen */
    f2py_success = int_from_pyobj(&salen,salen_capi,"_wdm_lib.wdbsgr() 4th argument (salen) can't be converted to int");
  if (f2py_success) {
  /* Processing variable retcod */
  /* Processing variable saval */
  saval_Dims[0]=salen;
  capi_saval_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_saval_tmp = array_from_pyobj(NPY_FLOAT,saval_Dims,saval_Rank,capi_saval_intent,Py_None);
  if (capi_saval_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_wdm_lib_error,"failed in converting hidden `saval' of _wdm_lib.wdbsgr to C/Fortran array" );
  } else {
    saval = (float *)(PyArray_DATA(capi_saval_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&wdmsfl,&dsn,&saind,&salen,saval,&retcod);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("Ni",capi_saval_tmp,retcod);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  }  /*if (capi_saval_tmp == NULL) ... else of saval*/
  /* End of cleaning variable saval */
  /* End of cleaning variable retcod */
  } /*if (f2py_success) of salen*/
  /* End of cleaning variable salen */
  } /*if (f2py_success) of saind*/
  /* End of cleaning variable saind */
  } /*if (f2py_success) of dsn*/
  /* End of cleaning variable dsn */
  } /*if (f2py_success) of wdmsfl*/
  /* End of cleaning variable wdmsfl */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of wdbsgr *******************************/

/*********************************** wddsrn ***********************************/
static char doc_f2py_rout__wdm_lib_wddsrn[] = "\
retcod = wddsrn(wdmsfl,odsn,ndsn)\n\nWrapper for ``wddsrn``.\
\n\nParameters\n----------\n"
"wdmsfl : input int\n"
"odsn : input int\n"
"ndsn : input int\n"
"\nReturns\n-------\n"
"retcod : int";
/* extern void F_FUNC(wddsrn,WDDSRN)(int*,int*,int*,int*); */
static PyObject *f2py_rout__wdm_lib_wddsrn(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int wdmsfl = 0;
  PyObject *wdmsfl_capi = Py_None;
  int odsn = 0;
  PyObject *odsn_capi = Py_None;
  int ndsn = 0;
  PyObject *ndsn_capi = Py_None;
  int retcod = 0;
  static char *capi_kwlist[] = {"wdmsfl","odsn","ndsn",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOO:_wdm_lib.wddsrn",\
    capi_kwlist,&wdmsfl_capi,&odsn_capi,&ndsn_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable wdmsfl */
    f2py_success = int_from_pyobj(&wdmsfl,wdmsfl_capi,"_wdm_lib.wddsrn() 1st argument (wdmsfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable odsn */
    f2py_success = int_from_pyobj(&odsn,odsn_capi,"_wdm_lib.wddsrn() 2nd argument (odsn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable ndsn */
    f2py_success = int_from_pyobj(&ndsn,ndsn_capi,"_wdm_lib.wddsrn() 3rd argument (ndsn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable retcod */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&wdmsfl,&odsn,&ndsn,&retcod);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("i",retcod);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  /* End of cleaning variable retcod */
  } /*if (f2py_success) of ndsn*/
  /* End of cleaning variable ndsn */
  } /*if (f2py_success) of odsn*/
  /* End of cleaning variable odsn */
  } /*if (f2py_success) of wdmsfl*/
  /* End of cleaning variable wdmsfl */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of wddsrn *******************************/

/*********************************** wddscl ***********************************/
static char doc_f2py_rout__wdm_lib_wddscl[] = "\
retcod = wddscl(owdmfl,odsn,nwdmfl,ndsn,ntype)\n\nWrapper for ``wddscl``.\
\n\nParameters\n----------\n"
"owdmfl : input int\n"
"odsn : input int\n"
"nwdmfl : input int\n"
"ndsn : input int\n"
"ntype : input int\n"
"\nReturns\n-------\n"
"retcod : int";
/* extern void F_FUNC(wddscl,WDDSCL)(int*,int*,int*,int*,int*,int*); */
static PyObject *f2py_rout__wdm_lib_wddscl(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int owdmfl = 0;
  PyObject *owdmfl_capi = Py_None;
  int odsn = 0;
  PyObject *odsn_capi = Py_None;
  int nwdmfl = 0;
  PyObject *nwdmfl_capi = Py_None;
  int ndsn = 0;
  PyObject *ndsn_capi = Py_None;
  int ntype = 0;
  PyObject *ntype_capi = Py_None;
  int retcod = 0;
  static char *capi_kwlist[] = {"owdmfl","odsn","nwdmfl","ndsn","ntype",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOO:_wdm_lib.wddscl",\
    capi_kwlist,&owdmfl_capi,&odsn_capi,&nwdmfl_capi,&ndsn_capi,&ntype_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable owdmfl */
    f2py_success = int_from_pyobj(&owdmfl,owdmfl_capi,"_wdm_lib.wddscl() 1st argument (owdmfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable odsn */
    f2py_success = int_from_pyobj(&odsn,odsn_capi,"_wdm_lib.wddscl() 2nd argument (odsn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable nwdmfl */
    f2py_success = int_from_pyobj(&nwdmfl,nwdmfl_capi,"_wdm_lib.wddscl() 3rd argument (nwdmfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable ndsn */
    f2py_success = int_from_pyobj(&ndsn,ndsn_capi,"_wdm_lib.wddscl() 4th argument (ndsn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable ntype */
    f2py_success = int_from_pyobj(&ntype,ntype_capi,"_wdm_lib.wddscl() 5th argument (ntype) can't be converted to int");
  if (f2py_success) {
  /* Processing variable retcod */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&owdmfl,&odsn,&nwdmfl,&ndsn,&ntype,&retcod);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("i",retcod);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  /* End of cleaning variable retcod */
  } /*if (f2py_success) of ntype*/
  /* End of cleaning variable ntype */
  } /*if (f2py_success) of ndsn*/
  /* End of cleaning variable ndsn */
  } /*if (f2py_success) of nwdmfl*/
  /* End of cleaning variable nwdmfl */
  } /*if (f2py_success) of odsn*/
  /* End of cleaning variable odsn */
  } /*if (f2py_success) of owdmfl*/
  /* End of cleaning variable owdmfl */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of wddscl *******************************/

/*********************************** wddsdl ***********************************/
static char doc_f2py_rout__wdm_lib_wddsdl[] = "\
retcod = wddsdl(wdmsfl,dsn)\n\nWrapper for ``wddsdl``.\
\n\nParameters\n----------\n"
"wdmsfl : input int\n"
"dsn : input int\n"
"\nReturns\n-------\n"
"retcod : int";
/* extern void F_FUNC(wddsdl,WDDSDL)(int*,int*,int*); */
static PyObject *f2py_rout__wdm_lib_wddsdl(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int wdmsfl = 0;
  PyObject *wdmsfl_capi = Py_None;
  int dsn = 0;
  PyObject *dsn_capi = Py_None;
  int retcod = 0;
  static char *capi_kwlist[] = {"wdmsfl","dsn",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OO:_wdm_lib.wddsdl",\
    capi_kwlist,&wdmsfl_capi,&dsn_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable wdmsfl */
    f2py_success = int_from_pyobj(&wdmsfl,wdmsfl_capi,"_wdm_lib.wddsdl() 1st argument (wdmsfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dsn */
    f2py_success = int_from_pyobj(&dsn,dsn_capi,"_wdm_lib.wddsdl() 2nd argument (dsn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable retcod */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&wdmsfl,&dsn,&retcod);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("i",retcod);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  /* End of cleaning variable retcod */
  } /*if (f2py_success) of dsn*/
  /* End of cleaning variable dsn */
  } /*if (f2py_success) of wdmsfl*/
  /* End of cleaning variable wdmsfl */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of wddsdl *******************************/

/*********************************** wdlbax ***********************************/
static char doc_f2py_rout__wdm_lib_wdlbax[] = "\
psa = wdlbax(wdmsfl,dsn,dstype,ndn,nup,nsa,nsasp,ndp)\n\nWrapper for ``wdlbax``.\
\n\nParameters\n----------\n"
"wdmsfl : input int\n"
"dsn : input int\n"
"dstype : input int\n"
"ndn : input int\n"
"nup : input int\n"
"nsa : input int\n"
"nsasp : input int\n"
"ndp : input int\n"
"\nReturns\n-------\n"
"psa : int";
/* extern void F_FUNC(wdlbax,WDLBAX)(int*,int*,int*,int*,int*,int*,int*,int*,int*); */
static PyObject *f2py_rout__wdm_lib_wdlbax(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,int*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int wdmsfl = 0;
  PyObject *wdmsfl_capi = Py_None;
  int dsn = 0;
  PyObject *dsn_capi = Py_None;
  int dstype = 0;
  PyObject *dstype_capi = Py_None;
  int ndn = 0;
  PyObject *ndn_capi = Py_None;
  int nup = 0;
  PyObject *nup_capi = Py_None;
  int nsa = 0;
  PyObject *nsa_capi = Py_None;
  int nsasp = 0;
  PyObject *nsasp_capi = Py_None;
  int ndp = 0;
  PyObject *ndp_capi = Py_None;
  int psa = 0;
  static char *capi_kwlist[] = {"wdmsfl","dsn","dstype","ndn","nup","nsa","nsasp","ndp",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOOOO:_wdm_lib.wdlbax",\
    capi_kwlist,&wdmsfl_capi,&dsn_capi,&dstype_capi,&ndn_capi,&nup_capi,&nsa_capi,&nsasp_capi,&ndp_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable wdmsfl */
    f2py_success = int_from_pyobj(&wdmsfl,wdmsfl_capi,"_wdm_lib.wdlbax() 1st argument (wdmsfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dsn */
    f2py_success = int_from_pyobj(&dsn,dsn_capi,"_wdm_lib.wdlbax() 2nd argument (dsn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dstype */
    f2py_success = int_from_pyobj(&dstype,dstype_capi,"_wdm_lib.wdlbax() 3rd argument (dstype) can't be converted to int");
  if (f2py_success) {
  /* Processing variable ndn */
    f2py_success = int_from_pyobj(&ndn,ndn_capi,"_wdm_lib.wdlbax() 4th argument (ndn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable nup */
    f2py_success = int_from_pyobj(&nup,nup_capi,"_wdm_lib.wdlbax() 5th argument (nup) can't be converted to int");
  if (f2py_success) {
  /* Processing variable nsa */
    f2py_success = int_from_pyobj(&nsa,nsa_capi,"_wdm_lib.wdlbax() 6th argument (nsa) can't be converted to int");
  if (f2py_success) {
  /* Processing variable nsasp */
    f2py_success = int_from_pyobj(&nsasp,nsasp_capi,"_wdm_lib.wdlbax() 7th argument (nsasp) can't be converted to int");
  if (f2py_success) {
  /* Processing variable ndp */
    f2py_success = int_from_pyobj(&ndp,ndp_capi,"_wdm_lib.wdlbax() 8th argument (ndp) can't be converted to int");
  if (f2py_success) {
  /* Processing variable psa */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&wdmsfl,&dsn,&dstype,&ndn,&nup,&nsa,&nsasp,&ndp,&psa);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("i",psa);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  /* End of cleaning variable psa */
  } /*if (f2py_success) of ndp*/
  /* End of cleaning variable ndp */
  } /*if (f2py_success) of nsasp*/
  /* End of cleaning variable nsasp */
  } /*if (f2py_success) of nsa*/
  /* End of cleaning variable nsa */
  } /*if (f2py_success) of nup*/
  /* End of cleaning variable nup */
  } /*if (f2py_success) of ndn*/
  /* End of cleaning variable ndn */
  } /*if (f2py_success) of dstype*/
  /* End of cleaning variable dstype */
  } /*if (f2py_success) of dsn*/
  /* End of cleaning variable dsn */
  } /*if (f2py_success) of wdmsfl*/
  /* End of cleaning variable wdmsfl */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of wdlbax *******************************/

/*********************************** wdbopn ***********************************/
static char doc_f2py_rout__wdm_lib_wdbopn[] = "\
retcod = wdbopn(wdmsfl,wdname,ronwfg)\n\nWrapper for ``wdbopn``.\
\n\nParameters\n----------\n"
"wdmsfl : input int\n"
"wdname : input string(len=-1)\n"
"ronwfg : input int\n"
"\nReturns\n-------\n"
"retcod : int";
/* extern void F_FUNC(wdbopn,WDBOPN)(int*,string,int*,int*,size_t); */
static PyObject *f2py_rout__wdm_lib_wdbopn(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,string,int*,int*,size_t)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int wdmsfl = 0;
  PyObject *wdmsfl_capi = Py_None;
  string wdname = NULL;
  int slen(wdname);
  PyObject *wdname_capi = Py_None;
  int ronwfg = 0;
  PyObject *ronwfg_capi = Py_None;
  int retcod = 0;
  static char *capi_kwlist[] = {"wdmsfl","wdname","ronwfg",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOO:_wdm_lib.wdbopn",\
    capi_kwlist,&wdmsfl_capi,&wdname_capi,&ronwfg_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable wdmsfl */
    f2py_success = int_from_pyobj(&wdmsfl,wdmsfl_capi,"_wdm_lib.wdbopn() 1st argument (wdmsfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable wdname */
  slen(wdname) = -1;
  f2py_success = string_from_pyobj(&wdname,&slen(wdname),"",wdname_capi,"string_from_pyobj failed in converting 2nd argument `wdname' of _wdm_lib.wdbopn to C string");
  if (f2py_success) {
  /* Processing variable ronwfg */
    f2py_success = int_from_pyobj(&ronwfg,ronwfg_capi,"_wdm_lib.wdbopn() 3rd argument (ronwfg) can't be converted to int");
  if (f2py_success) {
  /* Processing variable retcod */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&wdmsfl,wdname,&ronwfg,&retcod,slen(wdname));
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("i",retcod);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  /* End of cleaning variable retcod */
  } /*if (f2py_success) of ronwfg*/
  /* End of cleaning variable ronwfg */
    STRINGFREE(wdname);
  }  /*if (f2py_success) of wdname*/
  /* End of cleaning variable wdname */
  } /*if (f2py_success) of wdmsfl*/
  /* End of cleaning variable wdmsfl */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of wdbopn *******************************/

/*********************************** wdtget ***********************************/
static char doc_f2py_rout__wdm_lib_wdtget[] = "\
rval,retcod = wdtget(wdmsfl,dsn,delt,dates,nval,dtran,qualfg,tunits)\n\nWrapper for ``wdtget``.\
\n\nParameters\n----------\n"
"wdmsfl : input int\n"
"dsn : input int\n"
"delt : input int\n"
"dates : input rank-1 array('i') with bounds (6)\n"
"nval : input int\n"
"dtran : input int\n"
"qualfg : input int\n"
"tunits : input int\n"
"\nReturns\n-------\n"
"rval : rank-1 array('f') with bounds (nval)\n"
"retcod : int";
/* extern void F_FUNC(wdtget,WDTGET)(int*,int*,int*,int*,int*,int*,int*,int*,float*,int*); */
static PyObject *f2py_rout__wdm_lib_wdtget(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,int*,int*,int*,int*,float*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int wdmsfl = 0;
  PyObject *wdmsfl_capi = Py_None;
  int dsn = 0;
  PyObject *dsn_capi = Py_None;
  int delt = 0;
  PyObject *delt_capi = Py_None;
  int *dates = NULL;
  npy_intp dates_Dims[1] = {-1};
  const int dates_Rank = 1;
  PyArrayObject *capi_dates_tmp = NULL;
  int capi_dates_intent = 0;
  PyObject *dates_capi = Py_None;
  int nval = 0;
  PyObject *nval_capi = Py_None;
  int dtran = 0;
  PyObject *dtran_capi = Py_None;
  int qualfg = 0;
  PyObject *qualfg_capi = Py_None;
  int tunits = 0;
  PyObject *tunits_capi = Py_None;
  float *rval = NULL;
  npy_intp rval_Dims[1] = {-1};
  const int rval_Rank = 1;
  PyArrayObject *capi_rval_tmp = NULL;
  int capi_rval_intent = 0;
  int retcod = 0;
  static char *capi_kwlist[] = {"wdmsfl","dsn","delt","dates","nval","dtran","qualfg","tunits",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOOOO:_wdm_lib.wdtget",\
    capi_kwlist,&wdmsfl_capi,&dsn_capi,&delt_capi,&dates_capi,&nval_capi,&dtran_capi,&qualfg_capi,&tunits_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable wdmsfl */
    f2py_success = int_from_pyobj(&wdmsfl,wdmsfl_capi,"_wdm_lib.wdtget() 1st argument (wdmsfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dsn */
    f2py_success = int_from_pyobj(&dsn,dsn_capi,"_wdm_lib.wdtget() 2nd argument (dsn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable delt */
    f2py_success = int_from_pyobj(&delt,delt_capi,"_wdm_lib.wdtget() 3rd argument (delt) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dates */
  dates_Dims[0]=6;
  capi_dates_intent |= F2PY_INTENT_IN;
  capi_dates_tmp = array_from_pyobj(NPY_INT,dates_Dims,dates_Rank,capi_dates_intent,dates_capi);
  if (capi_dates_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_wdm_lib_error,"failed in converting 4th argument `dates' of _wdm_lib.wdtget to C/Fortran array" );
  } else {
    dates = (int *)(PyArray_DATA(capi_dates_tmp));

  /* Processing variable nval */
    f2py_success = int_from_pyobj(&nval,nval_capi,"_wdm_lib.wdtget() 5th argument (nval) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dtran */
    f2py_success = int_from_pyobj(&dtran,dtran_capi,"_wdm_lib.wdtget() 6th argument (dtran) can't be converted to int");
  if (f2py_success) {
  /* Processing variable qualfg */
    f2py_success = int_from_pyobj(&qualfg,qualfg_capi,"_wdm_lib.wdtget() 7th argument (qualfg) can't be converted to int");
  if (f2py_success) {
  /* Processing variable tunits */
    f2py_success = int_from_pyobj(&tunits,tunits_capi,"_wdm_lib.wdtget() 8th argument (tunits) can't be converted to int");
  if (f2py_success) {
  /* Processing variable retcod */
  /* Processing variable rval */
  rval_Dims[0]=nval;
  capi_rval_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_rval_tmp = array_from_pyobj(NPY_FLOAT,rval_Dims,rval_Rank,capi_rval_intent,Py_None);
  if (capi_rval_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_wdm_lib_error,"failed in converting hidden `rval' of _wdm_lib.wdtget to C/Fortran array" );
  } else {
    rval = (float *)(PyArray_DATA(capi_rval_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&wdmsfl,&dsn,&delt,dates,&nval,&dtran,&qualfg,&tunits,rval,&retcod);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("Ni",capi_rval_tmp,retcod);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  }  /*if (capi_rval_tmp == NULL) ... else of rval*/
  /* End of cleaning variable rval */
  /* End of cleaning variable retcod */
  } /*if (f2py_success) of tunits*/
  /* End of cleaning variable tunits */
  } /*if (f2py_success) of qualfg*/
  /* End of cleaning variable qualfg */
  } /*if (f2py_success) of dtran*/
  /* End of cleaning variable dtran */
  } /*if (f2py_success) of nval*/
  /* End of cleaning variable nval */
  if((PyObject *)capi_dates_tmp!=dates_capi) {
    Py_XDECREF(capi_dates_tmp); }
  }  /*if (capi_dates_tmp == NULL) ... else of dates*/
  /* End of cleaning variable dates */
  } /*if (f2py_success) of delt*/
  /* End of cleaning variable delt */
  } /*if (f2py_success) of dsn*/
  /* End of cleaning variable dsn */
  } /*if (f2py_success) of wdmsfl*/
  /* End of cleaning variable wdmsfl */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of wdtget *******************************/

/*********************************** wdtput ***********************************/
static char doc_f2py_rout__wdm_lib_wdtput[] = "\
retcod = wdtput(wdmsfl,dsn,delt,dates,nval,dtovwr,qualfg,tunits,rval)\n\nWrapper for ``wdtput``.\
\n\nParameters\n----------\n"
"wdmsfl : input int\n"
"dsn : input int\n"
"delt : input int\n"
"dates : input rank-1 array('i') with bounds (6)\n"
"nval : input int\n"
"dtovwr : input int\n"
"qualfg : input int\n"
"tunits : input int\n"
"rval : input rank-1 array('f') with bounds (nval)\n"
"\nReturns\n-------\n"
"retcod : int";
/* extern void F_FUNC(wdtput,WDTPUT)(int*,int*,int*,int*,int*,int*,int*,int*,float*,int*); */
static PyObject *f2py_rout__wdm_lib_wdtput(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,int*,int*,int*,int*,float*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int wdmsfl = 0;
  PyObject *wdmsfl_capi = Py_None;
  int dsn = 0;
  PyObject *dsn_capi = Py_None;
  int delt = 0;
  PyObject *delt_capi = Py_None;
  int *dates = NULL;
  npy_intp dates_Dims[1] = {-1};
  const int dates_Rank = 1;
  PyArrayObject *capi_dates_tmp = NULL;
  int capi_dates_intent = 0;
  PyObject *dates_capi = Py_None;
  int nval = 0;
  PyObject *nval_capi = Py_None;
  int dtovwr = 0;
  PyObject *dtovwr_capi = Py_None;
  int qualfg = 0;
  PyObject *qualfg_capi = Py_None;
  int tunits = 0;
  PyObject *tunits_capi = Py_None;
  float *rval = NULL;
  npy_intp rval_Dims[1] = {-1};
  const int rval_Rank = 1;
  PyArrayObject *capi_rval_tmp = NULL;
  int capi_rval_intent = 0;
  PyObject *rval_capi = Py_None;
  int retcod = 0;
  static char *capi_kwlist[] = {"wdmsfl","dsn","delt","dates","nval","dtovwr","qualfg","tunits","rval",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOOOOO:_wdm_lib.wdtput",\
    capi_kwlist,&wdmsfl_capi,&dsn_capi,&delt_capi,&dates_capi,&nval_capi,&dtovwr_capi,&qualfg_capi,&tunits_capi,&rval_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable wdmsfl */
    f2py_success = int_from_pyobj(&wdmsfl,wdmsfl_capi,"_wdm_lib.wdtput() 1st argument (wdmsfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dsn */
    f2py_success = int_from_pyobj(&dsn,dsn_capi,"_wdm_lib.wdtput() 2nd argument (dsn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable delt */
    f2py_success = int_from_pyobj(&delt,delt_capi,"_wdm_lib.wdtput() 3rd argument (delt) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dates */
  dates_Dims[0]=6;
  capi_dates_intent |= F2PY_INTENT_IN;
  capi_dates_tmp = array_from_pyobj(NPY_INT,dates_Dims,dates_Rank,capi_dates_intent,dates_capi);
  if (capi_dates_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_wdm_lib_error,"failed in converting 4th argument `dates' of _wdm_lib.wdtput to C/Fortran array" );
  } else {
    dates = (int *)(PyArray_DATA(capi_dates_tmp));

  /* Processing variable nval */
    f2py_success = int_from_pyobj(&nval,nval_capi,"_wdm_lib.wdtput() 5th argument (nval) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dtovwr */
    f2py_success = int_from_pyobj(&dtovwr,dtovwr_capi,"_wdm_lib.wdtput() 6th argument (dtovwr) can't be converted to int");
  if (f2py_success) {
  /* Processing variable qualfg */
    f2py_success = int_from_pyobj(&qualfg,qualfg_capi,"_wdm_lib.wdtput() 7th argument (qualfg) can't be converted to int");
  if (f2py_success) {
  /* Processing variable tunits */
    f2py_success = int_from_pyobj(&tunits,tunits_capi,"_wdm_lib.wdtput() 8th argument (tunits) can't be converted to int");
  if (f2py_success) {
  /* Processing variable retcod */
  /* Processing variable rval */
  rval_Dims[0]=nval;
  capi_rval_intent |= F2PY_INTENT_IN;
  capi_rval_tmp = array_from_pyobj(NPY_FLOAT,rval_Dims,rval_Rank,capi_rval_intent,rval_capi);
  if (capi_rval_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_wdm_lib_error,"failed in converting 9th argument `rval' of _wdm_lib.wdtput to C/Fortran array" );
  } else {
    rval = (float *)(PyArray_DATA(capi_rval_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&wdmsfl,&dsn,&delt,dates,&nval,&dtovwr,&qualfg,&tunits,rval,&retcod);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("i",retcod);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  if((PyObject *)capi_rval_tmp!=rval_capi) {
    Py_XDECREF(capi_rval_tmp); }
  }  /*if (capi_rval_tmp == NULL) ... else of rval*/
  /* End of cleaning variable rval */
  /* End of cleaning variable retcod */
  } /*if (f2py_success) of tunits*/
  /* End of cleaning variable tunits */
  } /*if (f2py_success) of qualfg*/
  /* End of cleaning variable qualfg */
  } /*if (f2py_success) of dtovwr*/
  /* End of cleaning variable dtovwr */
  } /*if (f2py_success) of nval*/
  /* End of cleaning variable nval */
  if((PyObject *)capi_dates_tmp!=dates_capi) {
    Py_XDECREF(capi_dates_tmp); }
  }  /*if (capi_dates_tmp == NULL) ... else of dates*/
  /* End of cleaning variable dates */
  } /*if (f2py_success) of delt*/
  /* End of cleaning variable delt */
  } /*if (f2py_success) of dsn*/
  /* End of cleaning variable dsn */
  } /*if (f2py_success) of wdmsfl*/
  /* End of cleaning variable wdmsfl */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of wdtput *******************************/

/*********************************** wtfndt ***********************************/
static char doc_f2py_rout__wdm_lib_wtfndt[] = "\
tdsfrc,sdat,edat,retcod = wtfndt(wdmsfl,dsn,gpflg)\n\nWrapper for ``wtfndt``.\
\n\nParameters\n----------\n"
"wdmsfl : input int\n"
"dsn : input int\n"
"gpflg : input int\n"
"\nReturns\n-------\n"
"tdsfrc : int\n"
"sdat : rank-1 array('i') with bounds (6)\n"
"edat : rank-1 array('i') with bounds (6)\n"
"retcod : int";
/* extern void F_FUNC(wtfndt,WTFNDT)(int*,int*,int*,int*,int*,int*,int*); */
static PyObject *f2py_rout__wdm_lib_wtfndt(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int wdmsfl = 0;
  PyObject *wdmsfl_capi = Py_None;
  int dsn = 0;
  PyObject *dsn_capi = Py_None;
  int gpflg = 0;
  PyObject *gpflg_capi = Py_None;
  int tdsfrc = 0;
  int *sdat = NULL;
  npy_intp sdat_Dims[1] = {-1};
  const int sdat_Rank = 1;
  PyArrayObject *capi_sdat_tmp = NULL;
  int capi_sdat_intent = 0;
  int *edat = NULL;
  npy_intp edat_Dims[1] = {-1};
  const int edat_Rank = 1;
  PyArrayObject *capi_edat_tmp = NULL;
  int capi_edat_intent = 0;
  int retcod = 0;
  static char *capi_kwlist[] = {"wdmsfl","dsn","gpflg",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOO:_wdm_lib.wtfndt",\
    capi_kwlist,&wdmsfl_capi,&dsn_capi,&gpflg_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable wdmsfl */
    f2py_success = int_from_pyobj(&wdmsfl,wdmsfl_capi,"_wdm_lib.wtfndt() 1st argument (wdmsfl) can't be converted to int");
  if (f2py_success) {
  /* Processing variable dsn */
    f2py_success = int_from_pyobj(&dsn,dsn_capi,"_wdm_lib.wtfndt() 2nd argument (dsn) can't be converted to int");
  if (f2py_success) {
  /* Processing variable gpflg */
    f2py_success = int_from_pyobj(&gpflg,gpflg_capi,"_wdm_lib.wtfndt() 3rd argument (gpflg) can't be converted to int");
  if (f2py_success) {
  /* Processing variable tdsfrc */
  /* Processing variable sdat */
  sdat_Dims[0]=6;
  capi_sdat_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_sdat_tmp = array_from_pyobj(NPY_INT,sdat_Dims,sdat_Rank,capi_sdat_intent,Py_None);
  if (capi_sdat_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_wdm_lib_error,"failed in converting hidden `sdat' of _wdm_lib.wtfndt to C/Fortran array" );
  } else {
    sdat = (int *)(PyArray_DATA(capi_sdat_tmp));

  /* Processing variable edat */
  edat_Dims[0]=6;
  capi_edat_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_edat_tmp = array_from_pyobj(NPY_INT,edat_Dims,edat_Rank,capi_edat_intent,Py_None);
  if (capi_edat_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_wdm_lib_error,"failed in converting hidden `edat' of _wdm_lib.wtfndt to C/Fortran array" );
  } else {
    edat = (int *)(PyArray_DATA(capi_edat_tmp));

  /* Processing variable retcod */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&wdmsfl,&dsn,&gpflg,&tdsfrc,sdat,edat,&retcod);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("iNNi",tdsfrc,capi_sdat_tmp,capi_edat_tmp,retcod);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  /* End of cleaning variable retcod */
  }  /*if (capi_edat_tmp == NULL) ... else of edat*/
  /* End of cleaning variable edat */
  }  /*if (capi_sdat_tmp == NULL) ... else of sdat*/
  /* End of cleaning variable sdat */
  /* End of cleaning variable tdsfrc */
  } /*if (f2py_success) of gpflg*/
  /* End of cleaning variable gpflg */
  } /*if (f2py_success) of dsn*/
  /* End of cleaning variable dsn */
  } /*if (f2py_success) of wdmsfl*/
  /* End of cleaning variable wdmsfl */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of wtfndt *******************************/
/*eof body*/

/******************* See f2py2e/f90mod_rules.py: buildhooks *******************/
/*need_f90modhooks*/

/************** See f2py2e/rules.py: module_rules['modulebody'] **************/

/******************* See f2py2e/common_rules.py: buildhooks *******************/

static FortranDataDef f2py_cfbuff_def[] = {
  {"wibuff",2,{{512,10}},NPY_INT},
  {"recno",1,{{10}},NPY_INT},
  {"wdmfun",1,{{10}},NPY_INT},
  {"nxtpos",1,{{10}},NPY_INT},
  {"prepos",1,{{10}},NPY_INT},
  {"frepos",0,{{-1}},NPY_INT},
  {"wdmcnt",0,{{-1}},NPY_INT},
  {"wdmopn",1,{{5}},NPY_INT},
  {"maxrec",1,{{5}},NPY_INT},
  {NULL}
};
static void f2py_setup_cfbuff(char *wibuff,char *recno,char *wdmfun,char *nxtpos,char *prepos,char *frepos,char *wdmcnt,char *wdmopn,char *maxrec) {
  int i_f2py=0;
  f2py_cfbuff_def[i_f2py++].data = wibuff;
  f2py_cfbuff_def[i_f2py++].data = recno;
  f2py_cfbuff_def[i_f2py++].data = wdmfun;
  f2py_cfbuff_def[i_f2py++].data = nxtpos;
  f2py_cfbuff_def[i_f2py++].data = prepos;
  f2py_cfbuff_def[i_f2py++].data = frepos;
  f2py_cfbuff_def[i_f2py++].data = wdmcnt;
  f2py_cfbuff_def[i_f2py++].data = wdmopn;
  f2py_cfbuff_def[i_f2py++].data = maxrec;
}
extern void F_FUNC(f2pyinitcfbuff,F2PYINITCFBUFF)(void(*)(char*,char*,char*,char*,char*,char*,char*,char*,char*));
static void f2py_init_cfbuff(void) {
  F_FUNC(f2pyinitcfbuff,F2PYINITCFBUFF)(f2py_setup_cfbuff);
}

static FortranDataDef f2py_cdrloc_def[] = {
  {"pfname",0,{{-1}},NPY_INT},
  {"pmxrec",0,{{-1}},NPY_INT},
  {"pfrrec",0,{{-1}},NPY_INT},
  {"ptsnum",0,{{-1}},NPY_INT},
  {"pdirpt",0,{{-1}},NPY_INT},
  {NULL}
};
static void f2py_setup_cdrloc(char *pfname,char *pmxrec,char *pfrrec,char *ptsnum,char *pdirpt) {
  int i_f2py=0;
  f2py_cdrloc_def[i_f2py++].data = pfname;
  f2py_cdrloc_def[i_f2py++].data = pmxrec;
  f2py_cdrloc_def[i_f2py++].data = pfrrec;
  f2py_cdrloc_def[i_f2py++].data = ptsnum;
  f2py_cdrloc_def[i_f2py++].data = pdirpt;
}
extern void F_FUNC(f2pyinitcdrloc,F2PYINITCDRLOC)(void(*)(char*,char*,char*,char*,char*));
static void f2py_init_cdrloc(void) {
  F_FUNC(f2pyinitcdrloc,F2PYINITCDRLOC)(f2py_setup_cdrloc);
}

/*need_commonhooks*/

/**************************** See f2py2e/rules.py ****************************/

static FortranDataDef f2py_routine_defs[] = {
  {"timcvt",-1,{{-1}},0,(char *)F_FUNC(timcvt,TIMCVT),(f2py_init_func)f2py_rout__wdm_lib_timcvt,doc_f2py_rout__wdm_lib_timcvt},
  {"timdif",-1,{{-1}},0,(char *)F_FUNC(timdif,TIMDIF),(f2py_init_func)f2py_rout__wdm_lib_timdif,doc_f2py_rout__wdm_lib_timdif},
  {"wdflcl",-1,{{-1}},0,(char *)F_FUNC(wdflcl,WDFLCL),(f2py_init_func)f2py_rout__wdm_lib_wdflcl,doc_f2py_rout__wdm_lib_wdflcl},
  {"wdckdt",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(wdckdt,WDCKDT),(f2py_init_func)f2py_rout__wdm_lib_wdckdt,doc_f2py_rout__wdm_lib_wdckdt},
  {"wdbsac",-1,{{-1}},0,(char *)F_FUNC(wdbsac,WDBSAC),(f2py_init_func)f2py_rout__wdm_lib_wdbsac,doc_f2py_rout__wdm_lib_wdbsac},
  {"wdbsai",-1,{{-1}},0,(char *)F_FUNC(wdbsai,WDBSAI),(f2py_init_func)f2py_rout__wdm_lib_wdbsai,doc_f2py_rout__wdm_lib_wdbsai},
  {"wdbsar",-1,{{-1}},0,(char *)F_FUNC(wdbsar,WDBSAR),(f2py_init_func)f2py_rout__wdm_lib_wdbsar,doc_f2py_rout__wdm_lib_wdbsar},
  {"wdbsgc",-1,{{-1}},0,(char *)F_FUNC(wdbsgc,WDBSGC),(f2py_init_func)f2py_rout__wdm_lib_wdbsgc,doc_f2py_rout__wdm_lib_wdbsgc},
  {"wdbsgi",-1,{{-1}},0,(char *)F_FUNC(wdbsgi,WDBSGI),(f2py_init_func)f2py_rout__wdm_lib_wdbsgi,doc_f2py_rout__wdm_lib_wdbsgi},
  {"wdbsgr",-1,{{-1}},0,(char *)F_FUNC(wdbsgr,WDBSGR),(f2py_init_func)f2py_rout__wdm_lib_wdbsgr,doc_f2py_rout__wdm_lib_wdbsgr},
  {"wddsrn",-1,{{-1}},0,(char *)F_FUNC(wddsrn,WDDSRN),(f2py_init_func)f2py_rout__wdm_lib_wddsrn,doc_f2py_rout__wdm_lib_wddsrn},
  {"wddscl",-1,{{-1}},0,(char *)F_FUNC(wddscl,WDDSCL),(f2py_init_func)f2py_rout__wdm_lib_wddscl,doc_f2py_rout__wdm_lib_wddscl},
  {"wddsdl",-1,{{-1}},0,(char *)F_FUNC(wddsdl,WDDSDL),(f2py_init_func)f2py_rout__wdm_lib_wddsdl,doc_f2py_rout__wdm_lib_wddsdl},
  {"wdlbax",-1,{{-1}},0,(char *)F_FUNC(wdlbax,WDLBAX),(f2py_init_func)f2py_rout__wdm_lib_wdlbax,doc_f2py_rout__wdm_lib_wdlbax},
  {"wdbopn",-1,{{-1}},0,(char *)F_FUNC(wdbopn,WDBOPN),(f2py_init_func)f2py_rout__wdm_lib_wdbopn,doc_f2py_rout__wdm_lib_wdbopn},
  {"wdtget",-1,{{-1}},0,(char *)F_FUNC(wdtget,WDTGET),(f2py_init_func)f2py_rout__wdm_lib_wdtget,doc_f2py_rout__wdm_lib_wdtget},
  {"wdtput",-1,{{-1}},0,(char *)F_FUNC(wdtput,WDTPUT),(f2py_init_func)f2py_rout__wdm_lib_wdtput,doc_f2py_rout__wdm_lib_wdtput},
  {"wtfndt",-1,{{-1}},0,(char *)F_FUNC(wtfndt,WTFNDT),(f2py_init_func)f2py_rout__wdm_lib_wtfndt,doc_f2py_rout__wdm_lib_wtfndt},

/*eof routine_defs*/
  {NULL}
};

static PyMethodDef f2py_module_methods[] = {

  {NULL,NULL}
};

#if PY_VERSION_HEX >= 0x03000000
static struct PyModuleDef moduledef = {
  PyModuleDef_HEAD_INIT,
  "_wdm_lib",
  NULL,
  -1,
  f2py_module_methods,
  NULL,
  NULL,
  NULL,
  NULL
};
#endif

#if PY_VERSION_HEX >= 0x03000000
#define RETVAL m
PyMODINIT_FUNC PyInit__wdm_lib(void) {
#else
#define RETVAL
PyMODINIT_FUNC init_wdm_lib(void) {
#endif
  int i;
  PyObject *m,*d, *s;
#if PY_VERSION_HEX >= 0x03000000
  m = _wdm_lib_module = PyModule_Create(&moduledef);
#else
  m = _wdm_lib_module = Py_InitModule("_wdm_lib", f2py_module_methods);
#endif
  Py_TYPE(&PyFortran_Type) = &PyType_Type;
  import_array();
  if (PyErr_Occurred())
    {PyErr_SetString(PyExc_ImportError, "can't initialize module _wdm_lib (failed to import numpy)"); return RETVAL;}
  d = PyModule_GetDict(m);
  s = PyString_FromString("$Revision: $");
  PyDict_SetItemString(d, "__version__", s);
#if PY_VERSION_HEX >= 0x03000000
  s = PyUnicode_FromString(
#else
  s = PyString_FromString(
#endif
    "This module '_wdm_lib' is auto-generated with f2py (version:2).\nFunctions:\n"
"  timcvt(date)\n"
"  nvals = timdif(date1,date2,tcode,tstep)\n"
"  retcod = wdflcl(wdmsfl)\n"
"  wdckdt = wdckdt(wdmsfl,dsn)\n"
"  retcod = wdbsac(wdmsfl,dsn,messfl,saind,salen,saval)\n"
"  retcod = wdbsai(wdmsfl,dsn,messfl,saind,salen,saval)\n"
"  retcod = wdbsar(wdmsfl,dsn,messfl,saind,salen,saval)\n"
"  saval,retcod = wdbsgc(wdmsfl,dsn,saind,salen)\n"
"  saval,retcod = wdbsgi(wdmsfl,dsn,saind,salen)\n"
"  saval,retcod = wdbsgr(wdmsfl,dsn,saind,salen)\n"
"  retcod = wddsrn(wdmsfl,odsn,ndsn)\n"
"  retcod = wddscl(owdmfl,odsn,nwdmfl,ndsn,ntype)\n"
"  retcod = wddsdl(wdmsfl,dsn)\n"
"  psa = wdlbax(wdmsfl,dsn,dstype,ndn,nup,nsa,nsasp,ndp)\n"
"  retcod = wdbopn(wdmsfl,wdname,ronwfg)\n"
"  rval,retcod = wdtget(wdmsfl,dsn,delt,dates,nval,dtran,qualfg,tunits)\n"
"  retcod = wdtput(wdmsfl,dsn,delt,dates,nval,dtovwr,qualfg,tunits,rval)\n"
"  tdsfrc,sdat,edat,retcod = wtfndt(wdmsfl,dsn,gpflg)\n"
"COMMON blocks:\n""  /cfbuff/ wibuff(512,10),recno(10),wdmfun(10),nxtpos(10),prepos(10),frepos,wdmcnt,wdmopn(5),maxrec(5)\n""  /cdrloc/ pfname,pmxrec,pfrrec,ptsnum,pdirpt\n"".");
  PyDict_SetItemString(d, "__doc__", s);
  _wdm_lib_error = PyErr_NewException ("_wdm_lib.error", NULL, NULL);
  Py_DECREF(s);
  for(i=0;f2py_routine_defs[i].name!=NULL;i++)
    PyDict_SetItemString(d, f2py_routine_defs[i].name,PyFortranObject_NewAsAttr(&f2py_routine_defs[i]));




    {
      extern int F_FUNC(wdckdt,WDCKDT)(void);
      PyObject* o = PyDict_GetItemString(d,"wdckdt");
      PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(wdckdt,WDCKDT),NULL));
#if PY_VERSION_HEX >= 0x03000000
      PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("wdckdt"));
#else
      PyObject_SetAttrString(o,"__name__", PyString_FromString("wdckdt"));
#endif
    }
    














/*eof initf2pywraphooks*/
/*eof initf90modhooks*/

  F2PyDict_SetItemString(d, "cfbuff", PyFortranObject_New(f2py_cfbuff_def,f2py_init_cfbuff));
  F2PyDict_SetItemString(d, "cdrloc", PyFortranObject_New(f2py_cdrloc_def,f2py_init_cdrloc));
/*eof initcommonhooks*/


#ifdef F2PY_REPORT_ATEXIT
  if (! PyErr_Occurred())
    on_exit(f2py_report_on_exit,(void*)"_wdm_lib");
#endif

  return RETVAL;
}
#ifdef __cplusplus
}
#endif
