Query Regarding Latitude-Varying Air Pressure in ROMS Model

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
hyc006
Posts: 24
Joined: Thu Nov 30, 2023 2:12 am
Location: UCSD

Query Regarding Latitude-Varying Air Pressure in ROMS Model

#1 Unread post by hyc006 »

Greetings ROMS Discussion Community,

I'm currently working on implementing latitude-varying air pressure in my ROMS model to create a pressure gradient for driving geostrophic currents. To achieve this, I've constructed the air pressure in the ana_pair.h file as follows:

Code: Select all

#elif defined SHALLOW || SHALLOWNI
      Cor_freq = -1.182E-05_r8
      Tilt_pressure = -0.05_r8*Cor_freq*rho0*111.2_r8*1000_r8
      Mid_lat = -4.6741
      Mid_pressure = 1013.25_r8
      DO j=JstrT,JendT
        DO i=IstrT,IendT
          Lat_move = latr(i,j)-Mid_lat
         /*0.01 for 1 pa = 0.01 mbar*/
          Pair(i,j)= Mid_pressure + 0.01_r8*Tilt_pressure*Lat_move
        END DO
      END DO 
This method appears to generate a reasonable pressure gradient, as evidenced by the output (shown in the figure).
pair2.jpg
However, I've encountered a peculiar issue: there seems to be an unexpected pressure bump at the south boundary. My initial suspicion is that the periodic boundary condition might be influencing this anomaly. However, it doesn't seem logical to enforce periodicity on air pressure while setting other variables (such as u, v, ssh, etc.) to be periodic.

Does anyone have insights into why this strange pressure bump might be occurring at the south boundary? I would greatly appreciate any thoughts or suggestions on how to address this issue.

Thank you for your assistance!
Hsin-Yi Chen

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

Re: Query Regarding Latitude-Varying Air Pressure in ROMS Model

#2 Unread post by jcwarner »

N-S periodic means that field values on the northern edge will be copied to the southern edge, and also the other way.
So the thin line along the bottom is the pressure from the northern edge, if you set periodic in the ocean.in file.
for a continuous gradient, periodic may not be the best choice. perhaps a body force might work better.

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: Query Regarding Latitude-Varying Air Pressure in ROMS Model

#3 Unread post by wilkin »

I use time varying air pressure to generate oscillating flow in a "1-dimensional" ( actually 3 x 3 horizontal grid) doubly periodic test case for teaching ... similar to the BIO_TOY example.

For this to work, I have to fill the entire grid and disable the periodic exchange.

So, in ana_pair.h note the +2 in the DO loop ranges ...

Code: Select all

#elif defined COD_1DMIX
# ifdef RAMP_TIDES
        cff1=TANH((tdays(ng)-dstart)/1.0_r8)
# else
        cff1=1.0_r8
# endif 
      DO j=JstrR-2,JendR+2
        DO i=IstrR-2,IendR+2
! A barotropic pressure gradient is used to emulate the body force due to tides
! Units of Pair are millibars 
! user(6) is imposed maximum dp/dx in Pascals per meter                 
! dp (mb) in each dx is 0.01_r8*dp/dx*delta-x
! (the factor 0.01_r8 converts Pa to millibars)
! 0.02 Pa/m corresponds to slope 1 m per 500 km
!
! harmonic time variability like a tide
          cff2 = 2.0_r8*pi/(user(7)/24.0_r8)  ! user(7) freq in days-1
          Pair(i,j)=1000.0_r8 + 0.01_r8*user(6)*FLOAT(i)/Lm(ng)        &
     &                           *cff1*SIN(cff2*tdays(ng))
        END DO
      END DO
#else
and then ...

Code: Select all

!
!  Exchange boundary data.
!
#if !defined COD_1DMIX
/* In periodic applications it is necessary to exchange boundary data
   to enforce periodicity. But in COD 1-D Mixing example we don't want
   to do this because it messes up grad(p) = spatially constant */
      IF (EWperiodic(ng).or.NSperiodic(ng)) THEN
       CALL exchange_r2d_tile (ng, tile,                               &
     &                          LBi, UBi, LBj, UBj,                    &
     &                          Pair)
      END IF
#endif
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Post Reply