ncgen: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/ncgen - from package: netcdf

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/ncgen - from package: netcdf-bin

You may install the required package with command apt-get install {package}
Error in other languages:
ncgen: bevel nie gevind nie
ncgen: comandă negăsită
ncgen: comando não encontrado
ncgen: commande introuvable
ncgen: command not found
ncgen: käsku ei ole
ncgen: không tìm thấy lệnh
ncgen: komanda nerasta
ncgen: Kommando nicht gefunden.
ncgen: kommandot finns inte
ncgen: komut yok
ncgen: nie znaleziono polecenia
ncgen: níor aimsíodh an t-ordú
ncgen: no se encontró la orden
ncgen: no s'ha trobat l'ordre
ncgen: opdracht niet gevonden
ncgen: parancs nem található
ncgen: perintah tidak ditemukan
ncgen: príkaz nenájdený
ncgen: příkaz nenalezen
ncgen: команда не найдена
ncgen: командата не е открита
ncgen: 命令找不到
ncgen: コマンドが見つかりません