Opened 16 years ago
Closed 16 years ago
#275 closed bug (Fixed)
Corrected I/O bug when periodic conditions are activated
Reported by: | arango | Owned by: | arango |
---|---|---|---|
Priority: | major | Milestone: | Parallel Input/Output |
Component: | Parallelism | Version: | 3.2 |
Keywords: | Cc: |
Description
There are couple of bugs in mp_scatter2d and mp_scatter3d when either EW_PERIODIC or NS_PERIODIC are activated. This only happen when processing input fields from NetCDF files. The periodic applications are usually configured with analytical fuctions instead of NetCDF files. I was using the wrong structure to determine the global number of points to process in the I- and J-directions. The computational structure BOUNDS(ng) was used instead of the I/O structure IOBOUNDS(ng). The correct code is to use:
SELECT CASE (MyType) CASE (p2dvar, p3dvar) Io=IOBOUNDS(ng) % ILB_psi Ie=IOBOUNDS(ng) % IUB_psi Jo=IOBOUNDS(ng) % JLB_psi Je=IOBOUNDS(ng) % JUB_psi Ioff=0 Joff=1 CASE (r2dvar, r3dvar) Io=IOBOUNDS(ng) % ILB_rho Ie=IOBOUNDS(ng) % IUB_rho Jo=IOBOUNDS(ng) % JLB_rho Je=IOBOUNDS(ng) % JUB_rho Ioff=1 Joff=0 CASE (u2dvar, u3dvar) Io=IOBOUNDS(ng) % ILB_u Ie=IOBOUNDS(ng) % IUB_u Jo=IOBOUNDS(ng) % JLB_u Je=IOBOUNDS(ng) % JUB_u Ioff=0 Joff=0 CASE (v2dvar, v3dvar) Io=IOBOUNDS(ng) % ILB_v Ie=IOBOUNDS(ng) % IUB_v Jo=IOBOUNDS(ng) % JLB_v Je=IOBOUNDS(ng) % JUB_v Ioff=1 Joff=1 CASE DEFAULT ! RHO-points Io=IOBOUNDS(ng) % ILB_rho Ie=IOBOUNDS(ng) % IUB_rho Jo=IOBOUNDS(ng) % JLB_rho Je=IOBOUNDS(ng) % JUB_rho Ioff=1 Joff=0 END SELECT
I also corrected mp_gather2d and mp_gather3d. Non-periodic applications are fine. The issue here is that in periodic applications the computational I-RHO (EW_PERIODIC) and J-RHO (NS_PERIODIC) starts at 1 instead of 0.
Many thanks to Paul Budgell for reporting this problem and giving a good clue.