Welcome, Guest
Username: Password: Remember me

TOPIC: Error in reading wind file in meteo.f

Error in reading wind file in meteo.f 7 years 5 months ago #26876

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
Hi everyone,

In my model I have to include wind effects so I have to provide the model with a wind data file. The wind data is constant in space but varying in time, in this case I use OPTION FOR WIND = 2.

But in the first few tests, I found the wind data file was not read properly. It read the first two lines (time at 0s and time at 600s) and then it didn't continue when it was time to read the third line (time at 1200s).The error says no such file.

Then I found the reason for this minor problem. In the source code meteo.f, at line 155, it defines UL as the index of the wind file. But the problem is that it’s only defined at time step 0, under IF(LT.EQ.0) statement.
!     AT FIRST TIMESTEP
!
      IF(LT.EQ.0) THEN
!
        UL = FILES(ATMFILEA)%LU
      ......
      END

I simply move the line UL = FILES(ATMFILEA)%LU and put it above IF(LT.EQ.0).

The other way is to replace UL with FILES(ATMFILEA)%LU in all the READ(UL,*,ERR=100,END=200). It works as well.

Best regards,
Qilong
The administrator has disabled public write access.
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.