Compiling ROMS-3.2 with modifications in ana_nudgcoef.h

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
staalstrom
Posts: 31
Joined: Mon Feb 04, 2008 3:43 pm
Location: NIVA, OSLO, NORWAY

Compiling ROMS-3.2 with modifications in ana_nudgcoef.h

#1 Unread post by staalstrom »

I have compiled ROMS-3.2.
The application is a fjord (The Oslofjord) and has one open boundary in the south and I want to use enhanced climatological nudging near the boundary and no nudging in the interior.

So I want to make some modifications in the ana_nudgcoef.h.

#elif defined IOSLO
Lh=user(1) ! Width [m] of southern nudging region
DO j=JstrR,JendR
DO i=IstrR,IendR
IF (GRID(ng)%yr(i,j).lt.Lh) THEN
wrk(i,j)=0.5_r8*(1+COS(pi/Lh*(GRID(ng)%yr(i,j))))
END IF
END DO
END DO
# ifdef TCLM_NUDGING
DO itrc=1,NT(ng)
DO j=JstrR,JendR
DO i=IstrR,IendR
CLIMA(ng)%Tnudgcof(i,j,itrc)=wrk(i,j)*Tnudg(itrc,ng)
END DO
END DO
END DO
# endif
# ifdef M3CLM_NUDGING
DO j=JstrR,JendR
DO i=IstrR,IendR
CLIMA(ng)%M3nudgcof(i,j)=wrk(i,j)*M3nudg(ng)
END DO
END DO
# endif
#else

But when I compile I get problems while declaring wrk:

fortcom: Error: analytical.f90, line 374: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association [JMAXS]
real(r8), dimension(IminS:ImaxS,JminS:JmaxS) :: wrk
--------------------------------------------^
fortcom: Error: analytical.f90, line 374: This name does not have a type, and must have an explicit type. [IMINS]
real(r8), dimension(IminS:ImaxS,JminS:JmaxS) :: wrk
--------------------------^

Earlier in ana_nudgcoef.h wrk was declared as

real(r8), dimension(PRIVATE_2D_SCRATCH_ARRAY) :: wrk

Can anyone tell me what's the problem?
Do I have to put in something instead of "PRIVATE_2D_SCRATCH_ARRAY"?

Best regards
staalstrom

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

Re: Compiling ROMS-3.2 with modifications in ana_nudgcoef.h

#2 Unread post by kate »

Yes, there was a change at some point so all instances of PRIVATE_2D_SCRATCH_ARRAY has to be changed. The new incantation is:

Code: Select all

      real(r8), dimension(IminS:ImaxS,JminS:JmaxS) :: wrk

staalstrom
Posts: 31
Joined: Mon Feb 04, 2008 3:43 pm
Location: NIVA, OSLO, NORWAY

Re: Compiling ROMS-3.2 with modifications in ana_nudgcoef.h

#3 Unread post by staalstrom »

Thanks.
I used and outdated version of ana_nudgcoef.h
When I do my edits in an updated version, everything works fine.

staalstrom

Post Reply