Initial 2D current not in outputs' 1st timestep

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
mathieudever

Initial 2D current not in outputs' 1st timestep

#1 Unread post by mathieudever »

Hi,

My problem is that I feel like ROMS is not picking up all the initials conditions when it runs, and I am wondering why... I just have a regular basin with 2 closed boundaries and 2 (upstream and downstream) open boundaries. My boundary conditions are:

Code: Select all

!                   W       S       E       N
!                   e       o       a       o
!                   s       u       s       r
!                   t       t       t       t
!                           h               h
!
!                   1       2       3       4

   LBC(isFsur) ==   Clo     Cha     Clo     Cha         ! free-surface
   LBC(isUbar) ==   Clo     Per     Clo     Per         ! 2D U-momentum
   LBC(isVbar) ==   Clo     Per     Clo     Per         ! 2D V-momentum
   LBC(isUvel) ==   Clo     Per     Clo     Per         ! 3D U-momentum
   LBC(isVvel) ==   Clo     Per     Clo     Per         ! 3D V-momentum
   LBC(isMtke) ==   Clo     Per     Clo     Per         ! mixing TKE

   LBC(isTvar) ==   Clo     Rad     Clo     Cla \       ! temperature
                    Clo     Rad     Clo     Cla         ! salinity
And I specified an uniform flow (vbar) in ANA_INITIAL:

Code: Select all

#elif defined COASTAL_CURRENT
      DO j=JstrR,JendR
        DO i=Istr,IendR
          ubar(i,j,1)=0.0_r8
        END DO
      END DO
      DO j=Jstr,JendR
        DO i=IstrR,IendR
          vbar(i,j,1)=-1.0_r8
        END DO
      END DO
which is reported in the "analytical.f90" file (meaning it identifies the correct loop, i.e. "COASTAL_CURRENT" is right). However, when I look at the 1st time step of the output file "ocean_his.nc", the velocity is zero... Why is that? Especially because my first step has the right temperature and salinity (T0 and S0 specified in *.in input file), just not the right flow. Any idea why?

Thanks!
Mat.

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

Re: Initial 2D current not in outputs' 1st timestep

#2 Unread post by kate »

The LBC you show does not clamp the velocity boundary conditions but instead leaves them as Periodic. Try changing them.

mathieudever

Re: Initial 2D current not in outputs' 1st timestep

#3 Unread post by mathieudever »

Thank you for your answer Kate.

However, I was just showing my boundary conditions for reference. The real issue is in my initial conditions. I actually investigated the problem a bit more and turns out that the fields ubar and vbar in "ocean_his.nc" at the 1st timestep (i.e. my initial conditions) are the same as u and v.

As showed in my previous post, ROMS reads the ubar and vbar in the ana_inital file and copies it in the analytical.f90 file, but for a mysterious reason, the outputs u and ubar are identical (so are v and vbar). It ignores my definition in ana_initial of ubar and vbar, and replaces it by u and v... Any idea why?

Thanks for your help!
Mat.

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

Re: Initial 2D current not in outputs' 1st timestep

#4 Unread post by kate »

Ah, OK, the initial conditions. If you want uniform southward flow for a 3-D simulation, you need to set it in the v field. ROMS will make vbar consistent with your v in ini_fields, which has this comment:

Code: Select all

!  This routine initializes other time levels for 2D fields. It also   !
!  couples 3D and 2D momentum equations:  it initializes 2D momentum   !
!  (ubar,vbar) to the vertical integral of initial 3D momentum (u,v).  !
ini_fields gets called on the first timestep before anything else happens.

mathieudever

Re: Initial 2D current not in outputs' 1st timestep

#5 Unread post by mathieudever »

Thank you for your help Kate, it is priceless. I slowly get how ROMS works! Thanks again!

Post Reply