Ignore:
Timestamp:
08/19/21 13:28:53 (5 months ago)
Author:
ymipsl
Message:

Bugs fix for UGRID convention output

  • global indexation was not taking into account
  • coherence problem in connectivity for node, edge and face mesh
  • add UGRID testcase based on sphere cube

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/io/nc4_data_output.cpp

    r2181 r2200  
    556556      // The first domain for the same mesh that will be written is that with the highest value of nvertex. 
    557557      // Thus the entire mesh connectivity will be generated at once. 
     558 
    558559      if (isWrittenDomain(domid)) return ; 
    559560      else setWrittenDomain(domid); 
     
    570571      std::vector<StdString> dim0; 
    571572      StdString domainName = domain->name; 
    572       domain->assignMesh(domainName, domain->nvertex); 
    573       domain->mesh->createMeshEpsilon(server->intraComm, domain->lonvalue, domain->latvalue, domain->bounds_lonvalue, domain->bounds_latvalue); 
    574573 
    575574      StdString node_x = domainName + "_node_x"; 
     
    600599      SuperClassWriter::addAttribute("topology_dimension", 2, &domainName); 
    601600      SuperClassWriter::addAttribute("node_coordinates", node_x + " " + node_y, &domainName); 
     601 
    602602 
    603603      try 
     
    810810                 startNodes[0] = domain->mesh->node_start; 
    811811                 countNodes[0] = domain->mesh->node_count; 
     812                 if (countNodes[0]==0) startNodes[0]=0 ; // for netcdf error 
    812813                 startEdgeNodes[0] = domain->ibegin; 
    813814                 startEdgeNodes[1] = 0; 
     
    846847                 startNodes[0] = domain->mesh->node_start; 
    847848                 countNodes[0] = domain->mesh->node_count; 
     849                 if (countNodes[0]==0) startNodes[0]=0; 
     850                  
    848851                 startEdges[0] = domain->mesh->edge_start; 
    849852                 countEdges[0] = domain->mesh->edge_count; 
     853                 if (countEdges[0]==0) startEdges[0]=0 ; // for netcdf error 
     854                  
    850855                 startEdgeNodes[0] = domain->mesh->edge_start; 
     856                 countEdgeNodes[0] = domain->mesh->edge_count; 
     857                 if (countEdgeNodes[0]==0) startEdgeNodes[0]=0; // for netcdf error 
    851858                 startEdgeNodes[1] = 0; 
    852                  countEdgeNodes[0] = domain->mesh->edge_count; 
    853859                 countEdgeNodes[1]= 2; 
     860 
    854861                 startEdgeFaces[0] = domain->mesh->edge_start; 
     862                 countEdgeFaces[0] = domain->mesh->edge_count; 
     863                 if (countEdgeFaces[0]==0) startEdgeFaces[0]=0 ; // for netcdf error 
    855864                 startEdgeFaces[1]= 0; 
    856                  countEdgeFaces[0] = domain->mesh->edge_count; 
    857865                 countEdgeFaces[1]= 2; 
     866                 
    858867                 startFaceConctv[0] = domain->ibegin; 
     868                 countFaceConctv[0] = domain->ni; 
    859869                 startFaceConctv[1] = 0; 
    860                  countFaceConctv[0] = domain->ni; 
    861870                 countFaceConctv[1] = domain->nvertex; 
    862871               } 
Note: See TracChangeset for help on using the changeset viewer.