New URL for NEMO forge!   http://forge.nemo-ocean.eu

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 icb_combrest.py) – NEMO

Opened 8 years ago

Closed 6 years ago

#1708 closed Bug (fixed)

bug in icb_combrest.py

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

Description

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 icb_combrest.py 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)

ChangesetAuthorTimeChangeLog
6622davestorkey2016-05-25T16:24:04+02:00

Bug fix for icb_combrest.py. See ticket #1708.

6621davestorkey2016-05-25T16:21:58+02:00

NEMO 3.6_stable: bug fix for icb_combrest.py. See ticket #1708

6449davestorkey2016-04-07T18:22:56+02:00

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

6447davestorkey2016-04-07T18:19:52+02:00

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

6424davestorkey2016-04-05T10:21:26+02:00
  1. Add icb_combrest.py (for iceberg restart rebuilding) to nemo_v3_6_STABLE branch.
  2. Add nonzero sys.exit code for icb_pp.py in nemo_v3_6_STABLE branch.

See ticket #1708

6423davestorkey2016-04-05T10:12:33+02:00
  1. Bug fix for icb_combrest.py. Will now cope with a set of iceberg restart files with icebergs on the zeroth processor.
  2. Add nonzero sys.exit codes for icb_combrest.py and icb_pp.py.

See ticket #1708

Attachments (1)

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

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by davestorkey

bug-fixed version of icb_combrest.py

comment:1 Changed 8 years ago by davestorkey

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

I have updated icb_combrest.py 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 icb_combrest.py and icb_pp.py 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.