Marcos, The easiest way to solve the problem is to reread the parameters and set their values to your local variables at every iteration. That solution wastes computation time so a better solution is that you check IUNIT against the value of INFO(1). If those two values are different then you know you need to reread the parameter list. If they are the same, you don't. Take a look at Type6.for. There is a section that takes care of this problem: IF(INFO(1).NE.IUNIT) THEN !reset the unit number IUNIT = INFO(1) ITYPE = INFO(2) !read the parameter values QMAX = PAR(1) CP = PAR(2) UA = PAR(3) HTREFF = PAR(4) ENDIF of course the problem may be more subtle. If there are local variables that are calculated when you read parameters, those also have to be recalculated if the unit number changes. Best, David On 4/27/2010 08:12, Marcos Porras wrote:
|