bug in main3d

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
turuncu
Posts: 128
Joined: Tue Feb 01, 2005 8:21 pm
Location: Istanbul Technical University (ITU)
Contact:

bug in main3d

#1 Unread post by turuncu »

Hi,

I think, i found a bug in main3d. When i run the model (revision 737) in coupling mode (coupled with atmospheric model) the model is not run correctly. For example, if i set coupling interval as 1-hour the model runs 30 step (in my case dt = 120 s) for first 1-hour but after that it runs until end time and it does not stop in next 1-hour. I check the code and add following statement to it just before reading required data

Code: Select all

      IF (tile == 0) then
              PRINT*, Time_Step, step_counter(ng), Rsteps, RunInterval
            END IF
It writes following information to the stdout.

First iteration (1-hour) - F 30 30 3480.00000000000
Second iteration (1-hour) - T 60 30 3480.00000000000

I think that following statement is wrong,

Code: Select all

IF (step_counter(ng).eq.Rsteps) Time_Step=.FALSE.
and should be like that

Code: Select all

IF (MOD(step_counter(ng),Rsteps).eq.0) Time_Step=.FALSE.
Anyway, i modified code and run it. In this case, the ROMS model hanging after second iteration. So i just wonder that is this a bug? Do you have any idea about it?

PS: If you use the model in standalone mode, probably you won't see any problem.

Regards,

--ufuk

turuncu
Posts: 128
Joined: Tue Feb 01, 2005 8:21 pm
Location: Istanbul Technical University (ITU)
Contact:

Re: bug in main3d

#2 Unread post by turuncu »

Hi Again,

To fix hanging problem i also fix "ROMS/Utility/ntimestep.F". I just initialise my_Nsteps as 1.

Code: Select all

          ELSE
            my_Nsteps(ig)=1
            my_Nsteps(ig)=MAX(my_Nsteps(ig), WindowSteps(ig)+1)
            step_counter(ng)=step_counter(ng)+WindowSteps(ig)+1
          END IF

# ifdef ADJOINT
The previous version had a problem because my_Nsteps is not initializing and it has some garbage value comes from memory.

--ufuk

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: bug in main3d

#3 Unread post by kate »

Thanks for the reports! I assume this is COAWST? I'll be trying the coupled atmosphere option soon.

jcwarner
Posts: 1172
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: bug in main3d

#4 Unread post by jcwarner »

this is a roms specific issue. for the model coupling in coawst we simply have
IF (iic(ng).ne.ntstart(ng)) THEN
CALL ocean_coupling (nl)
END IF
COAWST looks at the dt of all the models and determines the number of steps each model should take before coupling. For roms it uses iic(ng) as the time step indicator. Do notice that coawst is different model coupling than distributed by rutgers. i dont think the rutgers version would couple to wrf correctly. Suggest users use coawst for any model coupling.

More importantly I think that the my_Nsteps issue is real. It is never initialized at the top of ntimestep.F, but can be used for the case
ELSE
my_Nsteps(ig)=MAX(my_Nsteps(ig), WindowSteps(ig)+1)
step_counter(ng)=step_counter(ng)+WindowSteps(ig)+1
END IF

-j

turuncu
Posts: 128
Joined: Tue Feb 01, 2005 8:21 pm
Location: Istanbul Technical University (ITU)
Contact:

Re: bug in main3d

#5 Unread post by turuncu »

No. It is not COWAST. I wrote my own driver

RegESM - https://github.com/uturuncoglu/RegESM

to couple ROMS with ICTP's RegCM regional climate model. I just want to test the latest version of the ROMS with the driver, then i found this error.

--ufuk

Post Reply