Question about API in Fortran
When I use a call like WINDMIND, how could I get and use the output value?
In API.pdf, it shows the Fortran syntax:CALL WINDMIND(IBUS, ID, STRING1, STRING2, IVAL, IERR)
So, I write:
CALL WINDMIND(2,'1','WGEN','STATE',IVAL,IERR)
In order to get the output, IVAL, I write the below code in my understanding:
VAR(L)=IVAL
VAR(L+1)=IERR
VAR(L+2)=VAR(IVAL)
VAR(L+3)=VAR(IERR)
I put all these codes in a GUST model ,MODE 3, and in .dyr I write
2 'USRMDL' 1 'API' 106 0 0 0 0 4
All other models in .dyr are offical models like REECAU1...
However, when I start dynamic simulation, all the VARs are 0.
How to solve this problem?