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
Error in ROMS/Modules/mod_scalars.F
- arango
- Site Admin
- Posts: 1367
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: Error in ROMS/Modules/mod_scalars.F
Thank you for reporting this issue. The problem is that the statement in mod_scalars.F
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.
Code: Select all
user=0.0_r8
Re: Error in ROMS/Modules/mod_scalars.F
Thank you for quick response. Hope it can be fixed in next version ROMS.
Always appreciate you for your service.
Best regards,
Jang
Always appreciate you for your service.
Best regards,
Jang