Changes between Version 59 and Version 60 of ticket/1851/General
- Timestamp:
- 2017-03-09T16:48:41+01:00 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ticket/1851/General
v59 v60 455 455 There's a suspicious looking bit of code in here which does; 456 456 457 {{{ 457 {{{ IF( kt /= nit000 ) THEN ! Swap of forcing fields ! 458 ! ! ---------------------------------------- ! 459 rnf_b (:,: ) = rnf (:,: ) ! Swap the ocean forcing fields except at nit000 460 rnf_tsc_b(:,:,:) = rnf_tsc(:,:,:) ! where before fields are set at the end of the routine 461 ! 462 ENDIF 463 }}} 464 465 And later on we have... 466 467 {{{ 468 458 469 IF( kt == nit000 ) THEN ! set the forcing field at nit000 - 1 ! 459 470 ! ! ---------------------------------------- ! … … 472 483 }}} 473 484 474 So this lump of code can only be called on the first TS after a restart... putting writes in here confirms that it is and that the first IF condition qualifies so it's reading rnf_b and rnf_tsc_b 475 from the dump. However it seems that if it wasn't reading the dump it wants to transfer rnf to rnf_b and rnf_tsc to rnf_tsc_b. I don't get how that can make sense. 476 477 If it's the first TS of a restart where's it getting its values from? Ancillaries? Maybe it's OK. 485 So it means on every TS except a restart it's setting rnf_b = rnf and rnf_tsc_b = rnf_tsc. 486 A restart is the only occasion when these things emerge from sbc_rnf with different values. The rest of the time the _b and standard values are identical. Talking to Tim he agrees this is fishy. He says that the reading of rnf_b from the restart is legitimate because we need the value from the last TS, but our rnf value should be different. So it's the CRUN at TS 33 which is at fault. In fact all non-restart timesteps will have incorrectly identical values for rnf and rnf_b. 487 488 We need to ensure that this swapping is done before the new rnf value is obtained (from the coupling), not after! 489 490 This appears to have been in code for a very long time. Tim confirms that it was present in GC2! 491 492 The only reason we're able to identify this (and the CICE restart bug) now is because we now have a restartable atmosphere. Until we had that (some time in the last year) we would never 493 have been able to spot these sorts of bugs, w/o some sort of dummy interface. 494 495