Opened 7 years ago
Closed 7 years ago
#1852 closed Defect (fixed)
Inconsistent halo values across restarts in SETTE tests
Reported by: | acc | Owned by: | acc |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | OCE | Version: | trunk |
Severity: | Keywords: | ||
Cc: |
Description
Context
Attempts to derive a SETTE test for SAS configurations by comparing restarts in restart ability tests has revealed a minor issue with sbc_tsc_b values differing between continuous runs and restarted runs covering the same period. Differences are found in halo regions which have no impact on results but invalidate the proposed new test.
Analysis
The cause has been traced to the initialisation carried out in trasbc.F90. Currently the code is (in shorter, pre-OMP form):
IF( kt == nit000 ) THEN !* 1st time-step IF( ln_rstart .AND. & ! Restart: read in restart file & iom_varid( numror, 'sbc_hc_b', ldstop = .FALSE. ) > 0 ) THEN IF(lwp) WRITE(numout,*) ' nit000-1 sbc tracer content field read in the restart file' zfact = 0.5_wp CALL iom_get( numror, jpdom_autoglo, 'sbc_hc_b', sbc_tsc_b(:,:,jp_tem) ) ! before heat content sbc trend CALL iom_get( numror, jpdom_autoglo, 'sbc_sc_b', sbc_tsc_b(:,:,jp_sal) ) ! before salt content sbc trend ELSE ! No restart or restart not found: Euler forward time stepping zfact = 1._wp sbc_tsc(:,:,:) = 0._wp sbc_tsc_b(:,:,:) = 0._wp ENDIF ELSE !* other time-steps: swap of forcing fields zfact = 0.5_wp sbc_tsc_b(:,:,:) = sbc_tsc(:,:,:) ENDIF ! !== Now sbc tracer content fields ==! DO jj = 2, jpj DO ji = fs_2, fs_jpim1 ! vector opt. sbc_tsc(ji,jj,jp_tem) = r1_rau0_rcp * qns(ji,jj) ! non solar heat flux sbc_tsc(ji,jj,jp_sal) = r1_rau0 * sfx(ji,jj) ! salt flux due to freezing/melting END DO END DO
Note that on a restart, sbc_tsc is not initialised and only inner points are subsequently set before the:
sbc_tsc_b(:,:,:) = sbc_tsc(:,:,:)
instruction on the next time step. Thus the unused haloes can (and do) contain arbitrary values unless unset values are automatically set to zero by the compiler.
Recommendation
The simplest solution is to introduce a:
sbc_tsc(:,:,:) = 0._wp
immediately before the first call to iom_get.
Of course for OMP operability what actually needs to be inserted is:
DO jn = 1, jpts !$OMP PARALLEL DO schedule(static) private(jj, ji) DO jj = 1, jpj DO ji = 1, jpi sbc_tsc(ji,jj,jn) = 0._wp ! needed just to ensure haloes are consistent across restarts END DO END DO END DO
Commit History (1)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
7710 | acc | 2017-02-21T17:00:18+01:00 | Trunk fix for ticket #1852. Add initialisation of sbc_tsc in trasbc.F90 to ensure consistency in unused haloes across restarts |
Change History (1)
comment:1 Changed 7 years ago by acc
- Resolution set to fixed
- Status changed from new to closed
Fix submitted to trunk at Changeset: [7710]