I’d like to report a potential issue I’m encountering when applying non-periodic atmospheric pressure forcing using ana_pair in an idealized model setup.
I'm driving an idealized ROMS simulation using a pressure gradient imposed via the Pair field in ana_pair.h.
I intentionally want all other state variables to remain periodic, but for Pair only, I want the field to be non-periodic, to simulate a steady pressure gradient forcing.
The pressure varies with latitude and is meant to be non-periodic, so I explicitly disabled all periodic boundary exchange for this variable.
What Works :
On my old server (OpenMPI + gfortran), everything works as expected—both in serial and parallel.
On my new server, the model runs correctly in serial (Intel ifort + MPICH).
The Problem :
When I run the same model in parallel on the new server, the air pressure field (Pair) appears to behave as if it is still periodic, even though:
1. I commented out the default periodic exchange in ana_pair.h:
Code: Select all
! IF (EWperiodic(ng).or.NSperiodic(ng)) THEN
! CALL exchange_r2d_tile(...)
! END IF
Code: Select all
IF (EWperiodic(ng)) THEN
EW_exchange = .FALSE.
ELSE
EW_exchange = .FALSE.
END IF
I added the following call at the end of ana_pair.h:
Code: Select all
#ifdef DISTRIBUTE
CALL mp_exchange2d(ng, tile, model, 1, LBi, UBi, LBj, UBj, NghostPoints, .FALSE., .FALSE., Pair)
#endif
What I’ve Tried :
Switching from ifort to gfortran on the new server — did not fix the issue.
Comparing behavior in serial vs. parallel — serial runs behave as expected.
Could this be an issue in how ROMS handles exchange routines internally in distributed parallel runs? Or is there another communication step I might be missing, even after disabling the periodicity at multiple levels?
I’ve attached both my modified ana_pair.h and exchange_2d.F files for reference. I would really appreciate any insight into whether this is an implementation issue on my side or potentially a bug related to parallel exchange behavior in custom variables like Pair. Thanks very much for your time and help!
Best,
Hsin-Yi Chen