diff --git a/.vscode/settings.json b/.vscode/settings.json index ae489949..3a3390c6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,11 +2,13 @@ "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools", "cmake.configureOnOpen": false, "files.associations": { + "*.make": "makefile", "vector": "cpp", "utility": "cpp", "ostream": "cpp", "iostream": "cpp", "map": "cpp", - "iosfwd": "cpp" + "iosfwd": "cpp", + "filesystem": "cpp" } } diff --git a/CMakeLists.txt b/CMakeLists.txt index 02ed3331..dbf07637 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ cmake_minimum_required( VERSION 3.12 FATAL_ERROR ) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild/cmake") find_package( ecbuild 3.4 REQUIRED ) -project( magics VERSION 4.10.0 LANGUAGES CXX ) +project( magics VERSION 4.10.1 LANGUAGES CXX ) # make sure that the header files are installed into include/magics # note that this needs to be done before ecbuild_declare_project() diff --git a/share/magics/styles/ecmwf/styles.json b/share/magics/styles/ecmwf/styles.json index 095004b2..9070ac5e 100644 --- a/share/magics/styles/ecmwf/styles.json +++ b/share/magics/styles/ecmwf/styles.json @@ -9422,6 +9422,48 @@ "contour_shade_technique" : "cell_shading", "contour_title" : "Transparency grey (rgbA)" }, + "accumulated_tp_1" : { + "contour_highlight": "off", + "contour_hilo": "off", + "contour_label": "off", + "contour_legend_text": "Contour shade (Range: 1 / 2000)", + "contour_level_list": "1/4/10/20/30/50/100/250/1000/2000", + "contour_level_selection_type": "level_list", + "contour_shade": "on", + "contour_shade_colour_list": "rgb(0.9,0.85,0.95)/rgb(0.7,0.75,0.95)/rgb(0.7,0.95,0.95)/rgb(0.7,0.95,0.6)/rgb(0.95,0.85,0.6)/red/rgb(0.95,0.6,0.9)/rgb(0.35,0.35,0.35)/violet", + "contour_shade_colour_method": "list", + "contour_shade_method": "area_fill", + "contour_shade_min_level": "1", + "contour_shade_max_level": "2000" + }, + "accumulated_tp_2" : { + "contour_highlight": "off", + "contour_hilo": "off", + "contour_label": "off", + "contour_legend_text": "Contour shade (Range: 1/2000)", + "contour_level_list": "1/2/5/10/15/20/30/40/50/75/100/125/150/175/200/250/300/500/2000", + "contour_level_selection_type": "level_list", + "contour_shade": "on", + "contour_shade_colour_list": "RGB(0.5,0.97,0.67)/RGB(0.41,0.93,0.74)/RGB(0.11,0.84,0.94)/RGB(0.04,0.57,1)/RGB(0,0.28,1)/RGB(0.04,0.05,0.99)/RGB(0.04,0.04,0.81)/RGB(0.04,0.04,0.62)/RGB(0.04,0.04,0.44)/RGB(0.27,0.04,0.25)/RGB(0.57,0.04,0.06)/RGB(0.72,0.13,0.04)/RGB(0.85,0.27,0.04)/RGB(0.99,0.40,0.04)/RGB(0.82,0.23,0.30)/RGB(0.62,0.05,0.58)/RGB(0.8,0.30,0.70)/RGB(1,0.76,0.8)", + "contour_shade_colour_method": "list", + "contour_shade_method": "area_fill", + "contour_shade_min_level": "1", + "contour_shade_max_level": "2000" + }, + "accumulated_tp_3" : { + "contour_highlight": "off", + "contour_hilo": "off", + "contour_label": "off", + "contour_legend_text": "Contour shade (Range: 0.1/1000)", + "contour_level_list": "0.1/1/2/5/10/15/20/30/40/50/100/300/1000", + "contour_level_selection_type": "level_list", + "contour_shade_colour_list": "RGB(0.94,0.86,0.72)/RGB(0.71,0.98,0.67)/RGB(0.47,0.96,0.45)/RGB(0.71,0.94,0.98)/RGB(0.47,0.73,0.98)/RGB(0.24,0.59,0.96)/RGB(0.12,0.43,0.93)/RGB(1,0.91,0.47)/RGB(1,0.63,0)/red/RGB(0.64,0.13,0.13)/magenta/grey", + "contour_shade": "on", + "contour_shade_colour_method": "list", + "contour_shade_method": "area_fill", + "contour_shade_min_level": "0.1", + "contour_shade_max_level": "1000" + }, "coloured_flags" : { "legend" : "on", "wind_field_type" : "flags", diff --git a/src/decoders/NetcdfData.cc b/src/decoders/NetcdfData.cc index 5c1a4c42..5466f8fa 100644 --- a/src/decoders/NetcdfData.cc +++ b/src/decoders/NetcdfData.cc @@ -53,14 +53,14 @@ void TypedAccessor::operator()(vector& to, vector& start, vecto std::transform(from.begin(), from.begin() + to.size(), to.begin(), Convertor(var)); // for (auto x = start.begin(); x != start.end(); ++x) { cout << "start " << *x << endl; } // for (auto x = edges.begin(); x != edges.end(); ++x) { cout << "edges " << *x << endl; } - + } template void TypedAccessor::get(vector& from, vector& start, vector& edges, NetVariable& var) const { var.get(&from.front(), start, edges); - - + + } Netcdf::Netcdf(const string& path, const string& method) : file_(-1) { @@ -68,7 +68,7 @@ Netcdf::Netcdf(const string& path, const string& method) : file_(-1) { if (status != NC_NOERR) { fprintf(stderr, "ERROR while opening NetCDF file - %s\n", nc_strerror(status)); - throw NoSuchNetcdfFile(path); + throw NoSuchNetcdfFile(path, nc_strerror(status)); } int num_var; @@ -157,11 +157,11 @@ int NetDimension::index(const string& val) { } int NetDimension::value(const string& val) { - + if (variable_ != -1) { // int index = Index::get(variable_->type(), val, variable_->values(), variable_->num_vals()); NetVariable var(name_, variable_, parent_, "index"); - + return var.find(val); } diff --git a/src/decoders/NetcdfData.h b/src/decoders/NetcdfData.h index e9372827..27f9abe3 100644 --- a/src/decoders/NetcdfData.h +++ b/src/decoders/NetcdfData.h @@ -47,8 +47,8 @@ class NoSuchNetcdfDimension : public MagicsException { class NoSuchNetcdfFile : public MagicsException { public: - NoSuchNetcdfFile(const string& file) : - MagicsException("Netcdf MagException: The file " + file + " does not exist or is not a valid netcdf file") { + NoSuchNetcdfFile(const string& file, const string& why) : + MagicsException("Netcdf MagException: Cannot open " + file + ": " + why) { MagLog::error() << what() << "\n"; } }; diff --git a/src/web/MagConfig.cc b/src/web/MagConfig.cc index a5cd364e..de8d8f70 100644 --- a/src/web/MagConfig.cc +++ b/src/web/MagConfig.cc @@ -152,6 +152,7 @@ void Style::set(const ValueMap& object) { methods_["eccharts_layer"] = &Style::name; methods_["visdef"] = &Style::style; methods_["scaling"] = &Style::ignore; + methods_["description"] = &Style::ignore; } for (auto entry = object.begin(); entry != object.end(); ++entry) {