Sorry for asking such a basic questions. I am working on some FOTRAN77 codes and trying to call it from Python. However, I have found some problems in returning two or more values from a function.
Below is the code. It has four inputs (APPRAT,APPNUM,APSPAC,KOC), and I want to return three parameter values (APPTOT,KD,TDEGF), which are stored in GENEEC3. My compiled code works well when only one parameter is returned, but does not work when I request it to send three parameters back.
So please give me some suggestions and thanks everyone for the help!
Function GENEEC3 (APPRAT,APPNUM,APSPAC,KOC)
REAL GENEEC3(3)
CHARACTER*1 METHOD,AGAIN,WETTED,ADSORP,AIRFLG,GRNFLG,ORCFLG,GRSIZE
Cf2py intent(in) APPRAT,APPNUM,APSPAC,KOC,METHAF,WETTED,METHOD,AIRFLG
Cf2py intent(in) YLOCEN,GRNFLG,ORCFLG,INCORP,SOL,METHAP,HYDHAP,FOTHAP
Cf2py intent(out) GENEEC3(3)
C
APPTOT=APPRAT*APPNUM
TDEGF = APPNUM * APSPAC
KD = 0.0116 * KOC
C
GENEEC3(1)=APPTOT
GENEEC3(2)=KD
GENEEC3(3)=TDEGF
C
RETURN
END Function GENEEC3