From the looking at the netcdf documentation it doesn't appear to provide an ``error_nc`` function. You could probably define one like

````
subroutine error_nc(section, rcode)
    use netcdf
    implicit none
    character(len=*), intent(in) :: section
    integer, intent(in) :: rcode
    integer, parameter :: stderr = 0

    write(stderr,*) "ERROR: section ",trim(section)," - ",trim(nf90_strerr(rcode))
end subroutine
```