replaced go to statements with do whiles for looping on grids and levels in valout_netcdf.f90