#671 closed Enhancement (fixed)
mbathy(:,:) field is not initialised when going through the zgr_bat_ctl subroutine in partial cells
Reported by: | ctlod | Owned by: | rblod |
---|---|---|---|
Priority: | low | Milestone: | Unscheduled |
Component: | OCE | Version: | v3.2 |
Severity: | Keywords: | Miscellaneous OPA bathymetry initialization v3.2 | |
Cc: |
Description
Under specific cases a running time error could occur in domzgr.F90 module:
Case description:
- partial cells option, (ln_zps=.true.)
- a bathymetric file in meters is read, (ntopo=1)
The problem occurs:
- on plateform: SGI ALTIX ICE 8200
- with compilator: ifort v11.1
the mbathy(:,:) field (bathymetry in levels) is not initialised (in partiall cells) before the call to zgr_bat_ctl subroutine.
Furthermore, mbathy(:,:) is modified in this subroutine and is reset to jpkm1 at the beginning of zgr_zps subroutine called just after zgr_bat_ctl.
2 solutions could be applied:
Firstly: replace the following line (at the end of zgr_bat):
IF( .NOT. lk_c1d ) CALL zgr_bat_ctl ! Bathymetry check !
with
IF( .NOT. lk_c1d .AND. .NOT. ln_zps ) CALL zgr_bat_ctl ! Bathymetry check !
since the call to zgr_bat_ctl is a useless in partial cells
Secondly: add the initialisation of mbathy(:,:) to zero or jpkm1 for instance just after the read of the bathymetry in meters in zgr_bat::
CALL iom_open( 'bathy_meter.nc', inum )
CALL iom_get ( inum, jpdom_data, 'Bathymetry', bathy )
CALL iom_close (inum)
mbathy(:,:) = jpkm1
The module with modifications is attached with this ticket.
Commit History (1)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
2463 | gm | 2010-12-08T12:28:00+01:00 | v3.3beta: #766 & #671 share the deepest ocean level indices: bug correction in domzgr.F90 |
Attachments (2)
Change History (12)
Changed 14 years ago by ctlod
comment:1 Changed 14 years ago by rblod
- Owner changed from NEMO team to rblod
comment:2 Changed 14 years ago by gm
This problem does not only concerns the bathymetry control (zgr_bat_ctl) but also the subdomain zoom case (zgr_bat_zoom). Both modify mbathy prior to its initialisation. Fortunately, there are both called again at the end of zgr_zps and zgr_sco subroutines, so that there is no error in the simulation its self, just a potential warning or stop if arrays are not initialized to zero by the compiler.
The best solution is to move the call the two routines at the end of domzgr.F90 ==> call done only 1 time and at the right place.
This has been done in the v3.3beta (see changeset:2463)
for the consolidation of v3.2. I put in attachment the corrected domzgr.F90 module
Gurvan
comment:3 Changed 14 years ago by cetlod
- Resolution set to fixed
- Status changed from new to closed
Done for the consolidation of v3.2, see changeset:2465
comment:4 Changed 8 years ago by nicolasmartin
- Keywords initialization added; initialisation removed
comment:5 Changed 8 years ago by nicolasmartin
- Keywords nemo_v3_2* added
comment:6 Changed 8 years ago by nicolasmartin
- Keywords bathymetry added; mbathy removed
comment:7 Changed 7 years ago by nemo
- Keywords Misc. added
comment:8 Changed 7 years ago by nemo
- Keywords nemo_v3_2* removed
comment:9 Changed 7 years ago by nemo
- Keywords Misc. removed
comment:10 Changed 2 years ago by nemo
- Keywords Miscellaneous OPA v3.2 added
I'm not so sure the call to bat_ctl is so useless, because it's the only place where we applly a lbc on mbathy. So I would better go to the second solution.
Rachid