Skip to content

Commit

Permalink
Merge pull request #2 from gold2718/update_externals_to_cesm2_3_alpha02a
Browse files Browse the repository at this point in the history
Fix for missing no_fill argument
  • Loading branch information
cacraigucar authored Jan 16, 2021
2 parents 89a7b17 + a864c68 commit ba3c91c
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions src/utils/cam_pio_utils.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1215,14 +1215,20 @@ integer function inq_var_fill_i4(File, vdesc, fillvalue, no_fill) result(ierr)
#endif
use pio, only: PIO_NOERR

! Dummy arguments
type(File_desc_t), intent(in) :: File
type(var_desc_t), intent(in) :: vdesc
! fillvalue needs to not be optional to avoid ambiguity
integer, target, intent(out) :: fillvalue
integer, optional, intent(out) :: no_fill
! Local variable
integer :: no_fill_use

#ifdef PIO2
ierr = pio_inq_var_fill(File, vdesc, no_fill, fillvalue)
ierr = pio_inq_var_fill(File, vdesc, no_fill_use, fillvalue)
if (present(no_fill)) then
no_fill = no_fill_use
end if
#else
ierr = PIO_NOERR
fillvalue = 0
Expand All @@ -1236,14 +1242,20 @@ integer function inq_var_fill_r4(File, vdesc, fillvalue, no_fill) result(ierr)
#endif
use pio, only: PIO_NOERR

! Dummy arguments
type(File_desc_t), intent(in) :: File
type(var_desc_t), intent(in) :: vdesc
! fillvalue needs to not be optional to avoid ambiguity
real(r4), target, intent(out) :: fillvalue
integer, optional, intent(out) :: no_fill
! Local variable
integer :: no_fill_use

#ifdef PIO2
ierr = pio_inq_var_fill(File, vdesc, no_fill, fillvalue)
ierr = pio_inq_var_fill(File, vdesc, no_fill_use, fillvalue)
if (present(no_fill)) then
no_fill = no_fill_use
end if
#else
ierr = PIO_NOERR
fillvalue = 0.0_R4
Expand All @@ -1257,14 +1269,20 @@ integer function inq_var_fill_r8(File, vdesc, fillvalue, no_fill) result(ierr)
#endif
use pio, only: PIO_NOERR

! Dummy arguments
type(File_desc_t), intent(in) :: File
type(var_desc_t), intent(in) :: vdesc
! fillvalue needs to not be optional to avoid ambiguity
real(r8), target, intent(out) :: fillvalue
integer, optional, intent(out) :: no_fill
! Local variable
integer :: no_fill_use

#ifdef PIO2
ierr = pio_inq_var_fill(File, vdesc, no_fill, fillvalue)
ierr = pio_inq_var_fill(File, vdesc, no_fill_use, fillvalue)
if (present(no_fill)) then
no_fill = no_fill_use
end if
#else
ierr = PIO_NOERR
fillvalue = 0.0_R8
Expand Down

0 comments on commit ba3c91c

Please sign in to comment.