I have a netCDF in a rotated lat lon grid (file-a). I also have another file which contains the right lats and lons as two different variables (file-b). What I need to do is import the lats and lons from file-b to my variable in file-a as attributes. How could I do that?
1 Answer
This doesn't do it as NetCDF attributes, (I'm not sure what that would mean) but since they are different variables, you could use the NetCDF Operator tool ncks
to extract the new variables from file_b and paste them onto the file_a:
ncks -A -v latnew,lonnew file_b.nc file_a.nc