error messages with ANA_INITIAL

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
nacholibre
Posts: 81
Joined: Thu Dec 07, 2006 3:14 pm
Location: USGS
Contact:

error messages with ANA_INITIAL

#1 Unread post by nacholibre »

I am trying to define some river inflow in the ANA_INITIAL routine. It is similar to the RIVERPLUME2 test case. No problems with modifying the initial 2D momentum, but I have problems with the 3D momentum. I can insert the following piece of code with no problems.

Code: Select all

DO k=1,N(ng)
   DO j=JstrR,JendR
      DO i=Istr,IendR
         u(i,j,k,1)=0.0_r8
      END DO
    END DO
  DO j=Jstr,JendR
    DO i=IstrR,IendR
      v(i,j,k,1)=0.0_r8
    END DO
  END DO
END DO
But, if I add the following lines right below it, ROMS cannot compile.

Code: Select all

DO k=1,N(ng)
  v(104,10,k,1)=-1.0_r8
  v(104,9,k,1)=-1.0_r8
  u(82,16,k,1)=1.0_r8
END
I get error messages addressing the related line at analytical.f90

Code: Select all

PGF90-S-0310-Illegal statement in the specification part of a MODULE  (analytical.f90: 440)
What is wrong? I am using svn version 351.

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

Re: error messages with ANA_INITIAL

#2 Unread post by kate »

Are you compiling for parallel execution? I don't know why that didn't compile, but if you ever run that code in parallel, you could get into big trouble. The valid range of i,j will depend on which tile you are running on. A safer way to write that would have if checks comparing 104 to Istr and Iend, etc.

That doesn't tell you why it didn't compile, though. Does it think you are free format or fixed format? Are you obeying one or both?

nacholibre
Posts: 81
Joined: Thu Dec 07, 2006 3:14 pm
Location: USGS
Contact:

Re: error messages with ANA_INITIAL

#3 Unread post by nacholibre »

My understanding is that there is a lot of issues with parallel execution in ROMS. Maybe more for ANA_ routines?
On the other hand, I did the same thing for the 2D momentum in the same routine and there were no problems with it. e.g.

Code: Select all

      
vbar(104,9,1)=-2.0_r8
vbar(104,10,1)=-2.0_r8
ubar(82,16,1)=2.0_r8

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

Re: error messages with ANA_INITIAL

#4 Unread post by jcwarner »

if you do this kind of stuff:
"vbar(104,9,1)=-2.0_r8"
that can be extremely dangerous if you run it in parallel. In MPI, a tile may not know (for example) what index 104 is, and this can stomp on memory somewhere else and cause bad things to happen all around.
If you are running in parallel, it would be best to just use netcdf forcing files if at all possibile.

nacholibre
Posts: 81
Joined: Thu Dec 07, 2006 3:14 pm
Location: USGS
Contact:

ANA_PSOURCE

#5 Unread post by nacholibre »

I see. Thanks for your comments. 8)
This one problem that I am having is not related to ANA_INITIAL, but rather to ANA_PSOURCE. However, I thought it might fit under this post. I get incredibly high values for velocity where I define my source (almost Inf), which is unrealistic of course. The model does not blow up but I need to mask that point while reading the result in order to sea the general spatial variation. I wonder if this is a usual thing to have when using ana_psource. Has anybody experienced anything similar before?

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

Re: error messages with ANA_INITIAL

#6 Unread post by jcwarner »

Hernan just did an update with the ana_psource routine. Give that a try and see if it fixes the situation.

nacholibre
Posts: 81
Joined: Thu Dec 07, 2006 3:14 pm
Location: USGS
Contact:

Re: ANA_PSOURCE

#7 Unread post by nacholibre »

nacholibre wrote:
This one problem that I am having is not related to ANA_INITIAL, but rather to ANA_PSOURCE.
On a second thought it does not have to be limited to ANA_PSOURCE. I think it would happen in case of feeding river information with a netCDF forcing file...

Post Reply