You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #368 from mvertens/feature/escomp_merge_of_cdeps1.0.83_noresm_v3
bugfix for reading in multi-level unstructured data plus additional cleanup
### Description of changes
This PR fixes a CDEPS bug that was found using stream input ne16pg3 with 58 vertical levels using NorESM. CDEPS aborted trying to read this in.
### Specific notes
This PR also does the following:
- new error checking for most allocations
- cleanup of stdout formatting
- replacement of` character(*) with character(len=*)`
- introduction `logunit `and `mainproc` in shr_strdata_type and both `logunit` and `mainproc` in shr_stream_streamType. This is needed since the inline interface was not always writing all log output consistently.
- new expanded API for setting stream pointers with optional arguments in `dshr_strdata_mod.F90` for
shr_strdata_get_stream_pointer_1d and shr_strdata_get_stream_pointer_2d
```
subroutine shr_strdata_get_stream_pointer_1d(sdat, strm_fld, strm_ptr, rc, requirePointer, errmsg)
type(shr_strdata_type) , intent(in) :: sdat
character(len=*) , intent(in) :: strm_fld
real(r8) , pointer :: strm_ptr(:)
integer , intent(out) :: rc
logical, optional , intent(in) :: requirePointer
character(len=*), optional , intent(in) :: errmsg
```
and
```
subroutine shr_strdata_get_stream_pointer_2d(sdat, strm_fld, strm_ptr, rc, requirePointer, errmsg)
type(shr_strdata_type) , intent(in) :: sdat
character(len=*) , intent(in) :: strm_fld
real(r8) , pointer :: strm_ptr(:,:)
integer , intent(out) :: rc
logical, optional , intent(in) :: requirePointer
character(len=*), optional , intent(in) :: errmsg
```
If requirePointer is not provided - then if the pointer is not found, the subroutine returns without an error. If requirePointer is an argument and is true, than normally an errmsg is provided that describes why the pointer is required. Also - now if the pointer is required and is found - then the pointer is initialized to NaN.
The new setting of NaNs in the stream and state pointers resulted in the following additional changes that needed to be brought in:
- refactored dlnd code to remove presence of present nans in stream pointers
- fixed problem in drof that came up due to presence of presence of nans
- fixed problem in datm/cplhist that cam up due to presence of nans
Contributors other than yourself, if any: None
CDEPS Issues Fixed:
Are there dependencies on other component PRs: None
Are changes expected to change answers (bfb, different to roundoff, more substantial): bfb
Any User Interface Changes (namelist or namelist defaults changes): None
0 commit comments