# Changeset 1158

Ignore:
Timestamp:
06/06/17 17:58:16 (3 years ago)
Message:

Two server levels: merging with trunk r1137.
There are bugs.

Location:
XIOS/dev/dev_olga
Files:
202 edited

Unmodified
Removed
• ## XIOS/dev/dev_olga/extern/remap/src/elt.hpp

 r923 } void insert_vertex(int i, const Coord& v) { for(int j=n; j > i ; j--) { vertex[j]=vertex[j-1] ; edge[j]=edge[j-1] ; d[j]=d[j-1] ; neighbour[j]=neighbour[j-1] ; } vertex[i+1]=v ; n++ ; } int neighbour[NMAX]; 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 } /** New methods to find an insert a neighbour in a cell of the source mesh. *  return true/false if cell b is a neighbour of a. if "insert" is true, then b will be inserted as a neighbour * in cell a . This is needed for 2 order interpolation that need neighboround for gradient computing. * A cell is a neighbour if : *  - it shares 2 countiguous vertex (ie an edge) with a *  - A vertex of b is located on one of an edge of a. **/ bool insertNeighbour( Elt& a, const Elt& b, bool insert ) { // for now suppose pole -> Oz Coord pole(0,0,1) ; Coord O, Oa1, Oa2,Ob1,Ob2,V1,V2 ; double da,db,alpha,alpha1,alpha2,delta ; for (int i = 0; i < a.n; i++) { for (int j = 0; j < b.n; j++) { // share a full edge ? be carefull at the orientation assert(squaredist(a.vertex[ i       ], b.vertex[ j       ]) > 1e-10*1e-10 || squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]) > 1e-10*1e-10); if (   squaredist(a.vertex[ i       ], b.vertex[ j           ]) < 1e-10*1e-10 && squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+b.n-1)%b.n]) < 1e-10*1e-10) { if (insert) a.neighbour[i] = b.id.ind ; return true; } // 1 or 2 vertices of b is located on an edge of a da=a.d[i] ; if (scalarprod(a.edge[i], pole) < 0) da=-da ; db=b.d[(j+b.n-1)%b.n] ; if (scalarprod(b.edge[(j+b.n-1)%b.n], pole) < 0) db=-db ; if ( fabs(da-db)<1e-10 ) { O=pole*da ; Oa1=a.vertex[i]-O ; Oa2=a.vertex[(i+1)%a.n]-O ; Ob1=b.vertex[j]-O ; Ob2=b.vertex[(j+b.n-1)%b.n]-O ; V1=crossprod(Oa1,Oa2) ; V2=crossprod(Ob1,Ob2) ; if (norm(crossprod(V1,V2))/(norm(V1)*norm(V2)) < 1e-10) { alpha = vectAngle(Oa1,Oa2,V1) ; alpha1= vectAngle(Oa1,Ob1,V1) ; alpha2= vectAngle(Oa1,Ob2,V1) ; delta= alpha2-alpha1 ; if (delta >= M_PI) delta=2*M_PI-delta ; else if (delta <= -M_PI) delta=2*M_PI+delta ; if (alpha >= 0) { if (alpha1 > 1e-10 && alpha1 < alpha-1e-10) { if (alpha2 > 1e-10 && alpha2 < alpha-1e-10) { assert(delta > 0) ; if (insert) { // insert both a.insert_vertex(i,b.vertex[(j+b.n-1)%b.n]); a.insert_vertex(i,b.vertex[j]); a.neighbour[i+1] = b.id.ind ; } return true ; } else { assert( delta > 0 ) ; if (insert) { //insert alpha1 a.insert_vertex(i,b.vertex[j]); a.neighbour[i+1] = b.id.ind ; } return true ; } } else if (alpha2 > 1e-10 && alpha2 < alpha-1e-10) { assert( delta > 0 ) ; if (insert) { // insert alpha2 a.insert_vertex(i,b.vertex[(j+b.n-1)%b.n]); a.neighbour[i] = b.id.ind ; } return true ; } else { // nothing to do } } else  // alpha < 0 { if (alpha1 < -1e-10 && alpha1 > alpha+1e-10) { if (alpha2 < -1e-10 && alpha2 > alpha+1e-10) { assert(delta < 0) ; if (insert) { // insert both a.insert_vertex(i,b.vertex[(j+b.n-1)%b.n]); a.insert_vertex(i,b.vertex[j]); a.neighbour[i+1] = b.id.ind ; } return true ; } else { assert(delta < 0) ; if (insert) { //insert alpha1 a.insert_vertex(i,b.vertex[j]); a.neighbour[i+1] = b.id.ind ; } return true ; } } else if (alpha2 < -1e-10 && alpha2 > alpha+1e-10) { assert(delta < 0) ; if (insert) { // insert alpha2 a.insert_vertex(i,b.vertex[(j+b.n-1)%b.n]); a.neighbour[i] = b.id.ind ; } return true ; } else { // nothing to do } } } } } } return false; } /** void set_neighbour(Elt& a, const Elt& b) { if (b.id.ind == a.id.ind) return; int idx = neighbour_idx(a, b); if (idx != NOT_FOUND) a.neighbour[idx] = b.id.ind; if (b.id.ind == a.id.ind) return; /* int idx = neighbour_idx(a, b); if (idx != NOT_FOUND) a.neighbour[idx] = b.id.ind; */ insertNeighbour(a,b,true) ; } /** return true if `a` and `b` share an edge */ bool isNeighbour(const Elt& a, const Elt& b) { return neighbour_idx(a, b) != NOT_FOUND; bool isNeighbour(Elt& a, const Elt& b) { // return neighbour_idx(a, b) != NOT_FOUND; return insertNeighbour(a,b,false) ; }
• ## XIOS/dev/dev_olga/extern/remap/src/intersect.hpp

 r688 void set_neighbour(Elt& elt, const Elt& elt2); bool isNeighbour(const Elt& elt, const Elt& elt2); bool isNeighbour(Elt& elt, const Elt& elt2); void intersect(Elt *a, Elt *b);
• ## XIOS/dev/dev_olga/extern/remap/src/mapper.cpp

 r923 } vector Mapper::computeWeights(int interpOrder, bool renormalize) vector Mapper::computeWeights(int interpOrder, bool renormalize, bool quantity) { vector timings; if (mpiRank == 0 && verbose) cout << "Remapping..." << endl; tic = cputime(); nWeights = remap(&targetElements[0], targetElements.size(), interpOrder, renormalize); nWeights = remap(&targetElements[0], targetElements.size(), interpOrder, renormalize, quantity); timings.push_back(cputime() - tic); @param order is the order of interpolaton (must be 1 or 2). */ int Mapper::remap(Elt *elements, int nbElements, int order, bool renormalize) int Mapper::remap(Elt *elements, int nbElements, int order, bool renormalize, bool quantity) { int mpiSize, mpiRank; int **sendElement = new int*[mpiSize]; /* indices of elements required from other rank */ double **recvValue = new double*[mpiSize]; double **recvArea = new double*[mpiSize]; Coord **recvGrad = new Coord*[mpiSize]; GloId **recvNeighIds = new GloId*[mpiSize]; /* ids of the of the source neighbours which also contribute through gradient */ sendElement[rank] = new int[nbSendElement[rank]]; recvValue[rank]   = new double[nbSendElement[rank]]; recvArea[rank]    = new double[nbSendElement[rank]]; if (order == 2) { int **recvElement = new int*[mpiSize]; double **sendValue = new double*[mpiSize]; double **sendArea = new double*[mpiSize]; Coord **sendGrad = new Coord*[mpiSize]; GloId **sendNeighIds = new GloId*[mpiSize]; MPI_Request *sendRequest = new MPI_Request[3*mpiSize]; MPI_Request *recvRequest = new MPI_Request[3*mpiSize]; MPI_Request *sendRequest = new MPI_Request[4*mpiSize]; MPI_Request *recvRequest = new MPI_Request[4*mpiSize]; for (int rank = 0; rank < mpiSize; rank++) { recvElement[rank] = new int[nbRecvElement[rank]]; sendValue[rank]   = new double[nbRecvElement[rank]]; sendArea[rank]   = new double[nbRecvElement[rank]]; if (order == 2) { } } MPI_Status *status = new MPI_Status[3*mpiSize]; MPI_Waitall(nbRecvRequest, recvRequest, status); MPI_Status *status = new MPI_Status[4*mpiSize]; MPI_Waitall(nbSendRequest, sendRequest, status); MPI_Waitall(nbRecvRequest, recvRequest, status); /* for all indices that have been received from requesting ranks: pack values and gradients, then send */ { sendValue[rank][j] = sstree.localElements[recvElement[rank][j]].val; sendArea[rank][j] = sstree.localElements[recvElement[rank][j]].area; if (order == 2) { MPI_Issend(sendValue[rank],  nbRecvElement[rank], MPI_DOUBLE, rank, 0, communicator, &sendRequest[nbSendRequest]); nbSendRequest++; MPI_Issend(sendArea[rank],  nbRecvElement[rank], MPI_DOUBLE, rank, 0, communicator, &sendRequest[nbSendRequest]); nbSendRequest++; if (order == 2) { MPI_Irecv(recvValue[rank],  nbSendElement[rank], MPI_DOUBLE, rank, 0, communicator, &recvRequest[nbRecvRequest]); nbRecvRequest++; MPI_Irecv(recvArea[rank],  nbSendElement[rank], MPI_DOUBLE, rank, 0, communicator, &recvRequest[nbRecvRequest]); nbRecvRequest++; if (order == 2) { } } MPI_Waitall(nbSendRequest, sendRequest, status); MPI_Waitall(nbRecvRequest, recvRequest, status); MPI_Waitall(nbSendRequest, sendRequest, status); /* now that all values and gradients are available use them to computed interpolated values on target int rank = (*it)->id.rank; double fk = recvValue[rank][n1]; double srcArea = recvArea[rank][n1]; double w = (*it)->area; if (quantity) w/=srcArea ; /* first order: src value times weight (weight = supermesh area), later divide by target area */ int kk = (order == 2) ? n1 * (NMAX + 1) : n1; GloId neighID = recvNeighIds[rank][kk]; wgt_map[neighID] += (*it)->area; wgt_map[neighID] += w; if (order == 2) for (map::iterator it = wgt_map.begin(); it != wgt_map.end(); it++) { this->remapMatrix[i] = (it->second / e.area) / renorm; if (quantity)  this->remapMatrix[i] = (it->second ) / renorm; else this->remapMatrix[i] = (it->second / e.area) / renorm; this->srcAddress[i] = it->first.ind; this->srcRank[i] = it->first.rank; delete[] sendElement[rank]; delete[] recvValue[rank]; delete[] recvArea[rank]; if (order == 2) { delete[] recvElement[rank]; delete[] sendValue[rank]; delete[] sendArea[rank]; if (order == 2) delete[] sendGrad[rank];
• ## XIOS/dev/dev_olga/extern/remap/src/mapper.hpp

 r844 /** @param trgElts are the elements of the unstructured target grid Returns the timings for substeps: */ vector computeWeights(int interpOrder, bool renormalize=false); vector computeWeights(int interpOrder, bool renormalize=false, bool quantity=false); int getNbWeights(void) { return nWeights ; } /* private: /** @return number of weights (local to cpu) */ int remap(Elt* elements, int nbElements, int order, bool renormalize=false); int remap(Elt* elements, int nbElements, int order, bool renormalize=false, bool quantity=false); void buildMeshTopology();
• ## XIOS/dev/dev_olga/extern/remap/src/tree.cpp

 r951 root->parent = 0; root->leafCount = 0; root->centre = ORIGIN; // initialize root node on the sphere root->centre.x=1 ; root->centre.y=0 ; root->centre.z=0 ; root->radius = 0.; root->reinserted = false;
• ## XIOS/dev/dev_olga/extern/remap/src/triple.cpp

 r849 } // return oriented vector angle in range [-pi..pi], pole must be orthogonal to a and b double vectAngle(const Coord &a, const Coord &b, const Coord &pole) { double nab = 1./(norm(a)*norm(b)) ; Coord a_cross_b=crossprod(a, b)*nab ; double sinVect ; if (scalarprod(a_cross_b, pole) >= 0) sinVect=norm(a_cross_b) ; else sinVect=-norm(a_cross_b) ; double cosVect=scalarprod(a,b)*nab ; return atan2(sinVect,cosVect) ; } }
• ## XIOS/dev/dev_olga/extern/remap/src/triple.hpp

 r688 double angle(const Coord &a, const Coord &b, const Coord &pole); // return oriented vector angle in range [-pi..pi], pole must be orthogonal to a and b double vectAngle(const Coord &a, const Coord &b, const Coord &pole) ; void print_Coord(Coord &p);
• ## XIOS/dev/dev_olga/src/array_new.hpp

 r731 } bool operator== (const CArray& array) { size_t nbThis = this->numElements(); size_t nbArr  = array.numElements(); if (nbThis != nbArr) return false; typename Array::const_iterator itx=array.begin(), itxe=array.end(), ity=this->begin() ; for(;itx!=itxe;++itx,++ity) if (*itx!=*ity) return false ; return true; } bool operator== (const Array& array) { return ((*this) == (dynamic_cast& >(array))); } void resize(int extent) { }; #define macro(NRANK)\ \ template <>\ inline size_t CArray::size(void) const\ {\ size_t size=(1 + NRANK) * sizeof(int) ;\ Array::const_iterator it, itb=this->begin(), ite=this->end() ;\ \ for(it=itb;it!=ite;++it)\ {\ size+= sizeof(size_t) ;\ size+= (*it).size();\ } \ return size ;\ }\ \ /* for array string this function is an evaluation of maximum size of the array, considering stringArrayLen is the maximum size of the strings*/ \ template <>\ inline size_t CArray::size(sizeType numElements)\ {\ return (NRANK + 1) * sizeof(int) + numElements * stringArrayLen;\ }\ \ template <>\ inline bool CArray::toBuffer(CBufferOut& buffer) const\ {\ bool ret;\ ret =  buffer.put(this->dimensions());\ ret &= buffer.put(this->shape().data(), this->dimensions());\ \ Array::const_iterator it, itb=this->begin(), ite=this->end() ;\ \ for(it=itb;it!=ite;++it)\ {\ ret &= buffer.put((*it).size()) ;\ ret &= buffer.put((*it).data(),(*it).size());\ } \ return ret;\ }\ \ template <>\ inline bool CArray::fromBuffer(CBufferIn& buffer)\ {\ bool ret;\ int numDim;\ TinyVector vect;\ size_t ne;\ \ ret =  buffer.get(numDim);\ ret &= buffer.get(vect.data(), NRANK);\ this->resize(vect);\ \ Array::iterator it, itb=this->begin(), ite=this->end() ;\ for(it=itb;it!=ite;++it)\ {\ ret &= buffer.get(ne) ;\ char* str = new char[ne] ;\ ret &= buffer.get(str, ne);\ *it = string(str,ne) ;\ delete [] str ;\ }\ initialized = true;\ return ret;\ } macro(1) macro(2) macro(3) macro(4) macro(5) macro(6) macro(7) #undef macro template inline CBufferOut& operator<<(CBufferOut& buffer, const CArray& array) {
• ## XIOS/dev/dev_olga/src/attribute.cpp

 r680 namespace xios { const StdString CAttribute::resetInheritanceStr("_reset_") ; /// ////////////////////// DÃ©finitions ////////////////////// /// CAttribute::CAttribute(const StdString & id) : CObject(id), CBaseType() : CObject(id), CBaseType(), _canInherite(true) //         , value() { /* Ne rien faire de plus */ } /* CAttribute::CAttribute(const CAttribute & attribut) : CObject(attribut.getId()),CBaseType() { //        this->value = attribut.getAnyValue(); } */ CAttribute::~CAttribute(void) ///-------------------------------------------------------------- /* const boost::any & CAttribute::getAnyValue(void) const { return (this->value); } void CAttribute::setAnyValue(const boost::any & value) { this->value = value; } void CAttribute::clear(void) { this->value = boost::any(); } //--------------------------------------------------------------- bool CAttribute::isEmpty(void) const { return (this->value.empty()); } */ const StdString & CAttribute::getName(void) const { ///-------------------------------------------------------------- CMessage& operator<<(CMessage& msg,CAttribute& type) {
• ## XIOS/dev/dev_olga/src/attribute.hpp

 r1025 { /// ////////////////////// DÃ©clarations ////////////////////// /// /*! \class CAttribute The fundamental class which describes the attributes of other different class in XIOS. This class only plays a role of interface, its class child will have specific implelemtation corresponding to type of attribute */ class CAttribute : public CObject, public virtual CBaseType { /// Constructeurs /// explicit CAttribute(const StdString & id); //            CAttribute(const CAttribute & attribut); //            CAttribute(const CAttribute * const attribut); // Not implemented. /// Accesseurs /// const StdString & getName(void) const; //            const boost::any & getAnyValue(void) const; //            template inline T getValue(void) const; //            template inline T* getRef(void); //            /// Mutateurs /// //            template inline void setValue(const T & value); //            void setAnyValue(const boost::any & value); //            void clear(void); /// Test /// //            bool isEmpty(void) const; //            template inline bool isType(void) const; virtual void set(const CAttribute& ) =0 ; virtual void reset(void ) =0 ; virtual StdString toString(void) const = 0; virtual void fromString(const StdString & str) = 0; //            virtual void toBinary  (StdOStream & os) const = 0; //            virtual void fromBinary(StdIStream & is) = 0; virtual bool isEqual(const CAttribute& ) = 0; //! Returns true if and only if the attribute should be publicly exposed in the API virtual bool doSend() const { return true; } /* Groupd of functions to generate C and Fortran interface */ virtual void generateCInterface(ostream& oss, const string& className) = 0 ; virtual void generateCInterfaceIsDefined(ostream& oss, const string& className) ; virtual void setInheritedValue(const CAttribute& ) = 0 ; virtual bool hasInheritedValue(void) const = 0; protected : /// Constructeurs /// //            CAttribute(void);  // Not implemented. /// PropriÃ©tÃ© /// //            boost::any value; bool canInherite(void) {return _canInherite ;} protected : bool _canInherite ; static const StdString resetInheritanceStr ; }; // class CAttribute /// ////////////////////// DÃ©finitions ////////////////////// /// /* template T CAttribute::getValue(void) const { return (boost::any_cast(this->value)); } template T* CAttribute::getRef(void) { return (boost::any_cast(&value)); } template void CAttribute::setValue(const T & value) { this->value = value; } template bool CAttribute::isType(void) const { return (this->value.type() == typeid(T)); } */ CMessage& operator<<(CMessage& msg,CAttribute& type) ; CMessage& operator<<(CMessage& msg, const CAttribute&  type) ;
• ## XIOS/dev/dev_olga/src/attribute_array.hpp

 r780 { /// ////////////////////// DÃ©clarations ////////////////////// /// /*! \class CAttributeArray This class implements the attribute representing array of value */ template class CAttributeArray : public CAttribute, public CArray using CArray::operator = ; //           using Array::operator = ; /// Constructeurs /// CArray getInheritedValue(void) const ; bool hasInheritedValue(void) const; bool isEqual(const CAttributeArray& attr); bool isEqual(const CAttribute& attr); /// Destructeur /// /// Autre /// virtual string toString(void) const { return _toString();} virtual void fromString(const StdString & str) { _fromString(str);} virtual void fromString(const StdString & str) { if (str==resetInheritanceStr) { reset(); _canInherite=false ;}  else _fromString(str);} virtual bool toBuffer  (CBufferOut& buffer) const { return _toBuffer(buffer);} virtual bool fromBuffer(CBufferIn& buffer) { return _fromBuffer(buffer); } virtual void generateFortranInterfaceGetDeclaration(ostream& oss,const string& className) ; protected : /// Constructeurs /// private : CArray inheritedValue ;
• ## XIOS/dev/dev_olga/src/attribute_array_decl.cpp

 r932 template class CAttributeArray ; template class CAttributeArray ; template class CAttributeArray ; template class CAttributeArray ; }
• ## XIOS/dev/dev_olga/src/attribute_array_impl.hpp

 r778 void CAttributeArray::setInheritedValue(const CAttributeArray& attr) { if (this->isEmpty() && attr.hasInheritedValue()) if (this->isEmpty() && _canInherite && attr.hasInheritedValue()) { inheritedValue.resize(attr.shape()) ; } template bool CAttributeArray::isEqual(const CAttributeArray& attr) { return ((dynamic_cast& >(*this)) == (dynamic_cast& >(attr))); } template bool CAttributeArray::isEqual(const CAttribute& attr) { return ((*this) == (dynamic_cast& >(attr))); } template
• ## XIOS/dev/dev_olga/src/attribute_enum.hpp

 r591 { /// ////////////////////// Déclarations ////////////////////// /// /*! \class CAttributeEnum This class implements the attribute representing enumeration */ template class CAttributeEnum : public CAttribute, public CEnum bool hasInheritedValue(void) const; bool isEqual(const CAttributeEnum& attr ); bool isEqual(const CAttribute& attr ); /// Destructeur /// virtual ~CAttributeEnum(void) { } /// Autre /// virtual StdString toString(void) const { return _toString();} virtual void fromString(const StdString & str) { _fromString(str);} virtual void fromString(const StdString & str) { if (str==resetInheritanceStr) { reset(); _canInherite=false ;}  else _fromString(str);} virtual bool toBuffer  (CBufferOut& buffer) const { return _toBuffer(buffer);} virtual void generateFortranInterfaceGetDeclaration(ostream& oss,const string& className) ; protected : /// Constructeurs /// //            CAttributeTemplate(void); // Not implemented. private : StdString _toString(void) const;
• ## XIOS/dev/dev_olga/src/attribute_enum_impl.hpp

 r580 void CAttributeEnum::setInheritedValue(const CAttributeEnum& attr) { if (this->isEmpty() && attr.hasInheritedValue()) inheritedValue.set(attr.getInheritedValue()); if (this->isEmpty() && _canInherite && attr.hasInheritedValue()) inheritedValue.set(attr.getInheritedValue()); } { return !this->isEmpty() || !inheritedValue.isEmpty(); } template bool CAttributeEnum::isEqual(const CAttribute& attr) { return (this->isEqual(dynamic_cast& >(attr))); } template bool CAttributeEnum::isEqual(const CAttributeEnum& attr) { return ((dynamic_cast& >(*this)) == (dynamic_cast& >(attr))); }
• ## XIOS/dev/dev_olga/src/attribute_map.cpp

 r1009 ///-------------------------------------------------------------- /*! Clear all attributes of an object and reset them to empty state */ void CAttributeMap::clearAllAttributes(void) { //--------------------------------------------------------------- /* Clear an attribute and reset its value \param[in] key id of attribute */ void CAttributeMap::clearAttribute(const StdString& key) { //--------------------------------------------------------------- /*! Set an attribute of certain id with a value \param[in] key id of the attribute \param[in] attr value of attribute */ void CAttributeMap::setAttribute(const StdString& key, CAttribute* const attr) { //--------------------------------------------------------------- /*! Subscript operator. Return attribute with a specific id */ CAttribute* CAttributeMap::operator[](const StdString& key) { } } /*! Compare two attribute maps \param [in] another attribute map to compare \param [in] excludedAttrs attribute to be excluded from comparasion \return true if these two maps have same attributes whose value are identical */ bool CAttributeMap::isEqual(const CAttributeMap& another, const vector& excludedAttrs) { SuperClassMap::const_iterator itb = another.begin(), ite = another.end(), it; for (it = itb; it !=ite; ++it) { bool excluded = false; for (int idx = 0; idx < excludedAttrs.size(); ++idx) { if (0 == (*it).first.compare(excludedAttrs[idx])) { excluded = true; break; } } if (!excluded) { if ((*it).first.compare(StdString("id")) != 0 && (*it).first.compare(StdString("src")) != 0) { if (this->hasAttribute(it->first)) { if (!((*it).second->isEqual(*(*this)[it->first]))) { return false; } } else return false; } } } return true; } //--------------------------------------------------------------- if (apply) { if (currentAtt->isEmpty() && !el.second->isEmpty()) if (currentAtt->isEmpty() && currentAtt->canInherite() && !el.second->isEmpty()) { this->setAttribute(el.first, el.second); } /*! Duplicate attribute map with a specific attribute map. Copy all non-empty attribute of the current attribute map \param [in] srcAttr attribute map which is copied from. */ void CAttributeMap::duplicateAttributes(const CAttributeMap* const srcAttr) { } */ void CAttributeMap::generateCInterface(ostream& oss, const string& className) {
• ## XIOS/dev/dev_olga/src/attribute_map.hpp

 r1009 { /// ////////////////////// DÃ©clarations ////////////////////// /// /*! \class CAttributeMap This class represents the set of attributes which an object can have. Each attribute in the set is represented by an unique id. */ class CAttributeMap : public xios_map void clearAttribute(const StdString& key); bool isEqual(const CAttributeMap& another, const vector& excludedAttrs); /// Destructeur /// inline bool CAttributeMap::hasAttribute(const StdString& key) const { return (this->find(key) != this->end()); return (this->find(key) != this->end()); }
• ## XIOS/dev/dev_olga/src/attribute_template.hpp

 r780 { /// ////////////////////// DÃ©clarations ////////////////////// /// /*! \class CAttributeTemplate The class implements attribute of some basic types */ template class CAttributeTemplate : public CAttribute, public CType bool hasInheritedValue(void) const; bool isEqual_(const CAttributeTemplate& attr ); bool isEqual(const CAttribute& attr ); /// Destructeur /// virtual ~CAttributeTemplate(void) { } /// Autre /// virtual StdString toString(void) const { return _toString();} virtual void fromString(const StdString & str) { _fromString(str);} virtual void fromString(const StdString & str) { if (str==resetInheritanceStr) { reset(); _canInherite=false ;}  else _fromString(str);} //            virtual CAttributeTemplate* clone() const {} //            virtual void toBinary  (StdOStream & os) const;
• ## XIOS/dev/dev_olga/src/attribute_template_impl.hpp

 r778 T CAttributeTemplate::getValue(void) const { return CType::get() ; /* if (SuperClass::isEmpty()) { ERROR("T CAttributeTemplate::getValue(void) const", << "[ id = " << this->getId() << "]" << " L'attribut est requis mais n'est pas dÃ©fini !"); } return (SuperClass::getValue()); return CType::get() ; /* if (SuperClass::isEmpty()) { ERROR("T CAttributeTemplate::getValue(void) const", << "[ id = " << this->getId() << "]" << " L'attribut est requis mais n'est pas dÃ©fini !"); } return (SuperClass::getValue()); */ } void CAttributeTemplate::setInheritedValue(const CAttributeTemplate& attr) { if (this->isEmpty() && attr.hasInheritedValue()) inheritedValue.set(attr.getInheritedValue()) ; if (this->isEmpty() && _canInherite && attr.hasInheritedValue()) inheritedValue.set(attr.getInheritedValue()) ; } { return !this->isEmpty() || !inheritedValue.isEmpty() ; } template bool CAttributeTemplate::isEqual(const CAttribute& attr) { const CAttributeTemplate& tmp = dynamic_cast& >(attr); return this->isEqual_(tmp); } template bool CAttributeTemplate::isEqual_(const CAttributeTemplate& attr) { if ((!this->hasInheritedValue() && !attr.hasInheritedValue())) return true; if (this->hasInheritedValue() && attr.hasInheritedValue()) return (this->getInheritedValue() == attr.getInheritedValue()); else return false; }
• ## XIOS/dev/dev_olga/src/client.cpp

 r1152 MPI_Comm CClient::interComm ; std::list CClient::contextInterComms; int CClient::serverLeader; int CClient::serverLeader ; bool CClient::is_MPI_Initialized ; int CClient::rank_ = INVALID_RANK; } CTimer::get("XIOS").resume() ; CTimer::get("XIOS init").resume() ; CTimer::get("XIOS init/finalize").resume() ; boost::hash hashString ; unsigned long hashClient = hashString(codeId) ; unsigned long hashServer = hashString(CXios::xiosCodeId); //          unsigned long hashServer = hashString(CXios::xiosCodeIdPrm); unsigned long hashClient=hashString(codeId) ; unsigned long hashServer=hashString(CXios::xiosCodeId) ; unsigned long* hashAll ; int size ; hashAll=new unsigned long[size] ; MPI_Allgather(&hashClient, 1, MPI_LONG, hashAll, 1, MPI_LONG, CXios::globalComm) ; MPI_Allgather(&hashClient,1,MPI_LONG,hashAll,1,MPI_LONG,CXios::globalComm) ; map colors ; for (i=0; i < size; ++i) { if (hashAll[i] == hashString(CXios::xiosCodeId)) if (hashServer == hashAll[i]) { CXios::setUsingServer(); CTimer::get("XIOS").resume() ; CTimer::get("XIOS init").resume() ; CTimer::get("XIOS init/finalize").resume() ; if (CXios::usingServer) int messageSize=msg.size() ; void * buff = new char[messageSize] ; CBufferOut buffer(buff,messageSize) ; char * buff = new char[messageSize] ; CBufferOut buffer((void*)buff,messageSize) ; buffer<
• ## XIOS/dev/dev_olga/src/client.hpp

 r1148 public: static void initialize(const string& codeId, MPI_Comm& localComm, MPI_Comm& returnComm); static void finalize(void); static void registerContext(const string& id, MPI_Comm contextComm);
• ## XIOS/dev/dev_olga/src/client_client_dht_template_impl.hpp

 r1030 indexToInfoMappingLevel_.swap(indexToInfoMapping); if (0 != recvNbIndexCount) delete [] recvIndexBuff; for (boost::unordered_map::const_iterator it = client2ClientIndex.begin();
• ## XIOS/dev/dev_olga/src/client_server_mapping.hpp

 r1030 public: typedef boost::unordered_map > GlobalIndexMap; //  typedef boost::map > GlobalIndexMap; public: /** Default constructor */
• ## XIOS/dev/dev_olga/src/config/axis_attribute.conf

 r1025 DECLARE_ATTRIBUTE(int,       n_glo) DECLARE_ENUM2(positive, up, down) DECLARE_ENUM2(positive, up, down) /* GLOBAL */ DECLARE_ARRAY(bool, 1 , mask) DECLARE_ARRAY(double, 2 , bounds) DECLARE_ATTRIBUTE(int,       prec) DECLARE_ARRAY(StdString    ,1    , label)
• ## XIOS/dev/dev_olga/src/config/domain_attribute.conf

 r1025 DECLARE_ENUM4(type,rectilinear,curvilinear,unstructured, gaussian) DECLARE_ATTRIBUTE(StdString, domain_ref) DECLARE_ATTRIBUTE(int,       prec)

• ## XIOS/dev/dev_olga/src/config/expand_domain_attribute.conf

 r941 DECLARE_ENUM2(type,node,edge) // Flag to determine if domain expension should be periodic (and in which direction) DECLARE_ATTRIBUTE(bool,      i_periodic) DECLARE_ATTRIBUTE(bool,      j_periodic)
• ## XIOS/dev/dev_olga/src/config/file_attribute.conf

 r983 DECLARE_ENUM2(format,        netcdf4, netcdf4_classic) DECLARE_ENUM2(convention,    CF, UGRID) DECLARE_ATTRIBUTE(StdString, convention_str) DECLARE_ENUM2(par_access,    collective, independent) DECLARE_ATTRIBUTE(bool,      append) DECLARE_ENUM2(mode,          read, write) DECLARE_ENUM4(time_counter,  centered, instant, record, none) DECLARE_ENUM7(time_counter,  centered, instant, record, exclusive, centered_exclusive, instant_exclusive, none) DECLARE_ATTRIBUTE(StdString, time_counter_name) DECLARE_ENUM2(time_units, seconds, days) DECLARE_ATTRIBUTE(int,       record_offset) DECLARE_ATTRIBUTE(bool,      cyclic) DECLARE_ATTRIBUTE(int,       compression_level) DECLARE_ATTRIBUTE(bool,      coupler) DECLARE_ENUM4(timeseries,    none, only, both, exclusive) DECLARE_ATTRIBUTE(StdString, ts_prefix) DECLARE_ATTRIBUTE(StdString, time_stamp_name) DECLARE_ATTRIBUTE(StdString, time_stamp_format) DECLARE_ATTRIBUTE(StdString, uuid_name) DECLARE_ATTRIBUTE(StdString, uuid_format)
• ## XIOS/dev/dev_olga/src/config/interpolate_domain_attribute.conf

 r1021 /* GLOBAL */ DECLARE_ATTRIBUTE(StdString, file) DECLARE_ATTRIBUTE(int, order) DECLARE_ATTRIBUTE(bool, renormalize) DECLARE_ATTRIBUTE(bool, quantity) /* Write interpolation weights into file */
• ## XIOS/dev/dev_olga/src/config/scalar_attribute.conf

 r887 DECLARE_ATTRIBUTE(StdString, scalar_ref) DECLARE_ATTRIBUTE(int, prec)
• ## XIOS/dev/dev_olga/src/config/var_attribute.conf

 r527 DECLARE_TYPE(type) DECLARE_ATTRIBUTE(StdString, name) DECLARE_ENUM4(ts_target, file, field, both, none)

• ## XIOS/dev/dev_olga/src/context_client.hpp

 r1148 MPI_Comm intraComm; //!< Communicator of client group map buffers;         //!< Buffers for connection to servers map buffers; //!< Buffers for connection to servers private:
• ## XIOS/dev/dev_olga/src/context_server.cpp

 r1139 { CContextServer::CContextServer(CContext* parent, MPI_Comm intraComm_,MPI_Comm interComm_) CContextServer::CContextServer(CContext* parent,MPI_Comm intraComm_,MPI_Comm interComm_) { context=parent; pendingEvent=true; } bool CContextServer::hasPendingEvent(void) { map::iterator it; for(it=buffers.begin();it!=buffers.end();++it) delete it->second; for(it=buffers.begin();it!=buffers.end();++it) delete it->second; } } } }
• ## XIOS/dev/dev_olga/src/context_server.hpp

 r1130 public: CContextServer(CContext* parent, MPI_Comm intraComm, MPI_Comm interComm) ; CContextServer(CContext* parent,MPI_Comm intraComm,MPI_Comm interComm) ; bool eventLoop(bool enableEventsProcessing = true); void listen(void) ; void checkPendingRequest(void) ; void processRequest(int rank, char* buff,int count) ; void processEvents(void) ; bool hasFinished(void); void setPendingEvent(void) ; bool hasPendingEvent(void) ; void processRequest(int rank, char* buff,int count) ; MPI_Comm intraComm ; private: std::map mapBufferSize_; std::map mapBufferSize_; } ;
• ## XIOS/dev/dev_olga/src/cxios.cpp

 r1130 string CXios::rootFile="./iodef.xml" ; string CXios::xiosCodeId="xios.x" ; //  string CXios::xiosCodeIdPrm="xios.x.1" ; //  string CXios::xiosCodeIdSnd="xios.x.2" ; string CXios::clientFile="./xios_client"; string CXios::serverFile="./xios_server"; bool CXios::isOptPerformance = true; CRegistry* CXios::globalRegistry = 0; double CXios::recvFieldTimeout = 10.0; //! Parse configuration file and create some objects from it bufferSizeFactor = getin("buffer_size_factor", defaultBufferSizeFactor); minBufferSize = getin("min_buffer_size", 1024 * sizeof(double)); recvFieldTimeout = getin("recv_field_timeout", 10.0); if (recvFieldTimeout < 0.0) ERROR("CXios::parseXiosConfig()", "recv_field_timeout cannot be negative."); globalComm=MPI_COMM_WORLD ; delete globalRegistry ; } CClient::closeInfoStream(); #ifdef XIOS_MEMTRACK #ifdef XIOS_MEMTRACK_LIGHT report(10) << " Memory report : current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; report(10) << " Memory report : maximum memory used by XIOS : "<<  MemTrack::getMaxMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; #endif #ifdef XIOS_MEMTRACK_FULL MemTrack::TrackListMemoryUsage() ; MemTrack::TrackDumpBlocks(); #endif CClient::closeInfoStream(); #endif } { initServer(); isClient = false; isServer = true; // Initialize all aspects MPI CServer::initialize(); isServer = true; isClient = false; if (CServer::getRank()==0) globalRegistry = new CRegistry(CServer::intraComm) ; } CServer::finalize(); #ifdef XIOS_MEMTRACK #ifdef XIOS_MEMTRACK_LIGHT report(10) << " Memory report : current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; report(10) << " Memory report : maximum memory used by XIOS : "<<  MemTrack::getMaxMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; #endif #ifdef XIOS_MEMTRACK_FULL MemTrack::TrackListMemoryUsage() ; MemTrack::TrackDumpBlocks(); #endif #endif CServer::closeInfoStream(); }
• ## XIOS/dev/dev_olga/src/cxios.hpp

 r1077 static bool isServer ; //!< Check if xios is server //     static int serverLevel ; static MPI_Comm globalComm ; //!< Global communicator static bool isOptPerformance; //!< Check if buffer size is for performance (as large as possible) static CRegistry* globalRegistry ; //!< global registry which is wrote by the root process of the servers static double recvFieldTimeout; //!< Time to wait for data before issuing an error when receiving a field public:
• ## XIOS/dev/dev_olga/src/data_output.cpp

 r887 //---------------------------------------------------------------- void CDataOutput::writeField(CField* field) void CDataOutput::writeFieldTimeAxis(CField* field) { CContext* context = CContext::getCurrent() ; boost::shared_ptr calendar = context->getCalendar(); this->writeTimeAxis_(field, calendar); } void CDataOutput::writeField(CField* field) { this->writeField_(field); this->writeTimeAxis_(field, calendar); }
• ## XIOS/dev/dev_olga/src/data_output.hpp

 r887 void closeFile     (void); void writeField    (CField* field); void writeFieldTimeAxis(CField* field) ; void writeFieldGrid(CField* field); void writeTimeDimension(void);
• ## XIOS/dev/dev_olga/src/date.cpp

 r647 hour = date.hour; minute = date.minute; second = date.second; return (*this); } bool CDate::operator==(const CDate& date) { return (&(*relCalendar) == &(*date.relCalendar) && year == date.year && month  == date.month  && day == date.day && hour == date.hour && minute == date.minute && second == date.second); }
• ## XIOS/dev/dev_olga/src/date.hpp

 r591 /// OpÃ©rateurs /// CDate& operator=(const CDate& date); bool operator==(const CDate& date); friend StdOStream& operator<<(StdOStream& out, const CDate& date); friend StdIStream& operator>>(StdIStream& in, CDate& date);
• ## XIOS/dev/dev_olga/src/declare_ref_func.hpp

 r1099 if (refer_ptr->hasAutoGeneratedId() &&                           \ refer_ptr->hasDirect##type##Reference())                     \ nameRef = refer_ptr->name_##_ref;                            \ nameRef = refer_ptr->name_##_ref;                              \ else {                                                           \ nameRef = refer_ptr->getId(); break;                           \ }                                                                \ if (tmpRefObjects.end() != tmpRefObjects.find(refer_ptr))        \ {                                                                \ nameRef = refer_ptr->getId(); break;                           \ }                                                                \ if (tmpRefObjects.end() != tmpRefObjects.find(refer_ptr))        \ {                                                                \ ERROR("const StdString& C" #type "::get" #type "OutputName(void) const ",      \ << "Circular dependency stopped for " #name_ " object "  \ << "with id = \"" << refer_ptr->getId() << "\".");       \ }                                                               \ << "Circular dependency stopped for " #name_ " object "  \ << "with id = \"" << refer_ptr->getId() << "\".");       \ }                                                                \ }                                                                  \ return nameRef;                                                    \
• ## XIOS/dev/dev_olga/src/dht_auto_indexing.cpp

 r924 for (itIdx = itbIdx; itIdx != iteIdx; ++itIdx) { (itIdx->second)[0] = beginIndexOnProc_ + idx; //      (itIdx->second)[0] = beginIndexOnProc_ + idx; (itIdx->second)[1] = beginIndexOnProc_ + idx; globalIndex_[idx] = beginIndexOnProc_ + idx; ++idx ;
• ## XIOS/dev/dev_olga/src/distribution_client.cpp

 r1144 infoIndex_.resize(this->dims_); // A trick to determine position of each domain in domainList int domIndex = 0, axisIndex = 0, scalarIndex = 0; idx = 0; elementLocalIndex_.resize(numElement_); elementGlobalIndex_.resize(numElement_); elementNLocal_.resize(numElement_); elementNGlobal_.resize(numElement_); elementNLocal_[0] = 1; elementNGlobal_[0] = 1; size_t localSize = 1, globalSize = 1; isDataDistributed_ = false; size_t localSize = 1, globalSize = 1; // A trick to determine position of each domain in domainList int domIndex = 0, axisIndex = 0, scalarIndex = 0; idx = 0; // Update all the vectors above for (idx = 0; idx < numElement_; ++idx)
• ## XIOS/dev/dev_olga/src/distribution_server.hpp

 r1144 virtual void createGlobalIndex(); void createGlobalIndexFromIndex(const std::vector >& globalIndexOnEachDimension, const std::vector& nbGlobal); protected: GlobalLocalMap globalLocalIndexMap_;
• ## XIOS/dev/dev_olga/src/duration.cpp

 r612 } /*! This operation may not serve much, it's here because of the need of operator== from generic class CType */ bool CDuration::operator==(const CDuration& duration) { return (year == duration.year && month  == duration.month  && day == duration.day && hour == duration.hour && minute == duration.minute && second == duration.second && timestep == duration.timestep); } StdOStream& operator<<(StdOStream& out, const CDuration& duration) { char   c = '/'; bool   invalidUnit = false; CDuration sentinel = NoneDu; #define setDuration(unit, value)                                                  \ {                                                                         \ if (sentinel.unit)                                                      \ ERROR("StdIStream& operator>>(StdIStream& in , CDuration& duration)", \ << "Bad duration format: " #unit " has already been set.");      \ \ duration.unit = value;                                                  \ sentinel.unit = 1.0;                                                    \ } do switch (c) { case 'y': duration.year   = v; break; case 'd': duration.day    = v; break; case 'h': duration.hour   = v; break; case 's': duration.second = v; break; case 'y': setDuration(year, v) break; case 'd': setDuration(day, v) break; case 'h': setDuration(hour, v) break; case 's': setDuration(second, v) break; case 'm': { in >> c; if      (c == 'i') duration.minute = v; else if (c == 'o') duration.month  = v; if      (c == 'i') setDuration(minute, v) else if (c == 'o') setDuration(month, v) else invalidUnit = true; break; { in >> c; if (c == 's') duration.timestep = v; if (c == 's') setDuration(timestep, v) else invalidUnit = true; break; << "Bad duration format: invalid unit, unexpected '" << c << "' character."); } while (in.peek() != EOF); // check whether there is a next character to read #undef setDuration return in;
• ## XIOS/dev/dev_olga/src/duration.hpp

 r612 /// OpÃ©rateurs /// CDuration& operator=(const CDuration& duration); bool operator==(const CDuration& duration); friend StdOStream& operator<<(StdOStream& out, const CDuration& duration);
• ## XIOS/dev/dev_olga/src/event_scheduler.cpp

 r992 size_t hashId=recvRequest->buffer[1] ; size_t lev=recvRequest->buffer[2] ; //        delete recvRequest ; delete recvRequest ; pendingRecvParentRequest.pop() ; if (lev==level) eventStack.push(pair(timeLine,hashId)) ; else  bcastEvent(timeLine, hashId, lev) ; delete recvRequest ; } }
• ## XIOS/dev/dev_olga/src/filter/file_server_writer_filter.cpp

 r1026 field->writeUpdateData(data[0]->data); } bool CFileServerWriterFilter::isDataExpected(const CDate& date) const { return true; } } // namespace xios
• ## XIOS/dev/dev_olga/src/filter/file_server_writer_filter.hpp

 r1026 CFileServerWriterFilter(CGarbageCollector& gc, CField* field); bool virtual isDataExpected(const CDate& date) const; protected: /*!
• ## XIOS/dev/dev_olga/src/filter/file_writer_filter.cpp

 r639 #include "exception.hpp" #include "field.hpp" #include "utils.hpp" namespace xios void CFileWriterFilter::onInputReady(std::vector data) { bool ignoreMissingValue = (!field->detect_missing_value.isEmpty() && !field->default_value.isEmpty() && field->detect_missing_value == true); if (ignoreMissingValue) { double missingValue = field->default_value; size_t nbData = data[0]->data.numElements(); for (size_t idx = 0; idx < nbData; ++idx) { if (NumTraits::isnan(data[0]->data(idx))) data[0]->data(idx) = missingValue; } } field->sendUpdateData(data[0]->data); } bool CFileWriterFilter::isDataExpected(const CDate& date) const { return true; } } // namespace xios
• ## XIOS/dev/dev_olga/src/filter/file_writer_filter.hpp

 r639 CFileWriterFilter(CGarbageCollector& gc, CField* field); /*! * Tests whether data is expected for the specified date. * * \param date the date associated to the data */ bool virtual isDataExpected(const CDate& date) const; protected: /*!
• ## XIOS/dev/dev_olga/src/filter/filter.cpp

 r1021 return (CInputPin::canBeTriggered() || COutputPin::canBeTriggered()); } bool CFilter::isDataExpected(const CDate& date) const { return COutputPin::isDataExpected(date); } } // namespace xios
• ## XIOS/dev/dev_olga/src/filter/filter.hpp

 r1021 bool virtual canBeTriggered() const; /*! * Tests whether data is expected for the specified date. * * \param date the date associated to the data */ bool virtual isDataExpected(const CDate& date) const; protected: IFilterEngine* engine; //!< The filter engine, might be the filter itself
• ## XIOS/dev/dev_olga/src/filter/input_pin.hpp

 r1021 /*! * Tests whether data is expected for the specified date. * * \param date the date associated to the data */ bool virtual isDataExpected(const CDate& date) const = 0; /*! * Removes all pending packets which are older than the specified timestamp. *
• ## XIOS/dev/dev_olga/src/filter/output_pin.cpp

 r1021 } bool COutputPin::isDataExpected(const CDate& date) const { std::vector, size_t> >::const_iterator it, itEnd; for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it) { if (it->first->isDataExpected(date)) return true; } return false; } void COutputPin::invalidate(Time timestamp) {
• ## XIOS/dev/dev_olga/src/filter/output_pin.hpp

 r1021 /*! * Tests whether data is expected for the specified date. * * \param date the date associated to the data */ bool virtual isDataExpected(const CDate& date) const; /*! * Removes all pending packets which are older than the specified timestamp. *
• ## XIOS/dev/dev_olga/src/filter/source_filter.cpp

 r1021 #include "exception.hpp" #include "calendar_util.hpp" #include namespace xios { CSourceFilter::CSourceFilter(CGarbageCollector& gc, CGrid* grid, const CDuration offset /*= NoneDu*/, bool manualTrigger /*= false*/) const CDuration offset /*= NoneDu*/, bool manualTrigger /*= false*/, bool hasMissingValue /*= false*/, double defaultValue /*= 0.0*/) : COutputPin(gc, manualTrigger) , grid(grid) , offset(offset) , hasMissingValue(hasMissingValue), defaultValue(defaultValue) { if (!grid) packet->data.resize(grid->storeIndex_client.numElements()); grid->inputField(data, packet->data); // Convert missing values to NaN if (hasMissingValue) { double nanValue = std::numeric_limits::quiet_NaN(); size_t nbData = packet->data.numElements(); for (size_t idx = 0; idx < nbData; ++idx) { if (defaultValue == packet->data(idx)) packet->data(idx) = nanValue; } } onOutputReady(packet);
• ## XIOS/dev/dev_olga/src/filter/source_filter.hpp

 r1021 * \param offset the offset applied to the timestamp of all packets * \param manualTrigger whether the output should be triggered manually * \param hasMissingValue whether data has missing value * \param defaultValue missing value to detect */ CSourceFilter(CGarbageCollector& gc, CGrid* grid, const CDuration offset = NoneDu, bool manualTrigger = false); const CDuration offset = NoneDu, bool manualTrigger = false, bool hasMissingValue = false, double defaultValue = 0.0); /*! CGrid* grid; //!< The grid attached to the data the filter can accept const CDuration offset; //!< The offset applied to the timestamp of all packets bool hasMissingValue; double defaultValue; }; // class CSourceFilter } // namespace xios
• ## XIOS/dev/dev_olga/src/filter/spatial_transform_filter.cpp

 r1021 std::pair, boost::shared_ptr > CSpatialTransformFilter::buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, double defaultValue) CSpatialTransformFilter::buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, bool hasMissingValue, double missingValue) { if (!srcGrid || !destGrid) const std::vector& auxInputs = gridTransformation->getAuxInputs(); size_t inputCount = 1 + (auxInputs.empty() ? 0 : auxInputs.size()); double defaultValue  = (hasMissingValue) ? std::numeric_limits::quiet_NaN() : 0.0; boost::shared_ptr filter(new CSpatialTransformFilter(gc, engine, defaultValue, inputCount)); } packet->data.resize(gridTransformation->getGridDestination()->storeIndex_client.numElements()); packet->data = defaultValue; if (0 != packet->data.numElements()) (packet->data)(0) = defaultValue; apply(data[0]->data, packet->data); } // Get default value for output data double defaultValue = 0.0; if (0 != dataDest.numElements()) defaultValue = dataDest(0); bool ignoreMissingValue = false; double defaultValue = std::numeric_limits::quiet_NaN(); if (0 != dataDest.numElements()) ignoreMissingValue = NumTraits::isnan(dataDest(0)); const std::list& listLocalIndexSend = gridTransformation->getLocalIndexToSendFromGridSource(); else dataCurrentDest(i) = defaultValue; std::vector localInitFlag(dataCurrentDest.size(), true); std::vector localInitFlag(dataCurrentDest.numElements(), true); currentBuff = 0; for (itRecv = itbRecv; itRecv != iteRecv; ++itRecv) dataCurrentDest, localInitFlag, defaultValue); ignoreMissingValue); currentBuff += countSize;
• ## XIOS/dev/dev_olga/src/filter/spatial_transform_filter.hpp

 r873 * \param srcGrid the source grid * \param destGrid the destination grid * \param hasMissingValue whether field source has missing value * \param defaultValue default value * \return the first and the last filters of the filter graph */ static std::pair, boost::shared_ptr > buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, double defaultValue); buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, bool hasMissingValue, double defaultValue); protected:
• ## XIOS/dev/dev_olga/src/filter/store_filter.cpp

 r1021 CTimer timer("CStoreFilter::getPacket"); CConstDataPacketPtr packet; const double timeout = 10 ; // 10 seconds timeout const double timeout = CXios::recvFieldTimeout; do } bool CStoreFilter::isDataExpected(const CDate& date) const { return true; } void CStoreFilter::invalidate(Time timestamp) {
• ## XIOS/dev/dev_olga/src/filter/store_filter.hpp

 r1021 /*! * Tests whether data is expected for the specified date. * * \param date the date associated to the data */ bool virtual isDataExpected(const CDate& date) const; /*! * Removes all pending packets which are older than the specified timestamp. *
• ## XIOS/dev/dev_olga/src/filter/temporal_filter.cpp

 r854 namespace xios { static func::CFunctor* createFunctor(const std::string& opId, bool ignoreMissingValue, double missingValue, CArray& tmpData); CTemporalFilter::CTemporalFilter(CGarbageCollector& gc, const std::string& opId, const CDate& initDate, const CDuration samplingFreq, const CDuration samplingOffset, const CDuration opFreq, bool ignoreMissingValue /*= false*/, double missingValue /*= 0.0*/) : CFilter(gc, 1, this) , samplingFreq(samplingFreq) , functor(createFunctor(opId, ignoreMissingValue, missingValue, tmpData)) , isOnceOperation(functor->timeType() == func::CFunctor::once) , isInstantOperation(functor->timeType() == func::CFunctor::instant) // If we can optimize the sampling when dealing with an instant functor we do it , samplingFreq((isInstantOperation && samplingFreq == TimeStep && samplingOffset == NoneDu) ? opFreq : samplingFreq) , samplingOffset((isInstantOperation && samplingFreq == TimeStep && samplingOffset == NoneDu) ? opFreq - initDate.getRelCalendar().getTimeStep() : samplingOffset) , opFreq(opFreq) , nextSamplingDate(initDate + samplingOffset + initDate.getRelCalendar().getTimeStep()) , nextOperationDate(initDate + opFreq) , nextSamplingDate(initDate + this->samplingOffset + initDate.getRelCalendar().getTimeStep()) , nextOperationDate(initDate + this->samplingOffset + opFreq) , isFirstOperation(true) { #define DECLARE_FUNCTOR(MType, mtype) \ if (opId.compare(#mtype) == 0) \ { \ if (ignoreMissingValue) \ { \ functor.reset(new func::C##MType(tmpData, missingValue)); \ } \ else \ { \ functor.reset(new func::C##MType(tmpData)); \ } \ } #include "functor_type.conf" if (!functor) ERROR("CTemporalFilter::CTemporalFilter(CGarbageCollector& gc, const std::string& opId, ...)", << "\"" << opId << "\" is not a valid operation."); isOnceOperation = (functor->timeType() == func::CFunctor::once); } if (data[0]->status != CDataPacket::END_OF_STREAM) { const bool usePacket = isOnceOperation ? isFirstOperation : (data[0]->date >= nextSamplingDate); bool usePacket, outputResult, copyLess; if (isOnceOperation) usePacket = outputResult = copyLess = isFirstOperation; else { usePacket = (data[0]->date >= nextSamplingDate); outputResult = (data[0]->date + samplingFreq > nextOperationDate); copyLess = (isInstantOperation && usePacket && outputResult); } if (usePacket) { if (!tmpData.numElements()) tmpData.resize(data[0]->data.numElements()); if (!copyLess) { if (!tmpData.numElements()) tmpData.resize(data[0]->data.numElements()); (*functor)(data[0]->data); (*functor)(data[0]->data); } nextSamplingDate = nextSamplingDate + samplingFreq; } const bool outputResult = isOnceOperation ? isFirstOperation : (data[0]->date + samplingFreq > nextOperationDate); if (outputResult) { functor->final(); if (!copyLess) { functor->final(); packet = CDataPacketPtr(new CDataPacket); packet->date = data[0]->date; packet->timestamp = data[0]->timestamp; packet->status = data[0]->status; packet->data.resize(tmpData.numElements()); packet->data = tmpData; packet = CDataPacketPtr(new CDataPacket); packet->date = data[0]->date; packet->timestamp = data[0]->timestamp; packet->status = data[0]->status; packet->data.resize(tmpData.numElements()); packet->data = tmpData; } else packet = data[0]; isFirstOperation = false; return packet; } bool CTemporalFilter::isDataExpected(const CDate& date) const { return isOnceOperation ? isFirstOperation : (date >= nextSamplingDate || date + samplingFreq > nextOperationDate); } static func::CFunctor* createFunctor(const std::string& opId, bool ignoreMissingValue, double missingValue, CArray& tmpData) { func::CFunctor* functor = NULL; double defaultValue = ignoreMissingValue ? std::numeric_limits::quiet_NaN() : missingValue; #define DECLARE_FUNCTOR(MType, mtype) \ if (opId.compare(#mtype) == 0) \ { \ if (ignoreMissingValue) \ { \ functor = new func::C##MType(tmpData, defaultValue); \ } \ else \ { \ functor = new func::C##MType(tmpData); \ } \ } #include "functor_type.conf" if (!functor) ERROR("createFunctor(const std::string& opId, ...)", << "\"" << opId << "\" is not a valid operation."); return functor; } } // namespace xios
• ## XIOS/dev/dev_olga/src/filter/temporal_filter.hpp

 r643 CDataPacketPtr virtual apply(std::vector data); /*! * Tests whether data is expected for the specified date. * * \param date the date associated to the data */ bool virtual isDataExpected(const CDate& date) const; private: boost::scoped_ptr functor; //!< The functor corresponding to the temporal operation const boost::scoped_ptr functor; //!< The functor corresponding to the temporal operation CArray tmpData; //!< The array of data used for temporary storage const CDuration samplingFreq; //!< The sampling frequency, i.e. the frequency at which the input data will be used const CDuration samplingOffset; //!< The sampling offset, i.e. the offset after which the input data will be used const CDuration opFreq; //!< The operation frequency, i.e. the frequency at which the output data will be computed CDate nextSamplingDate; //!< The date of the next sampling CDate nextOperationDate; //!< The date of the next operation bool isFirstOperation; //!< True before the first operation was been computed bool isOnceOperation; //!< True if the operation should be computed just once const bool isOnceOperation; //!< True if the operation should be computed just once const bool isInstantOperation; //!< True if the operation is instant }; // class CTemporalFilter } // namespace xios
• ## XIOS/dev/dev_olga/src/functor/accumulate.cpp

 r591 #include "accumulate.hpp" #include "array_new.hpp" #include "utils.hpp" namespace xios double* out=_doutput.dataFirst(); for (i=0; i::isnan(*in)) { if(*out!=missingValue) *out  += *in; if(!NumTraits::isnan(*out)) *out  += *in; else *out=*in ; }
• ## XIOS/dev/dev_olga/src/functor/average.cpp

 r591 #include "average.hpp" #include "array_new.hpp" #include "utils.hpp" namespace xios int* nc=nbcalls.dataFirst() ; for (i=0; i::isnan(*in)) (*nc) ++; } } int* nc=nbcalls.dataFirst() ; for (i=0; i::isnan(*in)) { if (*nc != 0) (*out)  += *in;
• ## XIOS/dev/dev_olga/src/functor/maximum.cpp

 r591 #include "maximum.hpp" #include "array_new.hpp" #include "utils.hpp" namespace xios { for (; it1 != end1; it1++, it++) if (*it1 != missingValue) if (!NumTraits::isnan(*it1)) { if ( *it != missingValue) *it = std::max(*it1, *it); if (!NumTraits::isnan(*it)) *it = std::max(*it1, *it); else *it=*it1 ; }
• ## XIOS/dev/dev_olga/src/functor/minimum.cpp

 r591 #include "array_new.hpp" #include #include "utils.hpp" namespace xios { const double * it1  = _dinput.dataFirst(), * end1 = _dinput.dataFirst() + _dinput.numElements(); *end1 = _dinput.dataFirst() + _dinput.numElements(); double * it   = _doutput.dataFirst(); { for (; it1 != end1; it1++, it++) if (*it1!=missingValue) if (!NumTraits::isnan(*it1)) { if (*it != missingValue) *it = std::min(*it1, *it); if (!NumTraits::isnan(*it)) *it = std::min(*it1, *it); else *it=*it1 ; }
• ## XIOS/dev/dev_olga/src/generate_interface_impl.hpp

 r966 #undef macro #define macro(N,EXTENT)\ template <>\ void CInterface::AttributeCInterface >(ostream& oss, const string& className, const string& name)\ { \ oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << "char* " << name <<", int str_len, int* str_size, int* extent)" << iendl; \ oss << "{" << iendl; \ oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \ oss << "  "<"<::iterator it, itb="<"<"<::const_iterator it, itb="<"<"<copy(&"<size()) ; "<< iendl; \ oss << "  CTimer::get(\"XIOS\").suspend();" << iendl; \ oss << "}" << std::endl; \ } macro(1,"extent[0]") macro(2,"extent[0],extent[1]") macro(3,"extent[0],extent[1],extent[2]") macro(4,"extent[0],extent[1],extent[2],extent[3]") macro(5,"extent[0],extent[1],extent[2],extent[3],extent[4]") macro(6,"extent[0],extent[1],extent[2],extent[3],extent[4],extent[5]") macro(7,"extent[0],extent[1],extent[2],extent[3],extent[4],extent[5],extent[6]") #undef macro // ///////////////////////////////////////////////// // //          Fortran 2003 Interface             // #undef macro #define macro(T)\ template <>\ void CInterface::AttributeFortran2003Interface >(ostream& oss, const string& className, const string& name)\ {\ oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", str_len, str_size, extent) BIND(C)" << iendl; \ oss << "  USE ISO_C_BINDING" << iendl; \ oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \ oss << "  CHARACTER (KIND=C_CHAR), DIMENSION(*)    :: " << name << iendl; \ oss << "  INTEGER (kind = C_INT), VALUE            :: str_len" << iendl; \ oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: str_size" << iendl; \ oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \ oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; \ oss << iendl; \ oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", str_size, extent) BIND(C)" << iendl; \ oss << "  USE ISO_C_BINDING" << iendl; \ oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \ oss << "  CHARACTER (KIND=C_CHAR), DIMENSION(*)    :: " << name << iendl; \ oss << "  INTEGER (kind = C_INT), VALUE            :: str_size" << iendl; \ oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \ oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; \ } macro(1) macro(2) macro(3) macro(4) macro(5) macro(6) macro(7) #undef macro #define macro(T) \ template <> \ #undef macro #define macro(T,EXTENT)\ template <> \ void CInterface::AttributeFortranInterfaceDeclaration >(ostream& oss, const string& className, const string& name)\ {\ oss << "CHARACTER(len=*) , OPTIONAL, INTENT(IN) :: " << name << "("<\ void CInterface::AttributeFortranInterfaceGetDeclaration >(ostream& oss, const string& className, const string& name)\ {\ oss << "CHARACTER(len=*) , OPTIONAL, INTENT(OUT) :: " << name << "("<\ void CInterface::AttributeFortranInterfaceBody< CArray >(ostream& oss, const string& className, const string& name)\ {\ oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \ oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl; \ oss << "(" << className << "_hdl%daddr, " << name <<"_, LEN("<  \ #undef macro #define macro(T)\ template <> \ void CInterface::AttributeFortranInterfaceGetBody< CArray >(ostream& oss, const string& className, const string& name)\ {\ oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \ oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl; \ oss << "(" << className << "_hdl%daddr, " << name << "_, LEN("<
• ## XIOS/dev/dev_olga/src/group_template_impl.hpp

 r1030 #include "context.hpp" #include "event_client.hpp" #include "context_client.hpp" #include "message.hpp" #include "type.hpp" } } // if (! context->hasServer ) // { //    CContextClient* client=context->client ; //    CEventClient event(this->getType(),EVENT_ID_CREATE_CHILD) ; //    if (client->isServerLeader()) //    { //      CMessage msg ; //      msg<getId() ; //      msg<& ranks = client->getRanksServerLeader(); //      for (std::list::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) //        event.push(*itRank,1,msg) ; //      client->sendEvent(event) ; //    } //    else client->sendEvent(event) ; // } } } } // if (! context->hasServer ) // { //    CContextClient* client=context->client ; //    CEventClient event(this->getType(),EVENT_ID_CREATE_CHILD_GROUP) ; //    if (client->isServerLeader()) //    { //      CMessage msg ; //      msg<getId() ; //      msg<& ranks = client->getRanksServerLeader(); //      for (std::list::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) //        event.push(*itRank,1,msg) ; //      client->sendEvent(event) ; //    } //    else client->sendEvent(event) ; // } } void CGroupTemplate::recvCreateChild(CEventServer& event) { CBufferIn* buffer=event.subEvents.begin()->buffer; string id;
• ## XIOS/dev/dev_olga/src/interface/c/icfield.cpp

 r943 // ----------------------------------------------------------------------------------------------------- void cxios_field_is_active (XFieldPtr field_hdl, bool* ret) void cxios_field_is_active (XFieldPtr field_hdl, bool at_current_timestep, bool* ret) { CTimer::get("XIOS").resume() ; *ret = field_hdl->isActive(); *ret = field_hdl->isActive(at_current_timestep); CTimer::get("XIOS").suspend() ; }
• ## XIOS/dev/dev_olga/src/interface/c_attr/icaxis_attr.cpp

 r817 void cxios_set_axis_label(axis_Ptr axis_hdl, char* label, int str_len, int* str_size, int* extent) { CTimer::get("XIOS").resume(); axis_hdl->label.resize(shape(extent[0])); Array::iterator it, itb=axis_hdl->label.begin(), ite=axis_hdl->label.end() ; int i, n ; for(it=itb, i=0, n=0 ; it!=ite ; ++it,n+=str_len,++i) *it=StdString(&label[n],str_size[i]) ; CTimer::get("XIOS").suspend(); } void cxios_get_axis_label(axis_Ptr axis_hdl, char* label, int str_size, int* extent) { CTimer::get("XIOS").resume(); Array::const_iterator it, itb=axis_hdl->label.getInheritedValue().begin(), ite=axis_hdl->label.getInheritedValue().end() ; int n ; for(it=itb, n=0 ; it!=ite ; ++it, n+=str_size) it->copy(&label[n],it->size()) ; CTimer::get("XIOS").suspend(); } bool cxios_is_defined_axis_label(axis_Ptr axis_hdl) { CTimer::get("XIOS").resume(); bool isDefined = axis_hdl->label.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_axis_long_name(axis_Ptr axis_hdl, const char * long_name, int long_name_size) { void cxios_set_axis_prec(axis_Ptr axis_hdl, int prec) { CTimer::get("XIOS").resume(); axis_hdl->prec.setValue(prec); CTimer::get("XIOS").suspend(); } void cxios_get_axis_prec(axis_Ptr axis_hdl, int* prec) { CTimer::get("XIOS").resume(); *prec = axis_hdl->prec.getInheritedValue(); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_axis_prec(axis_Ptr axis_hdl) { CTimer::get("XIOS").resume(); bool isDefined = axis_hdl->prec.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_axis_standard_name(axis_Ptr axis_hdl, const char * standard_name, int standard_name_size) {
• ## XIOS/dev/dev_olga/src/interface/c_attr/icaxisgroup_attr.cpp

 r817 void cxios_set_axisgroup_label(axisgroup_Ptr axisgroup_hdl, char* label, int str_len, int* str_size, int* extent) { CTimer::get("XIOS").resume(); axisgroup_hdl->label.resize(shape(extent[0])); Array::iterator it, itb=axisgroup_hdl->label.begin(), ite=axisgroup_hdl->label.end() ; int i, n ; for(it=itb, i=0, n=0 ; it!=ite ; ++it,n+=str_len,++i) *it=StdString(&label[n],str_size[i]) ; CTimer::get("XIOS").suspend(); } void cxios_get_axisgroup_label(axisgroup_Ptr axisgroup_hdl, char* label, int str_size, int* extent) { CTimer::get("XIOS").resume(); Array::const_iterator it, itb=axisgroup_hdl->label.getInheritedValue().begin(), ite=axisgroup_hdl->label.getInheritedValue().end() ; int n ; for(it=itb, n=0 ; it!=ite ; ++it, n+=str_size) it->copy(&label[n],it->size()) ; CTimer::get("XIOS").suspend(); } bool cxios_is_defined_axisgroup_label(axisgroup_Ptr axisgroup_hdl) { CTimer::get("XIOS").resume(); bool isDefined = axisgroup_hdl->label.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, const char * long_name, int long_name_size) { void cxios_set_axisgroup_prec(axisgroup_Ptr axisgroup_hdl, int prec) { CTimer::get("XIOS").resume(); axisgroup_hdl->prec.setValue(prec); CTimer::get("XIOS").suspend(); } void cxios_get_axisgroup_prec(axisgroup_Ptr axisgroup_hdl, int* prec) { CTimer::get("XIOS").resume(); *prec = axisgroup_hdl->prec.getInheritedValue(); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_axisgroup_prec(axisgroup_Ptr axisgroup_hdl) { CTimer::get("XIOS").resume(); bool isDefined = axisgroup_hdl->prec.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, const char * standard_name, int standard_name_size) {
• ## XIOS/dev/dev_olga/src/interface/c_attr/icdomain_attr.cpp

 r789 void cxios_set_domain_prec(domain_Ptr domain_hdl, int prec) { CTimer::get("XIOS").resume(); domain_hdl->prec.setValue(prec); CTimer::get("XIOS").suspend(); } void cxios_get_domain_prec(domain_Ptr domain_hdl, int* prec) { CTimer::get("XIOS").resume(); *prec = domain_hdl->prec.getInheritedValue(); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_domain_prec(domain_Ptr domain_hdl) { CTimer::get("XIOS").resume(); bool isDefined = domain_hdl->prec.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_domain_standard_name(domain_Ptr domain_hdl, const char * standard_name, int standard_name_size) {
• ## XIOS/dev/dev_olga/src/interface/c_attr/icdomaingroup_attr.cpp

 r789 void cxios_set_domaingroup_prec(domaingroup_Ptr domaingroup_hdl, int prec) { CTimer::get("XIOS").resume(); domaingroup_hdl->prec.setValue(prec); CTimer::get("XIOS").suspend(); } void cxios_get_domaingroup_prec(domaingroup_Ptr domaingroup_hdl, int* prec) { CTimer::get("XIOS").resume(); *prec = domaingroup_hdl->prec.getInheritedValue(); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_domaingroup_prec(domaingroup_Ptr domaingroup_hdl) { CTimer::get("XIOS").resume(); bool isDefined = domaingroup_hdl->prec.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_domaingroup_standard_name(domaingroup_Ptr domaingroup_hdl, const char * standard_name, int standard_name_size) {
• ## XIOS/dev/dev_olga/src/interface/c_attr/icexpand_domain_attr.cpp

 r981 { typedef xios::CExpandDomain* expand_domain_Ptr; void cxios_set_expand_domain_i_periodic(expand_domain_Ptr expand_domain_hdl, bool i_periodic) { CTimer::get("XIOS").resume(); expand_domain_hdl->i_periodic.setValue(i_periodic); CTimer::get("XIOS").suspend(); } void cxios_get_expand_domain_i_periodic(expand_domain_Ptr expand_domain_hdl, bool* i_periodic) { CTimer::get("XIOS").resume(); *i_periodic = expand_domain_hdl->i_periodic.getInheritedValue(); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_expand_domain_i_periodic(expand_domain_Ptr expand_domain_hdl) { CTimer::get("XIOS").resume(); bool isDefined = expand_domain_hdl->i_periodic.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_expand_domain_j_periodic(expand_domain_Ptr expand_domain_hdl, bool j_periodic) { CTimer::get("XIOS").resume(); expand_domain_hdl->j_periodic.setValue(j_periodic); CTimer::get("XIOS").suspend(); } void cxios_get_expand_domain_j_periodic(expand_domain_Ptr expand_domain_hdl, bool* j_periodic) { CTimer::get("XIOS").resume(); *j_periodic = expand_domain_hdl->j_periodic.getInheritedValue(); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_expand_domain_j_periodic(expand_domain_Ptr expand_domain_hdl) { CTimer::get("XIOS").resume(); bool isDefined = expand_domain_hdl->j_periodic.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } 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 void cxios_set_file_time_stamp_format(file_Ptr file_hdl, const char * time_stamp_format, int time_stamp_format_size) { std::string time_stamp_format_str; if (!cstr2string(time_stamp_format, time_stamp_format_size, time_stamp_format_str)) return; CTimer::get("XIOS").resume(); file_hdl->time_stamp_format.setValue(time_stamp_format_str); CTimer::get("XIOS").suspend(); } void cxios_get_file_time_stamp_format(file_Ptr file_hdl, char * time_stamp_format, int time_stamp_format_size) { CTimer::get("XIOS").resume(); if (!string_copy(file_hdl->time_stamp_format.getInheritedValue(), time_stamp_format, time_stamp_format_size)) 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"); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_file_time_stamp_format(file_Ptr file_hdl) { CTimer::get("XIOS").resume(); bool isDefined = file_hdl->time_stamp_format.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_file_time_stamp_name(file_Ptr file_hdl, const char * time_stamp_name, int time_stamp_name_size) { std::string time_stamp_name_str; if (!cstr2string(time_stamp_name, time_stamp_name_size, time_stamp_name_str)) return; CTimer::get("XIOS").resume(); file_hdl->time_stamp_name.setValue(time_stamp_name_str); CTimer::get("XIOS").suspend(); } void cxios_get_file_time_stamp_name(file_Ptr file_hdl, char * time_stamp_name, int time_stamp_name_size) { CTimer::get("XIOS").resume(); if (!string_copy(file_hdl->time_stamp_name.getInheritedValue(), time_stamp_name, time_stamp_name_size)) 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"); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_file_time_stamp_name(file_Ptr file_hdl) { CTimer::get("XIOS").resume(); bool isDefined = file_hdl->time_stamp_name.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_file_time_units(file_Ptr file_hdl, const char * time_units, int time_units_size) { std::string time_units_str; if (!cstr2string(time_units, time_units_size, time_units_str)) return; CTimer::get("XIOS").resume(); file_hdl->time_units.fromString(time_units_str); CTimer::get("XIOS").suspend(); } void cxios_get_file_time_units(file_Ptr file_hdl, char * time_units, int time_units_size) { CTimer::get("XIOS").resume(); if (!string_copy(file_hdl->time_units.getInheritedStringValue(), time_units, time_units_size)) ERROR("void cxios_get_file_time_units(file_Ptr file_hdl, char * time_units, int time_units_size)", << "Input string is too short"); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_file_time_units(file_Ptr file_hdl) { CTimer::get("XIOS").resume(); bool isDefined = file_hdl->time_units.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_file_timeseries(file_Ptr file_hdl, const char * timeseries, int timeseries_size) { return isDefined; } void cxios_set_file_uuid_format(file_Ptr file_hdl, const char * uuid_format, int uuid_format_size) { std::string uuid_format_str; if (!cstr2string(uuid_format, uuid_format_size, uuid_format_str)) return; CTimer::get("XIOS").resume(); file_hdl->uuid_format.setValue(uuid_format_str); CTimer::get("XIOS").suspend(); } void cxios_get_file_uuid_format(file_Ptr file_hdl, char * uuid_format, int uuid_format_size) { CTimer::get("XIOS").resume(); if (!string_copy(file_hdl->uuid_format.getInheritedValue(), uuid_format, uuid_format_size)) ERROR("void cxios_get_file_uuid_format(file_Ptr file_hdl, char * uuid_format, int uuid_format_size)", << "Input string is too short"); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_file_uuid_format(file_Ptr file_hdl) { CTimer::get("XIOS").resume(); bool isDefined = file_hdl->uuid_format.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_file_uuid_name(file_Ptr file_hdl, const char * uuid_name, int uuid_name_size) { std::string uuid_name_str; if (!cstr2string(uuid_name, uuid_name_size, uuid_name_str)) return; CTimer::get("XIOS").resume(); file_hdl->uuid_name.setValue(uuid_name_str); CTimer::get("XIOS").suspend(); } void cxios_get_file_uuid_name(file_Ptr file_hdl, char * uuid_name, int uuid_name_size) { CTimer::get("XIOS").resume(); if (!string_copy(file_hdl->uuid_name.getInheritedValue(), uuid_name, uuid_name_size)) ERROR("void cxios_get_file_uuid_name(file_Ptr file_hdl, char * uuid_name, int uuid_name_size)", << "Input string is too short"); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_file_uuid_name(file_Ptr file_hdl) { CTimer::get("XIOS").resume(); bool isDefined = file_hdl->uuid_name.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } }
• ## XIOS/dev/dev_olga/src/interface/c_attr/icfilegroup_attr.cpp

 r932 void cxios_set_filegroup_time_stamp_format(filegroup_Ptr filegroup_hdl, const char * time_stamp_format, int time_stamp_format_size) { std::string time_stamp_format_str; if (!cstr2string(time_stamp_format, time_stamp_format_size, time_stamp_format_str)) return; CTimer::get("XIOS").resume(); filegroup_hdl->time_stamp_format.setValue(time_stamp_format_str); CTimer::get("XIOS").suspend(); } void cxios_get_filegroup_time_stamp_format(filegroup_Ptr filegroup_hdl, char * time_stamp_format, int time_stamp_format_size) { CTimer::get("XIOS").resume(); if (!string_copy(filegroup_hdl->time_stamp_format.getInheritedValue(), time_stamp_format, time_stamp_format_size)) 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"); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_filegroup_time_stamp_format(filegroup_Ptr filegroup_hdl) { CTimer::get("XIOS").resume(); bool isDefined = filegroup_hdl->time_stamp_format.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_filegroup_time_stamp_name(filegroup_Ptr filegroup_hdl, const char * time_stamp_name, int time_stamp_name_size) { std::string time_stamp_name_str; if (!cstr2string(time_stamp_name, time_stamp_name_size, time_stamp_name_str)) return; CTimer::get("XIOS").resume(); filegroup_hdl->time_stamp_name.setValue(time_stamp_name_str); CTimer::get("XIOS").suspend(); } void cxios_get_filegroup_time_stamp_name(filegroup_Ptr filegroup_hdl, char * time_stamp_name, int time_stamp_name_size) { CTimer::get("XIOS").resume(); if (!string_copy(filegroup_hdl->time_stamp_name.getInheritedValue(), time_stamp_name, time_stamp_name_size)) 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"); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_filegroup_time_stamp_name(filegroup_Ptr filegroup_hdl) { CTimer::get("XIOS").resume(); bool isDefined = filegroup_hdl->time_stamp_name.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_filegroup_time_units(filegroup_Ptr filegroup_hdl, const char * time_units, int time_units_size) { std::string time_units_str; if (!cstr2string(time_units, time_units_size, time_units_str)) return; CTimer::get("XIOS").resume(); filegroup_hdl->time_units.fromString(time_units_str); CTimer::get("XIOS").suspend(); } void cxios_get_filegroup_time_units(filegroup_Ptr filegroup_hdl, char * time_units, int time_units_size) { CTimer::get("XIOS").resume(); if (!string_copy(filegroup_hdl->time_units.getInheritedStringValue(), time_units, time_units_size)) ERROR("void cxios_get_filegroup_time_units(filegroup_Ptr filegroup_hdl, char * time_units, int time_units_size)", << "Input string is too short"); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_filegroup_time_units(filegroup_Ptr filegroup_hdl) { CTimer::get("XIOS").resume(); bool isDefined = filegroup_hdl->time_units.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_filegroup_timeseries(filegroup_Ptr filegroup_hdl, const char * timeseries, int timeseries_size) { return isDefined; } void cxios_set_filegroup_uuid_format(filegroup_Ptr filegroup_hdl, const char * uuid_format, int uuid_format_size) { std::string uuid_format_str; if (!cstr2string(uuid_format, uuid_format_size, uuid_format_str)) return; CTimer::get("XIOS").resume(); filegroup_hdl->uuid_format.setValue(uuid_format_str); CTimer::get("XIOS").suspend(); } void cxios_get_filegroup_uuid_format(filegroup_Ptr filegroup_hdl, char * uuid_format, int uuid_format_size) { CTimer::get("XIOS").resume(); if (!string_copy(filegroup_hdl->uuid_format.getInheritedValue(), uuid_format, uuid_format_size)) ERROR("void cxios_get_filegroup_uuid_format(filegroup_Ptr filegroup_hdl, char * uuid_format, int uuid_format_size)", << "Input string is too short"); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_filegroup_uuid_format(filegroup_Ptr filegroup_hdl) { CTimer::get("XIOS").resume(); bool isDefined = filegroup_hdl->uuid_format.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_filegroup_uuid_name(filegroup_Ptr filegroup_hdl, const char * uuid_name, int uuid_name_size) { std::string uuid_name_str; if (!cstr2string(uuid_name, uuid_name_size, uuid_name_str)) return; CTimer::get("XIOS").resume(); filegroup_hdl->uuid_name.setValue(uuid_name_str); CTimer::get("XIOS").suspend(); } void cxios_get_filegroup_uuid_name(filegroup_Ptr filegroup_hdl, char * uuid_name, int uuid_name_size) { CTimer::get("XIOS").resume(); if (!string_copy(filegroup_hdl->uuid_name.getInheritedValue(), uuid_name, uuid_name_size)) ERROR("void cxios_get_filegroup_uuid_name(filegroup_Ptr filegroup_hdl, char * uuid_name, int uuid_name_size)", << "Input string is too short"); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_filegroup_uuid_name(filegroup_Ptr filegroup_hdl) { CTimer::get("XIOS").resume(); bool isDefined = filegroup_hdl->uuid_name.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } }
• ## XIOS/dev/dev_olga/src/interface/c_attr/icinterpolate_domain_attr.cpp

 r1021 { typedef xios::CInterpolateDomain* interpolate_domain_Ptr; void cxios_set_interpolate_domain_file(interpolate_domain_Ptr interpolate_domain_hdl, const char * file, int file_size) { std::string file_str; if (!cstr2string(file, file_size, file_str)) return; CTimer::get("XIOS").resume(); interpolate_domain_hdl->file.setValue(file_str); CTimer::get("XIOS").suspend(); } void cxios_get_interpolate_domain_file(interpolate_domain_Ptr interpolate_domain_hdl, char * file, int file_size) { CTimer::get("XIOS").resume(); if (!string_copy(interpolate_domain_hdl->file.getInheritedValue(), file, file_size)) ERROR("void cxios_get_interpolate_domain_file(interpolate_domain_Ptr interpolate_domain_hdl, char * file, int file_size)", << "Input string is too short"); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_interpolate_domain_file(interpolate_domain_Ptr interpolate_domain_hdl) { CTimer::get("XIOS").resume(); bool isDefined = interpolate_domain_hdl->file.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } 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 CTimer::get("XIOS").resume(); bool isDefined = scalar_hdl->name.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_scalar_prec(scalar_Ptr scalar_hdl, int prec) { CTimer::get("XIOS").resume(); scalar_hdl->prec.setValue(prec); CTimer::get("XIOS").suspend(); } void cxios_get_scalar_prec(scalar_Ptr scalar_hdl, int* prec) { CTimer::get("XIOS").resume(); *prec = scalar_hdl->prec.getInheritedValue(); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_scalar_prec(scalar_Ptr scalar_hdl) { CTimer::get("XIOS").resume(); bool isDefined = scalar_hdl->prec.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined;
• ## XIOS/dev/dev_olga/src/interface/c_attr/icscalargroup_attr.cpp

 r891 void cxios_set_scalargroup_prec(scalargroup_Ptr scalargroup_hdl, int prec) { CTimer::get("XIOS").resume(); scalargroup_hdl->prec.setValue(prec); CTimer::get("XIOS").suspend(); } void cxios_get_scalargroup_prec(scalargroup_Ptr scalargroup_hdl, int* prec) { CTimer::get("XIOS").resume(); *prec = scalargroup_hdl->prec.getInheritedValue(); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_scalargroup_prec(scalargroup_Ptr scalargroup_hdl) { CTimer::get("XIOS").resume(); bool isDefined = scalargroup_hdl->prec.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, const char * scalar_ref, int scalar_ref_size) {
• ## XIOS/dev/dev_olga/src/interface/c_attr/icvariable_attr.cpp

 r591 void cxios_set_variable_ts_target(variable_Ptr variable_hdl, const char * ts_target, int ts_target_size) { std::string ts_target_str; if (!cstr2string(ts_target, ts_target_size, ts_target_str)) return; CTimer::get("XIOS").resume(); variable_hdl->ts_target.fromString(ts_target_str); CTimer::get("XIOS").suspend(); } void cxios_get_variable_ts_target(variable_Ptr variable_hdl, char * ts_target, int ts_target_size) { CTimer::get("XIOS").resume(); if (!string_copy(variable_hdl->ts_target.getInheritedStringValue(), ts_target, ts_target_size)) ERROR("void cxios_get_variable_ts_target(variable_Ptr variable_hdl, char * ts_target, int ts_target_size)", << "Input string is too short"); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_variable_ts_target(variable_Ptr variable_hdl) { CTimer::get("XIOS").resume(); bool isDefined = variable_hdl->ts_target.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_variable_type(variable_Ptr variable_hdl, const char * type, int type_size) {
• ## XIOS/dev/dev_olga/src/interface/c_attr/icvariablegroup_attr.cpp

 r591 void cxios_set_variablegroup_ts_target(variablegroup_Ptr variablegroup_hdl, const char * ts_target, int ts_target_size) { std::string ts_target_str; if (!cstr2string(ts_target, ts_target_size, ts_target_str)) return; CTimer::get("XIOS").resume(); variablegroup_hdl->ts_target.fromString(ts_target_str); CTimer::get("XIOS").suspend(); } void cxios_get_variablegroup_ts_target(variablegroup_Ptr variablegroup_hdl, char * ts_target, int ts_target_size) { CTimer::get("XIOS").resume(); if (!string_copy(variablegroup_hdl->ts_target.getInheritedStringValue(), ts_target, ts_target_size)) ERROR("void cxios_get_variablegroup_ts_target(variablegroup_Ptr variablegroup_hdl, char * ts_target, int ts_target_size)", << "Input string is too short"); CTimer::get("XIOS").suspend(); } bool cxios_is_defined_variablegroup_ts_target(variablegroup_Ptr variablegroup_hdl) { CTimer::get("XIOS").resume(); bool isDefined = variablegroup_hdl->ts_target.hasInheritedValue(); CTimer::get("XIOS").suspend(); return isDefined; } void cxios_set_variablegroup_type(variablegroup_Ptr variablegroup_hdl, const char * type, int type_size) {
• ## XIOS/dev/dev_olga/src/interface/fortran/field_interface.f90

 r943 END SUBROUTINE cxios_field_valid_id SUBROUTINE cxios_field_is_active(field_hdl, ret) BIND(C) SUBROUTINE cxios_field_is_active(field_hdl, at_current_timestep, ret) BIND(C) USE ISO_C_BINDING INTEGER  (kind = C_INTPTR_T), VALUE        :: field_hdl LOGICAL  (kind = C_BOOL), VALUE            :: at_current_timestep LOGICAL  (kind = C_BOOL)                   :: ret END SUBROUTINE cxios_field_is_active
• ## XIOS/dev/dev_olga/src/interface/fortran/idata.F90

 r1054 SUBROUTINE  cxios_init_server() BIND(C) USE ISO_C_BINDING END SUBROUTINE cxios_init_server SUBROUTINE  xios(init_server)() IMPLICIT NONE CALL cxios_init_server() CALL cxios_init_server() END SUBROUTINE xios(init_server)
• ## XIOS/dev/dev_olga/src/interface/fortran/ifield.F90

 r943 END FUNCTION  xios(is_valid_fieldgroup) LOGICAL FUNCTION xios(field_is_active_id(field_id)) LOGICAL FUNCTION xios(field_is_active_id)(field_id, at_current_timestep_arg) IMPLICIT NONE CHARACTER(len  = *)    , INTENT(IN) :: field_id LOGICAL  (kind = 1)                 :: val TYPE(txios(field))                 :: field_hdl CHARACTER(len  = *) , INTENT(IN) :: field_id LOGICAL, OPTIONAL   , INTENT(IN) :: at_current_timestep_arg TYPE(txios(field))               :: field_hdl CALL xios(get_field_handle)(field_id,field_hdl) xios(field_is_active_id)=xios(field_is_active_hdl(field_hdl)) xios(field_is_active_id) = xios(field_is_active_hdl)(field_hdl, at_current_timestep_arg) END FUNCTION  xios(field_is_active_id) LOGICAL FUNCTION xios(field_is_active_hdl(field_hdl)) END FUNCTION xios(field_is_active_id) LOGICAL FUNCTION xios(field_is_active_hdl)(field_hdl, at_current_timestep_arg) IMPLICIT NONE TYPE(txios(field)),INTENT(IN)       :: field_hdl LOGICAL  (kind = 1)                 :: ret CALL cxios_field_is_active(field_hdl%daddr, ret); TYPE(txios(field)) , INTENT(IN) :: field_hdl LOGICAL, OPTIONAL  , INTENT(IN) :: at_current_timestep_arg LOGICAL(kind = C_BOOL)          :: at_current_timestep LOGICAL(kind = C_BOOL)          :: ret IF (PRESENT(at_current_timestep_arg)) THEN at_current_timestep = at_current_timestep_arg ELSE at_current_timestep = .FALSE. ENDIF CALL cxios_field_is_active(field_hdl%daddr, at_current_timestep, ret); xios(field_is_active_hdl) = ret END FUNCTION  xios(field_is_active_hdl) END FUNCTION xios(field_is_active_hdl) END MODULE IFIELD
• ## XIOS/dev/dev_olga/src/interface/fortran_attr/axis_interface_attr.F90

 r817 SUBROUTINE cxios_set_axis_label(axis_hdl, label, str_len, str_size, extent) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE       :: axis_hdl CHARACTER (KIND=C_CHAR), DIMENSION(*)    :: label INTEGER (kind = C_INT), VALUE            :: str_len INTEGER (kind = C_INT), DIMENSION(*)     :: str_size INTEGER (kind = C_INT), DIMENSION(*)     :: extent END SUBROUTINE cxios_set_axis_label SUBROUTINE cxios_get_axis_label(axis_hdl, label, str_size, extent) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE       :: axis_hdl CHARACTER (KIND=C_CHAR), DIMENSION(*)    :: label INTEGER (kind = C_INT), VALUE            :: str_size INTEGER (kind = C_INT), DIMENSION(*)     :: extent END SUBROUTINE cxios_get_axis_label FUNCTION cxios_is_defined_axis_label(axis_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_label INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl END FUNCTION cxios_is_defined_axis_label SUBROUTINE cxios_set_axis_long_name(axis_hdl, long_name, long_name_size) BIND(C) USE ISO_C_BINDING SUBROUTINE cxios_set_axis_prec(axis_hdl, prec) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl INTEGER (KIND=C_INT)      , VALUE :: prec END SUBROUTINE cxios_set_axis_prec SUBROUTINE cxios_get_axis_prec(axis_hdl, prec) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl INTEGER (KIND=C_INT)             :: prec END SUBROUTINE cxios_get_axis_prec FUNCTION cxios_is_defined_axis_prec(axis_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_prec INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl END FUNCTION cxios_is_defined_axis_prec SUBROUTINE cxios_set_axis_standard_name(axis_hdl, standard_name, standard_name_size) BIND(C) USE ISO_C_BINDING
• ## XIOS/dev/dev_olga/src/interface/fortran_attr/axisgroup_interface_attr.F90

 r817 SUBROUTINE cxios_set_axisgroup_label(axisgroup_hdl, label, str_len, str_size, extent) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl CHARACTER (KIND=C_CHAR), DIMENSION(*)    :: label INTEGER (kind = C_INT), VALUE            :: str_len INTEGER (kind = C_INT), DIMENSION(*)     :: str_size INTEGER (kind = C_INT), DIMENSION(*)     :: extent END SUBROUTINE cxios_set_axisgroup_label SUBROUTINE cxios_get_axisgroup_label(axisgroup_hdl, label, str_size, extent) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl CHARACTER (KIND=C_CHAR), DIMENSION(*)    :: label INTEGER (kind = C_INT), VALUE            :: str_size INTEGER (kind = C_INT), DIMENSION(*)     :: extent END SUBROUTINE cxios_get_axisgroup_label FUNCTION cxios_is_defined_axisgroup_label(axisgroup_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_label INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl END FUNCTION cxios_is_defined_axisgroup_label SUBROUTINE cxios_set_axisgroup_long_name(axisgroup_hdl, long_name, long_name_size) BIND(C) USE ISO_C_BINDING SUBROUTINE cxios_set_axisgroup_prec(axisgroup_hdl, prec) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl INTEGER (KIND=C_INT)      , VALUE :: prec END SUBROUTINE cxios_set_axisgroup_prec SUBROUTINE cxios_get_axisgroup_prec(axisgroup_hdl, prec) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl INTEGER (KIND=C_INT)             :: prec END SUBROUTINE cxios_get_axisgroup_prec FUNCTION cxios_is_defined_axisgroup_prec(axisgroup_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_prec INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl END FUNCTION cxios_is_defined_axisgroup_prec SUBROUTINE cxios_set_axisgroup_standard_name(axisgroup_hdl, standard_name, standard_name_size) BIND(C) USE ISO_C_BINDING
• ## XIOS/dev/dev_olga/src/interface/fortran_attr/domain_interface_attr.F90

 r789 SUBROUTINE cxios_set_domain_prec(domain_hdl, prec) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl INTEGER (KIND=C_INT)      , VALUE :: prec END SUBROUTINE cxios_set_domain_prec SUBROUTINE cxios_get_domain_prec(domain_hdl, prec) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl INTEGER (KIND=C_INT)             :: prec END SUBROUTINE cxios_get_domain_prec FUNCTION cxios_is_defined_domain_prec(domain_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_prec INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl END FUNCTION cxios_is_defined_domain_prec SUBROUTINE cxios_set_domain_standard_name(domain_hdl, standard_name, standard_name_size) BIND(C) USE ISO_C_BINDING
• ## XIOS/dev/dev_olga/src/interface/fortran_attr/domaingroup_interface_attr.F90

 r789 SUBROUTINE cxios_set_domaingroup_prec(domaingroup_hdl, prec) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl INTEGER (KIND=C_INT)      , VALUE :: prec END SUBROUTINE cxios_set_domaingroup_prec SUBROUTINE cxios_get_domaingroup_prec(domaingroup_hdl, prec) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl INTEGER (KIND=C_INT)             :: prec END SUBROUTINE cxios_get_domaingroup_prec FUNCTION cxios_is_defined_domaingroup_prec(domaingroup_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_prec INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl END FUNCTION cxios_is_defined_domaingroup_prec SUBROUTINE cxios_set_domaingroup_standard_name(domaingroup_hdl, standard_name, standard_name_size) BIND(C) USE ISO_C_BINDING
• ## XIOS/dev/dev_olga/src/interface/fortran_attr/expand_domain_interface_attr.F90

 r981 INTERFACE ! Do not call directly / interface FORTRAN 2003 <-> C99 SUBROUTINE cxios_set_expand_domain_i_periodic(expand_domain_hdl, i_periodic) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl LOGICAL (KIND=C_BOOL)      , VALUE :: i_periodic END SUBROUTINE cxios_set_expand_domain_i_periodic SUBROUTINE cxios_get_expand_domain_i_periodic(expand_domain_hdl, i_periodic) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl LOGICAL (KIND=C_BOOL)             :: i_periodic END SUBROUTINE cxios_get_expand_domain_i_periodic FUNCTION cxios_is_defined_expand_domain_i_periodic(expand_domain_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_expand_domain_i_periodic INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl END FUNCTION cxios_is_defined_expand_domain_i_periodic SUBROUTINE cxios_set_expand_domain_j_periodic(expand_domain_hdl, j_periodic) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl LOGICAL (KIND=C_BOOL)      , VALUE :: j_periodic END SUBROUTINE cxios_set_expand_domain_j_periodic SUBROUTINE cxios_get_expand_domain_j_periodic(expand_domain_hdl, j_periodic) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl LOGICAL (KIND=C_BOOL)             :: j_periodic END SUBROUTINE cxios_get_expand_domain_j_periodic FUNCTION cxios_is_defined_expand_domain_j_periodic(expand_domain_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_expand_domain_j_periodic INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl END FUNCTION cxios_is_defined_expand_domain_j_periodic 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 SUBROUTINE cxios_set_file_time_stamp_format(file_hdl, time_stamp_format, time_stamp_format_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_stamp_format INTEGER  (kind = C_INT)     , VALUE        :: time_stamp_format_size END SUBROUTINE cxios_set_file_time_stamp_format SUBROUTINE cxios_get_file_time_stamp_format(file_hdl, time_stamp_format, time_stamp_format_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_stamp_format INTEGER  (kind = C_INT)     , VALUE        :: time_stamp_format_size END SUBROUTINE cxios_get_file_time_stamp_format FUNCTION cxios_is_defined_file_time_stamp_format(file_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_time_stamp_format INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl END FUNCTION cxios_is_defined_file_time_stamp_format SUBROUTINE cxios_set_file_time_stamp_name(file_hdl, time_stamp_name, time_stamp_name_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_stamp_name INTEGER  (kind = C_INT)     , VALUE        :: time_stamp_name_size END SUBROUTINE cxios_set_file_time_stamp_name SUBROUTINE cxios_get_file_time_stamp_name(file_hdl, time_stamp_name, time_stamp_name_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_stamp_name INTEGER  (kind = C_INT)     , VALUE        :: time_stamp_name_size END SUBROUTINE cxios_get_file_time_stamp_name FUNCTION cxios_is_defined_file_time_stamp_name(file_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_time_stamp_name INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl END FUNCTION cxios_is_defined_file_time_stamp_name SUBROUTINE cxios_set_file_time_units(file_hdl, time_units, time_units_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_units INTEGER  (kind = C_INT)     , VALUE        :: time_units_size END SUBROUTINE cxios_set_file_time_units SUBROUTINE cxios_get_file_time_units(file_hdl, time_units, time_units_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_units INTEGER  (kind = C_INT)     , VALUE        :: time_units_size END SUBROUTINE cxios_get_file_time_units FUNCTION cxios_is_defined_file_time_units(file_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_time_units INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl END FUNCTION cxios_is_defined_file_time_units SUBROUTINE cxios_set_file_timeseries(file_hdl, timeseries, timeseries_size) BIND(C) USE ISO_C_BINDING END FUNCTION cxios_is_defined_file_type SUBROUTINE cxios_set_file_uuid_format(file_hdl, uuid_format, uuid_format_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: uuid_format INTEGER  (kind = C_INT)     , VALUE        :: uuid_format_size END SUBROUTINE cxios_set_file_uuid_format SUBROUTINE cxios_get_file_uuid_format(file_hdl, uuid_format, uuid_format_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: uuid_format INTEGER  (kind = C_INT)     , VALUE        :: uuid_format_size END SUBROUTINE cxios_get_file_uuid_format FUNCTION cxios_is_defined_file_uuid_format(file_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_uuid_format INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl END FUNCTION cxios_is_defined_file_uuid_format SUBROUTINE cxios_set_file_uuid_name(file_hdl, uuid_name, uuid_name_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: uuid_name INTEGER  (kind = C_INT)     , VALUE        :: uuid_name_size END SUBROUTINE cxios_set_file_uuid_name SUBROUTINE cxios_get_file_uuid_name(file_hdl, uuid_name, uuid_name_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: uuid_name INTEGER  (kind = C_INT)     , VALUE        :: uuid_name_size END SUBROUTINE cxios_get_file_uuid_name FUNCTION cxios_is_defined_file_uuid_name(file_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_uuid_name INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl END FUNCTION cxios_is_defined_file_uuid_name END INTERFACE
• ## XIOS/dev/dev_olga/src/interface/fortran_attr/filegroup_interface_attr.F90

 r932 SUBROUTINE cxios_set_filegroup_time_stamp_format(filegroup_hdl, time_stamp_format, time_stamp_format_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_stamp_format INTEGER  (kind = C_INT)     , VALUE        :: time_stamp_format_size END SUBROUTINE cxios_set_filegroup_time_stamp_format SUBROUTINE cxios_get_filegroup_time_stamp_format(filegroup_hdl, time_stamp_format, time_stamp_format_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_stamp_format INTEGER  (kind = C_INT)     , VALUE        :: time_stamp_format_size END SUBROUTINE cxios_get_filegroup_time_stamp_format FUNCTION cxios_is_defined_filegroup_time_stamp_format(filegroup_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_time_stamp_format INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl END FUNCTION cxios_is_defined_filegroup_time_stamp_format SUBROUTINE cxios_set_filegroup_time_stamp_name(filegroup_hdl, time_stamp_name, time_stamp_name_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_stamp_name INTEGER  (kind = C_INT)     , VALUE        :: time_stamp_name_size END SUBROUTINE cxios_set_filegroup_time_stamp_name SUBROUTINE cxios_get_filegroup_time_stamp_name(filegroup_hdl, time_stamp_name, time_stamp_name_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_stamp_name INTEGER  (kind = C_INT)     , VALUE        :: time_stamp_name_size END SUBROUTINE cxios_get_filegroup_time_stamp_name FUNCTION cxios_is_defined_filegroup_time_stamp_name(filegroup_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_time_stamp_name INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl END FUNCTION cxios_is_defined_filegroup_time_stamp_name SUBROUTINE cxios_set_filegroup_time_units(filegroup_hdl, time_units, time_units_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_units INTEGER  (kind = C_INT)     , VALUE        :: time_units_size END SUBROUTINE cxios_set_filegroup_time_units SUBROUTINE cxios_get_filegroup_time_units(filegroup_hdl, time_units, time_units_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_units INTEGER  (kind = C_INT)     , VALUE        :: time_units_size END SUBROUTINE cxios_get_filegroup_time_units FUNCTION cxios_is_defined_filegroup_time_units(filegroup_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_time_units INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl END FUNCTION cxios_is_defined_filegroup_time_units SUBROUTINE cxios_set_filegroup_timeseries(filegroup_hdl, timeseries, timeseries_size) BIND(C) USE ISO_C_BINDING END FUNCTION cxios_is_defined_filegroup_type SUBROUTINE cxios_set_filegroup_uuid_format(filegroup_hdl, uuid_format, uuid_format_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: uuid_format INTEGER  (kind = C_INT)     , VALUE        :: uuid_format_size END SUBROUTINE cxios_set_filegroup_uuid_format SUBROUTINE cxios_get_filegroup_uuid_format(filegroup_hdl, uuid_format, uuid_format_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: uuid_format INTEGER  (kind = C_INT)     , VALUE        :: uuid_format_size END SUBROUTINE cxios_get_filegroup_uuid_format FUNCTION cxios_is_defined_filegroup_uuid_format(filegroup_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_uuid_format INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl END FUNCTION cxios_is_defined_filegroup_uuid_format SUBROUTINE cxios_set_filegroup_uuid_name(filegroup_hdl, uuid_name, uuid_name_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: uuid_name INTEGER  (kind = C_INT)     , VALUE        :: uuid_name_size END SUBROUTINE cxios_set_filegroup_uuid_name SUBROUTINE cxios_get_filegroup_uuid_name(filegroup_hdl, uuid_name, uuid_name_size) BIND(C) USE ISO_C_BINDING INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: uuid_name INTEGER  (kind = C_INT)     , VALUE        :: uuid_name_size END SUBROUTINE cxios_get_filegroup_uuid_name FUNCTION cxios_is_defined_filegroup_uuid_name(filegroup_hdl) BIND(C) USE ISO_C_BINDING LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_uuid_name INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl END FUNCTION cxios_is_defined_filegroup_uuid_name END INTERFACE