Error in ROMS/Modules/mod_scalars.F

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
gen3
Posts: 8
Joined: Tue Oct 28, 2014 7:16 pm
Location: Pusan National University, Korea

Error in ROMS/Modules/mod_scalars.F

#1 Unread post by gen3 »

I had trouble for running model using latest version of ROMS and realized that this is because error in mod_scalars.F

Using USE_DEBUG, it is figured out that the error (mentioned in viewtopic.php?t=6022) is caused in mod_scalars.F, line of

user=0.0_r8

Debugger said: Fortran runtime error: Assignment of scalar to unallocated array.

The generic user parameter array (user) is updated to be recently allocatable variable. I can see that the variable is declared as allocatable, but there is no code to allocate 'user' variable.

To be specific, mod_scalars.F need to include below codes

IF (.not.allocated(user)) THEN
allocate ( user(Ngrids) )
Dmem(1)=Dmem(1)+REAL(Ngrids,r8)
END IF

and

IF (allocated(user)) deallocate ( user )

. After I put these code in mod_scalars.F, latest version start to work.

I would be pleasure if it can be officially updated as soon as possible.


Best regards,

Jang

User avatar
arango
Site Admin
Posts: 1347
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: Error in ROMS/Modules/mod_scalars.F

#2 Unread post by arango »

Thank you for reporting this issue. The problem is that the statement in mod_scalars.F

Code: Select all

      user=0.0_r8
needs to be removed. The other statements that you added are incorrect. The management of the user variable is now done in read_phypar.F.

gen3
Posts: 8
Joined: Tue Oct 28, 2014 7:16 pm
Location: Pusan National University, Korea

Re: Error in ROMS/Modules/mod_scalars.F

#3 Unread post by gen3 »

Thank you for quick response. Hope it can be fixed in next version ROMS.

Always appreciate you for your service.


Best regards,

Jang

Post Reply