21 CGenerateRectilinearDomain* genDomain = CGenerateRectilinearDomainGroup::get(
"generate_rectilinear_domain_definition")->createChild(
id);
22 if (node) genDomain->
parse(*node);
40 const double defaultBndsLonStart = 0;
41 const double defaultBndsLonEnd = 360;
43 const double defaultBndsLatStart = -90;
44 const double defaultBndsLatEnd = 90;
47 int niGlo = domainDst->ni_glo;
48 int njGlo = domainDst->nj_glo;
51 double deltaLon=(defaultBndsLonEnd-defaultBndsLonStart)/niGlo ;
52 if (!lon_start.isEmpty() && !lon_end.isEmpty() ) deltaLon=(lon_end-lon_start)/(niGlo-1) ;
53 if (!bounds_lon_start.isEmpty() && !bounds_lon_end.isEmpty()) deltaLon=(bounds_lon_end-bounds_lon_start)/niGlo ;
54 if (!lon_start.isEmpty() && !bounds_lon_end.isEmpty()) deltaLon=(bounds_lon_end-bounds_lon_start)/(niGlo-0.5) ;
55 if (!bounds_lon_start.isEmpty() && !lon_end.isEmpty()) deltaLon=(bounds_lon_end-bounds_lon_start)/(niGlo-0.5) ;
57 if (lon_start.isEmpty())
59 if (!bounds_lon_start.isEmpty()) domainDst->lon_start=bounds_lon_start+0.5*deltaLon ;
60 else if (!lon_end.isEmpty()) domainDst->lon_start= lon_end-(niGlo-1.)*deltaLon ;
61 else if (!bounds_lon_end.isEmpty()) domainDst->lon_start=bounds_lon_end-(niGlo-0.5)*deltaLon ;
62 else domainDst->lon_start=defaultBndsLonStart+0.5*deltaLon ;
64 else domainDst->lon_start=lon_start ;
66 if (bounds_lon_start.isEmpty())
68 if (!lon_start.isEmpty()) domainDst->bounds_lon_start=lon_start-0.5*deltaLon ;
69 else if (!lon_end.isEmpty()) domainDst->bounds_lon_start= lon_end-(niGlo-0.5)*deltaLon ;
70 else if (!bounds_lon_end.isEmpty()) domainDst->bounds_lon_start=bounds_lon_end-niGlo*deltaLon ;
71 else domainDst->bounds_lon_start=defaultBndsLonStart ;
73 else domainDst->bounds_lon_start=bounds_lon_start ;
75 if (lon_end.isEmpty())
77 if (!bounds_lon_end.isEmpty()) domainDst->lon_end=bounds_lon_end-0.5*deltaLon ;
78 else if (!bounds_lon_start.isEmpty()) domainDst->lon_end=bounds_lon_start+(niGlo-0.5)*deltaLon ;
79 else if (!lon_start.isEmpty()) domainDst->lon_end=lon_start+(niGlo-1.)*deltaLon ;
80 else domainDst->lon_end=defaultBndsLonEnd-0.5*deltaLon ;
82 else domainDst->lon_end=lon_end ;
84 if (bounds_lon_end.isEmpty())
86 if (!lon_end.isEmpty()) domainDst->bounds_lon_end=lon_end+0.5*deltaLon ;
87 else if (!bounds_lon_start.isEmpty()) domainDst->bounds_lon_end=bounds_lon_start+niGlo*deltaLon ;
88 else if (!lon_start.isEmpty()) domainDst->bounds_lon_end=lon_start+(niGlo-0.5)*deltaLon ;
89 else domainDst->bounds_lon_end=defaultBndsLonEnd ;
91 else domainDst->bounds_lon_end=bounds_lon_end;
96 double deltaLat=(defaultBndsLatEnd-defaultBndsLatStart)/njGlo ;
97 if (!lat_start.isEmpty() && !lat_end.isEmpty() ) deltaLat=(lat_end-lat_start)/(njGlo-1) ;
98 if (!bounds_lat_start.isEmpty() && !bounds_lat_end.isEmpty()) deltaLat=(bounds_lat_end-bounds_lat_start)/njGlo ;
99 if (!lat_start.isEmpty() && !bounds_lat_end.isEmpty()) deltaLat=(bounds_lat_end-bounds_lat_start)/(njGlo-0.5) ;
100 if (!bounds_lat_start.isEmpty() && !lat_end.isEmpty()) deltaLat=(bounds_lat_end-bounds_lat_start)/(njGlo-0.5) ;
102 if (lat_start.isEmpty())
104 if (!bounds_lat_start.isEmpty()) domainDst->lat_start=bounds_lat_start+0.5*deltaLat ;
105 else if (!lat_end.isEmpty()) domainDst->lat_start= lat_end-(njGlo-1.)*deltaLat ;
106 else if (!bounds_lat_end.isEmpty()) domainDst->lat_start=bounds_lat_end-(njGlo-0.5)*deltaLat ;
107 else domainDst->lat_start=defaultBndsLatStart+0.5*deltaLat ;
109 else domainDst->lat_start=lat_start;
111 if (bounds_lat_start.isEmpty())
113 if (!lat_start.isEmpty()) domainDst->bounds_lat_start=lat_start-0.5*deltaLat ;
114 else if (!lat_end.isEmpty()) domainDst->bounds_lat_start= lat_end-(njGlo-0.5)*deltaLat ;
115 else if (!bounds_lat_end.isEmpty()) domainDst->bounds_lat_start=bounds_lat_end-njGlo*deltaLat ;
116 else domainDst->bounds_lat_start=defaultBndsLatStart ;
118 else domainDst->bounds_lat_start=bounds_lat_start;
120 if (lat_end.isEmpty())
122 if (!bounds_lat_end.isEmpty()) domainDst->lat_end=bounds_lat_end-0.5*deltaLat ;
123 else if (!bounds_lat_start.isEmpty()) domainDst->lat_end=bounds_lat_start+(njGlo-0.5)*deltaLat ;
124 else if (!lat_start.isEmpty()) domainDst->lat_end=lat_start+(njGlo-1.)*deltaLat ;
125 else domainDst->lat_end=defaultBndsLatEnd-0.5*deltaLat ;
127 else domainDst->lat_end=lat_end;
129 if (bounds_lat_end.isEmpty())
131 if (!lat_end.isEmpty()) domainDst->bounds_lat_end=lat_end+0.5*deltaLat ;
132 else if (!bounds_lat_start.isEmpty()) domainDst->bounds_lat_end=bounds_lat_start+njGlo*deltaLat ;
133 else if (!lat_start.isEmpty()) domainDst->bounds_lat_end=lat_start+(njGlo-0.5)*deltaLat ;
134 else domainDst->bounds_lat_end=defaultBndsLatEnd ;
136 else domainDst->bounds_lat_end=bounds_lat_end;
CATCH CDomainAlgorithmReorder::CDomainAlgorithmReorder(CDomain *domainDestination, CDomain *domainSource, CReorderDomain *reorderDomain if)(domainDestination->type!=CDomain::type_attr::rectilinear)
virtual ~CGenerateRectilinearDomain(void)
Destructeur ///.
static bool _dummyRegistered
static StdString GetDefName(void)
static ENodeType GetType(void)
virtual void checkValid(CDomain *axisDest)
////////////////////// Déclarations ////////////////////// ///
static StdString GetName(void)
Accesseurs statiques ///.
CGenerateRectilinearDomain(void)
Constructeurs ///.
virtual void parse(xml::CXMLNode &node)
static CTransformation< CDomain > * create(const StdString &id, xml::CXMLNode *node)
static bool registerTrans()
enum xios::_node_type ENodeType
////////////////////// Définitions ////////////////////// ///