"Finally, in accordance with convention, we calculate the latitude and longitude values by converting metres to degrees and write them to our netCDF file if we are using degrees as our unit:"
[x] It is interesting to have spherical output but this was not required.
"First, the variable to store the ID is created on the name that the netCdf uses as an alias for the longitude. In this case, the aliases are lon, longitude, x, X and a check is made to see if any of them are included in the file."
[x] The input was given in Cartesian coordinates, i.e., in meters.
Otherwise the values wouldn't make much sense either:
case VarType::CHAR:
outData[i].array = new char[length];
break;
case VarType::SHORT:
outData[i].array = new short[length];
break;
case VarType::INT:
outData[i].array = new int[length];
break;
[...]
[x] This is a bit over-engineered for the purpose of tsunami simulations.
(tsunami_lab) tsunami_19@LeChuck:~/05_large_io/gerlach_hofer/Tsunami-Simulation/build$ ./sanitize_test
writing to 'solutions/simulation/WriteNetCDF.test.nc'
writing to 'solutions/simulation/WriteNetCDF.test.nc'
writing to 'solutions/simulation/WriteNetCDF.test.nc'
writing to 'solutions/simulation/WriteNetCDF.test.nc'
writing to 'solutions/simulation/WriteNetCDF.test.nc'
[...]
[x] unit tests should be silent.
" -M use meters as unit for the X-Axis and Y-Axis instead of the Longitude and Latitude units degrees_east and degrees_north."
[x] Degrees would require you to do the mapping to Cartesian coordinates internally and to numerically work on curved mesh.
"Finally, in accordance with convention, we calculate the latitude and longitude values by converting metres to degrees and write them to our netCDF file if we are using degrees as our unit:"
"First, the variable to store the ID is created on the name that the netCdf uses as an alias for the longitude. In this case, the aliases are lon, longitude, x, X and a check is made to see if any of them are included in the file."
" -M use meters as unit for the X-Axis and Y-Axis instead of the Longitude and Latitude units degrees_east and degrees_north."