Changeset 1158
- Timestamp:
- 06/06/17 17:58:16 (7 years ago)
- Location:
- XIOS/dev/dev_olga
- Files:
-
- 202 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_olga/extern/remap/src/elt.hpp
r923 r1158 105 105 } 106 106 107 void insert_vertex(int i, const Coord& v) 108 { 109 for(int j=n; j > i ; j--) 110 { 111 vertex[j]=vertex[j-1] ; 112 edge[j]=edge[j-1] ; 113 d[j]=d[j-1] ; 114 neighbour[j]=neighbour[j-1] ; 115 } 116 vertex[i+1]=v ; 117 n++ ; 118 } 119 107 120 int neighbour[NMAX]; 108 121 double d[NMAX]; /**< distance of centre of small circle to origin, zero if great circle */ -
XIOS/dev/dev_olga/extern/remap/src/intersect.cpp
r688 r1158 37 37 } 38 38 39 /** New methods to find an insert a neighbour in a cell of the source mesh. 40 * return true/false if cell b is a neighbour of a. if "insert" is true, then b will be inserted as a neighbour 41 * in cell a . This is needed for 2 order interpolation that need neighboround for gradient computing. 42 * A cell is a neighbour if : 43 * - it shares 2 countiguous vertex (ie an edge) with a 44 * - A vertex of b is located on one of an edge of a. 45 **/ 46 bool insertNeighbour( Elt& a, const Elt& b, bool insert ) 47 { 48 // for now suppose pole -> Oz 49 Coord pole(0,0,1) ; 50 Coord O, Oa1, Oa2,Ob1,Ob2,V1,V2 ; 51 double da,db,alpha,alpha1,alpha2,delta ; 52 53 54 for (int i = 0; i < a.n; i++) 55 { 56 for (int j = 0; j < b.n; j++) 57 { 58 // share a full edge ? be carefull at the orientation 59 assert(squaredist(a.vertex[ i ], b.vertex[ j ]) > 1e-10*1e-10 || 60 squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]) > 1e-10*1e-10); 61 if ( squaredist(a.vertex[ i ], b.vertex[ j ]) < 1e-10*1e-10 && 62 squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+b.n-1)%b.n]) < 1e-10*1e-10) 63 { 64 if (insert) a.neighbour[i] = b.id.ind ; 65 return true; 66 } 67 68 69 // 1 or 2 vertices of b is located on an edge of a 70 da=a.d[i] ; 71 if (scalarprod(a.edge[i], pole) < 0) da=-da ; 72 db=b.d[(j+b.n-1)%b.n] ; 73 if (scalarprod(b.edge[(j+b.n-1)%b.n], pole) < 0) db=-db ; 74 75 if ( fabs(da-db)<1e-10 ) 76 { 77 O=pole*da ; 78 Oa1=a.vertex[i]-O ; 79 Oa2=a.vertex[(i+1)%a.n]-O ; 80 Ob1=b.vertex[j]-O ; 81 Ob2=b.vertex[(j+b.n-1)%b.n]-O ; 82 V1=crossprod(Oa1,Oa2) ; 83 V2=crossprod(Ob1,Ob2) ; 84 if (norm(crossprod(V1,V2))/(norm(V1)*norm(V2)) < 1e-10) 85 { 86 alpha = vectAngle(Oa1,Oa2,V1) ; 87 alpha1= vectAngle(Oa1,Ob1,V1) ; 88 alpha2= vectAngle(Oa1,Ob2,V1) ; 89 delta= alpha2-alpha1 ; 90 if (delta >= M_PI) delta=2*M_PI-delta ; 91 else if (delta <= -M_PI) delta=2*M_PI+delta ; 92 93 if (alpha >= 0) 94 { 95 if (alpha1 > 1e-10 && alpha1 < alpha-1e-10) 96 { 97 if (alpha2 > 1e-10 && alpha2 < alpha-1e-10) 98 { 99 assert(delta > 0) ; 100 if (insert) 101 { 102 // insert both 103 a.insert_vertex(i,b.vertex[(j+b.n-1)%b.n]); 104 a.insert_vertex(i,b.vertex[j]); 105 a.neighbour[i+1] = b.id.ind ; 106 } 107 return true ; 108 } 109 else 110 { 111 assert( delta > 0 ) ; 112 if (insert) 113 { 114 //insert alpha1 115 a.insert_vertex(i,b.vertex[j]); 116 a.neighbour[i+1] = b.id.ind ; 117 } 118 return true ; 119 } 120 } 121 else if (alpha2 > 1e-10 && alpha2 < alpha-1e-10) 122 { 123 assert( delta > 0 ) ; 124 if (insert) 125 { 126 // insert alpha2 127 a.insert_vertex(i,b.vertex[(j+b.n-1)%b.n]); 128 a.neighbour[i] = b.id.ind ; 129 } 130 return true ; 131 } 132 else 133 { 134 // nothing to do 135 } 136 137 } 138 else // alpha < 0 139 { 140 if (alpha1 < -1e-10 && alpha1 > alpha+1e-10) 141 { 142 if (alpha2 < -1e-10 && alpha2 > alpha+1e-10) 143 { 144 assert(delta < 0) ; 145 if (insert) 146 { 147 // insert both 148 a.insert_vertex(i,b.vertex[(j+b.n-1)%b.n]); 149 a.insert_vertex(i,b.vertex[j]); 150 a.neighbour[i+1] = b.id.ind ; 151 } 152 return true ; 153 } 154 else 155 { 156 assert(delta < 0) ; 157 if (insert) 158 { 159 //insert alpha1 160 a.insert_vertex(i,b.vertex[j]); 161 a.neighbour[i+1] = b.id.ind ; 162 } 163 return true ; 164 } 165 } 166 else if (alpha2 < -1e-10 && alpha2 > alpha+1e-10) 167 { 168 assert(delta < 0) ; 169 if (insert) 170 { 171 // insert alpha2 172 a.insert_vertex(i,b.vertex[(j+b.n-1)%b.n]); 173 a.neighbour[i] = b.id.ind ; 174 } 175 return true ; 176 } 177 else 178 { 179 // nothing to do 180 } 181 } 182 } 183 } 184 } 185 } 186 return false; 187 } 39 188 40 189 /** … … 44 193 void set_neighbour(Elt& a, const Elt& b) 45 194 { 46 if (b.id.ind == a.id.ind) return; 47 int idx = neighbour_idx(a, b); 48 if (idx != NOT_FOUND) 49 a.neighbour[idx] = b.id.ind; 195 if (b.id.ind == a.id.ind) return; 196 /* 197 int idx = neighbour_idx(a, b); 198 if (idx != NOT_FOUND) 199 a.neighbour[idx] = b.id.ind; 200 */ 201 insertNeighbour(a,b,true) ; 50 202 } 51 203 52 204 /** return true if `a` and `b` share an edge */ 53 bool isNeighbour(const Elt& a, const Elt& b) 54 { 55 return neighbour_idx(a, b) != NOT_FOUND; 205 bool isNeighbour(Elt& a, const Elt& b) 206 { 207 // return neighbour_idx(a, b) != NOT_FOUND; 208 return insertNeighbour(a,b,false) ; 56 209 } 57 210 -
XIOS/dev/dev_olga/extern/remap/src/intersect.hpp
r688 r1158 2 2 3 3 void set_neighbour(Elt& elt, const Elt& elt2); 4 bool isNeighbour( constElt& elt, const Elt& elt2);4 bool isNeighbour(Elt& elt, const Elt& elt2); 5 5 6 6 void intersect(Elt *a, Elt *b); -
XIOS/dev/dev_olga/extern/remap/src/mapper.cpp
r923 r1158 109 109 } 110 110 111 vector<double> Mapper::computeWeights(int interpOrder, bool renormalize )111 vector<double> Mapper::computeWeights(int interpOrder, bool renormalize, bool quantity) 112 112 { 113 113 vector<double> timings; … … 152 152 if (mpiRank == 0 && verbose) cout << "Remapping..." << endl; 153 153 tic = cputime(); 154 nWeights = remap(&targetElements[0], targetElements.size(), interpOrder, renormalize );154 nWeights = remap(&targetElements[0], targetElements.size(), interpOrder, renormalize, quantity); 155 155 timings.push_back(cputime() - tic); 156 156 … … 166 166 @param order is the order of interpolaton (must be 1 or 2). 167 167 */ 168 int Mapper::remap(Elt *elements, int nbElements, int order, bool renormalize )168 int Mapper::remap(Elt *elements, int nbElements, int order, bool renormalize, bool quantity) 169 169 { 170 170 int mpiSize, mpiRank; … … 184 184 int **sendElement = new int*[mpiSize]; /* indices of elements required from other rank */ 185 185 double **recvValue = new double*[mpiSize]; 186 double **recvArea = new double*[mpiSize]; 186 187 Coord **recvGrad = new Coord*[mpiSize]; 187 188 GloId **recvNeighIds = new GloId*[mpiSize]; /* ids of the of the source neighbours which also contribute through gradient */ … … 205 206 sendElement[rank] = new int[nbSendElement[rank]]; 206 207 recvValue[rank] = new double[nbSendElement[rank]]; 208 recvArea[rank] = new double[nbSendElement[rank]]; 207 209 if (order == 2) 208 210 { … … 234 236 int **recvElement = new int*[mpiSize]; 235 237 double **sendValue = new double*[mpiSize]; 238 double **sendArea = new double*[mpiSize]; 236 239 Coord **sendGrad = new Coord*[mpiSize]; 237 240 GloId **sendNeighIds = new GloId*[mpiSize]; 238 MPI_Request *sendRequest = new MPI_Request[ 3*mpiSize];239 MPI_Request *recvRequest = new MPI_Request[ 3*mpiSize];241 MPI_Request *sendRequest = new MPI_Request[4*mpiSize]; 242 MPI_Request *recvRequest = new MPI_Request[4*mpiSize]; 240 243 for (int rank = 0; rank < mpiSize; rank++) 241 244 { … … 250 253 recvElement[rank] = new int[nbRecvElement[rank]]; 251 254 sendValue[rank] = new double[nbRecvElement[rank]]; 255 sendArea[rank] = new double[nbRecvElement[rank]]; 252 256 if (order == 2) 253 257 { … … 263 267 } 264 268 } 265 MPI_Status *status = new MPI_Status[ 3*mpiSize];266 MPI_Waitall(nbRecvRequest, recvRequest, status);269 MPI_Status *status = new MPI_Status[4*mpiSize]; 270 267 271 MPI_Waitall(nbSendRequest, sendRequest, status); 272 MPI_Waitall(nbRecvRequest, recvRequest, status); 268 273 269 274 /* for all indices that have been received from requesting ranks: pack values and gradients, then send */ … … 278 283 { 279 284 sendValue[rank][j] = sstree.localElements[recvElement[rank][j]].val; 285 sendArea[rank][j] = sstree.localElements[recvElement[rank][j]].area; 280 286 if (order == 2) 281 287 { … … 297 303 MPI_Issend(sendValue[rank], nbRecvElement[rank], MPI_DOUBLE, rank, 0, communicator, &sendRequest[nbSendRequest]); 298 304 nbSendRequest++; 305 MPI_Issend(sendArea[rank], nbRecvElement[rank], MPI_DOUBLE, rank, 0, communicator, &sendRequest[nbSendRequest]); 306 nbSendRequest++; 299 307 if (order == 2) 300 308 { … … 317 325 MPI_Irecv(recvValue[rank], nbSendElement[rank], MPI_DOUBLE, rank, 0, communicator, &recvRequest[nbRecvRequest]); 318 326 nbRecvRequest++; 327 MPI_Irecv(recvArea[rank], nbSendElement[rank], MPI_DOUBLE, rank, 0, communicator, &recvRequest[nbRecvRequest]); 328 nbRecvRequest++; 319 329 if (order == 2) 320 330 { … … 334 344 } 335 345 } 346 347 MPI_Waitall(nbSendRequest, sendRequest, status); 336 348 MPI_Waitall(nbRecvRequest, recvRequest, status); 337 MPI_Waitall(nbSendRequest, sendRequest, status);349 338 350 339 351 /* now that all values and gradients are available use them to computed interpolated values on target … … 357 369 int rank = (*it)->id.rank; 358 370 double fk = recvValue[rank][n1]; 371 double srcArea = recvArea[rank][n1]; 359 372 double w = (*it)->area; 373 if (quantity) w/=srcArea ; 360 374 361 375 /* first order: src value times weight (weight = supermesh area), later divide by target area */ 362 376 int kk = (order == 2) ? n1 * (NMAX + 1) : n1; 363 377 GloId neighID = recvNeighIds[rank][kk]; 364 wgt_map[neighID] += (*it)->area;378 wgt_map[neighID] += w; 365 379 366 380 if (order == 2) … … 383 397 for (map<GloId,double>::iterator it = wgt_map.begin(); it != wgt_map.end(); it++) 384 398 { 385 this->remapMatrix[i] = (it->second / e.area) / renorm; 399 if (quantity) this->remapMatrix[i] = (it->second ) / renorm; 400 else this->remapMatrix[i] = (it->second / e.area) / renorm; 386 401 this->srcAddress[i] = it->first.ind; 387 402 this->srcRank[i] = it->first.rank; … … 400 415 delete[] sendElement[rank]; 401 416 delete[] recvValue[rank]; 417 delete[] recvArea[rank]; 402 418 if (order == 2) 403 419 { … … 410 426 delete[] recvElement[rank]; 411 427 delete[] sendValue[rank]; 428 delete[] sendArea[rank]; 412 429 if (order == 2) 413 430 delete[] sendGrad[rank]; -
XIOS/dev/dev_olga/extern/remap/src/mapper.hpp
r844 r1158 34 34 /** @param trgElts are the elements of the unstructured target grid 35 35 Returns the timings for substeps: */ 36 vector<double> computeWeights(int interpOrder, bool renormalize=false );36 vector<double> computeWeights(int interpOrder, bool renormalize=false, bool quantity=false); 37 37 int getNbWeights(void) { return nWeights ; } 38 38 /* … … 51 51 private: 52 52 /** @return number of weights (local to cpu) */ 53 int remap(Elt* elements, int nbElements, int order, bool renormalize=false );53 int remap(Elt* elements, int nbElements, int order, bool renormalize=false, bool quantity=false); 54 54 55 55 void buildMeshTopology(); -
XIOS/dev/dev_olga/extern/remap/src/tree.cpp
r951 r1158 142 142 root->parent = 0; 143 143 root->leafCount = 0; 144 root->centre = ORIGIN; 144 // initialize root node on the sphere 145 root->centre.x=1 ; root->centre.y=0 ; root->centre.z=0 ; 145 146 root->radius = 0.; 146 147 root->reinserted = false; -
XIOS/dev/dev_olga/extern/remap/src/triple.cpp
r849 r1158 124 124 } 125 125 126 // return oriented vector angle in range [-pi..pi], pole must be orthogonal to a and b 127 double vectAngle(const Coord &a, const Coord &b, const Coord &pole) 128 { 129 double nab = 1./(norm(a)*norm(b)) ; 130 131 Coord a_cross_b=crossprod(a, b)*nab ; 132 double sinVect ; 133 if (scalarprod(a_cross_b, pole) >= 0) sinVect=norm(a_cross_b) ; 134 else sinVect=-norm(a_cross_b) ; 135 double cosVect=scalarprod(a,b)*nab ; 136 137 return atan2(sinVect,cosVect) ; 126 138 } 139 140 } -
XIOS/dev/dev_olga/extern/remap/src/triple.hpp
r688 r1158 121 121 122 122 double angle(const Coord &a, const Coord &b, const Coord &pole); 123 124 // return oriented vector angle in range [-pi..pi], pole must be orthogonal to a and b 125 double vectAngle(const Coord &a, const Coord &b, const Coord &pole) ; 126 123 127 void print_Coord(Coord &p); 124 128 -
XIOS/dev/dev_olga/src/array_new.hpp
r731 r1158 302 302 } 303 303 304 bool operator== (const CArray<T_numtype,N_rank>& array) 305 { 306 size_t nbThis = this->numElements(); 307 size_t nbArr = array.numElements(); 308 if (nbThis != nbArr) return false; 309 typename Array<T_numtype,N_rank>::const_iterator itx=array.begin(), itxe=array.end(), ity=this->begin() ; 310 for(;itx!=itxe;++itx,++ity) if (*itx!=*ity) return false ; 311 return true; 312 } 313 314 bool operator== (const Array<T_numtype,N_rank>& array) 315 { 316 return ((*this) == (dynamic_cast<const CArray<T_numtype,N_rank>& >(array))); 317 } 318 304 319 void resize(int extent) 305 320 { … … 552 567 }; 553 568 569 570 #define macro(NRANK)\ 571 \ 572 template <>\ 573 inline size_t CArray<StdString,NRANK>::size(void) const\ 574 {\ 575 size_t size=(1 + NRANK) * sizeof(int) ;\ 576 Array<StdString,NRANK>::const_iterator it, itb=this->begin(), ite=this->end() ;\ 577 \ 578 for(it=itb;it!=ite;++it)\ 579 {\ 580 size+= sizeof(size_t) ;\ 581 size+= (*it).size();\ 582 } \ 583 return size ;\ 584 }\ 585 \ 586 /* for array string this function is an evaluation of maximum size of the array, considering stringArrayLen is the maximum size of the strings*/ \ 587 template <>\ 588 inline size_t CArray<StdString,NRANK>::size(sizeType numElements)\ 589 {\ 590 return (NRANK + 1) * sizeof(int) + numElements * stringArrayLen;\ 591 }\ 592 \ 593 template <>\ 594 inline bool CArray<StdString,NRANK>::toBuffer(CBufferOut& buffer) const\ 595 {\ 596 bool ret;\ 597 ret = buffer.put(this->dimensions());\ 598 ret &= buffer.put(this->shape().data(), this->dimensions());\ 599 \ 600 Array<StdString,NRANK>::const_iterator it, itb=this->begin(), ite=this->end() ;\ 601 \ 602 for(it=itb;it!=ite;++it)\ 603 {\ 604 ret &= buffer.put((*it).size()) ;\ 605 ret &= buffer.put((*it).data(),(*it).size());\ 606 } \ 607 return ret;\ 608 }\ 609 \ 610 template <>\ 611 inline bool CArray<StdString,NRANK>::fromBuffer(CBufferIn& buffer)\ 612 {\ 613 bool ret;\ 614 int numDim;\ 615 TinyVector<int,NRANK> vect;\ 616 size_t ne;\ 617 \ 618 ret = buffer.get(numDim);\ 619 ret &= buffer.get(vect.data(), NRANK);\ 620 this->resize(vect);\ 621 \ 622 Array<StdString,NRANK>::iterator it, itb=this->begin(), ite=this->end() ;\ 623 for(it=itb;it!=ite;++it)\ 624 {\ 625 ret &= buffer.get(ne) ;\ 626 char* str = new char[ne] ;\ 627 ret &= buffer.get(str, ne);\ 628 *it = string(str,ne) ;\ 629 delete [] str ;\ 630 }\ 631 initialized = true;\ 632 return ret;\ 633 } 634 macro(1) 635 macro(2) 636 macro(3) 637 macro(4) 638 macro(5) 639 macro(6) 640 macro(7) 641 642 #undef macro 643 554 644 template <typename T_numtype,int N_rank> inline CBufferOut& operator<<(CBufferOut& buffer, const CArray<T_numtype,N_rank>& array) 555 645 { -
XIOS/dev/dev_olga/src/attribute.cpp
r680 r1158 6 6 namespace xios 7 7 { 8 9 const StdString CAttribute::resetInheritanceStr("_reset_") ; 10 8 11 /// ////////////////////// Définitions ////////////////////// /// 9 12 CAttribute::CAttribute(const StdString & id) 10 : CObject(id), CBaseType() 13 : CObject(id), CBaseType(), _canInherite(true) 11 14 // , value() 12 15 { /* Ne rien faire de plus */ } 13 16 /* 14 CAttribute::CAttribute(const CAttribute & attribut)15 : CObject(attribut.getId()),CBaseType()16 {17 // this->value = attribut.getAnyValue();18 }19 17 */ 20 18 CAttribute::~CAttribute(void) … … 22 20 23 21 ///-------------------------------------------------------------- 24 /*25 const boost::any & CAttribute::getAnyValue(void) const26 {27 return (this->value);28 }29 22 30 31 void CAttribute::setAnyValue(const boost::any & value)32 {33 this->value = value;34 }35 36 void CAttribute::clear(void)37 {38 this->value = boost::any();39 }40 41 //---------------------------------------------------------------42 43 bool CAttribute::isEmpty(void) const44 {45 return (this->value.empty());46 }47 */48 23 const StdString & CAttribute::getName(void) const 49 24 { … … 79 54 ///-------------------------------------------------------------- 80 55 81 82 56 CMessage& operator<<(CMessage& msg,CAttribute& type) 83 57 { -
XIOS/dev/dev_olga/src/attribute.hpp
r1025 r1158 16 16 { 17 17 /// ////////////////////// Déclarations ////////////////////// /// 18 /*! 19 \class CAttribute 20 The fundamental class which describes the attributes of other different class in XIOS. 21 This class only plays a role of interface, its class child will have specific implelemtation corresponding to type of attribute 22 */ 18 23 class CAttribute : public CObject, public virtual CBaseType 19 24 { … … 24 29 /// Constructeurs /// 25 30 explicit CAttribute(const StdString & id); 26 // CAttribute(const CAttribute & attribut);27 // CAttribute(const CAttribute * const attribut); // Not implemented.28 31 29 32 /// Accesseurs /// 30 33 const StdString & getName(void) const; 31 // const boost::any & getAnyValue(void) const;32 // template <typename T> inline T getValue(void) const;33 // template <typename T> inline T* getRef(void);34 34 35 // /// Mutateurs ///36 // template <typename T> inline void setValue(const T & value);37 // void setAnyValue(const boost::any & value);38 // void clear(void);39 40 /// Test ///41 // bool isEmpty(void) const;42 // template <typename T> inline bool isType(void) const;43 35 virtual void set(const CAttribute& ) =0 ; 44 36 virtual void reset(void ) =0 ; … … 49 41 virtual StdString toString(void) const = 0; 50 42 virtual void fromString(const StdString & str) = 0; 51 52 // virtual void toBinary (StdOStream & os) const = 0; 53 // virtual void fromBinary(StdIStream & is) = 0; 43 virtual bool isEqual(const CAttribute& ) = 0; 54 44 55 45 //! Returns true if and only if the attribute should be publicly exposed in the API … … 59 49 virtual bool doSend() const { return true; } 60 50 51 /* 52 Groupd of functions to generate C and Fortran interface 53 */ 61 54 virtual void generateCInterface(ostream& oss, const string& className) = 0 ; 62 55 virtual void generateCInterfaceIsDefined(ostream& oss, const string& className) ; … … 75 68 virtual void setInheritedValue(const CAttribute& ) = 0 ; 76 69 virtual bool hasInheritedValue(void) const = 0; 77 78 protected :79 70 80 /// Constructeurs /// 81 // CAttribute(void); // Not implemented. 82 83 /// Propriété /// 84 // boost::any value; 71 bool canInherite(void) {return _canInherite ;} 72 protected : 73 bool _canInherite ; 74 static const StdString resetInheritanceStr ; 85 75 86 76 }; // class CAttribute 87 77 88 /// ////////////////////// Définitions ////////////////////// ///89 /*90 template <typename T>91 T CAttribute::getValue(void) const92 {93 return (boost::any_cast<T>(this->value));94 }95 96 template <typename T>97 T* CAttribute::getRef(void)98 {99 return (boost::any_cast<T>(&value));100 }101 102 template <typename T>103 void CAttribute::setValue(const T & value)104 {105 this->value = value;106 }107 108 template<typename T>109 bool CAttribute::isType(void) const110 {111 return (this->value.type() == typeid(T));112 }113 */114 115 78 CMessage& operator<<(CMessage& msg,CAttribute& type) ; 116 79 CMessage& operator<<(CMessage& msg, const CAttribute& type) ; -
XIOS/dev/dev_olga/src/attribute_array.hpp
r780 r1158 13 13 { 14 14 /// ////////////////////// Déclarations ////////////////////// /// 15 /*! 16 \class CAttributeArray 17 This class implements the attribute representing array of value 18 */ 15 19 template <typename T_numtype, int N_rank> 16 20 class CAttributeArray : public CAttribute, public CArray<T_numtype, N_rank> … … 19 23 20 24 using CArray<T_numtype,N_rank>::operator = ; 21 // using Array<T_numtype,N_rank>::operator = ;22 25 23 26 /// Constructeurs /// … … 40 43 CArray<T_numtype, N_rank> getInheritedValue(void) const ; 41 44 bool hasInheritedValue(void) const; 45 46 bool isEqual(const CAttributeArray& attr); 47 bool isEqual(const CAttribute& attr); 42 48 43 49 /// Destructeur /// … … 47 53 /// Autre /// 48 54 virtual string toString(void) const { return _toString();} 49 virtual void fromString(const StdString & str) { _fromString(str);}55 virtual void fromString(const StdString & str) { if (str==resetInheritanceStr) { reset(); _canInherite=false ;} else _fromString(str);} 50 56 virtual bool toBuffer (CBufferOut& buffer) const { return _toBuffer(buffer);} 51 57 virtual bool fromBuffer(CBufferIn& buffer) { return _fromBuffer(buffer); } … … 60 66 virtual void generateFortranInterfaceGetDeclaration(ostream& oss,const string& className) ; 61 67 62 63 protected :64 65 /// Constructeurs ///66 67 68 private : 68 69 CArray<T_numtype, N_rank> inheritedValue ; -
XIOS/dev/dev_olga/src/attribute_array_decl.cpp
r932 r1158 17 17 template class CAttributeArray<bool,6> ; 18 18 template class CAttributeArray<bool,7> ; 19 template class CAttributeArray<StdString,1> ; 20 template class CAttributeArray<StdString,2> ; 19 21 } -
XIOS/dev/dev_olga/src/attribute_array_impl.hpp
r778 r1158 83 83 void CAttributeArray<T_numtype,N_rank>::setInheritedValue(const CAttributeArray& attr) 84 84 { 85 if (this->isEmpty() && attr.hasInheritedValue())85 if (this->isEmpty() && _canInherite && attr.hasInheritedValue()) 86 86 { 87 87 inheritedValue.resize(attr.shape()) ; … … 103 103 } 104 104 105 template <typename T_numtype, int N_rank> 106 bool CAttributeArray<T_numtype,N_rank>::isEqual(const CAttributeArray& attr) 107 { 108 return ((dynamic_cast<CArray<T_numtype,N_rank>& >(*this)) == (dynamic_cast<const CArray<T_numtype,N_rank>& >(attr))); 109 } 110 111 template <typename T_numtype, int N_rank> 112 bool CAttributeArray<T_numtype,N_rank>::isEqual(const CAttribute& attr) 113 { 114 return ((*this) == (dynamic_cast<const CAttributeArray<T_numtype,N_rank>& >(attr))); 115 } 105 116 106 117 template <typename T_numtype, int N_rank> -
XIOS/dev/dev_olga/src/attribute_enum.hpp
r591 r1158 15 15 { 16 16 /// ////////////////////// Déclarations ////////////////////// /// 17 /*! 18 \class CAttributeEnum 19 This class implements the attribute representing enumeration 20 */ 17 21 template <class T> 18 22 class CAttributeEnum : public CAttribute, public CEnum<T> … … 47 51 bool hasInheritedValue(void) const; 48 52 53 bool isEqual(const CAttributeEnum& attr ); 54 bool isEqual(const CAttribute& attr ); 55 49 56 /// Destructeur /// 50 57 virtual ~CAttributeEnum(void) { } … … 55 62 /// Autre /// 56 63 virtual StdString toString(void) const { return _toString();} 57 virtual void fromString(const StdString & str) { _fromString(str);}64 virtual void fromString(const StdString & str) { if (str==resetInheritanceStr) { reset(); _canInherite=false ;} else _fromString(str);} 58 65 59 66 virtual bool toBuffer (CBufferOut& buffer) const { return _toBuffer(buffer);} … … 69 76 virtual void generateFortranInterfaceGetDeclaration(ostream& oss,const string& className) ; 70 77 71 72 protected :73 74 /// Constructeurs ///75 // CAttributeTemplate(void); // Not implemented.76 78 private : 77 79 StdString _toString(void) const; -
XIOS/dev/dev_olga/src/attribute_enum_impl.hpp
r580 r1158 88 88 void CAttributeEnum<T>::setInheritedValue(const CAttributeEnum& attr) 89 89 { 90 if (this->isEmpty() && attr.hasInheritedValue()) inheritedValue.set(attr.getInheritedValue());90 if (this->isEmpty() && _canInherite && attr.hasInheritedValue()) inheritedValue.set(attr.getInheritedValue()); 91 91 } 92 92 … … 109 109 { 110 110 return !this->isEmpty() || !inheritedValue.isEmpty(); 111 } 112 113 template <class T> 114 bool CAttributeEnum<T>::isEqual(const CAttribute& attr) 115 { 116 return (this->isEqual(dynamic_cast<const CAttributeEnum<T>& >(attr))); 117 } 118 119 template <class T> 120 bool CAttributeEnum<T>::isEqual(const CAttributeEnum& attr) 121 { 122 return ((dynamic_cast<const CEnum<T>& >(*this)) == (dynamic_cast<const CEnum<T>& >(attr))); 111 123 } 112 124 -
XIOS/dev/dev_olga/src/attribute_map.cpp
r1009 r1158 16 16 ///-------------------------------------------------------------- 17 17 18 /*! 19 Clear all attributes of an object and reset them to empty state 20 */ 18 21 void CAttributeMap::clearAllAttributes(void) 19 22 { … … 29 32 //--------------------------------------------------------------- 30 33 34 /* 35 Clear an attribute and reset its value 36 \param[in] key id of attribute 37 */ 31 38 void CAttributeMap::clearAttribute(const StdString& key) 32 39 { … … 36 43 //--------------------------------------------------------------- 37 44 45 /*! 46 Set an attribute of certain id with a value 47 \param[in] key id of the attribute 48 \param[in] attr value of attribute 49 */ 38 50 void CAttributeMap::setAttribute(const StdString& key, CAttribute* const attr) 39 51 { … … 50 62 //--------------------------------------------------------------- 51 63 64 /*! 65 Subscript operator. Return attribute with a specific id 66 */ 52 67 CAttribute* CAttributeMap::operator[](const StdString& key) 53 68 { … … 103 118 } 104 119 } 120 121 /*! 122 Compare two attribute maps 123 \param [in] another attribute map to compare 124 \param [in] excludedAttrs attribute to be excluded from comparasion 125 \return true if these two maps have same attributes whose value are identical 126 */ 127 bool CAttributeMap::isEqual(const CAttributeMap& another, const vector<StdString>& excludedAttrs) 128 { 129 SuperClassMap::const_iterator itb = another.begin(), ite = another.end(), it; 130 for (it = itb; it !=ite; ++it) 131 { 132 bool excluded = false; 133 for (int idx = 0; idx < excludedAttrs.size(); ++idx) 134 { 135 if (0 == (*it).first.compare(excludedAttrs[idx])) 136 { 137 excluded = true; 138 break; 139 } 140 } 141 142 if (!excluded) 143 { 144 if ((*it).first.compare(StdString("id")) != 0 && (*it).first.compare(StdString("src")) != 0) 145 { 146 if (this->hasAttribute(it->first)) 147 { 148 if (!((*it).second->isEqual(*(*this)[it->first]))) 149 { 150 return false; 151 } 152 } 153 else 154 return false; 155 } 156 } 157 } 158 159 return true; 160 } 161 105 162 106 163 //--------------------------------------------------------------- … … 129 186 if (apply) 130 187 { 131 if (currentAtt->isEmpty() && !el.second->isEmpty())188 if (currentAtt->isEmpty() && currentAtt->canInherite() && !el.second->isEmpty()) 132 189 { 133 190 this->setAttribute(el.first, el.second); … … 139 196 } 140 197 198 /*! 199 Duplicate attribute map with a specific attribute map. 200 Copy all non-empty attribute of the current attribute map 201 \param [in] srcAttr attribute map which is copied from. 202 */ 141 203 void CAttributeMap::duplicateAttributes(const CAttributeMap* const srcAttr) 142 204 { … … 216 278 } 217 279 */ 280 218 281 void CAttributeMap::generateCInterface(ostream& oss, const string& className) 219 282 { -
XIOS/dev/dev_olga/src/attribute_map.hpp
r1009 r1158 12 12 { 13 13 /// ////////////////////// Déclarations ////////////////////// /// 14 /*! 15 \class CAttributeMap 16 This class represents the set of attributes which an object can have. 17 Each attribute in the set is represented by an unique id. 18 */ 19 14 20 class CAttributeMap 15 21 : public xios_map<StdString, CAttribute*> … … 34 40 35 41 void clearAttribute(const StdString& key); 42 bool isEqual(const CAttributeMap& another, const vector<StdString>& excludedAttrs); 36 43 37 44 /// Destructeur /// … … 74 81 inline bool CAttributeMap::hasAttribute(const StdString& key) const 75 82 { 76 return (this->find(key) != this->end());83 return (this->find(key) != this->end()); 77 84 } 78 85 -
XIOS/dev/dev_olga/src/attribute_template.hpp
r780 r1158 16 16 { 17 17 /// ////////////////////// Déclarations ////////////////////// /// 18 /*! 19 \class CAttributeTemplate 20 The class implements attribute of some basic types 21 */ 18 22 template <class T> 19 23 class CAttributeTemplate : public CAttribute, public CType<T> … … 54 58 bool hasInheritedValue(void) const; 55 59 60 bool isEqual_(const CAttributeTemplate& attr ); 61 bool isEqual(const CAttribute& attr ); 62 56 63 /// Destructeur /// 57 64 virtual ~CAttributeTemplate(void) { } … … 62 69 /// Autre /// 63 70 virtual StdString toString(void) const { return _toString();} 64 virtual void fromString(const StdString & str) { _fromString(str);}71 virtual void fromString(const StdString & str) { if (str==resetInheritanceStr) { reset(); _canInherite=false ;} else _fromString(str);} 65 72 // virtual CAttributeTemplate* clone() const {} 66 73 // virtual void toBinary (StdOStream & os) const; -
XIOS/dev/dev_olga/src/attribute_template_impl.hpp
r778 r1158 71 71 T CAttributeTemplate<T>::getValue(void) const 72 72 { 73 74 /* 75 76 77 78 79 80 81 73 return CType<T>::get() ; 74 /* 75 if (SuperClass::isEmpty()) 76 { 77 ERROR("T CAttributeTemplate<T>::getValue(void) const", 78 << "[ id = " << this->getId() << "]" 79 << " L'attribut est requis mais n'est pas défini !"); 80 } 81 return (SuperClass::getValue<T>()); 82 82 */ 83 83 } … … 125 125 void CAttributeTemplate<T>::setInheritedValue(const CAttributeTemplate& attr) 126 126 { 127 if (this->isEmpty() && attr.hasInheritedValue()) inheritedValue.set(attr.getInheritedValue()) ;127 if (this->isEmpty() && _canInherite && attr.hasInheritedValue()) inheritedValue.set(attr.getInheritedValue()) ; 128 128 } 129 129 … … 139 139 { 140 140 return !this->isEmpty() || !inheritedValue.isEmpty() ; 141 } 142 143 template <class T> 144 bool CAttributeTemplate<T>::isEqual(const CAttribute& attr) 145 { 146 const CAttributeTemplate<T>& tmp = dynamic_cast<const CAttributeTemplate<T>& >(attr); 147 return this->isEqual_(tmp); 148 } 149 150 template <class T> 151 bool CAttributeTemplate<T>::isEqual_(const CAttributeTemplate& attr) 152 { 153 if ((!this->hasInheritedValue() && !attr.hasInheritedValue())) 154 return true; 155 if (this->hasInheritedValue() && attr.hasInheritedValue()) 156 return (this->getInheritedValue() == attr.getInheritedValue()); 157 else 158 return false; 141 159 } 142 160 -
XIOS/dev/dev_olga/src/client.cpp
r1152 r1158 18 18 MPI_Comm CClient::interComm ; 19 19 std::list<MPI_Comm> CClient::contextInterComms; 20 int CClient::serverLeader ;20 int CClient::serverLeader ; 21 21 bool CClient::is_MPI_Initialized ; 22 22 int CClient::rank_ = INVALID_RANK; … … 54 54 } 55 55 CTimer::get("XIOS").resume() ; 56 CTimer::get("XIOS init ").resume() ;56 CTimer::get("XIOS init/finalize").resume() ; 57 57 boost::hash<string> hashString ; 58 58 59 unsigned long hashClient = hashString(codeId) ; 60 unsigned long hashServer = hashString(CXios::xiosCodeId); 61 // unsigned long hashServer = hashString(CXios::xiosCodeIdPrm); 59 unsigned long hashClient=hashString(codeId) ; 60 unsigned long hashServer=hashString(CXios::xiosCodeId) ; 62 61 unsigned long* hashAll ; 63 62 int size ; … … 71 70 hashAll=new unsigned long[size] ; 72 71 73 MPI_Allgather(&hashClient, 1, MPI_LONG, hashAll, 1, MPI_LONG,CXios::globalComm) ;72 MPI_Allgather(&hashClient,1,MPI_LONG,hashAll,1,MPI_LONG,CXios::globalComm) ; 74 73 75 74 map<unsigned long, int> colors ; … … 90 89 for (i=0; i < size; ++i) 91 90 { 92 if (hash All[i] == hashString(CXios::xiosCodeId))91 if (hashServer == hashAll[i]) 93 92 { 94 93 CXios::setUsingServer(); … … 148 147 149 148 CTimer::get("XIOS").resume() ; 150 CTimer::get("XIOS init ").resume() ;149 CTimer::get("XIOS init/finalize").resume() ; 151 150 152 151 if (CXios::usingServer) … … 216 215 217 216 int messageSize=msg.size() ; 218 void* buff = new char[messageSize] ;219 CBufferOut buffer( buff,messageSize) ;217 char * buff = new char[messageSize] ; 218 CBufferOut buffer((void*)buff,messageSize) ; 220 219 buffer<<msg ; 221 220 222 MPI_Send(buff, buffer.count(), MPI_CHAR, serverLeader, 1, CXios::globalComm) ; 223 MPI_Intercomm_create(contextComm, 0, CXios::globalComm, serverLeader, 10+globalRank, &contextInterComm) ; 221 MPI_Send((void*)buff,buffer.count(),MPI_CHAR,serverLeader,1,CXios::globalComm) ; 222 223 MPI_Intercomm_create(contextComm,0,CXios::globalComm,serverLeader,10+globalRank,&contextInterComm) ; 224 224 info(10)<<"Register new Context : "<<id<<endl ; 225 225 MPI_Comm inter ; … … 257 257 MPI_Comm_free(&intraComm); 258 258 259 CTimer::get("XIOS finalize").suspend() ;259 CTimer::get("XIOS init/finalize").suspend() ; 260 260 CTimer::get("XIOS").suspend() ; 261 261 … … 267 267 268 268 info(20) << "Client side context is finalized"<<endl ; 269 report(0) <<" Performance report : Whole time from XIOS init and finalize: "<< CTimer::get("XIOS init/finalize").getCumulatedTime()<<" s"<<endl ; 269 270 report(0) <<" Performance report : total time spent for XIOS : "<< CTimer::get("XIOS").getCumulatedTime()<<" s"<<endl ; 270 271 report(0)<< " Performance report : time spent for waiting free buffer : "<< CTimer::get("Blocking time").getCumulatedTime()<<" s"<<endl ; 271 report(0)<< " Performance report : Ratio : "<< CTimer::get("Blocking time").getCumulatedTime()/CTimer::get("XIOS ").getCumulatedTime()*100.<<" %"<<endl ;272 report(0)<< " Performance report : Ratio : "<< CTimer::get("Blocking time").getCumulatedTime()/CTimer::get("XIOS init/finalize").getCumulatedTime()*100.<<" %"<<endl ; 272 273 report(0)<< " Performance report : This ratio must be close to zero. Otherwise it may be usefull to increase buffer size or numbers of server"<<endl ; 273 274 // report(0)<< " Memory report : Current buffer_size : "<<CXios::bufferSize<<endl ; 274 275 report(0)<< " Memory report : Minimum buffer size required : " << CClientBuffer::maxRequestSize << " bytes" << endl ; 275 276 report(0)<< " Memory report : increasing it by a factor will increase performance, depending of the volume of data wrote in file at each time step of the file"<<endl ; 276 277 report(100)<<CTimer::getAllCumulatedTime()<<endl ; 277 278 } 278 279 -
XIOS/dev/dev_olga/src/client.hpp
r1148 r1158 11 11 public: 12 12 static void initialize(const string& codeId, MPI_Comm& localComm, MPI_Comm& returnComm); 13 14 13 static void finalize(void); 15 14 static void registerContext(const string& id, MPI_Comm contextComm); -
XIOS/dev/dev_olga/src/client_client_dht_template_impl.hpp
r1030 r1158 307 307 308 308 indexToInfoMappingLevel_.swap(indexToInfoMapping); 309 310 309 if (0 != recvNbIndexCount) delete [] recvIndexBuff; 311 310 for (boost::unordered_map<int,size_t*>::const_iterator it = client2ClientIndex.begin(); -
XIOS/dev/dev_olga/src/client_server_mapping.hpp
r1030 r1158 26 26 public: 27 27 typedef boost::unordered_map<int, std::vector<size_t> > GlobalIndexMap; 28 // typedef boost::map<int, std::vector<size_t> > GlobalIndexMap;29 28 public: 30 29 /** Default constructor */ -
XIOS/dev/dev_olga/src/config/axis_attribute.conf
r1025 r1158 6 6 7 7 DECLARE_ATTRIBUTE(int, n_glo) 8 DECLARE_ENUM2(positive, up, down) 8 DECLARE_ENUM2(positive, up, down) 9 9 10 10 /* GLOBAL */ … … 29 29 DECLARE_ARRAY(bool, 1 , mask) 30 30 DECLARE_ARRAY(double, 2 , bounds) 31 DECLARE_ATTRIBUTE(int, prec) 32 DECLARE_ARRAY(StdString ,1 , label) -
XIOS/dev/dev_olga/src/config/domain_attribute.conf
r1025 r1158 53 53 DECLARE_ENUM4(type,rectilinear,curvilinear,unstructured, gaussian) 54 54 DECLARE_ATTRIBUTE(StdString, domain_ref) 55 DECLARE_ATTRIBUTE(int, prec) -
XIOS/dev/dev_olga/src/config/domain_attribute_private.conf
r1099 r1158 14 14 DECLARE_ARRAY_PRIVATE(double, 1, latvalue_rectilinear_read_from_file) 15 15 16 // Array contain whole value (non distributed) of longitude and latitude of curvilinear read from a file 17 DECLARE_ARRAY_PRIVATE(double, 2, lonvalue_curvilinear_read_from_file) 18 DECLARE_ARRAY_PRIVATE(double, 2, latvalue_curvilinear_read_from_file) 19 DECLARE_ARRAY_PRIVATE(double, 3, bounds_lonvalue_curvilinear_read_from_file) 20 DECLARE_ARRAY_PRIVATE(double, 3, bounds_latvalue_curvilinear_read_from_file) 21 22 // Array contain whole value (non distributed) of longitude and latitude of unstructured read from a file 23 DECLARE_ARRAY_PRIVATE(double, 1, lonvalue_unstructured_read_from_file) 24 DECLARE_ARRAY_PRIVATE(double, 1, latvalue_unstructured_read_from_file) 25 DECLARE_ARRAY_PRIVATE(double, 2, bounds_lonvalue_unstructured_read_from_file) 26 DECLARE_ARRAY_PRIVATE(double, 2, bounds_latvalue_unstructured_read_from_file) 27 16 28 DECLARE_ATTRIBUTE_PRIVATE(int, global_zoom_ibegin) 17 29 DECLARE_ATTRIBUTE_PRIVATE(int, global_zoom_ni) -
XIOS/dev/dev_olga/src/config/expand_domain_attribute.conf
r941 r1158 2 2 3 3 DECLARE_ENUM2(type,node,edge) 4 5 // Flag to determine if domain expension should be periodic (and in which direction) 6 DECLARE_ATTRIBUTE(bool, i_periodic) 7 DECLARE_ATTRIBUTE(bool, j_periodic) -
XIOS/dev/dev_olga/src/config/file_attribute.conf
r983 r1158 14 14 DECLARE_ENUM2(format, netcdf4, netcdf4_classic) 15 15 DECLARE_ENUM2(convention, CF, UGRID) 16 DECLARE_ATTRIBUTE(StdString, convention_str) 16 17 DECLARE_ENUM2(par_access, collective, independent) 17 18 DECLARE_ATTRIBUTE(bool, append) 18 19 DECLARE_ENUM2(mode, read, write) 19 DECLARE_ENUM 4(time_counter, centered, instant, record, none)20 DECLARE_ENUM7(time_counter, centered, instant, record, exclusive, centered_exclusive, instant_exclusive, none) 20 21 DECLARE_ATTRIBUTE(StdString, time_counter_name) 22 DECLARE_ENUM2(time_units, seconds, days) 21 23 DECLARE_ATTRIBUTE(int, record_offset) 22 24 DECLARE_ATTRIBUTE(bool, cyclic) 23 25 24 26 DECLARE_ATTRIBUTE(int, compression_level) 25 DECLARE_ATTRIBUTE(bool, coupler)26 27 27 28 DECLARE_ENUM4(timeseries, none, only, both, exclusive) 28 29 DECLARE_ATTRIBUTE(StdString, ts_prefix) 29 30 DECLARE_ATTRIBUTE(StdString, time_stamp_name) 31 DECLARE_ATTRIBUTE(StdString, time_stamp_format) 32 DECLARE_ATTRIBUTE(StdString, uuid_name) 33 DECLARE_ATTRIBUTE(StdString, uuid_format) -
XIOS/dev/dev_olga/src/config/interpolate_domain_attribute.conf
r1021 r1158 1 1 /* GLOBAL */ 2 DECLARE_ATTRIBUTE(StdString, file)3 2 DECLARE_ATTRIBUTE(int, order) 4 3 DECLARE_ATTRIBUTE(bool, renormalize) 4 DECLARE_ATTRIBUTE(bool, quantity) 5 5 6 6 /* Write interpolation weights into file */ -
XIOS/dev/dev_olga/src/config/scalar_attribute.conf
r887 r1158 9 9 10 10 DECLARE_ATTRIBUTE(StdString, scalar_ref) 11 DECLARE_ATTRIBUTE(int, prec) -
XIOS/dev/dev_olga/src/config/var_attribute.conf
r527 r1158 1 1 DECLARE_TYPE(type) 2 2 DECLARE_ATTRIBUTE(StdString, name) 3 DECLARE_ENUM4(ts_target, file, field, both, none) -
XIOS/dev/dev_olga/src/context_client.cpp
r1139 r1158 52 52 ranksServerLeader.push_back(rankStart + i); 53 53 54 ranksServerNotLeader.resize(0); } 54 ranksServerNotLeader.resize(0); 55 } 55 56 else 56 57 { … … 125 126 * Send the temporarily buffered event (if any). 126 127 * 127 * \return true if a temporarily buffered event could be sent, false otherwise 128 * \return true if a temporarily buffered event could be sent, false otherwise 128 129 */ 129 130 bool CContextClient::sendTemporarilyBufferedEvent() … … 171 172 } 172 173 } 173 174 174 175 175 /*! … … 323 323 } 324 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 325 /*! 326 Get leading server in the group of connected server 327 \return ranks of leading servers 328 */ 329 const std::list<int>& CContextClient::getRanksServerNotLeader(void) const 330 { 331 return ranksServerNotLeader; 332 } 333 334 /*! 335 Check if client connects to leading server 336 \return connected(true), not connected (false) 337 */ 338 bool CContextClient::isServerNotLeader(void) const 339 { 340 return !ranksServerNotLeader.empty(); 341 } 342 342 343 343 /*! -
XIOS/dev/dev_olga/src/context_client.hpp
r1148 r1158 72 72 MPI_Comm intraComm; //!< Communicator of client group 73 73 74 map<int,CClientBuffer*> buffers; 74 map<int,CClientBuffer*> buffers; //!< Buffers for connection to servers 75 75 76 76 private: -
XIOS/dev/dev_olga/src/context_server.cpp
r1139 r1158 23 23 { 24 24 25 CContextServer::CContextServer(CContext* parent, 25 CContextServer::CContextServer(CContext* parent,MPI_Comm intraComm_,MPI_Comm interComm_) 26 26 { 27 27 context=parent; … … 50 50 pendingEvent=true; 51 51 } 52 53 52 54 53 bool CContextServer::hasPendingEvent(void) … … 207 206 { 208 207 map<int,CServerBuffer*>::iterator it; 209 for(it=buffers.begin();it!=buffers.end();++it) 210 delete it->second; 208 for(it=buffers.begin();it!=buffers.end();++it) delete it->second; 211 209 } 212 210 … … 263 261 } 264 262 } 265 266 263 } -
XIOS/dev/dev_olga/src/context_server.hpp
r1130 r1158 14 14 public: 15 15 16 CContextServer(CContext* parent, MPI_Comm intraComm, MPI_Comm interComm) ; 17 16 CContextServer(CContext* parent,MPI_Comm intraComm,MPI_Comm interComm) ; 18 17 bool eventLoop(bool enableEventsProcessing = true); 19 18 void listen(void) ; 20 19 void checkPendingRequest(void) ; 20 void processRequest(int rank, char* buff,int count) ; 21 21 void processEvents(void) ; 22 22 bool hasFinished(void); … … 24 24 void setPendingEvent(void) ; 25 25 bool hasPendingEvent(void) ; 26 27 void processRequest(int rank, char* buff,int count) ;28 26 29 27 MPI_Comm intraComm ; … … 50 48 51 49 private: 52 std::map<int, StdSize> mapBufferSize_; 53 50 std::map<int, StdSize> mapBufferSize_; 54 51 } ; 55 52 -
XIOS/dev/dev_olga/src/cxios.cpp
r1130 r1158 16 16 string CXios::rootFile="./iodef.xml" ; 17 17 string CXios::xiosCodeId="xios.x" ; 18 // string CXios::xiosCodeIdPrm="xios.x.1" ;19 // string CXios::xiosCodeIdSnd="xios.x.2" ;20 18 string CXios::clientFile="./xios_client"; 21 19 string CXios::serverFile="./xios_server"; … … 36 34 bool CXios::isOptPerformance = true; 37 35 CRegistry* CXios::globalRegistry = 0; 36 double CXios::recvFieldTimeout = 10.0; 38 37 39 38 //! Parse configuration file and create some objects from it … … 71 70 bufferSizeFactor = getin<double>("buffer_size_factor", defaultBufferSizeFactor); 72 71 minBufferSize = getin<int>("min_buffer_size", 1024 * sizeof(double)); 72 recvFieldTimeout = getin<double>("recv_field_timeout", 10.0); 73 if (recvFieldTimeout < 0.0) 74 ERROR("CXios::parseXiosConfig()", "recv_field_timeout cannot be negative."); 73 75 74 76 globalComm=MPI_COMM_WORLD ; … … 115 117 delete globalRegistry ; 116 118 } 117 CClient::closeInfoStream();118 119 119 120 120 #ifdef XIOS_MEMTRACK 121 122 #ifdef XIOS_MEMTRACK_LIGHT 123 report(10) << " Memory report : current memory used by XIOS : "<< MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 124 report(10) << " Memory report : maximum memory used by XIOS : "<< MemTrack::getMaxMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 125 #endif 126 127 #ifdef XIOS_MEMTRACK_FULL 121 128 MemTrack::TrackListMemoryUsage() ; 122 129 MemTrack::TrackDumpBlocks(); 130 #endif 131 132 CClient::closeInfoStream(); 133 123 134 #endif 124 135 } … … 138 149 { 139 150 initServer(); 151 isClient = false; 152 isServer = true; 140 153 141 154 // Initialize all aspects MPI 142 155 CServer::initialize(); 143 isServer = true;144 isClient = false;145 146 156 if (CServer::getRank()==0) globalRegistry = new CRegistry(CServer::intraComm) ; 147 157 … … 181 191 } 182 192 CServer::finalize(); 193 194 #ifdef XIOS_MEMTRACK 195 196 #ifdef XIOS_MEMTRACK_LIGHT 197 report(10) << " Memory report : current memory used by XIOS : "<< MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 198 report(10) << " Memory report : maximum memory used by XIOS : "<< MemTrack::getMaxMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 199 #endif 200 201 #ifdef XIOS_MEMTRACK_FULL 202 MemTrack::TrackListMemoryUsage() ; 203 MemTrack::TrackDumpBlocks(); 204 #endif 205 #endif 183 206 CServer::closeInfoStream(); 184 207 } -
XIOS/dev/dev_olga/src/cxios.hpp
r1077 r1158 37 37 static bool isServer ; //!< Check if xios is server 38 38 39 // static int serverLevel ;40 41 39 static MPI_Comm globalComm ; //!< Global communicator 42 40 … … 51 49 static bool isOptPerformance; //!< Check if buffer size is for performance (as large as possible) 52 50 static CRegistry* globalRegistry ; //!< global registry which is wrote by the root process of the servers 51 static double recvFieldTimeout; //!< Time to wait for data before issuing an error when receiving a field 53 52 54 53 public: -
XIOS/dev/dev_olga/src/data_output.cpp
r887 r1158 84 84 //---------------------------------------------------------------- 85 85 86 void CDataOutput::writeField (CField* field)86 void CDataOutput::writeFieldTimeAxis(CField* field) 87 87 { 88 88 CContext* context = CContext::getCurrent() ; 89 89 boost::shared_ptr<CCalendar> calendar = context->getCalendar(); 90 90 91 this->writeTimeAxis_(field, calendar); 92 } 93 94 void CDataOutput::writeField(CField* field) 95 { 91 96 this->writeField_(field); 92 this->writeTimeAxis_(field, calendar);93 97 } 94 98 -
XIOS/dev/dev_olga/src/data_output.hpp
r887 r1158 25 25 void closeFile (void); 26 26 void writeField (CField* field); 27 void writeFieldTimeAxis(CField* field) ; 27 28 void writeFieldGrid(CField* field); 28 29 void writeTimeDimension(void); -
XIOS/dev/dev_olga/src/date.cpp
r647 r1158 62 62 hour = date.hour; minute = date.minute; second = date.second; 63 63 return (*this); 64 } 65 66 bool CDate::operator==(const CDate& date) 67 { 68 return (&(*relCalendar) == &(*date.relCalendar) && 69 year == date.year && month == date.month && day == date.day && 70 hour == date.hour && minute == date.minute && second == date.second); 71 64 72 } 65 73 -
XIOS/dev/dev_olga/src/date.hpp
r591 r1158 32 32 /// Opérateurs /// 33 33 CDate& operator=(const CDate& date); 34 bool operator==(const CDate& date); 34 35 friend StdOStream& operator<<(StdOStream& out, const CDate& date); 35 36 friend StdIStream& operator>>(StdIStream& in, CDate& date); -
XIOS/dev/dev_olga/src/declare_ref_func.hpp
r1099 r1158 107 107 if (refer_ptr->hasAutoGeneratedId() && \ 108 108 refer_ptr->hasDirect##type##Reference()) \ 109 nameRef = refer_ptr->name_##_ref;\109 nameRef = refer_ptr->name_##_ref; \ 110 110 else { \ 111 112 113 114 111 nameRef = refer_ptr->getId(); break; \ 112 } \ 113 if (tmpRefObjects.end() != tmpRefObjects.find(refer_ptr)) \ 114 { \ 115 115 ERROR("const StdString& C" #type "::get" #type "OutputName(void) const ", \ 116 117 118 }\116 << "Circular dependency stopped for " #name_ " object " \ 117 << "with id = \"" << refer_ptr->getId() << "\"."); \ 118 } \ 119 119 } \ 120 120 return nameRef; \ -
XIOS/dev/dev_olga/src/dht_auto_indexing.cpp
r924 r1158 79 79 for (itIdx = itbIdx; itIdx != iteIdx; ++itIdx) 80 80 { 81 (itIdx->second)[0] = beginIndexOnProc_ + idx; 81 // (itIdx->second)[0] = beginIndexOnProc_ + idx; 82 (itIdx->second)[1] = beginIndexOnProc_ + idx; 82 83 globalIndex_[idx] = beginIndexOnProc_ + idx; 83 84 ++idx ; -
XIOS/dev/dev_olga/src/distribution_client.cpp
r1144 r1158 152 152 infoIndex_.resize(this->dims_); 153 153 154 // A trick to determine position of each domain in domainList 155 int domIndex = 0, axisIndex = 0, scalarIndex = 0; 156 idx = 0; 157 154 158 elementLocalIndex_.resize(numElement_); 155 159 elementGlobalIndex_.resize(numElement_); … … 158 162 elementNLocal_.resize(numElement_); 159 163 elementNGlobal_.resize(numElement_); 160 161 164 elementNLocal_[0] = 1; 162 165 elementNGlobal_[0] = 1; 166 size_t localSize = 1, globalSize = 1; 167 163 168 isDataDistributed_ = false; 164 165 size_t localSize = 1, globalSize = 1;166 167 // A trick to determine position of each domain in domainList168 int domIndex = 0, axisIndex = 0, scalarIndex = 0;169 idx = 0;170 171 172 169 // Update all the vectors above 173 170 for (idx = 0; idx < numElement_; ++idx) -
XIOS/dev/dev_olga/src/distribution_server.hpp
r1144 r1158 43 43 virtual void createGlobalIndex(); 44 44 45 void createGlobalIndexFromIndex(const std::vector<CArray<int,1> >& globalIndexOnEachDimension,46 const std::vector<int>& nbGlobal);47 48 45 protected: 49 46 GlobalLocalMap globalLocalIndexMap_; -
XIOS/dev/dev_olga/src/duration.cpp
r612 r1158 26 26 } 27 27 28 /*! 29 This operation may not serve much, it's here because of the need of operator== from generic class CType<T> 30 */ 31 bool CDuration::operator==(const CDuration& duration) 32 { 33 return (year == duration.year && month == duration.month && day == duration.day && 34 hour == duration.hour && minute == duration.minute && second == duration.second && timestep == duration.timestep); 35 } 36 28 37 StdOStream& operator<<(StdOStream& out, const CDuration& duration) 29 38 { … … 38 47 char c = '/'; 39 48 bool invalidUnit = false; 49 CDuration sentinel = NoneDu; 50 51 #define setDuration(unit, value) \ 52 { \ 53 if (sentinel.unit) \ 54 ERROR("StdIStream& operator>>(StdIStream& in , CDuration& duration)", \ 55 << "Bad duration format: " #unit " has already been set."); \ 56 \ 57 duration.unit = value; \ 58 sentinel.unit = 1.0; \ 59 } 40 60 41 61 do … … 48 68 switch (c) 49 69 { 50 case 'y': duration.year = v;break;51 case 'd': duration.day = v;break;52 case 'h': duration.hour = v;break;53 case 's': duration.second = v;break;70 case 'y': setDuration(year, v) break; 71 case 'd': setDuration(day, v) break; 72 case 'h': setDuration(hour, v) break; 73 case 's': setDuration(second, v) break; 54 74 case 'm': 55 75 { 56 76 in >> c; 57 if (c == 'i') duration.minute = v;58 else if (c == 'o') duration.month = v;77 if (c == 'i') setDuration(minute, v) 78 else if (c == 'o') setDuration(month, v) 59 79 else invalidUnit = true; 60 80 break; … … 63 83 { 64 84 in >> c; 65 if (c == 's') duration.timestep = v;85 if (c == 's') setDuration(timestep, v) 66 86 else invalidUnit = true; 67 87 break; … … 76 96 << "Bad duration format: invalid unit, unexpected '" << c << "' character."); 77 97 } while (in.peek() != EOF); // check whether there is a next character to read 98 99 #undef setDuration 78 100 79 101 return in; -
XIOS/dev/dev_olga/src/duration.hpp
r612 r1158 22 22 /// Opérateurs /// 23 23 CDuration& operator=(const CDuration& duration); 24 bool operator==(const CDuration& duration); 24 25 25 26 friend StdOStream& operator<<(StdOStream& out, const CDuration& duration); -
XIOS/dev/dev_olga/src/event_scheduler.cpp
r992 r1158 150 150 size_t hashId=recvRequest->buffer[1] ; 151 151 size_t lev=recvRequest->buffer[2] ; 152 //delete recvRequest ;152 delete recvRequest ; 153 153 pendingRecvParentRequest.pop() ; 154 154 155 155 if (lev==level) eventStack.push(pair<size_t,size_t>(timeLine,hashId)) ; 156 156 else bcastEvent(timeLine, hashId, lev) ; 157 delete recvRequest ;158 157 } 159 158 } -
XIOS/dev/dev_olga/src/filter/file_server_writer_filter.cpp
r1026 r1158 18 18 field->writeUpdateData(data[0]->data); 19 19 } 20 21 bool CFileServerWriterFilter::isDataExpected(const CDate& date) const 22 { 23 return true; 24 } 20 25 } // namespace xios -
XIOS/dev/dev_olga/src/filter/file_server_writer_filter.hpp
r1026 r1158 23 23 CFileServerWriterFilter(CGarbageCollector& gc, CField* field); 24 24 25 bool virtual isDataExpected(const CDate& date) const; 25 26 protected: 26 27 /*! -
XIOS/dev/dev_olga/src/filter/file_writer_filter.cpp
r639 r1158 2 2 #include "exception.hpp" 3 3 #include "field.hpp" 4 #include "utils.hpp" 4 5 5 6 namespace xios … … 16 17 void CFileWriterFilter::onInputReady(std::vector<CDataPacketPtr> data) 17 18 { 19 bool ignoreMissingValue = (!field->detect_missing_value.isEmpty() && 20 !field->default_value.isEmpty() && 21 field->detect_missing_value == true); 22 if (ignoreMissingValue) 23 { 24 double missingValue = field->default_value; 25 size_t nbData = data[0]->data.numElements(); 26 for (size_t idx = 0; idx < nbData; ++idx) 27 { 28 if (NumTraits<double>::isnan(data[0]->data(idx))) 29 data[0]->data(idx) = missingValue; 30 } 31 } 32 18 33 field->sendUpdateData(data[0]->data); 19 34 } 35 36 bool CFileWriterFilter::isDataExpected(const CDate& date) const 37 { 38 return true; 39 } 20 40 } // namespace xios -
XIOS/dev/dev_olga/src/filter/file_writer_filter.hpp
r639 r1158 23 23 CFileWriterFilter(CGarbageCollector& gc, CField* field); 24 24 25 /*! 26 * Tests whether data is expected for the specified date. 27 * 28 * \param date the date associated to the data 29 */ 30 bool virtual isDataExpected(const CDate& date) const; 31 25 32 protected: 26 33 /*! -
XIOS/dev/dev_olga/src/filter/filter.cpp
r1021 r1158 40 40 return (CInputPin::canBeTriggered() || COutputPin::canBeTriggered()); 41 41 } 42 43 bool CFilter::isDataExpected(const CDate& date) const 44 { 45 return COutputPin::isDataExpected(date); 46 } 42 47 } // namespace xios -
XIOS/dev/dev_olga/src/filter/filter.hpp
r1021 r1158 48 48 bool virtual canBeTriggered() const; 49 49 50 /*! 51 * Tests whether data is expected for the specified date. 52 * 53 * \param date the date associated to the data 54 */ 55 bool virtual isDataExpected(const CDate& date) const; 56 50 57 protected: 51 58 IFilterEngine* engine; //!< The filter engine, might be the filter itself -
XIOS/dev/dev_olga/src/filter/input_pin.hpp
r1021 r1158 60 60 61 61 /*! 62 * Tests whether data is expected for the specified date. 63 * 64 * \param date the date associated to the data 65 */ 66 bool virtual isDataExpected(const CDate& date) const = 0; 67 68 /*! 62 69 * Removes all pending packets which are older than the specified timestamp. 63 70 * -
XIOS/dev/dev_olga/src/filter/output_pin.cpp
r1021 r1158 73 73 } 74 74 75 bool COutputPin::isDataExpected(const CDate& date) const 76 { 77 std::vector<std::pair<boost::shared_ptr<CInputPin>, size_t> >::const_iterator it, itEnd; 78 for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it) 79 { 80 if (it->first->isDataExpected(date)) 81 return true; 82 } 83 84 return false; 85 } 86 75 87 void COutputPin::invalidate(Time timestamp) 76 88 { -
XIOS/dev/dev_olga/src/filter/output_pin.hpp
r1021 r1158 46 46 47 47 /*! 48 * Tests whether data is expected for the specified date. 49 * 50 * \param date the date associated to the data 51 */ 52 bool virtual isDataExpected(const CDate& date) const; 53 54 /*! 48 55 * Removes all pending packets which are older than the specified timestamp. 49 56 * -
XIOS/dev/dev_olga/src/filter/source_filter.cpp
r1021 r1158 3 3 #include "exception.hpp" 4 4 #include "calendar_util.hpp" 5 #include <limits> 5 6 6 7 namespace xios 7 8 { 8 9 CSourceFilter::CSourceFilter(CGarbageCollector& gc, CGrid* grid, 9 const CDuration offset /*= NoneDu*/, bool manualTrigger /*= false*/) 10 const CDuration offset /*= NoneDu*/, bool manualTrigger /*= false*/, 11 bool hasMissingValue /*= false*/, 12 double defaultValue /*= 0.0*/) 10 13 : COutputPin(gc, manualTrigger) 11 14 , grid(grid) 12 15 , offset(offset) 16 , hasMissingValue(hasMissingValue), defaultValue(defaultValue) 13 17 { 14 18 if (!grid) … … 29 33 packet->data.resize(grid->storeIndex_client.numElements()); 30 34 grid->inputField(data, packet->data); 35 36 // Convert missing values to NaN 37 if (hasMissingValue) 38 { 39 double nanValue = std::numeric_limits<double>::quiet_NaN(); 40 size_t nbData = packet->data.numElements(); 41 for (size_t idx = 0; idx < nbData; ++idx) 42 { 43 if (defaultValue == packet->data(idx)) 44 packet->data(idx) = nanValue; 45 } 46 } 31 47 32 48 onOutputReady(packet); -
XIOS/dev/dev_olga/src/filter/source_filter.hpp
r1021 r1158 23 23 * \param offset the offset applied to the timestamp of all packets 24 24 * \param manualTrigger whether the output should be triggered manually 25 * \param hasMissingValue whether data has missing value 26 * \param defaultValue missing value to detect 25 27 */ 26 28 CSourceFilter(CGarbageCollector& gc, CGrid* grid, 27 const CDuration offset = NoneDu, bool manualTrigger = false); 29 const CDuration offset = NoneDu, bool manualTrigger = false, 30 bool hasMissingValue = false, 31 double defaultValue = 0.0); 28 32 29 33 /*! … … 58 62 CGrid* grid; //!< The grid attached to the data the filter can accept 59 63 const CDuration offset; //!< The offset applied to the timestamp of all packets 64 bool hasMissingValue; 65 double defaultValue; 60 66 }; // class CSourceFilter 61 67 } // namespace xios -
XIOS/dev/dev_olga/src/filter/spatial_transform_filter.cpp
r1021 r1158 11 11 12 12 std::pair<boost::shared_ptr<CSpatialTransformFilter>, boost::shared_ptr<CSpatialTransformFilter> > 13 CSpatialTransformFilter::buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, double defaultValue)13 CSpatialTransformFilter::buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, bool hasMissingValue, double missingValue) 14 14 { 15 15 if (!srcGrid || !destGrid) … … 26 26 const std::vector<StdString>& auxInputs = gridTransformation->getAuxInputs(); 27 27 size_t inputCount = 1 + (auxInputs.empty() ? 0 : auxInputs.size()); 28 double defaultValue = (hasMissingValue) ? std::numeric_limits<double>::quiet_NaN() : 0.0; 28 29 boost::shared_ptr<CSpatialTransformFilter> filter(new CSpatialTransformFilter(gc, engine, defaultValue, inputCount)); 29 30 … … 103 104 } 104 105 packet->data.resize(gridTransformation->getGridDestination()->storeIndex_client.numElements()); 105 packet->data = defaultValue; 106 if (0 != packet->data.numElements()) 107 (packet->data)(0) = defaultValue; 106 108 apply(data[0]->data, packet->data); 107 109 } … … 115 117 116 118 // Get default value for output data 117 double defaultValue = 0.0; 118 if (0 != dataDest.numElements()) defaultValue = dataDest(0); 119 bool ignoreMissingValue = false; 120 double defaultValue = std::numeric_limits<double>::quiet_NaN(); 121 if (0 != dataDest.numElements()) ignoreMissingValue = NumTraits<double>::isnan(dataDest(0)); 119 122 120 123 const std::list<CGridTransformation::SendingIndexGridSourceMap>& listLocalIndexSend = gridTransformation->getLocalIndexToSendFromGridSource(); … … 191 194 else dataCurrentDest(i) = defaultValue; 192 195 193 std::vector<bool> localInitFlag(dataCurrentDest. size(), true);196 std::vector<bool> localInitFlag(dataCurrentDest.numElements(), true); 194 197 currentBuff = 0; 195 198 for (itRecv = itbRecv; itRecv != iteRecv; ++itRecv) … … 201 204 dataCurrentDest, 202 205 localInitFlag, 203 defaultValue);206 ignoreMissingValue); 204 207 205 208 currentBuff += countSize; -
XIOS/dev/dev_olga/src/filter/spatial_transform_filter.hpp
r873 r1158 32 32 * \param srcGrid the source grid 33 33 * \param destGrid the destination grid 34 * \param hasMissingValue whether field source has missing value 35 * \param defaultValue default value 34 36 * \return the first and the last filters of the filter graph 35 37 */ 36 38 static std::pair<boost::shared_ptr<CSpatialTransformFilter>, boost::shared_ptr<CSpatialTransformFilter> > 37 buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, double defaultValue);39 buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, bool hasMissingValue, double defaultValue); 38 40 39 41 protected: -
XIOS/dev/dev_olga/src/filter/store_filter.cpp
r1021 r1158 24 24 CTimer timer("CStoreFilter::getPacket"); 25 25 CConstDataPacketPtr packet; 26 const double timeout = 10 ; // 10 seconds timeout26 const double timeout = CXios::recvFieldTimeout; 27 27 28 28 do … … 81 81 } 82 82 83 bool CStoreFilter::isDataExpected(const CDate& date) const 84 { 85 return true; 86 } 87 83 88 void CStoreFilter::invalidate(Time timestamp) 84 89 { -
XIOS/dev/dev_olga/src/filter/store_filter.hpp
r1021 r1158 50 50 51 51 /*! 52 * Tests whether data is expected for the specified date. 53 * 54 * \param date the date associated to the data 55 */ 56 bool virtual isDataExpected(const CDate& date) const; 57 58 /*! 52 59 * Removes all pending packets which are older than the specified timestamp. 53 60 * -
XIOS/dev/dev_olga/src/filter/temporal_filter.cpp
r854 r1158 5 5 namespace xios 6 6 { 7 static func::CFunctor* createFunctor(const std::string& opId, bool ignoreMissingValue, double missingValue, CArray<double, 1>& tmpData); 8 7 9 CTemporalFilter::CTemporalFilter(CGarbageCollector& gc, const std::string& opId, 8 10 const CDate& initDate, const CDuration samplingFreq, const CDuration samplingOffset, const CDuration opFreq, 9 11 bool ignoreMissingValue /*= false*/, double missingValue /*= 0.0*/) 10 12 : CFilter(gc, 1, this) 11 , samplingFreq(samplingFreq) 13 , functor(createFunctor(opId, ignoreMissingValue, missingValue, tmpData)) 14 , isOnceOperation(functor->timeType() == func::CFunctor::once) 15 , isInstantOperation(functor->timeType() == func::CFunctor::instant) 16 // If we can optimize the sampling when dealing with an instant functor we do it 17 , samplingFreq((isInstantOperation && samplingFreq == TimeStep && samplingOffset == NoneDu) ? opFreq : samplingFreq) 18 , samplingOffset((isInstantOperation && samplingFreq == TimeStep && samplingOffset == NoneDu) ? opFreq - initDate.getRelCalendar().getTimeStep() : samplingOffset) 12 19 , opFreq(opFreq) 13 , nextSamplingDate(initDate + samplingOffset + initDate.getRelCalendar().getTimeStep())14 , nextOperationDate(initDate + opFreq)20 , nextSamplingDate(initDate + this->samplingOffset + initDate.getRelCalendar().getTimeStep()) 21 , nextOperationDate(initDate + this->samplingOffset + opFreq) 15 22 , isFirstOperation(true) 16 23 { 17 #define DECLARE_FUNCTOR(MType, mtype) \18 if (opId.compare(#mtype) == 0) \19 { \20 if (ignoreMissingValue) \21 { \22 functor.reset(new func::C##MType(tmpData, missingValue)); \23 } \24 else \25 { \26 functor.reset(new func::C##MType(tmpData)); \27 } \28 }29 30 #include "functor_type.conf"31 32 if (!functor)33 ERROR("CTemporalFilter::CTemporalFilter(CGarbageCollector& gc, const std::string& opId, ...)",34 << "\"" << opId << "\" is not a valid operation.");35 36 isOnceOperation = (functor->timeType() == func::CFunctor::once);37 24 } 38 25 … … 43 30 if (data[0]->status != CDataPacket::END_OF_STREAM) 44 31 { 45 const bool usePacket = isOnceOperation ? isFirstOperation : (data[0]->date >= nextSamplingDate); 32 bool usePacket, outputResult, copyLess; 33 if (isOnceOperation) 34 usePacket = outputResult = copyLess = isFirstOperation; 35 else 36 { 37 usePacket = (data[0]->date >= nextSamplingDate); 38 outputResult = (data[0]->date + samplingFreq > nextOperationDate); 39 copyLess = (isInstantOperation && usePacket && outputResult); 40 } 41 46 42 if (usePacket) 47 43 { 48 if (!tmpData.numElements()) 49 tmpData.resize(data[0]->data.numElements()); 44 if (!copyLess) 45 { 46 if (!tmpData.numElements()) 47 tmpData.resize(data[0]->data.numElements()); 50 48 51 (*functor)(data[0]->data); 49 (*functor)(data[0]->data); 50 } 52 51 53 52 nextSamplingDate = nextSamplingDate + samplingFreq; 54 53 } 55 54 56 const bool outputResult = isOnceOperation ? isFirstOperation : (data[0]->date + samplingFreq > nextOperationDate);57 55 if (outputResult) 58 56 { 59 functor->final(); 57 if (!copyLess) 58 { 59 functor->final(); 60 60 61 packet = CDataPacketPtr(new CDataPacket); 62 packet->date = data[0]->date; 63 packet->timestamp = data[0]->timestamp; 64 packet->status = data[0]->status; 65 packet->data.resize(tmpData.numElements()); 66 packet->data = tmpData; 61 packet = CDataPacketPtr(new CDataPacket); 62 packet->date = data[0]->date; 63 packet->timestamp = data[0]->timestamp; 64 packet->status = data[0]->status; 65 packet->data.resize(tmpData.numElements()); 66 packet->data = tmpData; 67 } 68 else 69 packet = data[0]; 67 70 68 71 isFirstOperation = false; … … 73 76 return packet; 74 77 } 78 79 bool CTemporalFilter::isDataExpected(const CDate& date) const 80 { 81 return isOnceOperation ? isFirstOperation : (date >= nextSamplingDate || date + samplingFreq > nextOperationDate); 82 } 83 84 static func::CFunctor* createFunctor(const std::string& opId, bool ignoreMissingValue, double missingValue, CArray<double, 1>& tmpData) 85 { 86 func::CFunctor* functor = NULL; 87 88 double defaultValue = ignoreMissingValue ? std::numeric_limits<double>::quiet_NaN() : missingValue; 89 90 #define DECLARE_FUNCTOR(MType, mtype) \ 91 if (opId.compare(#mtype) == 0) \ 92 { \ 93 if (ignoreMissingValue) \ 94 { \ 95 functor = new func::C##MType(tmpData, defaultValue); \ 96 } \ 97 else \ 98 { \ 99 functor = new func::C##MType(tmpData); \ 100 } \ 101 } 102 103 #include "functor_type.conf" 104 105 if (!functor) 106 ERROR("createFunctor(const std::string& opId, ...)", 107 << "\"" << opId << "\" is not a valid operation."); 108 109 return functor; 110 } 75 111 } // namespace xios -
XIOS/dev/dev_olga/src/filter/temporal_filter.hpp
r643 r1158 40 40 CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data); 41 41 42 /*! 43 * Tests whether data is expected for the specified date. 44 * 45 * \param date the date associated to the data 46 */ 47 bool virtual isDataExpected(const CDate& date) const; 48 42 49 private: 43 boost::scoped_ptr<func::CFunctor> functor; //!< The functor corresponding to the temporal operation50 const boost::scoped_ptr<func::CFunctor> functor; //!< The functor corresponding to the temporal operation 44 51 CArray<double, 1> tmpData; //!< The array of data used for temporary storage 45 52 const CDuration samplingFreq; //!< The sampling frequency, i.e. the frequency at which the input data will be used 53 const CDuration samplingOffset; //!< The sampling offset, i.e. the offset after which the input data will be used 46 54 const CDuration opFreq; //!< The operation frequency, i.e. the frequency at which the output data will be computed 47 55 CDate nextSamplingDate; //!< The date of the next sampling 48 56 CDate nextOperationDate; //!< The date of the next operation 49 57 bool isFirstOperation; //!< True before the first operation was been computed 50 bool isOnceOperation; //!< True if the operation should be computed just once 58 const bool isOnceOperation; //!< True if the operation should be computed just once 59 const bool isInstantOperation; //!< True if the operation is instant 51 60 }; // class CTemporalFilter 52 61 } // namespace xios -
XIOS/dev/dev_olga/src/functor/accumulate.cpp
r591 r1158 1 1 #include "accumulate.hpp" 2 2 #include "array_new.hpp" 3 #include "utils.hpp" 3 4 4 5 namespace xios … … 33 34 double* out=_doutput.dataFirst(); 34 35 for (i=0; i<n; ++i,++in,++out) 35 if ( *in!=missingValue)36 if (!NumTraits<double>::isnan(*in)) 36 37 { 37 if( *out!=missingValue) *out += *in;38 if(!NumTraits<double>::isnan(*out)) *out += *in; 38 39 else *out=*in ; 39 40 } -
XIOS/dev/dev_olga/src/functor/average.cpp
r591 r1158 1 1 #include "average.hpp" 2 2 #include "array_new.hpp" 3 #include "utils.hpp" 3 4 4 5 namespace xios … … 42 43 int* nc=nbcalls.dataFirst() ; 43 44 for (i=0; i<n; ++i,++nc,++in) 44 if ( *in!=missingValue) (*nc) ++;45 if (!NumTraits<double>::isnan(*in)) (*nc) ++; 45 46 } 46 47 } … … 54 55 int* nc=nbcalls.dataFirst() ; 55 56 for (i=0; i<n; ++i,++in,++out,++nc) 56 if ( *in!=missingValue)57 if (!NumTraits<double>::isnan(*in)) 57 58 { 58 59 if (*nc != 0) (*out) += *in; -
XIOS/dev/dev_olga/src/functor/maximum.cpp
r591 r1158 1 1 #include "maximum.hpp" 2 2 #include "array_new.hpp" 3 4 3 #include "utils.hpp" 5 4 6 5 namespace xios … … 35 34 { 36 35 for (; it1 != end1; it1++, it++) 37 if ( *it1 != missingValue)36 if (!NumTraits<double>::isnan(*it1)) 38 37 { 39 if ( *it != missingValue) *it = std::max(*it1, *it);38 if (!NumTraits<double>::isnan(*it)) *it = std::max(*it1, *it); 40 39 else *it=*it1 ; 41 40 } -
XIOS/dev/dev_olga/src/functor/minimum.cpp
r591 r1158 2 2 #include "array_new.hpp" 3 3 #include <algorithm> 4 #include "utils.hpp" 4 5 5 6 namespace xios … … 26 27 { 27 28 const double * it1 = _dinput.dataFirst(), 28 * 29 *end1 = _dinput.dataFirst() + _dinput.numElements(); 29 30 double * it = _doutput.dataFirst(); 30 31 … … 35 36 { 36 37 for (; it1 != end1; it1++, it++) 37 if ( *it1!=missingValue)38 if (!NumTraits<double>::isnan(*it1)) 38 39 { 39 if ( *it != missingValue) *it = std::min(*it1, *it);40 if (!NumTraits<double>::isnan(*it)) *it = std::min(*it1, *it); 40 41 else *it=*it1 ; 41 42 } -
XIOS/dev/dev_olga/src/generate_interface_impl.hpp
r966 r1158 547 547 #undef macro 548 548 549 #define macro(N,EXTENT)\ 550 template <>\ 551 void CInterface::AttributeCInterface<CArray<StdString,N> >(ostream& oss, const string& className, const string& name)\ 552 { \ 553 oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << "char* " << name <<", int str_len, int* str_size, int* extent)" << iendl; \ 554 oss << "{" << iendl; \ 555 oss << " CTimer::get(\"XIOS\").resume();" << iendl; \ 556 oss << " "<<className<<"_hdl->"<<name<<".resize(shape("<<EXTENT<<"));"<<iendl;\ 557 oss << " Array<StdString,"<<#N<<">::iterator it, itb="<<className<<"_hdl->"<<name<<".begin(), ite="<<className<<"_hdl->"<<name<<".end() ;"<<iendl ;\ 558 oss << " int i, n ;"<< iendl; \ 559 oss << " for(it=itb, i=0, n=0 ; it!=ite ; ++it,n+=str_len,++i) *it=StdString(&"<<name<<"[n],str_size[i]) ;"<<iendl ;\ 560 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; \ 561 oss << "}" << std::endl; \ 562 oss << iendl; \ 563 oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << "char* " << name << ", int str_size, int* extent)" << iendl; \ 564 oss << "{" << iendl; \ 565 oss << " CTimer::get(\"XIOS\").resume();" << iendl; \ 566 oss << " Array<StdString,"<<#N<<">::const_iterator it, itb="<<className<<"_hdl->"<<name<<".getInheritedValue().begin(), ite="<<className<<"_hdl->"<<name<<".getInheritedValue().end() ;" << iendl; \ 567 oss << " int n ;"<< iendl; \ 568 oss << " for(it=itb, n=0 ; it!=ite ; ++it, n+=str_size) it->copy(&"<<name<<"[n],it->size()) ; "<< iendl; \ 569 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; \ 570 oss << "}" << std::endl; \ 571 } 572 573 macro(1,"extent[0]") 574 macro(2,"extent[0],extent[1]") 575 macro(3,"extent[0],extent[1],extent[2]") 576 macro(4,"extent[0],extent[1],extent[2],extent[3]") 577 macro(5,"extent[0],extent[1],extent[2],extent[3],extent[4]") 578 macro(6,"extent[0],extent[1],extent[2],extent[3],extent[4],extent[5]") 579 macro(7,"extent[0],extent[1],extent[2],extent[3],extent[4],extent[5],extent[6]") 580 #undef macro 549 581 // ///////////////////////////////////////////////// 550 582 // // Fortran 2003 Interface // … … 705 737 #undef macro 706 738 739 #define macro(T)\ 740 template <>\ 741 void CInterface::AttributeFortran2003Interface<CArray<StdString,T> >(ostream& oss, const string& className, const string& name)\ 742 {\ 743 oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", str_len, str_size, extent) BIND(C)" << iendl; \ 744 oss << " USE ISO_C_BINDING" << iendl; \ 745 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; \ 746 oss << " CHARACTER (KIND=C_CHAR), DIMENSION(*) :: " << name << iendl; \ 747 oss << " INTEGER (kind = C_INT), VALUE :: str_len" << iendl; \ 748 oss << " INTEGER (kind = C_INT), DIMENSION(*) :: str_size" << iendl; \ 749 oss << " INTEGER (kind = C_INT), DIMENSION(*) :: extent" << iendl; \ 750 oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; \ 751 oss << iendl; \ 752 oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", str_size, extent) BIND(C)" << iendl; \ 753 oss << " USE ISO_C_BINDING" << iendl; \ 754 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; \ 755 oss << " CHARACTER (KIND=C_CHAR), DIMENSION(*) :: " << name << iendl; \ 756 oss << " INTEGER (kind = C_INT), VALUE :: str_size" << iendl; \ 757 oss << " INTEGER (kind = C_INT), DIMENSION(*) :: extent" << iendl; \ 758 oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; \ 759 } 760 macro(1) 761 macro(2) 762 macro(3) 763 macro(4) 764 macro(5) 765 macro(6) 766 macro(7) 767 768 #undef macro 769 707 770 #define macro(T) \ 708 771 template <> \ … … 808 871 809 872 #undef macro 873 874 #define macro(T,EXTENT)\ 875 template <> \ 876 void CInterface::AttributeFortranInterfaceDeclaration<CArray<StdString,T> >(ostream& oss, const string& className, const string& name)\ 877 {\ 878 oss << "CHARACTER(len=*) , OPTIONAL, INTENT(IN) :: " << name << "("<<EXTENT<<")"; \ 879 }\ 880 \ 881 template <>\ 882 void CInterface::AttributeFortranInterfaceGetDeclaration<CArray<StdString,T> >(ostream& oss, const string& className, const string& name)\ 883 {\ 884 oss << "CHARACTER(len=*) , OPTIONAL, INTENT(OUT) :: " << name << "("<<EXTENT<<")"; \ 885 } 886 macro(1,":") 887 macro(2,":,:") 888 macro(3,":,:,:") 889 macro(4,":,:,:,:") 890 macro(5,":,:,:,:,:") 891 macro(6,":,:,:,:,:,:") 892 macro(7,":,:,:,:,:,:,:") 893 894 #undef macro 895 896 897 898 899 810 900 811 901 #define macro(T) \ … … 947 1037 #undef macro 948 1038 1039 #define macro(T)\ 1040 template <>\ 1041 void CInterface::AttributeFortranInterfaceBody< CArray<StdString,T> >(ostream& oss, const string& className, const string& name)\ 1042 {\ 1043 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \ 1044 oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; \ 1045 oss << "(" << className << "_hdl%daddr, " << name <<"_, LEN("<<name<<"_), LEN_TRIM("<<name<< "_), SHAPE(" << name << "_))" << iendl; \ 1046 oss << "ENDIF"; \ 1047 } 1048 1049 macro(1) 1050 macro(2) 1051 #undef macro 1052 949 1053 #define macro(T) \ 950 1054 template <> \ … … 1084 1188 1085 1189 #undef macro 1190 1191 #define macro(T)\ 1192 template <> \ 1193 void CInterface::AttributeFortranInterfaceGetBody< CArray<StdString,T> >(ostream& oss, const string& className, const string& name)\ 1194 {\ 1195 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \ 1196 oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; \ 1197 oss << "(" << className << "_hdl%daddr, " << name << "_, LEN("<<name<<"_), SHAPE(" << name << "_))" << iendl; \ 1198 oss << "ENDIF"; \ 1199 } 1200 macro(1) 1201 macro(2) 1202 macro(3) 1203 macro(4) 1204 macro(5) 1205 macro(6) 1206 macro(7) 1207 1208 #undef macro 1209 1086 1210 } 1087 1211 #endif -
XIOS/dev/dev_olga/src/group_template_impl.hpp
r1030 r1158 8 8 #include "context.hpp" 9 9 #include "event_client.hpp" 10 #include "context_client.hpp" 10 11 #include "message.hpp" 11 12 #include "type.hpp" … … 398 399 } 399 400 } 400 401 // if (! context->hasServer )402 // {403 // CContextClient* client=context->client ;404 405 // CEventClient event(this->getType(),EVENT_ID_CREATE_CHILD) ;406 // if (client->isServerLeader())407 // {408 // CMessage msg ;409 // msg<<this->getId() ;410 // msg<<id ;411 // const std::list<int>& ranks = client->getRanksServerLeader();412 // for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)413 // event.push(*itRank,1,msg) ;414 // client->sendEvent(event) ;415 // }416 // else client->sendEvent(event) ;417 // }418 401 419 402 } … … 464 447 } 465 448 } 466 467 // if (! context->hasServer )468 // {469 // CContextClient* client=context->client ;470 471 // CEventClient event(this->getType(),EVENT_ID_CREATE_CHILD_GROUP) ;472 // if (client->isServerLeader())473 // {474 // CMessage msg ;475 // msg<<this->getId() ;476 // msg<<id ;477 // const std::list<int>& ranks = client->getRanksServerLeader();478 // for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)479 // event.push(*itRank,1,msg) ;480 // client->sendEvent(event) ;481 // }482 // else client->sendEvent(event) ;483 // }484 485 449 } 486 450 … … 488 452 void CGroupTemplate<U, V, W>::recvCreateChild(CEventServer& event) 489 453 { 490 491 454 CBufferIn* buffer=event.subEvents.begin()->buffer; 492 455 string id; -
XIOS/dev/dev_olga/src/interface/c/icfield.cpp
r943 r1158 76 76 // ----------------------------------------------------------------------------------------------------- 77 77 78 void cxios_field_is_active (XFieldPtr field_hdl, bool * ret)78 void cxios_field_is_active (XFieldPtr field_hdl, bool at_current_timestep, bool* ret) 79 79 { 80 80 CTimer::get("XIOS").resume() ; 81 *ret = field_hdl->isActive( );81 *ret = field_hdl->isActive(at_current_timestep); 82 82 CTimer::get("XIOS").suspend() ; 83 83 } -
XIOS/dev/dev_olga/src/interface/c_attr/icaxis_attr.cpp
r817 r1158 188 188 189 189 190 void cxios_set_axis_label(axis_Ptr axis_hdl, char* label, int str_len, int* str_size, int* extent) 191 { 192 CTimer::get("XIOS").resume(); 193 axis_hdl->label.resize(shape(extent[0])); 194 Array<StdString,1>::iterator it, itb=axis_hdl->label.begin(), ite=axis_hdl->label.end() ; 195 int i, n ; 196 for(it=itb, i=0, n=0 ; it!=ite ; ++it,n+=str_len,++i) *it=StdString(&label[n],str_size[i]) ; 197 CTimer::get("XIOS").suspend(); 198 } 199 200 void cxios_get_axis_label(axis_Ptr axis_hdl, char* label, int str_size, int* extent) 201 { 202 CTimer::get("XIOS").resume(); 203 Array<StdString,1>::const_iterator it, itb=axis_hdl->label.getInheritedValue().begin(), ite=axis_hdl->label.getInheritedValue().end() ; 204 int n ; 205 for(it=itb, n=0 ; it!=ite ; ++it, n+=str_size) it->copy(&label[n],it->size()) ; 206 CTimer::get("XIOS").suspend(); 207 } 208 209 bool cxios_is_defined_axis_label(axis_Ptr axis_hdl) 210 { 211 CTimer::get("XIOS").resume(); 212 bool isDefined = axis_hdl->label.hasInheritedValue(); 213 CTimer::get("XIOS").suspend(); 214 return isDefined; 215 } 216 217 190 218 void cxios_set_axis_long_name(axis_Ptr axis_hdl, const char * long_name, int long_name_size) 191 219 { … … 360 388 361 389 390 void cxios_set_axis_prec(axis_Ptr axis_hdl, int prec) 391 { 392 CTimer::get("XIOS").resume(); 393 axis_hdl->prec.setValue(prec); 394 CTimer::get("XIOS").suspend(); 395 } 396 397 void cxios_get_axis_prec(axis_Ptr axis_hdl, int* prec) 398 { 399 CTimer::get("XIOS").resume(); 400 *prec = axis_hdl->prec.getInheritedValue(); 401 CTimer::get("XIOS").suspend(); 402 } 403 404 bool cxios_is_defined_axis_prec(axis_Ptr axis_hdl) 405 { 406 CTimer::get("XIOS").resume(); 407 bool isDefined = axis_hdl->prec.hasInheritedValue(); 408 CTimer::get("XIOS").suspend(); 409 return isDefined; 410 } 411 412 362 413 void cxios_set_axis_standard_name(axis_Ptr axis_hdl, const char * standard_name, int standard_name_size) 363 414 { -
XIOS/dev/dev_olga/src/interface/c_attr/icaxisgroup_attr.cpp
r817 r1158 214 214 215 215 216 void cxios_set_axisgroup_label(axisgroup_Ptr axisgroup_hdl, char* label, int str_len, int* str_size, int* extent) 217 { 218 CTimer::get("XIOS").resume(); 219 axisgroup_hdl->label.resize(shape(extent[0])); 220 Array<StdString,1>::iterator it, itb=axisgroup_hdl->label.begin(), ite=axisgroup_hdl->label.end() ; 221 int i, n ; 222 for(it=itb, i=0, n=0 ; it!=ite ; ++it,n+=str_len,++i) *it=StdString(&label[n],str_size[i]) ; 223 CTimer::get("XIOS").suspend(); 224 } 225 226 void cxios_get_axisgroup_label(axisgroup_Ptr axisgroup_hdl, char* label, int str_size, int* extent) 227 { 228 CTimer::get("XIOS").resume(); 229 Array<StdString,1>::const_iterator it, itb=axisgroup_hdl->label.getInheritedValue().begin(), ite=axisgroup_hdl->label.getInheritedValue().end() ; 230 int n ; 231 for(it=itb, n=0 ; it!=ite ; ++it, n+=str_size) it->copy(&label[n],it->size()) ; 232 CTimer::get("XIOS").suspend(); 233 } 234 235 bool cxios_is_defined_axisgroup_label(axisgroup_Ptr axisgroup_hdl) 236 { 237 CTimer::get("XIOS").resume(); 238 bool isDefined = axisgroup_hdl->label.hasInheritedValue(); 239 CTimer::get("XIOS").suspend(); 240 return isDefined; 241 } 242 243 216 244 void cxios_set_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, const char * long_name, int long_name_size) 217 245 { … … 386 414 387 415 416 void cxios_set_axisgroup_prec(axisgroup_Ptr axisgroup_hdl, int prec) 417 { 418 CTimer::get("XIOS").resume(); 419 axisgroup_hdl->prec.setValue(prec); 420 CTimer::get("XIOS").suspend(); 421 } 422 423 void cxios_get_axisgroup_prec(axisgroup_Ptr axisgroup_hdl, int* prec) 424 { 425 CTimer::get("XIOS").resume(); 426 *prec = axisgroup_hdl->prec.getInheritedValue(); 427 CTimer::get("XIOS").suspend(); 428 } 429 430 bool cxios_is_defined_axisgroup_prec(axisgroup_Ptr axisgroup_hdl) 431 { 432 CTimer::get("XIOS").resume(); 433 bool isDefined = axisgroup_hdl->prec.hasInheritedValue(); 434 CTimer::get("XIOS").suspend(); 435 return isDefined; 436 } 437 438 388 439 void cxios_set_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, const char * standard_name, int standard_name_size) 389 440 { -
XIOS/dev/dev_olga/src/interface/c_attr/icdomain_attr.cpp
r789 r1158 747 747 748 748 749 void cxios_set_domain_prec(domain_Ptr domain_hdl, int prec) 750 { 751 CTimer::get("XIOS").resume(); 752 domain_hdl->prec.setValue(prec); 753 CTimer::get("XIOS").suspend(); 754 } 755 756 void cxios_get_domain_prec(domain_Ptr domain_hdl, int* prec) 757 { 758 CTimer::get("XIOS").resume(); 759 *prec = domain_hdl->prec.getInheritedValue(); 760 CTimer::get("XIOS").suspend(); 761 } 762 763 bool cxios_is_defined_domain_prec(domain_Ptr domain_hdl) 764 { 765 CTimer::get("XIOS").resume(); 766 bool isDefined = domain_hdl->prec.hasInheritedValue(); 767 CTimer::get("XIOS").suspend(); 768 return isDefined; 769 } 770 771 749 772 void cxios_set_domain_standard_name(domain_Ptr domain_hdl, const char * standard_name, int standard_name_size) 750 773 { -
XIOS/dev/dev_olga/src/interface/c_attr/icdomaingroup_attr.cpp
r789 r1158 773 773 774 774 775 void cxios_set_domaingroup_prec(domaingroup_Ptr domaingroup_hdl, int prec) 776 { 777 CTimer::get("XIOS").resume(); 778 domaingroup_hdl->prec.setValue(prec); 779 CTimer::get("XIOS").suspend(); 780 } 781 782 void cxios_get_domaingroup_prec(domaingroup_Ptr domaingroup_hdl, int* prec) 783 { 784 CTimer::get("XIOS").resume(); 785 *prec = domaingroup_hdl->prec.getInheritedValue(); 786 CTimer::get("XIOS").suspend(); 787 } 788 789 bool cxios_is_defined_domaingroup_prec(domaingroup_Ptr domaingroup_hdl) 790 { 791 CTimer::get("XIOS").resume(); 792 bool isDefined = domaingroup_hdl->prec.hasInheritedValue(); 793 CTimer::get("XIOS").suspend(); 794 return isDefined; 795 } 796 797 775 798 void cxios_set_domaingroup_standard_name(domaingroup_Ptr domaingroup_hdl, const char * standard_name, int standard_name_size) 776 799 { -
XIOS/dev/dev_olga/src/interface/c_attr/icexpand_domain_attr.cpp
r981 r1158 17 17 { 18 18 typedef xios::CExpandDomain* expand_domain_Ptr; 19 20 void cxios_set_expand_domain_i_periodic(expand_domain_Ptr expand_domain_hdl, bool i_periodic) 21 { 22 CTimer::get("XIOS").resume(); 23 expand_domain_hdl->i_periodic.setValue(i_periodic); 24 CTimer::get("XIOS").suspend(); 25 } 26 27 void cxios_get_expand_domain_i_periodic(expand_domain_Ptr expand_domain_hdl, bool* i_periodic) 28 { 29 CTimer::get("XIOS").resume(); 30 *i_periodic = expand_domain_hdl->i_periodic.getInheritedValue(); 31 CTimer::get("XIOS").suspend(); 32 } 33 34 bool cxios_is_defined_expand_domain_i_periodic(expand_domain_Ptr expand_domain_hdl) 35 { 36 CTimer::get("XIOS").resume(); 37 bool isDefined = expand_domain_hdl->i_periodic.hasInheritedValue(); 38 CTimer::get("XIOS").suspend(); 39 return isDefined; 40 } 41 42 43 void cxios_set_expand_domain_j_periodic(expand_domain_Ptr expand_domain_hdl, bool j_periodic) 44 { 45 CTimer::get("XIOS").resume(); 46 expand_domain_hdl->j_periodic.setValue(j_periodic); 47 CTimer::get("XIOS").suspend(); 48 } 49 50 void cxios_get_expand_domain_j_periodic(expand_domain_Ptr expand_domain_hdl, bool* j_periodic) 51 { 52 CTimer::get("XIOS").resume(); 53 *j_periodic = expand_domain_hdl->j_periodic.getInheritedValue(); 54 CTimer::get("XIOS").suspend(); 55 } 56 57 bool cxios_is_defined_expand_domain_j_periodic(expand_domain_Ptr expand_domain_hdl) 58 { 59 CTimer::get("XIOS").resume(); 60 bool isDefined = expand_domain_hdl->j_periodic.hasInheritedValue(); 61 CTimer::get("XIOS").suspend(); 62 return isDefined; 63 } 64 19 65 20 66 void cxios_set_expand_domain_order(expand_domain_Ptr expand_domain_hdl, int order) -
XIOS/dev/dev_olga/src/interface/c_attr/icfile_attr.cpp
r932 r1158 553 553 554 554 555 void cxios_set_file_time_stamp_format(file_Ptr file_hdl, const char * time_stamp_format, int time_stamp_format_size) 556 { 557 std::string time_stamp_format_str; 558 if (!cstr2string(time_stamp_format, time_stamp_format_size, time_stamp_format_str)) return; 559 CTimer::get("XIOS").resume(); 560 file_hdl->time_stamp_format.setValue(time_stamp_format_str); 561 CTimer::get("XIOS").suspend(); 562 } 563 564 void cxios_get_file_time_stamp_format(file_Ptr file_hdl, char * time_stamp_format, int time_stamp_format_size) 565 { 566 CTimer::get("XIOS").resume(); 567 if (!string_copy(file_hdl->time_stamp_format.getInheritedValue(), time_stamp_format, time_stamp_format_size)) 568 ERROR("void cxios_get_file_time_stamp_format(file_Ptr file_hdl, char * time_stamp_format, int time_stamp_format_size)", << "Input string is too short"); 569 CTimer::get("XIOS").suspend(); 570 } 571 572 bool cxios_is_defined_file_time_stamp_format(file_Ptr file_hdl) 573 { 574 CTimer::get("XIOS").resume(); 575 bool isDefined = file_hdl->time_stamp_format.hasInheritedValue(); 576 CTimer::get("XIOS").suspend(); 577 return isDefined; 578 } 579 580 581 void cxios_set_file_time_stamp_name(file_Ptr file_hdl, const char * time_stamp_name, int time_stamp_name_size) 582 { 583 std::string time_stamp_name_str; 584 if (!cstr2string(time_stamp_name, time_stamp_name_size, time_stamp_name_str)) return; 585 CTimer::get("XIOS").resume(); 586 file_hdl->time_stamp_name.setValue(time_stamp_name_str); 587 CTimer::get("XIOS").suspend(); 588 } 589 590 void cxios_get_file_time_stamp_name(file_Ptr file_hdl, char * time_stamp_name, int time_stamp_name_size) 591 { 592 CTimer::get("XIOS").resume(); 593 if (!string_copy(file_hdl->time_stamp_name.getInheritedValue(), time_stamp_name, time_stamp_name_size)) 594 ERROR("void cxios_get_file_time_stamp_name(file_Ptr file_hdl, char * time_stamp_name, int time_stamp_name_size)", << "Input string is too short"); 595 CTimer::get("XIOS").suspend(); 596 } 597 598 bool cxios_is_defined_file_time_stamp_name(file_Ptr file_hdl) 599 { 600 CTimer::get("XIOS").resume(); 601 bool isDefined = file_hdl->time_stamp_name.hasInheritedValue(); 602 CTimer::get("XIOS").suspend(); 603 return isDefined; 604 } 605 606 607 void cxios_set_file_time_units(file_Ptr file_hdl, const char * time_units, int time_units_size) 608 { 609 std::string time_units_str; 610 if (!cstr2string(time_units, time_units_size, time_units_str)) return; 611 CTimer::get("XIOS").resume(); 612 file_hdl->time_units.fromString(time_units_str); 613 CTimer::get("XIOS").suspend(); 614 } 615 616 void cxios_get_file_time_units(file_Ptr file_hdl, char * time_units, int time_units_size) 617 { 618 CTimer::get("XIOS").resume(); 619 if (!string_copy(file_hdl->time_units.getInheritedStringValue(), time_units, time_units_size)) 620 ERROR("void cxios_get_file_time_units(file_Ptr file_hdl, char * time_units, int time_units_size)", << "Input string is too short"); 621 CTimer::get("XIOS").suspend(); 622 } 623 624 bool cxios_is_defined_file_time_units(file_Ptr file_hdl) 625 { 626 CTimer::get("XIOS").resume(); 627 bool isDefined = file_hdl->time_units.hasInheritedValue(); 628 CTimer::get("XIOS").suspend(); 629 return isDefined; 630 } 631 632 555 633 void cxios_set_file_timeseries(file_Ptr file_hdl, const char * timeseries, int timeseries_size) 556 634 { … … 629 707 return isDefined; 630 708 } 709 710 711 void cxios_set_file_uuid_format(file_Ptr file_hdl, const char * uuid_format, int uuid_format_size) 712 { 713 std::string uuid_format_str; 714 if (!cstr2string(uuid_format, uuid_format_size, uuid_format_str)) return; 715 CTimer::get("XIOS").resume(); 716 file_hdl->uuid_format.setValue(uuid_format_str); 717 CTimer::get("XIOS").suspend(); 718 } 719 720 void cxios_get_file_uuid_format(file_Ptr file_hdl, char * uuid_format, int uuid_format_size) 721 { 722 CTimer::get("XIOS").resume(); 723 if (!string_copy(file_hdl->uuid_format.getInheritedValue(), uuid_format, uuid_format_size)) 724 ERROR("void cxios_get_file_uuid_format(file_Ptr file_hdl, char * uuid_format, int uuid_format_size)", << "Input string is too short"); 725 CTimer::get("XIOS").suspend(); 726 } 727 728 bool cxios_is_defined_file_uuid_format(file_Ptr file_hdl) 729 { 730 CTimer::get("XIOS").resume(); 731 bool isDefined = file_hdl->uuid_format.hasInheritedValue(); 732 CTimer::get("XIOS").suspend(); 733 return isDefined; 734 } 735 736 737 void cxios_set_file_uuid_name(file_Ptr file_hdl, const char * uuid_name, int uuid_name_size) 738 { 739 std::string uuid_name_str; 740 if (!cstr2string(uuid_name, uuid_name_size, uuid_name_str)) return; 741 CTimer::get("XIOS").resume(); 742 file_hdl->uuid_name.setValue(uuid_name_str); 743 CTimer::get("XIOS").suspend(); 744 } 745 746 void cxios_get_file_uuid_name(file_Ptr file_hdl, char * uuid_name, int uuid_name_size) 747 { 748 CTimer::get("XIOS").resume(); 749 if (!string_copy(file_hdl->uuid_name.getInheritedValue(), uuid_name, uuid_name_size)) 750 ERROR("void cxios_get_file_uuid_name(file_Ptr file_hdl, char * uuid_name, int uuid_name_size)", << "Input string is too short"); 751 CTimer::get("XIOS").suspend(); 752 } 753 754 bool cxios_is_defined_file_uuid_name(file_Ptr file_hdl) 755 { 756 CTimer::get("XIOS").resume(); 757 bool isDefined = file_hdl->uuid_name.hasInheritedValue(); 758 CTimer::get("XIOS").suspend(); 759 return isDefined; 760 } 631 761 } -
XIOS/dev/dev_olga/src/interface/c_attr/icfilegroup_attr.cpp
r932 r1158 579 579 580 580 581 void cxios_set_filegroup_time_stamp_format(filegroup_Ptr filegroup_hdl, const char * time_stamp_format, int time_stamp_format_size) 582 { 583 std::string time_stamp_format_str; 584 if (!cstr2string(time_stamp_format, time_stamp_format_size, time_stamp_format_str)) return; 585 CTimer::get("XIOS").resume(); 586 filegroup_hdl->time_stamp_format.setValue(time_stamp_format_str); 587 CTimer::get("XIOS").suspend(); 588 } 589 590 void cxios_get_filegroup_time_stamp_format(filegroup_Ptr filegroup_hdl, char * time_stamp_format, int time_stamp_format_size) 591 { 592 CTimer::get("XIOS").resume(); 593 if (!string_copy(filegroup_hdl->time_stamp_format.getInheritedValue(), time_stamp_format, time_stamp_format_size)) 594 ERROR("void cxios_get_filegroup_time_stamp_format(filegroup_Ptr filegroup_hdl, char * time_stamp_format, int time_stamp_format_size)", << "Input string is too short"); 595 CTimer::get("XIOS").suspend(); 596 } 597 598 bool cxios_is_defined_filegroup_time_stamp_format(filegroup_Ptr filegroup_hdl) 599 { 600 CTimer::get("XIOS").resume(); 601 bool isDefined = filegroup_hdl->time_stamp_format.hasInheritedValue(); 602 CTimer::get("XIOS").suspend(); 603 return isDefined; 604 } 605 606 607 void cxios_set_filegroup_time_stamp_name(filegroup_Ptr filegroup_hdl, const char * time_stamp_name, int time_stamp_name_size) 608 { 609 std::string time_stamp_name_str; 610 if (!cstr2string(time_stamp_name, time_stamp_name_size, time_stamp_name_str)) return; 611 CTimer::get("XIOS").resume(); 612 filegroup_hdl->time_stamp_name.setValue(time_stamp_name_str); 613 CTimer::get("XIOS").suspend(); 614 } 615 616 void cxios_get_filegroup_time_stamp_name(filegroup_Ptr filegroup_hdl, char * time_stamp_name, int time_stamp_name_size) 617 { 618 CTimer::get("XIOS").resume(); 619 if (!string_copy(filegroup_hdl->time_stamp_name.getInheritedValue(), time_stamp_name, time_stamp_name_size)) 620 ERROR("void cxios_get_filegroup_time_stamp_name(filegroup_Ptr filegroup_hdl, char * time_stamp_name, int time_stamp_name_size)", << "Input string is too short"); 621 CTimer::get("XIOS").suspend(); 622 } 623 624 bool cxios_is_defined_filegroup_time_stamp_name(filegroup_Ptr filegroup_hdl) 625 { 626 CTimer::get("XIOS").resume(); 627 bool isDefined = filegroup_hdl->time_stamp_name.hasInheritedValue(); 628 CTimer::get("XIOS").suspend(); 629 return isDefined; 630 } 631 632 633 void cxios_set_filegroup_time_units(filegroup_Ptr filegroup_hdl, const char * time_units, int time_units_size) 634 { 635 std::string time_units_str; 636 if (!cstr2string(time_units, time_units_size, time_units_str)) return; 637 CTimer::get("XIOS").resume(); 638 filegroup_hdl->time_units.fromString(time_units_str); 639 CTimer::get("XIOS").suspend(); 640 } 641 642 void cxios_get_filegroup_time_units(filegroup_Ptr filegroup_hdl, char * time_units, int time_units_size) 643 { 644 CTimer::get("XIOS").resume(); 645 if (!string_copy(filegroup_hdl->time_units.getInheritedStringValue(), time_units, time_units_size)) 646 ERROR("void cxios_get_filegroup_time_units(filegroup_Ptr filegroup_hdl, char * time_units, int time_units_size)", << "Input string is too short"); 647 CTimer::get("XIOS").suspend(); 648 } 649 650 bool cxios_is_defined_filegroup_time_units(filegroup_Ptr filegroup_hdl) 651 { 652 CTimer::get("XIOS").resume(); 653 bool isDefined = filegroup_hdl->time_units.hasInheritedValue(); 654 CTimer::get("XIOS").suspend(); 655 return isDefined; 656 } 657 658 581 659 void cxios_set_filegroup_timeseries(filegroup_Ptr filegroup_hdl, const char * timeseries, int timeseries_size) 582 660 { … … 655 733 return isDefined; 656 734 } 735 736 737 void cxios_set_filegroup_uuid_format(filegroup_Ptr filegroup_hdl, const char * uuid_format, int uuid_format_size) 738 { 739 std::string uuid_format_str; 740 if (!cstr2string(uuid_format, uuid_format_size, uuid_format_str)) return; 741 CTimer::get("XIOS").resume(); 742 filegroup_hdl->uuid_format.setValue(uuid_format_str); 743 CTimer::get("XIOS").suspend(); 744 } 745 746 void cxios_get_filegroup_uuid_format(filegroup_Ptr filegroup_hdl, char * uuid_format, int uuid_format_size) 747 { 748 CTimer::get("XIOS").resume(); 749 if (!string_copy(filegroup_hdl->uuid_format.getInheritedValue(), uuid_format, uuid_format_size)) 750 ERROR("void cxios_get_filegroup_uuid_format(filegroup_Ptr filegroup_hdl, char * uuid_format, int uuid_format_size)", << "Input string is too short"); 751 CTimer::get("XIOS").suspend(); 752 } 753 754 bool cxios_is_defined_filegroup_uuid_format(filegroup_Ptr filegroup_hdl) 755 { 756 CTimer::get("XIOS").resume(); 757 bool isDefined = filegroup_hdl->uuid_format.hasInheritedValue(); 758 CTimer::get("XIOS").suspend(); 759 return isDefined; 760 } 761 762 763 void cxios_set_filegroup_uuid_name(filegroup_Ptr filegroup_hdl, const char * uuid_name, int uuid_name_size) 764 { 765 std::string uuid_name_str; 766 if (!cstr2string(uuid_name, uuid_name_size, uuid_name_str)) return; 767 CTimer::get("XIOS").resume(); 768 filegroup_hdl->uuid_name.setValue(uuid_name_str); 769 CTimer::get("XIOS").suspend(); 770 } 771 772 void cxios_get_filegroup_uuid_name(filegroup_Ptr filegroup_hdl, char * uuid_name, int uuid_name_size) 773 { 774 CTimer::get("XIOS").resume(); 775 if (!string_copy(filegroup_hdl->uuid_name.getInheritedValue(), uuid_name, uuid_name_size)) 776 ERROR("void cxios_get_filegroup_uuid_name(filegroup_Ptr filegroup_hdl, char * uuid_name, int uuid_name_size)", << "Input string is too short"); 777 CTimer::get("XIOS").suspend(); 778 } 779 780 bool cxios_is_defined_filegroup_uuid_name(filegroup_Ptr filegroup_hdl) 781 { 782 CTimer::get("XIOS").resume(); 783 bool isDefined = filegroup_hdl->uuid_name.hasInheritedValue(); 784 CTimer::get("XIOS").suspend(); 785 return isDefined; 786 } 657 787 } -
XIOS/dev/dev_olga/src/interface/c_attr/icinterpolate_domain_attr.cpp
r1021 r1158 17 17 { 18 18 typedef xios::CInterpolateDomain* interpolate_domain_Ptr; 19 20 void cxios_set_interpolate_domain_file(interpolate_domain_Ptr interpolate_domain_hdl, const char * file, int file_size)21 {22 std::string file_str;23 if (!cstr2string(file, file_size, file_str)) return;24 CTimer::get("XIOS").resume();25 interpolate_domain_hdl->file.setValue(file_str);26 CTimer::get("XIOS").suspend();27 }28 29 void cxios_get_interpolate_domain_file(interpolate_domain_Ptr interpolate_domain_hdl, char * file, int file_size)30 {31 CTimer::get("XIOS").resume();32 if (!string_copy(interpolate_domain_hdl->file.getInheritedValue(), file, file_size))33 ERROR("void cxios_get_interpolate_domain_file(interpolate_domain_Ptr interpolate_domain_hdl, char * file, int file_size)", << "Input string is too short");34 CTimer::get("XIOS").suspend();35 }36 37 bool cxios_is_defined_interpolate_domain_file(interpolate_domain_Ptr interpolate_domain_hdl)38 {39 CTimer::get("XIOS").resume();40 bool isDefined = interpolate_domain_hdl->file.hasInheritedValue();41 CTimer::get("XIOS").suspend();42 return isDefined;43 }44 45 19 46 20 void cxios_set_interpolate_domain_mode(interpolate_domain_Ptr interpolate_domain_hdl, const char * mode, int mode_size) -
XIOS/dev/dev_olga/src/interface/c_attr/icscalar_attr.cpp
r891 r1158 65 65 CTimer::get("XIOS").resume(); 66 66 bool isDefined = scalar_hdl->name.hasInheritedValue(); 67 CTimer::get("XIOS").suspend(); 68 return isDefined; 69 } 70 71 72 void cxios_set_scalar_prec(scalar_Ptr scalar_hdl, int prec) 73 { 74 CTimer::get("XIOS").resume(); 75 scalar_hdl->prec.setValue(prec); 76 CTimer::get("XIOS").suspend(); 77 } 78 79 void cxios_get_scalar_prec(scalar_Ptr scalar_hdl, int* prec) 80 { 81 CTimer::get("XIOS").resume(); 82 *prec = scalar_hdl->prec.getInheritedValue(); 83 CTimer::get("XIOS").suspend(); 84 } 85 86 bool cxios_is_defined_scalar_prec(scalar_Ptr scalar_hdl) 87 { 88 CTimer::get("XIOS").resume(); 89 bool isDefined = scalar_hdl->prec.hasInheritedValue(); 67 90 CTimer::get("XIOS").suspend(); 68 91 return isDefined; -
XIOS/dev/dev_olga/src/interface/c_attr/icscalargroup_attr.cpp
r891 r1158 96 96 97 97 98 void cxios_set_scalargroup_prec(scalargroup_Ptr scalargroup_hdl, int prec) 99 { 100 CTimer::get("XIOS").resume(); 101 scalargroup_hdl->prec.setValue(prec); 102 CTimer::get("XIOS").suspend(); 103 } 104 105 void cxios_get_scalargroup_prec(scalargroup_Ptr scalargroup_hdl, int* prec) 106 { 107 CTimer::get("XIOS").resume(); 108 *prec = scalargroup_hdl->prec.getInheritedValue(); 109 CTimer::get("XIOS").suspend(); 110 } 111 112 bool cxios_is_defined_scalargroup_prec(scalargroup_Ptr scalargroup_hdl) 113 { 114 CTimer::get("XIOS").resume(); 115 bool isDefined = scalargroup_hdl->prec.hasInheritedValue(); 116 CTimer::get("XIOS").suspend(); 117 return isDefined; 118 } 119 120 98 121 void cxios_set_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, const char * scalar_ref, int scalar_ref_size) 99 122 { -
XIOS/dev/dev_olga/src/interface/c_attr/icvariable_attr.cpp
r591 r1158 44 44 45 45 46 void cxios_set_variable_ts_target(variable_Ptr variable_hdl, const char * ts_target, int ts_target_size) 47 { 48 std::string ts_target_str; 49 if (!cstr2string(ts_target, ts_target_size, ts_target_str)) return; 50 CTimer::get("XIOS").resume(); 51 variable_hdl->ts_target.fromString(ts_target_str); 52 CTimer::get("XIOS").suspend(); 53 } 54 55 void cxios_get_variable_ts_target(variable_Ptr variable_hdl, char * ts_target, int ts_target_size) 56 { 57 CTimer::get("XIOS").resume(); 58 if (!string_copy(variable_hdl->ts_target.getInheritedStringValue(), ts_target, ts_target_size)) 59 ERROR("void cxios_get_variable_ts_target(variable_Ptr variable_hdl, char * ts_target, int ts_target_size)", << "Input string is too short"); 60 CTimer::get("XIOS").suspend(); 61 } 62 63 bool cxios_is_defined_variable_ts_target(variable_Ptr variable_hdl) 64 { 65 CTimer::get("XIOS").resume(); 66 bool isDefined = variable_hdl->ts_target.hasInheritedValue(); 67 CTimer::get("XIOS").suspend(); 68 return isDefined; 69 } 70 71 46 72 void cxios_set_variable_type(variable_Ptr variable_hdl, const char * type, int type_size) 47 73 { -
XIOS/dev/dev_olga/src/interface/c_attr/icvariablegroup_attr.cpp
r591 r1158 70 70 71 71 72 void cxios_set_variablegroup_ts_target(variablegroup_Ptr variablegroup_hdl, const char * ts_target, int ts_target_size) 73 { 74 std::string ts_target_str; 75 if (!cstr2string(ts_target, ts_target_size, ts_target_str)) return; 76 CTimer::get("XIOS").resume(); 77 variablegroup_hdl->ts_target.fromString(ts_target_str); 78 CTimer::get("XIOS").suspend(); 79 } 80 81 void cxios_get_variablegroup_ts_target(variablegroup_Ptr variablegroup_hdl, char * ts_target, int ts_target_size) 82 { 83 CTimer::get("XIOS").resume(); 84 if (!string_copy(variablegroup_hdl->ts_target.getInheritedStringValue(), ts_target, ts_target_size)) 85 ERROR("void cxios_get_variablegroup_ts_target(variablegroup_Ptr variablegroup_hdl, char * ts_target, int ts_target_size)", << "Input string is too short"); 86 CTimer::get("XIOS").suspend(); 87 } 88 89 bool cxios_is_defined_variablegroup_ts_target(variablegroup_Ptr variablegroup_hdl) 90 { 91 CTimer::get("XIOS").resume(); 92 bool isDefined = variablegroup_hdl->ts_target.hasInheritedValue(); 93 CTimer::get("XIOS").suspend(); 94 return isDefined; 95 } 96 97 72 98 void cxios_set_variablegroup_type(variablegroup_Ptr variablegroup_hdl, const char * type, int type_size) 73 99 { -
XIOS/dev/dev_olga/src/interface/fortran/field_interface.f90
r943 r1158 18 18 END SUBROUTINE cxios_field_valid_id 19 19 20 SUBROUTINE cxios_field_is_active(field_hdl, ret) BIND(C)20 SUBROUTINE cxios_field_is_active(field_hdl, at_current_timestep, ret) BIND(C) 21 21 USE ISO_C_BINDING 22 22 INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 23 LOGICAL (kind = C_BOOL), VALUE :: at_current_timestep 23 24 LOGICAL (kind = C_BOOL) :: ret 24 25 END SUBROUTINE cxios_field_is_active -
XIOS/dev/dev_olga/src/interface/fortran/idata.F90
r1054 r1158 8 8 9 9 SUBROUTINE cxios_init_server() BIND(C) 10 USE ISO_C_BINDING11 10 END SUBROUTINE cxios_init_server 12 11 … … 454 453 SUBROUTINE xios(init_server)() 455 454 IMPLICIT NONE 456 455 CALL cxios_init_server() 457 456 END SUBROUTINE xios(init_server) 458 457 -
XIOS/dev/dev_olga/src/interface/fortran/ifield.F90
r943 r1158 142 142 END FUNCTION xios(is_valid_fieldgroup) 143 143 144 LOGICAL FUNCTION xios(field_is_active_id (field_id))144 LOGICAL FUNCTION xios(field_is_active_id)(field_id, at_current_timestep_arg) 145 145 IMPLICIT NONE 146 CHARACTER(len = *) 147 LOGICAL (kind = 1) :: val148 TYPE(txios(field)) 149 146 CHARACTER(len = *) , INTENT(IN) :: field_id 147 LOGICAL, OPTIONAL , INTENT(IN) :: at_current_timestep_arg 148 TYPE(txios(field)) :: field_hdl 149 150 150 CALL xios(get_field_handle)(field_id,field_hdl) 151 xios(field_is_active_id) =xios(field_is_active_hdl(field_hdl))151 xios(field_is_active_id) = xios(field_is_active_hdl)(field_hdl, at_current_timestep_arg) 152 152 153 END FUNCTION xios(field_is_active_id) 154 155 156 LOGICAL FUNCTION xios(field_is_active_hdl(field_hdl)) 153 END FUNCTION xios(field_is_active_id) 154 155 LOGICAL FUNCTION xios(field_is_active_hdl)(field_hdl, at_current_timestep_arg) 157 156 IMPLICIT NONE 158 TYPE(txios(field)),INTENT(IN) :: field_hdl 159 LOGICAL (kind = 1) :: ret 160 161 CALL cxios_field_is_active(field_hdl%daddr, ret); 157 TYPE(txios(field)) , INTENT(IN) :: field_hdl 158 LOGICAL, OPTIONAL , INTENT(IN) :: at_current_timestep_arg 159 LOGICAL(kind = C_BOOL) :: at_current_timestep 160 LOGICAL(kind = C_BOOL) :: ret 161 162 IF (PRESENT(at_current_timestep_arg)) THEN 163 at_current_timestep = at_current_timestep_arg 164 ELSE 165 at_current_timestep = .FALSE. 166 ENDIF 167 168 CALL cxios_field_is_active(field_hdl%daddr, at_current_timestep, ret); 162 169 xios(field_is_active_hdl) = ret 163 170 164 END FUNCTION xios(field_is_active_hdl)171 END FUNCTION xios(field_is_active_hdl) 165 172 166 167 173 END MODULE IFIELD -
XIOS/dev/dev_olga/src/interface/fortran_attr/axis_interface_attr.F90
r817 r1158 151 151 152 152 153 SUBROUTINE cxios_set_axis_label(axis_hdl, label, str_len, str_size, extent) BIND(C) 154 USE ISO_C_BINDING 155 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 156 CHARACTER (KIND=C_CHAR), DIMENSION(*) :: label 157 INTEGER (kind = C_INT), VALUE :: str_len 158 INTEGER (kind = C_INT), DIMENSION(*) :: str_size 159 INTEGER (kind = C_INT), DIMENSION(*) :: extent 160 END SUBROUTINE cxios_set_axis_label 161 162 SUBROUTINE cxios_get_axis_label(axis_hdl, label, str_size, extent) BIND(C) 163 USE ISO_C_BINDING 164 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 165 CHARACTER (KIND=C_CHAR), DIMENSION(*) :: label 166 INTEGER (kind = C_INT), VALUE :: str_size 167 INTEGER (kind = C_INT), DIMENSION(*) :: extent 168 END SUBROUTINE cxios_get_axis_label 169 170 FUNCTION cxios_is_defined_axis_label(axis_hdl) BIND(C) 171 USE ISO_C_BINDING 172 LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_label 173 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 174 END FUNCTION cxios_is_defined_axis_label 175 176 153 177 SUBROUTINE cxios_set_axis_long_name(axis_hdl, long_name, long_name_size) BIND(C) 154 178 USE ISO_C_BINDING … … 292 316 293 317 318 SUBROUTINE cxios_set_axis_prec(axis_hdl, prec) BIND(C) 319 USE ISO_C_BINDING 320 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 321 INTEGER (KIND=C_INT) , VALUE :: prec 322 END SUBROUTINE cxios_set_axis_prec 323 324 SUBROUTINE cxios_get_axis_prec(axis_hdl, prec) BIND(C) 325 USE ISO_C_BINDING 326 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 327 INTEGER (KIND=C_INT) :: prec 328 END SUBROUTINE cxios_get_axis_prec 329 330 FUNCTION cxios_is_defined_axis_prec(axis_hdl) BIND(C) 331 USE ISO_C_BINDING 332 LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_prec 333 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 334 END FUNCTION cxios_is_defined_axis_prec 335 336 294 337 SUBROUTINE cxios_set_axis_standard_name(axis_hdl, standard_name, standard_name_size) BIND(C) 295 338 USE ISO_C_BINDING -
XIOS/dev/dev_olga/src/interface/fortran_attr/axisgroup_interface_attr.F90
r817 r1158 172 172 173 173 174 SUBROUTINE cxios_set_axisgroup_label(axisgroup_hdl, label, str_len, str_size, extent) BIND(C) 175 USE ISO_C_BINDING 176 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 177 CHARACTER (KIND=C_CHAR), DIMENSION(*) :: label 178 INTEGER (kind = C_INT), VALUE :: str_len 179 INTEGER (kind = C_INT), DIMENSION(*) :: str_size 180 INTEGER (kind = C_INT), DIMENSION(*) :: extent 181 END SUBROUTINE cxios_set_axisgroup_label 182 183 SUBROUTINE cxios_get_axisgroup_label(axisgroup_hdl, label, str_size, extent) BIND(C) 184 USE ISO_C_BINDING 185 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 186 CHARACTER (KIND=C_CHAR), DIMENSION(*) :: label 187 INTEGER (kind = C_INT), VALUE :: str_size 188 INTEGER (kind = C_INT), DIMENSION(*) :: extent 189 END SUBROUTINE cxios_get_axisgroup_label 190 191 FUNCTION cxios_is_defined_axisgroup_label(axisgroup_hdl) BIND(C) 192 USE ISO_C_BINDING 193 LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_label 194 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 195 END FUNCTION cxios_is_defined_axisgroup_label 196 197 174 198 SUBROUTINE cxios_set_axisgroup_long_name(axisgroup_hdl, long_name, long_name_size) BIND(C) 175 199 USE ISO_C_BINDING … … 313 337 314 338 339 SUBROUTINE cxios_set_axisgroup_prec(axisgroup_hdl, prec) BIND(C) 340 USE ISO_C_BINDING 341 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 342 INTEGER (KIND=C_INT) , VALUE :: prec 343 END SUBROUTINE cxios_set_axisgroup_prec 344 345 SUBROUTINE cxios_get_axisgroup_prec(axisgroup_hdl, prec) BIND(C) 346 USE ISO_C_BINDING 347 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 348 INTEGER (KIND=C_INT) :: prec 349 END SUBROUTINE cxios_get_axisgroup_prec 350 351 FUNCTION cxios_is_defined_axisgroup_prec(axisgroup_hdl) BIND(C) 352 USE ISO_C_BINDING 353 LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_prec 354 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 355 END FUNCTION cxios_is_defined_axisgroup_prec 356 357 315 358 SUBROUTINE cxios_set_axisgroup_standard_name(axisgroup_hdl, standard_name, standard_name_size) BIND(C) 316 359 USE ISO_C_BINDING -
XIOS/dev/dev_olga/src/interface/fortran_attr/domain_interface_attr.F90
r789 r1158 616 616 617 617 618 SUBROUTINE cxios_set_domain_prec(domain_hdl, prec) BIND(C) 619 USE ISO_C_BINDING 620 INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl 621 INTEGER (KIND=C_INT) , VALUE :: prec 622 END SUBROUTINE cxios_set_domain_prec 623 624 SUBROUTINE cxios_get_domain_prec(domain_hdl, prec) BIND(C) 625 USE ISO_C_BINDING 626 INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl 627 INTEGER (KIND=C_INT) :: prec 628 END SUBROUTINE cxios_get_domain_prec 629 630 FUNCTION cxios_is_defined_domain_prec(domain_hdl) BIND(C) 631 USE ISO_C_BINDING 632 LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_prec 633 INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl 634 END FUNCTION cxios_is_defined_domain_prec 635 636 618 637 SUBROUTINE cxios_set_domain_standard_name(domain_hdl, standard_name, standard_name_size) BIND(C) 619 638 USE ISO_C_BINDING -
XIOS/dev/dev_olga/src/interface/fortran_attr/domaingroup_interface_attr.F90
r789 r1158 637 637 638 638 639 SUBROUTINE cxios_set_domaingroup_prec(domaingroup_hdl, prec) BIND(C) 640 USE ISO_C_BINDING 641 INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl 642 INTEGER (KIND=C_INT) , VALUE :: prec 643 END SUBROUTINE cxios_set_domaingroup_prec 644 645 SUBROUTINE cxios_get_domaingroup_prec(domaingroup_hdl, prec) BIND(C) 646 USE ISO_C_BINDING 647 INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl 648 INTEGER (KIND=C_INT) :: prec 649 END SUBROUTINE cxios_get_domaingroup_prec 650 651 FUNCTION cxios_is_defined_domaingroup_prec(domaingroup_hdl) BIND(C) 652 USE ISO_C_BINDING 653 LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_prec 654 INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl 655 END FUNCTION cxios_is_defined_domaingroup_prec 656 657 639 658 SUBROUTINE cxios_set_domaingroup_standard_name(domaingroup_hdl, standard_name, standard_name_size) BIND(C) 640 659 USE ISO_C_BINDING -
XIOS/dev/dev_olga/src/interface/fortran_attr/expand_domain_interface_attr.F90
r981 r1158 9 9 INTERFACE 10 10 ! Do not call directly / interface FORTRAN 2003 <-> C99 11 12 SUBROUTINE cxios_set_expand_domain_i_periodic(expand_domain_hdl, i_periodic) BIND(C) 13 USE ISO_C_BINDING 14 INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl 15 LOGICAL (KIND=C_BOOL) , VALUE :: i_periodic 16 END SUBROUTINE cxios_set_expand_domain_i_periodic 17 18 SUBROUTINE cxios_get_expand_domain_i_periodic(expand_domain_hdl, i_periodic) BIND(C) 19 USE ISO_C_BINDING 20 INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl 21 LOGICAL (KIND=C_BOOL) :: i_periodic 22 END SUBROUTINE cxios_get_expand_domain_i_periodic 23 24 FUNCTION cxios_is_defined_expand_domain_i_periodic(expand_domain_hdl) BIND(C) 25 USE ISO_C_BINDING 26 LOGICAL(kind=C_BOOL) :: cxios_is_defined_expand_domain_i_periodic 27 INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl 28 END FUNCTION cxios_is_defined_expand_domain_i_periodic 29 30 31 SUBROUTINE cxios_set_expand_domain_j_periodic(expand_domain_hdl, j_periodic) BIND(C) 32 USE ISO_C_BINDING 33 INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl 34 LOGICAL (KIND=C_BOOL) , VALUE :: j_periodic 35 END SUBROUTINE cxios_set_expand_domain_j_periodic 36 37 SUBROUTINE cxios_get_expand_domain_j_periodic(expand_domain_hdl, j_periodic) BIND(C) 38 USE ISO_C_BINDING 39 INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl 40 LOGICAL (KIND=C_BOOL) :: j_periodic 41 END SUBROUTINE cxios_get_expand_domain_j_periodic 42 43 FUNCTION cxios_is_defined_expand_domain_j_periodic(expand_domain_hdl) BIND(C) 44 USE ISO_C_BINDING 45 LOGICAL(kind=C_BOOL) :: cxios_is_defined_expand_domain_j_periodic 46 INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl 47 END FUNCTION cxios_is_defined_expand_domain_j_periodic 48 11 49 12 50 SUBROUTINE cxios_set_expand_domain_order(expand_domain_hdl, order) BIND(C) -
XIOS/dev/dev_olga/src/interface/fortran_attr/file_interface_attr.F90
r932 r1158 416 416 417 417 418 SUBROUTINE cxios_set_file_time_stamp_format(file_hdl, time_stamp_format, time_stamp_format_size) BIND(C) 419 USE ISO_C_BINDING 420 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 421 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: time_stamp_format 422 INTEGER (kind = C_INT) , VALUE :: time_stamp_format_size 423 END SUBROUTINE cxios_set_file_time_stamp_format 424 425 SUBROUTINE cxios_get_file_time_stamp_format(file_hdl, time_stamp_format, time_stamp_format_size) BIND(C) 426 USE ISO_C_BINDING 427 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 428 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: time_stamp_format 429 INTEGER (kind = C_INT) , VALUE :: time_stamp_format_size 430 END SUBROUTINE cxios_get_file_time_stamp_format 431 432 FUNCTION cxios_is_defined_file_time_stamp_format(file_hdl) BIND(C) 433 USE ISO_C_BINDING 434 LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_time_stamp_format 435 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 436 END FUNCTION cxios_is_defined_file_time_stamp_format 437 438 439 SUBROUTINE cxios_set_file_time_stamp_name(file_hdl, time_stamp_name, time_stamp_name_size) BIND(C) 440 USE ISO_C_BINDING 441 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 442 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: time_stamp_name 443 INTEGER (kind = C_INT) , VALUE :: time_stamp_name_size 444 END SUBROUTINE cxios_set_file_time_stamp_name 445 446 SUBROUTINE cxios_get_file_time_stamp_name(file_hdl, time_stamp_name, time_stamp_name_size) BIND(C) 447 USE ISO_C_BINDING 448 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 449 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: time_stamp_name 450 INTEGER (kind = C_INT) , VALUE :: time_stamp_name_size 451 END SUBROUTINE cxios_get_file_time_stamp_name 452 453 FUNCTION cxios_is_defined_file_time_stamp_name(file_hdl) BIND(C) 454 USE ISO_C_BINDING 455 LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_time_stamp_name 456 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 457 END FUNCTION cxios_is_defined_file_time_stamp_name 458 459 460 SUBROUTINE cxios_set_file_time_units(file_hdl, time_units, time_units_size) BIND(C) 461 USE ISO_C_BINDING 462 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 463 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: time_units 464 INTEGER (kind = C_INT) , VALUE :: time_units_size 465 END SUBROUTINE cxios_set_file_time_units 466 467 SUBROUTINE cxios_get_file_time_units(file_hdl, time_units, time_units_size) BIND(C) 468 USE ISO_C_BINDING 469 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 470 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: time_units 471 INTEGER (kind = C_INT) , VALUE :: time_units_size 472 END SUBROUTINE cxios_get_file_time_units 473 474 FUNCTION cxios_is_defined_file_time_units(file_hdl) BIND(C) 475 USE ISO_C_BINDING 476 LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_time_units 477 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 478 END FUNCTION cxios_is_defined_file_time_units 479 480 418 481 SUBROUTINE cxios_set_file_timeseries(file_hdl, timeseries, timeseries_size) BIND(C) 419 482 USE ISO_C_BINDING … … 478 541 END FUNCTION cxios_is_defined_file_type 479 542 543 544 SUBROUTINE cxios_set_file_uuid_format(file_hdl, uuid_format, uuid_format_size) BIND(C) 545 USE ISO_C_BINDING 546 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 547 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: uuid_format 548 INTEGER (kind = C_INT) , VALUE :: uuid_format_size 549 END SUBROUTINE cxios_set_file_uuid_format 550 551 SUBROUTINE cxios_get_file_uuid_format(file_hdl, uuid_format, uuid_format_size) BIND(C) 552 USE ISO_C_BINDING 553 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 554 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: uuid_format 555 INTEGER (kind = C_INT) , VALUE :: uuid_format_size 556 END SUBROUTINE cxios_get_file_uuid_format 557 558 FUNCTION cxios_is_defined_file_uuid_format(file_hdl) BIND(C) 559 USE ISO_C_BINDING 560 LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_uuid_format 561 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 562 END FUNCTION cxios_is_defined_file_uuid_format 563 564 565 SUBROUTINE cxios_set_file_uuid_name(file_hdl, uuid_name, uuid_name_size) BIND(C) 566 USE ISO_C_BINDING 567 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 568 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: uuid_name 569 INTEGER (kind = C_INT) , VALUE :: uuid_name_size 570 END SUBROUTINE cxios_set_file_uuid_name 571 572 SUBROUTINE cxios_get_file_uuid_name(file_hdl, uuid_name, uuid_name_size) BIND(C) 573 USE ISO_C_BINDING 574 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 575 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: uuid_name 576 INTEGER (kind = C_INT) , VALUE :: uuid_name_size 577 END SUBROUTINE cxios_get_file_uuid_name 578 579 FUNCTION cxios_is_defined_file_uuid_name(file_hdl) BIND(C) 580 USE ISO_C_BINDING 581 LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_uuid_name 582 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 583 END FUNCTION cxios_is_defined_file_uuid_name 584 480 585 END INTERFACE 481 586 -
XIOS/dev/dev_olga/src/interface/fortran_attr/filegroup_interface_attr.F90
r932 r1158 437 437 438 438 439 SUBROUTINE cxios_set_filegroup_time_stamp_format(filegroup_hdl, time_stamp_format, time_stamp_format_size) BIND(C) 440 USE ISO_C_BINDING 441 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 442 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: time_stamp_format 443 INTEGER (kind = C_INT) , VALUE :: time_stamp_format_size 444 END SUBROUTINE cxios_set_filegroup_time_stamp_format 445 446 SUBROUTINE cxios_get_filegroup_time_stamp_format(filegroup_hdl, time_stamp_format, time_stamp_format_size) BIND(C) 447 USE ISO_C_BINDING 448 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 449 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: time_stamp_format 450 INTEGER (kind = C_INT) , VALUE :: time_stamp_format_size 451 END SUBROUTINE cxios_get_filegroup_time_stamp_format 452 453 FUNCTION cxios_is_defined_filegroup_time_stamp_format(filegroup_hdl) BIND(C) 454 USE ISO_C_BINDING 455 LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_time_stamp_format 456 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 457 END FUNCTION cxios_is_defined_filegroup_time_stamp_format 458 459 460 SUBROUTINE cxios_set_filegroup_time_stamp_name(filegroup_hdl, time_stamp_name, time_stamp_name_size) BIND(C) 461 USE ISO_C_BINDING 462 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 463 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: time_stamp_name 464 INTEGER (kind = C_INT) , VALUE :: time_stamp_name_size 465 END SUBROUTINE cxios_set_filegroup_time_stamp_name 466 467 SUBROUTINE cxios_get_filegroup_time_stamp_name(filegroup_hdl, time_stamp_name, time_stamp_name_size) BIND(C) 468 USE ISO_C_BINDING 469 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 470 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: time_stamp_name 471 INTEGER (kind = C_INT) , VALUE :: time_stamp_name_size 472 END SUBROUTINE cxios_get_filegroup_time_stamp_name 473 474 FUNCTION cxios_is_defined_filegroup_time_stamp_name(filegroup_hdl) BIND(C) 475 USE ISO_C_BINDING 476 LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_time_stamp_name 477 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 478 END FUNCTION cxios_is_defined_filegroup_time_stamp_name 479 480 481 SUBROUTINE cxios_set_filegroup_time_units(filegroup_hdl, time_units, time_units_size) BIND(C) 482 USE ISO_C_BINDING 483 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 484 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: time_units 485 INTEGER (kind = C_INT) , VALUE :: time_units_size 486 END SUBROUTINE cxios_set_filegroup_time_units 487 488 SUBROUTINE cxios_get_filegroup_time_units(filegroup_hdl, time_units, time_units_size) BIND(C) 489 USE ISO_C_BINDING 490 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 491 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: time_units 492 INTEGER (kind = C_INT) , VALUE :: time_units_size 493 END SUBROUTINE cxios_get_filegroup_time_units 494 495 FUNCTION cxios_is_defined_filegroup_time_units(filegroup_hdl) BIND(C) 496 USE ISO_C_BINDING 497 LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_time_units 498 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 499 END FUNCTION cxios_is_defined_filegroup_time_units 500 501 439 502 SUBROUTINE cxios_set_filegroup_timeseries(filegroup_hdl, timeseries, timeseries_size) BIND(C) 440 503 USE ISO_C_BINDING … … 499 562 END FUNCTION cxios_is_defined_filegroup_type 500 563 564 565 SUBROUTINE cxios_set_filegroup_uuid_format(filegroup_hdl, uuid_format, uuid_format_size) BIND(C) 566 USE ISO_C_BINDING 567 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 568 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: uuid_format 569 INTEGER (kind = C_INT) , VALUE :: uuid_format_size 570 END SUBROUTINE cxios_set_filegroup_uuid_format 571 572 SUBROUTINE cxios_get_filegroup_uuid_format(filegroup_hdl, uuid_format, uuid_format_size) BIND(C) 573 USE ISO_C_BINDING 574 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 575 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: uuid_format 576 INTEGER (kind = C_INT) , VALUE :: uuid_format_size 577 END SUBROUTINE cxios_get_filegroup_uuid_format 578 579 FUNCTION cxios_is_defined_filegroup_uuid_format(filegroup_hdl) BIND(C) 580 USE ISO_C_BINDING 581 LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_uuid_format 582 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 583 END FUNCTION cxios_is_defined_filegroup_uuid_format 584 585 586 SUBROUTINE cxios_set_filegroup_uuid_name(filegroup_hdl, uuid_name, uuid_name_size) BIND(C) 587 USE ISO_C_BINDING 588 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 589 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: uuid_name 590 INTEGER (kind = C_INT) , VALUE :: uuid_name_size 591 END SUBROUTINE cxios_set_filegroup_uuid_name 592 593 SUBROUTINE cxios_get_filegroup_uuid_name(filegroup_hdl, uuid_name, uuid_name_size) BIND(C) 594 USE ISO_C_BINDING 595 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 596 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: uuid_name 597 INTEGER (kind = C_INT) , VALUE :: uuid_name_size 598 END SUBROUTINE cxios_get_filegroup_uuid_name 599 600 FUNCTION cxios_is_defined_filegroup_uuid_name(filegroup_hdl) BIND(C) 601 USE ISO_C_BINDING 602 LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_uuid_name 603 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 604 END FUNCTION cxios_is_defined_filegroup_uuid_name 605 501 606 END INTERFACE 502 607 -
XIOS/dev/dev_olga/src/interface/fortran_attr/iaxis_attr.F90
r966 r1158 12 12 13 13 SUBROUTINE xios(set_axis_attr) & 14 ( axis_id, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask, n & 15 , n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 14 ( axis_id, axis_ref, begin, bounds, data_begin, data_index, data_n, index, label, long_name & 15 , mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit, value & 16 ) 16 17 17 18 IMPLICIT NONE … … 25 26 INTEGER , OPTIONAL, INTENT(IN) :: data_n 26 27 INTEGER , OPTIONAL, INTENT(IN) :: index(:) 28 CHARACTER(len=*) , OPTIONAL, INTENT(IN) :: label(:) 27 29 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name 28 30 LOGICAL , OPTIONAL, INTENT(IN) :: mask(:) … … 33 35 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 34 36 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive 37 INTEGER , OPTIONAL, INTENT(IN) :: prec 35 38 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name 36 39 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit … … 40 43 (axis_id,axis_hdl) 41 44 CALL xios(set_axis_attr_hdl_) & 42 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask & 43 , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 45 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, label, long_name & 46 , mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit, value & 47 ) 44 48 45 49 END SUBROUTINE xios(set_axis_attr) 46 50 47 51 SUBROUTINE xios(set_axis_attr_hdl) & 48 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask & 49 , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 52 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, label, long_name & 53 , mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit, value & 54 ) 50 55 51 56 IMPLICIT NONE … … 58 63 INTEGER , OPTIONAL, INTENT(IN) :: data_n 59 64 INTEGER , OPTIONAL, INTENT(IN) :: index(:) 65 CHARACTER(len=*) , OPTIONAL, INTENT(IN) :: label(:) 60 66 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name 61 67 LOGICAL , OPTIONAL, INTENT(IN) :: mask(:) … … 66 72 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 67 73 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive 74 INTEGER , OPTIONAL, INTENT(IN) :: prec 68 75 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name 69 76 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit … … 71 78 72 79 CALL xios(set_axis_attr_hdl_) & 73 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask & 74 , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 80 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, label, long_name & 81 , mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit, value & 82 ) 75 83 76 84 END SUBROUTINE xios(set_axis_attr_hdl) 77 85 78 86 SUBROUTINE xios(set_axis_attr_hdl_) & 79 ( axis_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, index_, l ong_name_ &80 , mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_, unit_, value_ &81 )87 ( axis_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, index_, label_, long_name_ & 88 , mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, prec_, standard_name_, unit_ & 89 , value_ ) 82 90 83 91 IMPLICIT NONE … … 90 98 INTEGER , OPTIONAL, INTENT(IN) :: data_n_ 91 99 INTEGER , OPTIONAL, INTENT(IN) :: index_(:) 100 CHARACTER(len=*) , OPTIONAL, INTENT(IN) :: label_(:) 92 101 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name_ 93 102 LOGICAL , OPTIONAL, INTENT(IN) :: mask_(:) … … 98 107 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 99 108 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive_ 109 INTEGER , OPTIONAL, INTENT(IN) :: prec_ 100 110 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_ 101 111 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit_ … … 135 145 CALL cxios_set_axis_index & 136 146 (axis_hdl%daddr, index_, SHAPE(index_)) 147 ENDIF 148 149 IF (PRESENT(label_)) THEN 150 CALL cxios_set_axis_label & 151 (axis_hdl%daddr, label_, LEN(label_), LEN_TRIM(label_), SHAPE(label_)) 137 152 ENDIF 138 153 … … 174 189 ENDIF 175 190 191 IF (PRESENT(prec_)) THEN 192 CALL cxios_set_axis_prec & 193 (axis_hdl%daddr, prec_) 194 ENDIF 195 176 196 IF (PRESENT(standard_name_)) THEN 177 197 CALL cxios_set_axis_standard_name & … … 192 212 193 213 SUBROUTINE xios(get_axis_attr) & 194 ( axis_id, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask, n & 195 , n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 214 ( axis_id, axis_ref, begin, bounds, data_begin, data_index, data_n, index, label, long_name & 215 , mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit, value & 216 ) 196 217 197 218 IMPLICIT NONE … … 205 226 INTEGER , OPTIONAL, INTENT(OUT) :: data_n 206 227 INTEGER , OPTIONAL, INTENT(OUT) :: index(:) 228 CHARACTER(len=*) , OPTIONAL, INTENT(OUT) :: label(:) 207 229 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name 208 230 LOGICAL , OPTIONAL, INTENT(OUT) :: mask(:) … … 213 235 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 214 236 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive 237 INTEGER , OPTIONAL, INTENT(OUT) :: prec 215 238 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name 216 239 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit … … 220 243 (axis_id,axis_hdl) 221 244 CALL xios(get_axis_attr_hdl_) & 222 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask & 223 , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 245 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, label, long_name & 246 , mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit, value & 247 ) 224 248 225 249 END SUBROUTINE xios(get_axis_attr) 226 250 227 251 SUBROUTINE xios(get_axis_attr_hdl) & 228 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask & 229 , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 252 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, label, long_name & 253 , mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit, value & 254 ) 230 255 231 256 IMPLICIT NONE … … 238 263 INTEGER , OPTIONAL, INTENT(OUT) :: data_n 239 264 INTEGER , OPTIONAL, INTENT(OUT) :: index(:) 265 CHARACTER(len=*) , OPTIONAL, INTENT(OUT) :: label(:) 240 266 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name 241 267 LOGICAL , OPTIONAL, INTENT(OUT) :: mask(:) … … 246 272 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 247 273 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive 274 INTEGER , OPTIONAL, INTENT(OUT) :: prec 248 275 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name 249 276 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit … … 251 278 252 279 CALL xios(get_axis_attr_hdl_) & 253 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask & 254 , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 280 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, label, long_name & 281 , mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit, value & 282 ) 255 283 256 284 END SUBROUTINE xios(get_axis_attr_hdl) 257 285 258 286 SUBROUTINE xios(get_axis_attr_hdl_) & 259 ( axis_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, index_, l ong_name_ &260 , mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_, unit_, value_ &261 )287 ( axis_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, index_, label_, long_name_ & 288 , mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, prec_, standard_name_, unit_ & 289 , value_ ) 262 290 263 291 IMPLICIT NONE … … 270 298 INTEGER , OPTIONAL, INTENT(OUT) :: data_n_ 271 299 INTEGER , OPTIONAL, INTENT(OUT) :: index_(:) 300 CHARACTER(len=*) , OPTIONAL, INTENT(OUT) :: label_(:) 272 301 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name_ 273 302 LOGICAL , OPTIONAL, INTENT(OUT) :: mask_(:) … … 278 307 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 279 308 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive_ 309 INTEGER , OPTIONAL, INTENT(OUT) :: prec_ 280 310 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_ 281 311 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit_ … … 315 345 CALL cxios_get_axis_index & 316 346 (axis_hdl%daddr, index_, SHAPE(index_)) 347 ENDIF 348 349 IF (PRESENT(label_)) THEN 350 CALL cxios_get_axis_label & 351 (axis_hdl%daddr, label_, LEN(label_), SHAPE(label_)) 317 352 ENDIF 318 353 … … 354 389 ENDIF 355 390 391 IF (PRESENT(prec_)) THEN 392 CALL cxios_get_axis_prec & 393 (axis_hdl%daddr, prec_) 394 ENDIF 395 356 396 IF (PRESENT(standard_name_)) THEN 357 397 CALL cxios_get_axis_standard_name & … … 372 412 373 413 SUBROUTINE xios(is_defined_axis_attr) & 374 ( axis_id, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask, n & 375 , n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 414 ( axis_id, axis_ref, begin, bounds, data_begin, data_index, data_n, index, label, long_name & 415 , mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit, value & 416 ) 376 417 377 418 IMPLICIT NONE … … 392 433 LOGICAL, OPTIONAL, INTENT(OUT) :: index 393 434 LOGICAL(KIND=C_BOOL) :: index_tmp 435 LOGICAL, OPTIONAL, INTENT(OUT) :: label 436 LOGICAL(KIND=C_BOOL) :: label_tmp 394 437 LOGICAL, OPTIONAL, INTENT(OUT) :: long_name 395 438 LOGICAL(KIND=C_BOOL) :: long_name_tmp … … 406 449 LOGICAL, OPTIONAL, INTENT(OUT) :: positive 407 450 LOGICAL(KIND=C_BOOL) :: positive_tmp 451 LOGICAL, OPTIONAL, INTENT(OUT) :: prec 452 LOGICAL(KIND=C_BOOL) :: prec_tmp 408 453 LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name 409 454 LOGICAL(KIND=C_BOOL) :: standard_name_tmp … … 416 461 (axis_id,axis_hdl) 417 462 CALL xios(is_defined_axis_attr_hdl_) & 418 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask & 419 , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 463 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, label, long_name & 464 , mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit, value & 465 ) 420 466 421 467 END SUBROUTINE xios(is_defined_axis_attr) 422 468 423 469 SUBROUTINE xios(is_defined_axis_attr_hdl) & 424 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask & 425 , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 470 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, label, long_name & 471 , mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit, value & 472 ) 426 473 427 474 IMPLICIT NONE … … 441 488 LOGICAL, OPTIONAL, INTENT(OUT) :: index 442 489 LOGICAL(KIND=C_BOOL) :: index_tmp 490 LOGICAL, OPTIONAL, INTENT(OUT) :: label 491 LOGICAL(KIND=C_BOOL) :: label_tmp 443 492 LOGICAL, OPTIONAL, INTENT(OUT) :: long_name 444 493 LOGICAL(KIND=C_BOOL) :: long_name_tmp … … 455 504 LOGICAL, OPTIONAL, INTENT(OUT) :: positive 456 505 LOGICAL(KIND=C_BOOL) :: positive_tmp 506 LOGICAL, OPTIONAL, INTENT(OUT) :: prec 507 LOGICAL(KIND=C_BOOL) :: prec_tmp 457 508 LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name 458 509 LOGICAL(KIND=C_BOOL) :: standard_name_tmp … … 463 514 464 515 CALL xios(is_defined_axis_attr_hdl_) & 465 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask & 466 , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 516 ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, label, long_name & 517 , mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit, value & 518 ) 467 519 468 520 END SUBROUTINE xios(is_defined_axis_attr_hdl) 469 521 470 522 SUBROUTINE xios(is_defined_axis_attr_hdl_) & 471 ( axis_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, index_, l ong_name_ &472 , mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_, unit_, value_ &473 )523 ( axis_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, index_, label_, long_name_ & 524 , mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, prec_, standard_name_, unit_ & 525 , value_ ) 474 526 475 527 IMPLICIT NONE … … 489 541 LOGICAL, OPTIONAL, INTENT(OUT) :: index_ 490 542 LOGICAL(KIND=C_BOOL) :: index__tmp 543 LOGICAL, OPTIONAL, INTENT(OUT) :: label_ 544 LOGICAL(KIND=C_BOOL) :: label__tmp 491 545 LOGICAL, OPTIONAL, INTENT(OUT) :: long_name_ 492 546 LOGICAL(KIND=C_BOOL) :: long_name__tmp … … 503 557 LOGICAL, OPTIONAL, INTENT(OUT) :: positive_ 504 558 LOGICAL(KIND=C_BOOL) :: positive__tmp 559 LOGICAL, OPTIONAL, INTENT(OUT) :: prec_ 560 LOGICAL(KIND=C_BOOL) :: prec__tmp 505 561 LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name_ 506 562 LOGICAL(KIND=C_BOOL) :: standard_name__tmp … … 552 608 ENDIF 553 609 610 IF (PRESENT(label_)) THEN 611 label__tmp = cxios_is_defined_axis_label & 612 (axis_hdl%daddr) 613 label_ = label__tmp 614 ENDIF 615 554 616 IF (PRESENT(long_name_)) THEN 555 617 long_name__tmp = cxios_is_defined_axis_long_name & … … 594 656 ENDIF 595 657 658 IF (PRESENT(prec_)) THEN 659 prec__tmp = cxios_is_defined_axis_prec & 660 (axis_hdl%daddr) 661 prec_ = prec__tmp 662 ENDIF 663 596 664 IF (PRESENT(standard_name_)) THEN 597 665 standard_name__tmp = cxios_is_defined_axis_standard_name & -
XIOS/dev/dev_olga/src/interface/fortran_attr/iaxisgroup_attr.F90
r966 r1158 12 12 13 13 SUBROUTINE xios(set_axisgroup_attr) & 14 ( axisgroup_id, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name & 15 , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 14 ( axisgroup_id, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, label & 15 , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit & 16 , value ) 16 17 17 18 IMPLICIT NONE … … 26 27 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 27 28 INTEGER , OPTIONAL, INTENT(IN) :: index(:) 29 CHARACTER(len=*) , OPTIONAL, INTENT(IN) :: label(:) 28 30 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name 29 31 LOGICAL , OPTIONAL, INTENT(IN) :: mask(:) … … 34 36 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 35 37 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive 38 INTEGER , OPTIONAL, INTENT(IN) :: prec 36 39 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name 37 40 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit … … 41 44 (axisgroup_id,axisgroup_hdl) 42 45 CALL xios(set_axisgroup_attr_hdl_) & 43 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name & 44 , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 46 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, label & 47 , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit & 48 , value ) 45 49 46 50 END SUBROUTINE xios(set_axisgroup_attr) 47 51 48 52 SUBROUTINE xios(set_axisgroup_attr_hdl) & 49 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name & 50 , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 53 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, label & 54 , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit & 55 , value ) 51 56 52 57 IMPLICIT NONE … … 60 65 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 61 66 INTEGER , OPTIONAL, INTENT(IN) :: index(:) 67 CHARACTER(len=*) , OPTIONAL, INTENT(IN) :: label(:) 62 68 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name 63 69 LOGICAL , OPTIONAL, INTENT(IN) :: mask(:) … … 68 74 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 69 75 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive 76 INTEGER , OPTIONAL, INTENT(IN) :: prec 70 77 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name 71 78 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit … … 73 80 74 81 CALL xios(set_axisgroup_attr_hdl_) & 75 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name & 76 , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 82 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, label & 83 , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit & 84 , value ) 77 85 78 86 END SUBROUTINE xios(set_axisgroup_attr_hdl) … … 80 88 SUBROUTINE xios(set_axisgroup_attr_hdl_) & 81 89 ( axisgroup_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, group_ref_, index_ & 82 , l ong_name_, mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_ &90 , label_, long_name_, mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, prec_, standard_name_ & 83 91 , unit_, value_ ) 84 92 … … 93 101 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_ 94 102 INTEGER , OPTIONAL, INTENT(IN) :: index_(:) 103 CHARACTER(len=*) , OPTIONAL, INTENT(IN) :: label_(:) 95 104 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name_ 96 105 LOGICAL , OPTIONAL, INTENT(IN) :: mask_(:) … … 101 110 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 102 111 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive_ 112 INTEGER , OPTIONAL, INTENT(IN) :: prec_ 103 113 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_ 104 114 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit_ … … 143 153 CALL cxios_set_axisgroup_index & 144 154 (axisgroup_hdl%daddr, index_, SHAPE(index_)) 155 ENDIF 156 157 IF (PRESENT(label_)) THEN 158 CALL cxios_set_axisgroup_label & 159 (axisgroup_hdl%daddr, label_, LEN(label_), LEN_TRIM(label_), SHAPE(label_)) 145 160 ENDIF 146 161 … … 182 197 ENDIF 183 198 199 IF (PRESENT(prec_)) THEN 200 CALL cxios_set_axisgroup_prec & 201 (axisgroup_hdl%daddr, prec_) 202 ENDIF 203 184 204 IF (PRESENT(standard_name_)) THEN 185 205 CALL cxios_set_axisgroup_standard_name & … … 200 220 201 221 SUBROUTINE xios(get_axisgroup_attr) & 202 ( axisgroup_id, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name & 203 , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 222 ( axisgroup_id, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, label & 223 , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit & 224 , value ) 204 225 205 226 IMPLICIT NONE … … 214 235 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 215 236 INTEGER , OPTIONAL, INTENT(OUT) :: index(:) 237 CHARACTER(len=*) , OPTIONAL, INTENT(OUT) :: label(:) 216 238 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name 217 239 LOGICAL , OPTIONAL, INTENT(OUT) :: mask(:) … … 222 244 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 223 245 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive 246 INTEGER , OPTIONAL, INTENT(OUT) :: prec 224 247 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name 225 248 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit … … 229 252 (axisgroup_id,axisgroup_hdl) 230 253 CALL xios(get_axisgroup_attr_hdl_) & 231 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name & 232 , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 254 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, label & 255 , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit & 256 , value ) 233 257 234 258 END SUBROUTINE xios(get_axisgroup_attr) 235 259 236 260 SUBROUTINE xios(get_axisgroup_attr_hdl) & 237 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name & 238 , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 261 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, label & 262 , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit & 263 , value ) 239 264 240 265 IMPLICIT NONE … … 248 273 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 249 274 INTEGER , OPTIONAL, INTENT(OUT) :: index(:) 275 CHARACTER(len=*) , OPTIONAL, INTENT(OUT) :: label(:) 250 276 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name 251 277 LOGICAL , OPTIONAL, INTENT(OUT) :: mask(:) … … 256 282 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 257 283 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive 284 INTEGER , OPTIONAL, INTENT(OUT) :: prec 258 285 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name 259 286 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit … … 261 288 262 289 CALL xios(get_axisgroup_attr_hdl_) & 263 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name & 264 , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 290 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, label & 291 , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit & 292 , value ) 265 293 266 294 END SUBROUTINE xios(get_axisgroup_attr_hdl) … … 268 296 SUBROUTINE xios(get_axisgroup_attr_hdl_) & 269 297 ( axisgroup_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, group_ref_, index_ & 270 , l ong_name_, mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_ &298 , label_, long_name_, mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, prec_, standard_name_ & 271 299 , unit_, value_ ) 272 300 … … 281 309 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_ 282 310 INTEGER , OPTIONAL, INTENT(OUT) :: index_(:) 311 CHARACTER(len=*) , OPTIONAL, INTENT(OUT) :: label_(:) 283 312 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name_ 284 313 LOGICAL , OPTIONAL, INTENT(OUT) :: mask_(:) … … 289 318 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 290 319 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive_ 320 INTEGER , OPTIONAL, INTENT(OUT) :: prec_ 291 321 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_ 292 322 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit_ … … 331 361 CALL cxios_get_axisgroup_index & 332 362 (axisgroup_hdl%daddr, index_, SHAPE(index_)) 363 ENDIF 364 365 IF (PRESENT(label_)) THEN 366 CALL cxios_get_axisgroup_label & 367 (axisgroup_hdl%daddr, label_, LEN(label_), SHAPE(label_)) 333 368 ENDIF 334 369 … … 370 405 ENDIF 371 406 407 IF (PRESENT(prec_)) THEN 408 CALL cxios_get_axisgroup_prec & 409 (axisgroup_hdl%daddr, prec_) 410 ENDIF 411 372 412 IF (PRESENT(standard_name_)) THEN 373 413 CALL cxios_get_axisgroup_standard_name & … … 388 428 389 429 SUBROUTINE xios(is_defined_axisgroup_attr) & 390 ( axisgroup_id, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name & 391 , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 430 ( axisgroup_id, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, label & 431 , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit & 432 , value ) 392 433 393 434 IMPLICIT NONE … … 410 451 LOGICAL, OPTIONAL, INTENT(OUT) :: index 411 452 LOGICAL(KIND=C_BOOL) :: index_tmp 453 LOGICAL, OPTIONAL, INTENT(OUT) :: label 454 LOGICAL(KIND=C_BOOL) :: label_tmp 412 455 LOGICAL, OPTIONAL, INTENT(OUT) :: long_name 413 456 LOGICAL(KIND=C_BOOL) :: long_name_tmp … … 424 467 LOGICAL, OPTIONAL, INTENT(OUT) :: positive 425 468 LOGICAL(KIND=C_BOOL) :: positive_tmp 469 LOGICAL, OPTIONAL, INTENT(OUT) :: prec 470 LOGICAL(KIND=C_BOOL) :: prec_tmp 426 471 LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name 427 472 LOGICAL(KIND=C_BOOL) :: standard_name_tmp … … 434 479 (axisgroup_id,axisgroup_hdl) 435 480 CALL xios(is_defined_axisgroup_attr_hdl_) & 436 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name & 437 , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 481 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, label & 482 , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit & 483 , value ) 438 484 439 485 END SUBROUTINE xios(is_defined_axisgroup_attr) 440 486 441 487 SUBROUTINE xios(is_defined_axisgroup_attr_hdl) & 442 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name & 443 , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 488 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, label & 489 , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit & 490 , value ) 444 491 445 492 IMPLICIT NONE … … 461 508 LOGICAL, OPTIONAL, INTENT(OUT) :: index 462 509 LOGICAL(KIND=C_BOOL) :: index_tmp 510 LOGICAL, OPTIONAL, INTENT(OUT) :: label 511 LOGICAL(KIND=C_BOOL) :: label_tmp 463 512 LOGICAL, OPTIONAL, INTENT(OUT) :: long_name 464 513 LOGICAL(KIND=C_BOOL) :: long_name_tmp … … 475 524 LOGICAL, OPTIONAL, INTENT(OUT) :: positive 476 525 LOGICAL(KIND=C_BOOL) :: positive_tmp 526 LOGICAL, OPTIONAL, INTENT(OUT) :: prec 527 LOGICAL(KIND=C_BOOL) :: prec_tmp 477 528 LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name 478 529 LOGICAL(KIND=C_BOOL) :: standard_name_tmp … … 483 534 484 535 CALL xios(is_defined_axisgroup_attr_hdl_) & 485 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name & 486 , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 536 ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, label & 537 , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit & 538 , value ) 487 539 488 540 END SUBROUTINE xios(is_defined_axisgroup_attr_hdl) … … 490 542 SUBROUTINE xios(is_defined_axisgroup_attr_hdl_) & 491 543 ( axisgroup_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, group_ref_, index_ & 492 , l ong_name_, mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_ &544 , label_, long_name_, mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, prec_, standard_name_ & 493 545 , unit_, value_ ) 494 546 … … 511 563 LOGICAL, OPTIONAL, INTENT(OUT) :: index_ 512 564 LOGICAL(KIND=C_BOOL) :: index__tmp 565 LOGICAL, OPTIONAL, INTENT(OUT) :: label_ 566 LOGICAL(KIND=C_BOOL) :: label__tmp 513 567 LOGICAL, OPTIONAL, INTENT(OUT) :: long_name_ 514 568 LOGICAL(KIND=C_BOOL) :: long_name__tmp … … 525 579 LOGICAL, OPTIONAL, INTENT(OUT) :: positive_ 526 580 LOGICAL(KIND=C_BOOL) :: positive__tmp 581 LOGICAL, OPTIONAL, INTENT(OUT) :: prec_ 582 LOGICAL(KIND=C_BOOL) :: prec__tmp 527 583 LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name_ 528 584 LOGICAL(KIND=C_BOOL) :: standard_name__tmp … … 580 636 ENDIF 581 637 638 IF (PRESENT(label_)) THEN 639 label__tmp = cxios_is_defined_axisgroup_label & 640 (axisgroup_hdl%daddr) 641 label_ = label__tmp 642 ENDIF 643 582 644 IF (PRESENT(long_name_)) THEN 583 645 long_name__tmp = cxios_is_defined_axisgroup_long_name & … … 622 684 ENDIF 623 685 686 IF (PRESENT(prec_)) THEN 687 prec__tmp = cxios_is_defined_axisgroup_prec & 688 (axisgroup_hdl%daddr) 689 prec_ = prec__tmp 690 ENDIF 691 624 692 IF (PRESENT(standard_name_)) THEN 625 693 standard_name__tmp = cxios_is_defined_axisgroup_standard_name & -
XIOS/dev/dev_olga/src/interface/fortran_attr/idomain_attr.F90
r966 r1158 15 15 , data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, i_index, ibegin, j_index & 16 16 , jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name & 17 , ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )17 , ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 18 18 19 19 IMPLICIT NONE … … 52 52 INTEGER , OPTIONAL, INTENT(IN) :: nj_glo 53 53 INTEGER , OPTIONAL, INTENT(IN) :: nvertex 54 INTEGER , OPTIONAL, INTENT(IN) :: prec 54 55 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name 55 56 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type … … 61 62 , data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, i_index, ibegin, j_index & 62 63 , jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name & 63 , ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )64 , ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 64 65 65 66 END SUBROUTINE xios(set_domain_attr) … … 69 70 , data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, i_index, ibegin, j_index & 70 71 , jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name & 71 , ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )72 , ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 72 73 73 74 IMPLICIT NONE … … 105 106 INTEGER , OPTIONAL, INTENT(IN) :: nj_glo 106 107 INTEGER , OPTIONAL, INTENT(IN) :: nvertex 108 INTEGER , OPTIONAL, INTENT(IN) :: prec 107 109 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name 108 110 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type … … 112 114 , data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, i_index, ibegin, j_index & 113 115 , jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name & 114 , ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )116 , ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 115 117 116 118 END SUBROUTINE xios(set_domain_attr_hdl) … … 120 122 , data_i_index_, data_ibegin_, data_j_index_, data_jbegin_, data_ni_, data_nj_, domain_ref_ & 121 123 , i_index_, ibegin_, j_index_, jbegin_, latvalue_1d_, latvalue_2d_, long_name_, lonvalue_1d_ & 122 , lonvalue_2d_, mask_1d_, mask_2d_, name_, ni_, ni_glo_, nj_, nj_glo_, nvertex_, standard_name_ &124 , lonvalue_2d_, mask_1d_, mask_2d_, name_, ni_, ni_glo_, nj_, nj_glo_, nvertex_, prec_, standard_name_ & 123 125 , type_ ) 124 126 … … 157 159 INTEGER , OPTIONAL, INTENT(IN) :: nj_glo_ 158 160 INTEGER , OPTIONAL, INTENT(IN) :: nvertex_ 161 INTEGER , OPTIONAL, INTENT(IN) :: prec_ 159 162 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_ 160 163 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_ … … 314 317 ENDIF 315 318 319 IF (PRESENT(prec_)) THEN 320 CALL cxios_set_domain_prec & 321 (domain_hdl%daddr, prec_) 322 ENDIF 323 316 324 IF (PRESENT(standard_name_)) THEN 317 325 CALL cxios_set_domain_standard_name & … … 330 338 , data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, i_index, ibegin, j_index & 331 339 , jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name & 332 , ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )340 , ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 333 341 334 342 IMPLICIT NONE … … 367 375 INTEGER , OPTIONAL, INTENT(OUT) :: nj_glo 368 376 INTEGER , OPTIONAL, INTENT(OUT) :: nvertex 377 INTEGER , OPTIONAL, INTENT(OUT) :: prec 369 378 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name 370 379 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type … … 376 385 , data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, i_index, ibegin, j_index & 377 386 , jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name & 378 , ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )387 , ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 379 388 380 389 END SUBROUTINE xios(get_domain_attr) … … 384 393 , data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, i_index, ibegin, j_index & 385 394 , jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name & 386 , ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )395 , ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 387 396 388 397 IMPLICIT NONE … … 420 429 INTEGER , OPTIONAL, INTENT(OUT) :: nj_glo 421 430 INTEGER , OPTIONAL, INTENT(OUT) :: nvertex 431 INTEGER , OPTIONAL, INTENT(OUT) :: prec 422 432 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name 423 433 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type … … 427 437 , data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, i_index, ibegin, j_index & 428 438 , jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name & 429 , ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )439 , ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 430 440 431 441 END SUBROUTINE xios(get_domain_attr_hdl) … … 435 445 , data_i_index_, data_ibegin_, data_j_index_, data_jbegin_, data_ni_, data_nj_, domain_ref_ & 436 446 , i_index_, ibegin_, j_index_, jbegin_, latvalue_1d_, latvalue_2d_, long_name_, lonvalue_1d_ & 437 , lonvalue_2d_, mask_1d_, mask_2d_, name_, ni_, ni_glo_, nj_, nj_glo_, nvertex_, standard_name_ &447 , lonvalue_2d_, mask_1d_, mask_2d_, name_, ni_, ni_glo_, nj_, nj_glo_, nvertex_, prec_, standard_name_ & 438 448 , type_ ) 439 449 … … 472 482 INTEGER , OPTIONAL, INTENT(OUT) :: nj_glo_ 473 483 INTEGER , OPTIONAL, INTENT(OUT) :: nvertex_ 484 INTEGER , OPTIONAL, INTENT(OUT) :: prec_ 474 485 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_ 475 486 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_ … … 629 640 ENDIF 630 641 642 IF (PRESENT(prec_)) THEN 643 CALL cxios_get_domain_prec & 644 (domain_hdl%daddr, prec_) 645 ENDIF 646 631 647 IF (PRESENT(standard_name_)) THEN 632 648 CALL cxios_get_domain_standard_name & … … 645 661 , data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, i_index, ibegin, j_index & 646 662 , jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name & 647 , ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )663 , ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 648 664 649 665 IMPLICIT NONE … … 710 726 LOGICAL, OPTIONAL, INTENT(OUT) :: nvertex 711 727 LOGICAL(KIND=C_BOOL) :: nvertex_tmp 728 LOGICAL, OPTIONAL, INTENT(OUT) :: prec 729 LOGICAL(KIND=C_BOOL) :: prec_tmp 712 730 LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name 713 731 LOGICAL(KIND=C_BOOL) :: standard_name_tmp … … 721 739 , data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, i_index, ibegin, j_index & 722 740 , jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name & 723 , ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )741 , ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 724 742 725 743 END SUBROUTINE xios(is_defined_domain_attr) … … 729 747 , data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, i_index, ibegin, j_index & 730 748 , jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name & 731 , ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )749 , ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 732 750 733 751 IMPLICIT NONE … … 793 811 LOGICAL, OPTIONAL, INTENT(OUT) :: nvertex 794 812 LOGICAL(KIND=C_BOOL) :: nvertex_tmp 813 LOGICAL, OPTIONAL, INTENT(OUT) :: prec 814 LOGICAL(KIND=C_BOOL) :: prec_tmp 795 815 LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name 796 816 LOGICAL(KIND=C_BOOL) :: standard_name_tmp … … 802 822 , data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, i_index, ibegin, j_index & 803 823 , jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name & 804 , ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )824 , ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 805 825 806 826 END SUBROUTINE xios(is_defined_domain_attr_hdl) … … 810 830 , data_i_index_, data_ibegin_, data_j_index_, data_jbegin_, data_ni_, data_nj_, domain_ref_ & 811 831 , i_index_, ibegin_, j_index_, jbegin_, latvalue_1d_, latvalue_2d_, long_name_, lonvalue_1d_ & 812 , lonvalue_2d_, mask_1d_, mask_2d_, name_, ni_, ni_glo_, nj_, nj_glo_, nvertex_, standard_name_ &832 , lonvalue_2d_, mask_1d_, mask_2d_, name_, ni_, ni_glo_, nj_, nj_glo_, nvertex_, prec_, standard_name_ & 813 833 , type_ ) 814 834 … … 875 895 LOGICAL, OPTIONAL, INTENT(OUT) :: nvertex_ 876 896 LOGICAL(KIND=C_BOOL) :: nvertex__tmp 897 LOGICAL, OPTIONAL, INTENT(OUT) :: prec_ 898 LOGICAL(KIND=C_BOOL) :: prec__tmp 877 899 LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name_ 878 900 LOGICAL(KIND=C_BOOL) :: standard_name__tmp … … 1060 1082 ENDIF 1061 1083 1084 IF (PRESENT(prec_)) THEN 1085 prec__tmp = cxios_is_defined_domain_prec & 1086 (domain_hdl%daddr) 1087 prec_ = prec__tmp 1088 ENDIF 1089 1062 1090 IF (PRESENT(standard_name_)) THEN 1063 1091 standard_name__tmp = cxios_is_defined_domain_standard_name & -
XIOS/dev/dev_olga/src/interface/fortran_attr/idomaingroup_attr.F90
r966 r1158 15 15 , data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, group_ref & 16 16 , i_index, ibegin, j_index, jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d & 17 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )17 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 18 18 19 19 IMPLICIT NONE … … 53 53 INTEGER , OPTIONAL, INTENT(IN) :: nj_glo 54 54 INTEGER , OPTIONAL, INTENT(IN) :: nvertex 55 INTEGER , OPTIONAL, INTENT(IN) :: prec 55 56 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name 56 57 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type … … 62 63 , data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, group_ref & 63 64 , i_index, ibegin, j_index, jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d & 64 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )65 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 65 66 66 67 END SUBROUTINE xios(set_domaingroup_attr) … … 70 71 , data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, group_ref & 71 72 , i_index, ibegin, j_index, jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d & 72 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )73 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 73 74 74 75 IMPLICIT NONE … … 107 108 INTEGER , OPTIONAL, INTENT(IN) :: nj_glo 108 109 INTEGER , OPTIONAL, INTENT(IN) :: nvertex 110 INTEGER , OPTIONAL, INTENT(IN) :: prec 109 111 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name 110 112 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type … … 114 116 , data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, group_ref & 115 117 , i_index, ibegin, j_index, jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d & 116 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )118 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 117 119 118 120 END SUBROUTINE xios(set_domaingroup_attr_hdl) … … 122 124 , data_i_index_, data_ibegin_, data_j_index_, data_jbegin_, data_ni_, data_nj_, domain_ref_ & 123 125 , group_ref_, i_index_, ibegin_, j_index_, jbegin_, latvalue_1d_, latvalue_2d_, long_name_, lonvalue_1d_ & 124 , lonvalue_2d_, mask_1d_, mask_2d_, name_, ni_, ni_glo_, nj_, nj_glo_, nvertex_, standard_name_ &126 , lonvalue_2d_, mask_1d_, mask_2d_, name_, ni_, ni_glo_, nj_, nj_glo_, nvertex_, prec_, standard_name_ & 125 127 , type_ ) 126 128 … … 160 162 INTEGER , OPTIONAL, INTENT(IN) :: nj_glo_ 161 163 INTEGER , OPTIONAL, INTENT(IN) :: nvertex_ 164 INTEGER , OPTIONAL, INTENT(IN) :: prec_ 162 165 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_ 163 166 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_ … … 322 325 ENDIF 323 326 327 IF (PRESENT(prec_)) THEN 328 CALL cxios_set_domaingroup_prec & 329 (domaingroup_hdl%daddr, prec_) 330 ENDIF 331 324 332 IF (PRESENT(standard_name_)) THEN 325 333 CALL cxios_set_domaingroup_standard_name & … … 338 346 , data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, group_ref & 339 347 , i_index, ibegin, j_index, jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d & 340 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )348 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 341 349 342 350 IMPLICIT NONE … … 376 384 INTEGER , OPTIONAL, INTENT(OUT) :: nj_glo 377 385 INTEGER , OPTIONAL, INTENT(OUT) :: nvertex 386 INTEGER , OPTIONAL, INTENT(OUT) :: prec 378 387 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name 379 388 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type … … 385 394 , data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, group_ref & 386 395 , i_index, ibegin, j_index, jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d & 387 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )396 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 388 397 389 398 END SUBROUTINE xios(get_domaingroup_attr) … … 393 402 , data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, group_ref & 394 403 , i_index, ibegin, j_index, jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d & 395 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )404 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 396 405 397 406 IMPLICIT NONE … … 430 439 INTEGER , OPTIONAL, INTENT(OUT) :: nj_glo 431 440 INTEGER , OPTIONAL, INTENT(OUT) :: nvertex 441 INTEGER , OPTIONAL, INTENT(OUT) :: prec 432 442 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name 433 443 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type … … 437 447 , data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, group_ref & 438 448 , i_index, ibegin, j_index, jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d & 439 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )449 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 440 450 441 451 END SUBROUTINE xios(get_domaingroup_attr_hdl) … … 445 455 , data_i_index_, data_ibegin_, data_j_index_, data_jbegin_, data_ni_, data_nj_, domain_ref_ & 446 456 , group_ref_, i_index_, ibegin_, j_index_, jbegin_, latvalue_1d_, latvalue_2d_, long_name_, lonvalue_1d_ & 447 , lonvalue_2d_, mask_1d_, mask_2d_, name_, ni_, ni_glo_, nj_, nj_glo_, nvertex_, standard_name_ &457 , lonvalue_2d_, mask_1d_, mask_2d_, name_, ni_, ni_glo_, nj_, nj_glo_, nvertex_, prec_, standard_name_ & 448 458 , type_ ) 449 459 … … 483 493 INTEGER , OPTIONAL, INTENT(OUT) :: nj_glo_ 484 494 INTEGER , OPTIONAL, INTENT(OUT) :: nvertex_ 495 INTEGER , OPTIONAL, INTENT(OUT) :: prec_ 485 496 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_ 486 497 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_ … … 645 656 ENDIF 646 657 658 IF (PRESENT(prec_)) THEN 659 CALL cxios_get_domaingroup_prec & 660 (domaingroup_hdl%daddr, prec_) 661 ENDIF 662 647 663 IF (PRESENT(standard_name_)) THEN 648 664 CALL cxios_get_domaingroup_standard_name & … … 661 677 , data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, group_ref & 662 678 , i_index, ibegin, j_index, jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d & 663 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )679 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 664 680 665 681 IMPLICIT NONE … … 728 744 LOGICAL, OPTIONAL, INTENT(OUT) :: nvertex 729 745 LOGICAL(KIND=C_BOOL) :: nvertex_tmp 746 LOGICAL, OPTIONAL, INTENT(OUT) :: prec 747 LOGICAL(KIND=C_BOOL) :: prec_tmp 730 748 LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name 731 749 LOGICAL(KIND=C_BOOL) :: standard_name_tmp … … 739 757 , data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni, data_nj, domain_ref, group_ref & 740 758 , i_index, ibegin, j_index, jbegin, latvalue_1d, latvalue_2d, long_name, lonvalue_1d, lonvalue_2d & 741 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name, type )759 , mask_1d, mask_2d, name, ni, ni_glo, nj, nj_glo, nvertex, prec, standard_name, type ) 742 760 743 761 END SUBROUTINE xios(is_defined_domaingroup_attr)