Skip to content

Commit

Permalink
Convert netcdf error routine to use f90 versions of netcdf.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Jan 10, 2025
1 parent 99a2e4f commit 1e57a0f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sorc/orog_mask_tools.fd/orog.fd/io_utils.F90
Original file line number Diff line number Diff line change
Expand Up @@ -237,18 +237,19 @@ end subroutine write_netcdf
!! @param[in] string The NetCDF error message
!! @author Jordan Alpert NOAA/EMC
subroutine netcdf_err( err, string )
use netcdf
implicit none
integer, intent(in) :: err
character(len=*), intent(in) :: string
character(len=256) :: errmsg
include "netcdf.inc"

if( err.EQ.NF_NOERR )return
errmsg = NF_STRERROR(err)
if( err.EQ.NF90_NOERR )return
errmsg = NF90_STRERROR(err)
print*, 'FATAL ERROR: ', trim(string), ': ', trim(errmsg)
call abort

return
end subroutine netcdf_err
end subroutine netcdf_err

!> Write the land mask file
!!
Expand Down

0 comments on commit 1e57a0f

Please sign in to comment.