@@ -1954,6 +1954,7 @@ subroutine shr_strdata_set_stream_iodesc(sdat, per_stream, fldname, pioid, rc)
1954
1954
character (* ), parameter :: F00 = " ('(shr_strdata_set_stream_iodesc) ',a,i8,2x,i8,2x,a)"
1955
1955
character (* ), parameter :: F01 = " ('(shr_strdata_set_stream_iodesc) ',a,i8,2x,i8,2x,a)"
1956
1956
character (* ), parameter :: F02 = " ('(shr_strdata_set_stream_iodesc) ',a,i8,2x,i8,2x,i8,2x,a)"
1957
+ character (* ), parameter :: F03 = " ('(shr_strdata_set_stream_iodesc) ',a,i8,2x,a)"
1957
1958
!- ------------------------------------------------------------------------------
1958
1959
1959
1960
rc = ESMF_SUCCESS
@@ -2003,13 +2004,23 @@ subroutine shr_strdata_set_stream_iodesc(sdat, per_stream, fldname, pioid, rc)
2003
2004
2004
2005
! determine io descriptor
2005
2006
if (ndims == 2 ) then
2006
- if (sdat% mainproc) then
2007
- write (sdat% stream(1 )% logunit,F00) ' setting iodesc for : ' // trim (fldname)// &
2008
- ' with dimlens(1), dimlens2 = ' ,dimlens(1 ),dimlens(2 ),&
2009
- ' variable has no time dimension '
2007
+ rcode = pio_inq_dimname(pioid, dimids(ndims), dimname)
2008
+ if (trim (dimname) == ' time' .or. trim (dimname) == ' nt' ) then
2009
+ if (sdat% mainproc) then
2010
+ write (sdat% stream(1 )% logunit,F03) ' setting iodesc for : ' // trim (fldname)// &
2011
+ ' with dimlens(1) = ' ,dimlens(1 ),' and the variable has a time dimension '
2012
+ end if
2013
+ call pio_initdecomp(sdat% pio_subsystem, pio_iovartype, (/ dimlens(1 )/ ), compdof, &
2014
+ per_stream% stream_pio_iodesc)
2015
+ else
2016
+ if (sdat% mainproc) then
2017
+ write (sdat% stream(1 )% logunit,F00) ' setting iodesc for : ' // trim (fldname)// &
2018
+ ' with dimlens(1), dimlens(2) = ' ,dimlens(1 ),dimlens(2 ),&
2019
+ ' variable has no time dimension '
2020
+ end if
2021
+ call pio_initdecomp(sdat% pio_subsystem, pio_iovartype, (/ dimlens(1 ),dimlens(2 )/ ), compdof, &
2022
+ per_stream% stream_pio_iodesc)
2010
2023
end if
2011
- call pio_initdecomp(sdat% pio_subsystem, pio_iovartype, (/ dimlens(1 ),dimlens(2 )/ ), compdof, &
2012
- per_stream% stream_pio_iodesc)
2013
2024
2014
2025
else if (ndims == 3 ) then
2015
2026
rcode = pio_inq_dimname(pioid, dimids(ndims), dimname)
0 commit comments