I'm working on an idealized ROMS setup where I drive the flow using a pressure gradient imposed by air pressure. To implement this, I modified ana_pair.h to set a latitudinally varying air pressure, disabling periodic exchange to ensure the gradient is preserved across the entire domain. Here's the relevant portion of my ana_pair.h:
Code: Select all
#elif defined SHALLOW
Cor_freq = -1.182E-05_r8
Tilt_pressure = -0.8_r8 * Cor_freq * rho0 * 111.2_r8 * 1000_r8
Mid_lat = -4.6741
Mid_pressure = 1013.25_r8
DO j=JstrR-2, JendR+2
DO i=IstrR-2, IendR+2
Lat_move = latr(i,j) - Mid_lat
Pair(i,j) = Mid_pressure + 0.01_r8 * Tilt_pressure * Lat_move
END DO
END DO
Code: Select all
! Exchange boundary data.
!
! IF (EWperiodic(ng).or.NSperiodic(ng)) THEN
! CALL exchange_r2d_tile (ng, tile, &
! & LBi, UBi, LBj, UBj, &
! & Pair)
! END IF
Some differences between the servers:
Old server: OpenMPI + gfortran
New server: MPICH + ifort
So, I’m wondering:
Is there something wrong or incomplete in my code that might be causing this?
Is it possible the parallel communication is still doing something I’m not catching?
Is there a more robust or recommended way to implement a latitudinal pressure gradient that is non-periodic?
I’ve attached my full ana_pair.h file below in case it’s helpful. Thanks in advance for any help or suggestions!
Best,
Hsin-Yi Chen