Basic NetCDF write test plus some metadata helper changes