Opened 8 years ago
Closed 7 years ago
#1765 closed Defect (fixed)
Undefined variables in dummy subroutines
Reported by: | timgraham | Owned by: | nemo |
---|---|---|---|
Priority: | lowest | Milestone: | |
Component: | OCE | Version: | trunk |
Severity: | Keywords: | ||
Cc: |
Description
Context
Note this also affects v3.6 STABLE but is probably not worth fixing in the branch.
In some of the modules where cpp keys are used there are undefined variables in the dummy subroutines. This means that compiler debugging options which can be used to check for undefined variables cannot be used to compile and run the NEMO code.
...
Analysis
Many of these cpp keys will be removed as part of the simplification but some will remain e.g. sbcice_lim.F90:
MODULE sbcice_lim #if defined key_lim3 CONTAINS SUBROUTINE sbc_ice_lim( kt, kblk ) INTEGER, INTENT(in) :: kt ! ocean time step INTEGER, INTENT(in) :: kblk ! type of bulk (=3 CLIO, =4 CORE, =5 COUPLED) END SUBROUTINE #else CONTAINS SUBROUTINE sbc_ice_lim ( kt, kblk ) ! Dummy routine WRITE(*,*) 'sbc_ice_lim: You should not have seen this print! error?', kt, kblk END SUBROUTINE sbc_ice_lim SUBROUTINE sbc_lim_init ! Dummy routine END SUBROUTINE sbc_lim_init #endif
In this case both kt and kblk are undefined in the dummy routine. Usually this is ok because "Implicit None" is not set in the routine but this can be set as a compiler option in which case the routine fails to compile.
...
Fix
Add variable definitions to dummy subroutines. I would suggest we wait until remaining simplification is merged into the trunk.
...
Commit History (2)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
7778 | clem | 2017-03-09T15:19:31+01:00 | fix for ticket #1765 |
7777 | clem | 2017-03-09T15:19:04+01:00 | fix for ticket #1765 |
Change History (1)
comment:1 Changed 7 years ago by clem
- Resolution set to fixed
- Status changed from new to closed
fixed at r7777