[rebuild_nemo] Fails with "NetCDF: Attribute not found" on grid_W files

I’m quite new to using NEMO and still trying to understand how the model output and tools like rebuild_nemo work. Please excuse me if I’ve misunderstood anything basic.

I’m using NEMO version 4.0.1 and trying to rebuild domain-decomposed grid_W output files using rebuild_nemo.

  • Files: ORCA2_1m_20010101_20011231_grid_W_0000.nc … ORCA2_1m_20010101_20011231_grid_W_0035.nc (36 domain-decomposed files)
  • nam_rebuild used:
&nam_rebuild
filebase='ORCA2_1m_20010101_20011231_grid_W'
ndomain=36
l_maskout=.false.
nslicesize=0
deflate_level=1
nc4_xchunk=206
nc4_ychunk=135
nc4_zchunk=1
nc4_tchunk=1
fchunksize=32000000
  • Command:
bash
./rebuild_nemo.exe

ERROR! : NetCDF: Attribute not found
*** NEMO rebuild failed ***

I’m wondering if the merging issue I’m facing might be related to unexpected metadata or variables present in the domain-decomposed files. Specifically, even though I’m rebuilding the grid_W files, the original domain-decomposed files contain global attributes or metadata related to grid_T (for example, attributes such as ibegin_grid_T, nj_grid_T, etc.).

Could the presence of these grid-specific attributes confuse rebuild_nemo during the merging process?

Should these attributes or variables be manually removed from the files before running rebuild_nemo?

However, even when I used cdo to explicitly remove the grid_T related variables and metadata before running rebuild_nemo, the merge still failed.