Changeset 2417 for XIOS3/branches/xios-3.0-beta/src/io/nc4_data_output.cpp
- Timestamp:
- 10/06/22 12:50:04 (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS3/branches/xios-3.0-beta/src/io/nc4_data_output.cpp
r2395 r2417 492 492 std::vector<StdString> dim0; 493 493 StdString domainName = domain->name; 494 domain->assignMesh(domainName, domain->nvertex);495 domain->mesh->createMeshEpsilon(context->intraComm_, domain->lonvalue, domain->latvalue, domain->bounds_lonvalue, domain->bounds_latvalue);496 494 497 495 StdString node_x = domainName + "_node_x"; … … 609 607 SuperClassWriter::addAttribute("edge_coordinates", edge_x + " " + edge_y, &domainName); 610 608 SuperClassWriter::addAttribute("edge_node_connectivity", edge_nodes, &domainName); 609 SuperClassWriter::addAttribute("face_edge_connectivity", face_edges, &domainName); 610 SuperClassWriter::addAttribute("edge_face_connectivity", edge_faces, &domainName); 611 611 SuperClassWriter::addDimension(dimEdge, domain->mesh->nbEdgesGlo); 612 612 dim0.clear(); … … 628 628 SuperClassWriter::addAttribute("start_index", 0, &edge_nodes); 629 629 } 630 SuperClassWriter::addAttribute("face_face_connectivity", face_faces, &domainName); 630 631 SuperClassWriter::addAttribute("face_coordinates", face_x + " " + face_y, &domainName); 631 632 SuperClassWriter::addAttribute("face_node_connectivity", face_nodes, &domainName); … … 661 662 dim0.push_back(dimTwo); 662 663 SuperClassWriter::addVariable(edge_faces, NC_INT, dim0, compressionLevel); 663 SuperClassWriter::addAttribute("cf_role", StdString("edge_face 664 SuperClassWriter::addAttribute("cf_role", StdString("edge_face_connectivity"), &edge_faces); 664 665 SuperClassWriter::addAttribute("long_name", StdString("neighbor faces for edges"), &edge_faces); 665 666 SuperClassWriter::addAttribute("start_index", 0, &edge_faces); … … 670 671 dim0.push_back(dimVertex); 671 672 SuperClassWriter::addVariable(face_faces, NC_INT, dim0, compressionLevel); 672 SuperClassWriter::addAttribute("cf_role", StdString("face_face 673 SuperClassWriter::addAttribute("cf_role", StdString("face_face_connectivity"), &face_faces); 673 674 SuperClassWriter::addAttribute("long_name", StdString("Indicates which other faces neighbor each face"), &face_faces); 674 675 SuperClassWriter::addAttribute("start_index", 0, &face_faces); … … 729 730 startNodes[0] = domain->mesh->node_start; 730 731 countNodes[0] = domain->mesh->node_count; 732 if (countNodes[0]==0) startNodes[0]=0 ; // for netcdf error 731 733 startEdgeNodes[0] = domain->ibegin; 732 734 startEdgeNodes[1] = 0; … … 765 767 startNodes[0] = domain->mesh->node_start; 766 768 countNodes[0] = domain->mesh->node_count; 769 if (countNodes[0]==0) startNodes[0]=0; 770 767 771 startEdges[0] = domain->mesh->edge_start; 768 772 countEdges[0] = domain->mesh->edge_count; 773 if (countEdges[0]==0) startEdges[0]=0 ; // for netcdf error 774 769 775 startEdgeNodes[0] = domain->mesh->edge_start; 776 countEdgeNodes[0] = domain->mesh->edge_count; 777 if (countEdgeNodes[0]==0) startEdgeNodes[0]=0; // for netcdf error 770 778 startEdgeNodes[1] = 0; 771 countEdgeNodes[0] = domain->mesh->edge_count;772 779 countEdgeNodes[1]= 2; 780 773 781 startEdgeFaces[0] = domain->mesh->edge_start; 782 countEdgeFaces[0] = domain->mesh->edge_count; 783 if (countEdgeFaces[0]==0) startEdgeFaces[0]=0 ; // for netcdf error 774 784 startEdgeFaces[1]= 0; 775 countEdgeFaces[0] = domain->mesh->edge_count;776 785 countEdgeFaces[1]= 2; 786 777 787 startFaceConctv[0] = domain->ibegin; 788 countFaceConctv[0] = domain->ni; 778 789 startFaceConctv[1] = 0; 779 countFaceConctv[0] = domain->ni;780 790 countFaceConctv[1] = domain->nvertex; 781 791 }
Note: See TracChangeset
for help on using the changeset viewer.