Skip to content

Commit

Permalink
Addressing review comments and adding error checking to PIO calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaxmonsky committed Jul 15, 2024
1 parent 7e8562b commit dbdbbad
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/dynamics/utils/hycoef.F90
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,21 @@ subroutine hycoef_read(File)
end if

ierr = pio_get_var(File, hyai_desc, hyai)
if (ierr /= PIO_NOERR) then
call endrun(routine//': ERROR: Unable to get hyai variable in ncdata or restart file.')
end if
ierr = pio_get_var(File, hybi_desc, hybi)
if (ierr /= PIO_NOERR) then
call endrun(routine//': ERROR: Unable to get hybi variable in ncdata or restart file.')
end if
ierr = pio_get_var(File, hyam_desc, hyam)
if (ierr /= PIO_NOERR) then
call endrun(routine//': ERROR: Unable to get hyam variable in ncdata or restart file.')
end if
ierr = pio_get_var(File, hybm_desc, hybm)
if (ierr /= PIO_NOERR) then
call endrun(routine//': ERROR: Unable to get hybm variable in ncdata or restart file.')
end if

if (masterproc) then
write(iulog,*) routine//': read hyai, hybi, hyam, hybm'
Expand Down

0 comments on commit dbdbbad

Please sign in to comment.