C *** the wrapper subroutine for MYFUNC
C *** input into array X, output into array Y
C
SUBROUTINE DO_MYFUNC(PARS_GET, PARS_PUT)
IMPLICIT NONE
INTEGER NPT_MAX, NPT
C *** We can handle NPT_MAX data points
PARAMETER(NPT_MAX=1000)
REAL X(NPT_MAX), Y(NPT_MAX)
EXTERNAL PARS_GET, PARS_PUT
C *** print a "blue" message to the user
CALL MODULE_INFORMATION("Inside module --- MYFUNC called!!!")
C *** Set NPT to the max. size of the array
C *** On return, NPT will be the number of data points passed
NPT = NPT_MAX
C *** The input was placed in a workspace field called 'XVALS' in GCL
CALL MODULE_GET_REAL_ARRAY(PARS_GET, 'XVALS', X, NPT)
IF (NPT .GT. NPT_MAX) THEN
CALL MODULE_ERROR("myfunc module", 'Too many points", " ")
RETURN
ENDIF
CALL MYFUNC(X, Y, NPT)
C *** now return the result (Y) in a workspace field called 'YVALS'
CALL MODULE_PUT_REAL_ARRAY(PARS_PUT, 'YVALS', Y, NPT)
RETURN
END