added netcdf function and some string joining