Skip to content

Conversation

@nikizadehgfdl
Copy link
Contributor

  • Address issue Potential make_coupler_mosaic bug when using --land_mosaic #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.

Description
Include a summary of the change and which issue is fixed. Please also include
relevant motivation and context. List any dependencies that are required for
this change.

Fixes # (issue)

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also note
any relevant details for your test configuration (e.g. compiler, OS). Include
enough information so someone can reproduce your tests.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • make distcheck passes

- Address issue NOAA-GFDL#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.
@nikizadehgfdl nikizadehgfdl changed the title [WIP] Fix bad xgrid along zero longitude when LND grid not same as ATM Fix bad xgrid along zero longitude when LND grid not same as ATM Jan 5, 2026
@nikizadehgfdl
Copy link
Contributor Author

@ceblanton could you assign this to be reviewed (I don't seem to have permissions to do that). I suggest @mlee03 and @bensonr as reviewers. Thanks.

@ceblanton
Copy link
Contributor

@nikizadehgfdl I added you to the github team that can write to the FRE repositories. Can you check?

Copy link

@bensonr bensonr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mlee03
Copy link
Contributor

mlee03 commented Jan 7, 2026

@nikizadehgfdl, could I request for the input and output files used to test this case? I want to make sure FMSgridtools/make_coupler_mosaic produces the correct xgrid

@nikizadehgfdl
Copy link
Contributor Author

nikizadehgfdl commented Jan 7, 2026

@mlee03, the input files are in

/work/Niki.Zadeh/exchange_grid_toolset/workdir/mosaic_ac96lc48oSPEAR.20260107.fixlon.an105/

so, the fix can be tested with the following command line on PAN (an105):

mpirun -np 6 /work/Niki.Zadeh/exchange_grid_toolset/tools/FRE-NCtools_main/builds/gfdlpan/bin/make_coupler_mosaic_parallel --atmos_mosaic /work/Niki.Zadeh/exchange_grid_toolset/workdir/mosaic_ac96lc48oSPEAR.20260107.fixlon.an105/C96_mosaic.nc --land_mosaic /work/Niki.Zadeh/exchange_grid_toolset/workdir/mosaic_ac96lc48oSPEAR.20260107.fixlon.an105/C48_mosaic.nc --ocean_mosaic /work/Niki.Zadeh/exchange_grid_toolset/workdir/mosaic_ac96lc48oSPEAR.20260107.fixlon.an105/ocean_mosaic.nc --mosaic_name mosaic_atmc96_lndc48_om4_SPEAR --ocean_topog /work/Niki.Zadeh/exchange_grid_toolset/workdir/mosaic_ac96lc48oSPEAR.20260107.fixlon.an105/ocean_topog.nc --verbose 2 --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants