Opened 8 years ago
Closed 8 years ago
#1862 closed Bug (fixed)
ierr not initialised correctly in case with no lateral diffusion
Reported by: | timgraham | Owned by: | timgraham |
---|---|---|---|
Priority: | lowest | Milestone: | |
Component: | OCE | Version: | trunk |
Severity: | Keywords: | LDF | |
Cc: |
Description
Context
In traldf.F90 ierr is used as an error flag but in the case with no diffusion is used it doesn't get initialised because the initialisation is inside an IF statement. As the check on ierr is outside of the IF statement it can lead to an error if the compiler sets ierr=1.
Analysis
IF( nldf /= np_no_ldf ) THEN ! direction ==>> type of operator ioptio = 0 IF( ln_traldf_lev ) ioptio = ioptio + 1 IF( ln_traldf_hor ) ioptio = ioptio + 1 IF( ln_traldf_iso ) ioptio = ioptio + 1 IF( ioptio > 1 ) CALL ctl_stop( 'tra_ldf_init: use only ONE direction (level/hor/iso)' ) ! ! ! defined the type of lateral diffusion from ln_traldf_... logicals ierr = 0 ...Lots more code here deleted to keep description short... ENDIF
Fix
Move the check on ierr to inside the IF statement.
Commit History (1)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
7765 | timgraham | 2017-03-07T13:45:51+01:00 | Fix for #1862 |
Change History (1)
comment:1 Changed 8 years ago by timgraham
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
Fixed at r7765