From b1c164045352a9063487a207b2d5b2c077b08de6 Mon Sep 17 00:00:00 2001 From: Niki Zadeh Date: Tue, 23 Dec 2025 13:13:45 -0500 Subject: [PATCH] Fix bad xgrid along zero longitude when LND grid not same as ATM - Address issue #366 - When LND grid is not the same as ATM the xgrid is wrong along the Prime Meridian, E.g., if ATM is c96 and LND is c48, the xgrid cell areas are small by almost a factor of 2 along longitude=0 and the land mask has a spurious line along longitude=0 - The root cause is the Ocean grid is shifted right by 360 degree assuming that the land and atmos grids are the same which cause the atmXlnd exchange grid cells that are just to the left of the longitude=0 to be ignored. - The fix is to (re)apply the fixlon to shift Ocean grid based on the atmxlnd_x[l][0] rather than the atm_avg. --- src/make-coupler-mosaic/make_coupler_mosaic.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/make-coupler-mosaic/make_coupler_mosaic.c b/src/make-coupler-mosaic/make_coupler_mosaic.c index c6cf61ab..16caeb34 100644 --- a/src/make-coupler-mosaic/make_coupler_mosaic.c +++ b/src/make-coupler-mosaic/make_coupler_mosaic.c @@ -1662,7 +1662,15 @@ int main (int argc, char *argv[]) if(lnd_frac > MIN_AREA_FRAC) { /* over land */ /* find the overlap of atmxlnd and ocean cell */ for(l=0; l