Commit 178c183
authored
Change file reader class allocation methods (ESCOMP#265)
Originator(s): nusbaume
Description (include issue title and the keyword ['closes', 'fixes',
'resolves'] and issue number):
@peverwhee discovered during testing of the changes
atmospheric_physics#258 that two changes needed to be made to the NetCDF
reader class, specifically:
1. The constructor must allocate a pointer, not an allocatable variable
(due to the fact that allocating a variable via a function doesn't have
a Fortran standard-defined order, and so can result in "already
allocated" errors).
2. The CCPP-framework does not currently allow for the passing of
pointers, and so all variables allocated by the reader itself during the
`get_var` method should be of type `allocatable`, not `pointer`. Of
course if we eventually find that we really do need a pointer option
then we can always provide two versions of the class itself for the
developer to choose from.
Finally, this PR contains the addition of a `start` and `count` variable
to use for file data subsetting.
List all namelist files that were added or changed:
List all files eliminated and why:
List all files added and what they do:
List all existing files that have been modified, and describe the
changes:
(Helpful git command: `git diff --name-status
development...<your_branch_name>`)
M phys_utils/ccpp_io_reader.F90
- Change constructor to pointer, get_var to allocatable, and add
optional start/count variables
M test/test_schemes/file_io_test.F90
- Update test scheme to properly use new file reader class
List all automated tests that failed, as well as an explanation for why
they weren't fixed:
Is this an answer-changing PR? If so, is it a new physics package,
algorithm change, tuning change, etc?
If yes to the above question, describe how this code was validated with
the new/modified features:1 parent 754a0c2 commit 178c183
2 files changed
Lines changed: 147 additions & 63 deletions
0 commit comments