River forcing in nested grids

Suggest improvements/optimizations to the ROMS code.

Moderators: arango, robertson

Post Reply
Message
Author
Renato_Cecilio
Posts: 5
Joined: Wed Aug 24, 2022 4:08 pm
Location: renatocecilio.org

River forcing in nested grids

#1 Unread post by Renato_Cecilio »

Hello all!

I was trying to implement a river forcing in the 3rd level only of a nested grid system.
An error occurred and the inspection with "debug=on" compilation showed a problem with dimensions of "SOURCES" in the file mod_sources.F.
So I changed it to:

157! IF (ng.eq.1) THEN
158! DO mg=1,Ngrids
159 mg=ng

176! END DO
177! END IF

189! IF (ng.eq.1) allocate ( SOURCES(Ngrids) )
190!
191 IF (.not.allocated(SOURCES)) THEN
192 allocate ( SOURCES(Ngrids) )
193 END IF

It is now working. No other change was made.
However: What did I do wrong? ( I wasn't supposed to change the code!)

Thanks.

Post Reply