Added conditional variable to make NetCDF conversion optional.