Opened 9 years ago
Closed 9 years ago
#1599 closed Bug (fixed)
fldread.F90: bad array allocation in the interpolation on the fly (in case land/sea mask in active)
Reported by: | clem | Owned by: | delrosso |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | OCE | Version: | v3.6 |
Severity: | Keywords: | ||
Cc: |
Description
In the subroutine fld_interp (from fldread.F90), the size of a temporary array is retrieved before the array is even allocated:
itmpi=SIZE(ztmp_fly_dta(jpi1_lsm:jpi2_lsm,jpj1_lsm:jpj2_lsm,:),1) itmpj=SIZE(ztmp_fly_dta(jpi1_lsm:jpi2_lsm,jpj1_lsm:jpj2_lsm,:),2) itmpz=kk ALLOCATE(ztmp_fly_dta(itmpi,itmpj,itmpz))
I would replace it by:
itmpi=jpi2_lsm-jpi1_lsm+1 itmpj=jpj2_lsm-jpj1_lsm+1 itmpz=kk ALLOCATE(ztmp_fly_dta(itmpi,itmpj,itmpz))
Moreover, variable zfieldo is defined as allocatable but is not allocated and not used. It is therefore not needed
I would commit the necessary changes unless someone disagrees.
Commit History (0)
(No commits)
Change History (2)
comment:1 Changed 9 years ago by delrosso
- Owner changed from NEMO team to delrosso
comment:2 Changed 9 years ago by delrosso
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.