New URL for NEMO forge!

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
#1708 (bug in – NEMO

Opened 8 years ago

Closed 6 years ago

#1708 closed Bug (fixed)

bug in

Reported by: davestorkey Owned by: davestorkey
Priority: low Milestone: Unscheduled
Component: OCE Version: v3.6
Severity: Keywords:


The python script to complete the rebuilding of iceberg restarts (after rebuild_nemo has rebuilt the 2D fields) doesn't work if there are icebergs on the zeroth processor. In this case rebuild_nemo adds the zeroth-processor icebergs to the partially-rebuilt file and fails because it can't overwrite the icebergs dimension "n".

There is no way to delete variables or dimensions in netcdf files using the netcdf APIs so the solution is to copy the 2D variables from the partially rebuilt file to a new file and then write the iceberg information to that file.

I have modified the routine (modified routine attached to this ticket). This gives the same answer as the original routine for a nonproblematic restart (with no icebergs on the zeroth processor) and also works for a problematic restart (with icebergs on the zeroth processor). Will commit to the trunk and 3.6_stable branch after review.

Commit History (6)


Bug fix for See ticket #1708.


NEMO 3.6_stable: bug fix for See ticket #1708


Bug fix for bug fix in TOOLS/REBUILD_NEMO/ for 3.6 branch. See ticket #1708.


Bug fix for bug fix to TOOLS/REBUILD_NEMO/ See ticket #1708.

  1. Add (for iceberg restart rebuilding) to nemo_v3_6_STABLE branch.
  2. Add nonzero sys.exit code for in nemo_v3_6_STABLE branch.

See ticket #1708

  1. Bug fix for Will now cope with a set of iceberg restart files with icebergs on the zeroth processor.
  2. Add nonzero sys.exit codes for and

See ticket #1708

Attachments (1)

icb_combrest.py_NEW (8.2 KB) - added by davestorkey 8 years ago.
bug-fixed version of

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by davestorkey

bug-fixed version of

comment:1 Changed 8 years ago by davestorkey

  • Resolution set to fixed
  • Status changed from new to closed

I have updated in the trunk at revision 6423 after review by Andrew Coward. Also added to nemo_v3_6_STABLE branch.

I have also add nonzero sys.exit codes to and for error trapping, which is useful when they are called from other routines.

comment:2 Changed 8 years ago by davestorkey

  • Resolution fixed deleted
  • Status changed from closed to reopened

Last bug fix introduced a new bug whereby the "k" dimension and "kount" variable were not included in the rebuilt file.

comment:3 Changed 7 years ago by clevy

  • Status changed from reopened to new

comment:4 Changed 6 years ago by timgraham

  • Resolution set to fixed
  • Status changed from new to closed

This was fixed a while ago in both nemo_v3_6_STAVLE and in the trunk

Note: See TracTickets for help on using tickets.