Changeset 1205
- Timestamp:
- 07/10/17 18:17:04 (6 years ago)
- Location:
- XIOS/dev/branch_yushan_merged
- Files:
-
- 77 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan_merged/extern/remap/src/clipper.cpp
r1146 r1205 1047 1047 1048 1048 //create a new edge array ... 1049 TEdge *edges = new TEdge [highI+1];1049 TEdge *edges = new TEdge [highI +1]; 1050 1050 1051 1051 bool IsFlat = true; -
XIOS/dev/branch_yushan_merged/extern/remap/src/gridRemap.hpp
r1155 r1205 14 14 Coord readPole(std::istream&); 15 15 16 16 extern CRemapGrid srcGrid; 17 extern CRemapGrid tgtGrid; 17 18 18 19 } -
XIOS/dev/branch_yushan_merged/extern/remap/src/intersect.cpp
r1155 r1205 17 17 using namespace std; 18 18 19 extern CRemapGrid srcGrid;20 #pragma omp threadprivate(srcGrid)21 22 extern CRemapGrid tgtGrid;23 #pragma omp threadprivate(tgtGrid)24 25 19 /** returns index of edge of a that is shared with b, 26 20 or NOT_FOUND if a and b do not share an edge */ … … 62 56 for (int j = 0; j < b.n; j++) 63 57 { 64 // share a full edge ? be carefull at the orientation 65 66 //if(squaredist(a.vertex[i], b.vertex[j]) > 1e-10*1e-10 || 67 // squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]) > 1e-10*1e-10 ) 68 //{ 69 //printf("A : squaredist(a.vertex[%d], b.vertex[%d]) = %.10e %d\n", 70 // i, j, squaredist(a.vertex[i], b.vertex[j]), 71 // squaredist(a.vertex[i], b.vertex[j]) > 1e-10*1e-10 ? true : false); 72 //printf("B : squaredist(a.vertex[%d], b.vertex[%d]) = %.10e %d\n", 73 // (i+1)%a.n, (j+1)%b.n, squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]), 74 // squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]) > 1e-10*1e-10 ? true : false); 75 76 assert(squaredist(a.vertex[ i ], b.vertex[ j ]) > 1e-10*1e-10 || 77 squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]) > 1e-10*1e-10); 78 79 //} 80 58 // share a full edge ? be carefull at the orientation 59 assert(squaredist(a.vertex[ i ], b.vertex[ j ]) > 1e-10*1e-10 || 60 squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]) > 1e-10*1e-10); 81 61 if ( squaredist(a.vertex[ i ], b.vertex[ j ]) < 1e-10*1e-10 && 82 62 squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+b.n-1)%b.n]) < 1e-10*1e-10) -
XIOS/dev/branch_yushan_merged/extern/remap/src/intersection_ym.cpp
r1155 r1205 16 16 using namespace std; 17 17 using namespace ClipperLib ; 18 19 extern CRemapGrid srcGrid;20 #pragma omp threadprivate(srcGrid)21 22 extern CRemapGrid tgtGrid;23 #pragma omp threadprivate(tgtGrid)24 18 25 19 double intersect_ym(Elt *a, Elt *b) -
XIOS/dev/branch_yushan_merged/extern/remap/src/libmapper.cpp
r1176 r1205 14 14 #include "mapper.hpp" 15 15 #include "cputime.hpp" // cputime 16 #include "gridRemap.hpp"17 18 16 #include <stdio.h> 19 17 20 18 using namespace sphereRemap ; 21 22 //extern CRemapGrid srcGrid;23 //#pragma omp threadprivate(srcGrid)24 25 //extern CRemapGrid tgtGrid;26 //#pragma omp threadprivate(tgtGrid)27 28 19 29 20 /* mapper is a ponter to a global class instance whoes members are allocated in the first step (finding the sizes of the weight arrays) … … 42 33 int order, int* n_weights) 43 34 { 44 printf("libmapper callded : remap_get_num_weights\n");45 35 assert(src_bounds_lon); 46 36 assert(src_bounds_lat); … … 125 115 double* centre_lon, double* centre_lat, double* areas) 126 116 { 127 printf("libmapper callded : remap_get_barycentres_and_areas\n");128 117 for (int i = 0; i < n_cell; i++) 129 118 { … … 149 138 extern "C" void remap_get_weights(double* weights, int* src_indices, int* dst_indices) 150 139 { 151 printf("libmapper callded : remap_get_weights\n");152 140 memcpy(weights, mapper->remapMatrix, mapper->nWeights*sizeof(double)); 153 141 memcpy(src_indices, mapper->srcAddress, mapper->nWeights*sizeof(int)); -
XIOS/dev/branch_yushan_merged/extern/remap/src/mapper.cpp
r1159 r1205 15 15 namespace sphereRemap { 16 16 17 extern CRemapGrid srcGrid;18 #pragma omp threadprivate(srcGrid)19 20 extern CRemapGrid tgtGrid;21 #pragma omp threadprivate(tgtGrid)22 23 17 /* A subdivition of an array into N sub-arays 24 18 can be represented by the length of the N arrays … … 275 269 276 270 MPI_Status *status = new MPI_Status[4*mpiSize]; 277 271 272 MPI_Waitall(nbSendRequest, sendRequest, status); 278 273 MPI_Waitall(nbRecvRequest, recvRequest, status); 279 MPI_Waitall(nbSendRequest, sendRequest, status);280 281 274 282 275 /* for all indices that have been received from requesting ranks: pack values and gradients, then send */ … … 629 622 MPI_Waitall(nbRecvRequest, recvRequest, status); 630 623 MPI_Waitall(nbSendRequest, sendRequest, status); 631 624 632 625 int nbNeighbourNodes = 0; 633 626 for (int rank = 0; rank < mpiSize; rank++) … … 699 692 } 700 693 701 /*702 for (int i = 0; i < elt->n; i++)703 {704 if (elt->neighbour[i] == NOT_FOUND)705 error_exit("neighbour not found");706 }707 */708 694 } 709 695 } … … 810 796 } 811 797 } 812 798 813 799 MPI_Waitall(nbRecvRequest, recvRequest, status); 814 800 MPI_Waitall(nbSendRequest, sendRequest, status); 815 816 801 817 802 char **sendBuffer2 = new char*[mpiSize]; 818 803 char **recvBuffer2 = new char*[mpiSize]; … … 838 823 Elt *elt2 = (Elt *) ((*it)->data); 839 824 /* recvElt is target, elt2 is source */ 840 //intersect(&recvElt[j], elt2);841 intersect_ym(&recvElt[j], elt2);825 intersect(&recvElt[j], elt2); 826 //intersect_ym(&recvElt[j], elt2); 842 827 } 843 844 828 if (recvElt[j].is.size() > 0) sentMessageSize[rank] += packIntersectionSize(recvElt[j]); 845 829 … … 860 844 } 861 845 delete [] recvElt; 862 863 846 } 864 847 } … … 898 881 MPI_Waitall(nbRecvRequest, recvRequest, status); 899 882 MPI_Waitall(nbSendRequest, sendRequest, status); 900 901 902 883 903 884 delete [] sendRequest; -
XIOS/dev/branch_yushan_merged/extern/remap/src/node.cpp
r1172 r1205 472 472 q->child.resize(MAX_NODE_SZ/2 + 1); 473 473 assert(thIs->child.size() == MAX_NODE_SZ+1); 474 if(thIs->closest(thIs->child, FARTHEST) == 0) 475 thIs->tree->ref = thIs->closest(thIs->child, FARTHEST); // farthest from centre 476 477 thIs->tree->ref = thIs->closest(thIs->child, FARTHEST); // farthest from centre 478 479 474 thIs->tree->ref = thIs->closest(thIs->child, FARTHEST); // farthest from centre 480 475 std::sort(thIs->child.begin(), thIs->child.end(), compareDist); 481 476 for (int i = 0; i < MAX_NODE_SZ+1; i++) -
XIOS/dev/branch_yushan_merged/extern/remap/src/parallel_tree.cpp
r1172 r1205 16 16 17 17 static const int assignLevel = 2; 18 19 extern CRemapGrid srcGrid;20 #pragma omp threadprivate(srcGrid)21 22 extern CRemapGrid tgtGrid;23 #pragma omp threadprivate(tgtGrid)24 18 25 19 // only the circle is packed, rest of node will be initialized on unpacking -
XIOS/dev/branch_yushan_merged/extern/remap/src/polyg.cpp
r1176 r1205 3 3 #include <cassert> 4 4 #include <iostream> 5 #include <stdio.h>6 5 #include "elt.hpp" 7 6 #include "errhandle.hpp" … … 175 174 t[2] = x[ii]; 176 175 double sc=scalarprod(crossprod(t[1] - t[0], t[2] - t[0]), t[0]) ; 177 //assert(sc >= -1e-10); // Error: tri a l'env (wrong orientation) 178 if(sc < -1e-10) 179 { 180 printf("N=%d, sc = %f, t[0]=(%f,%f,%f), t[1]=(%f,%f,%f), t[2]=(%f,%f,%f)\n", N, sc, 181 t[0].x, t[0].y, t[0].z, 182 t[1].x, t[1].y, t[1].z, 183 t[2].x, t[2].y, t[2].z); 184 assert(sc >= -1e-10); 185 } 176 assert(sc >= -1e-10); // Error: tri a l'env (wrong orientation) 186 177 double area_gc = triarea(t[0], t[1], t[2]); 187 178 double area_sc_gc_moon = 0; -
XIOS/dev/branch_yushan_merged/extern/remap/src/triple.cpp
r1176 r1205 3 3 namespace sphereRemap { 4 4 5 const Coord ORIGIN(0.0, 0.0, 0.0);5 extern const Coord ORIGIN(0.0, 0.0, 0.0); 6 6 7 7 std::ostream& operator<<(std::ostream& os, const Coord& c) { -
XIOS/dev/branch_yushan_merged/src/attribute.cpp
r1134 r1205 54 54 ///-------------------------------------------------------------- 55 55 56 57 56 CMessage& operator<<(CMessage& msg,CAttribute& type) 58 57 { -
XIOS/dev/branch_yushan_merged/src/buffer_client.cpp
r1179 r1205 12 12 size_t CClientBuffer::maxRequestSize = 0; 13 13 14 CClientBuffer::CClientBuffer(MPI_Comm interComm, int serverRank, StdSize bufferSize, StdSize maxBufferedEvents)14 CClientBuffer::CClientBuffer(MPI_Comm interComm, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize, StdSize maxBufferedEvents) 15 15 : interComm(interComm) 16 16 , serverRank(serverRank) 17 17 , bufferSize(bufferSize) 18 , estimatedMaxEventSize(estimatedMaxEventSize) 19 , maxEventSize(0) 18 20 , current(0) 19 21 , count(0) … … 43 45 bool CClientBuffer::isBufferFree(int size) 44 46 { 45 if (size > maxRequestSize) maxRequestSize = size;46 47 47 if (size > bufferSize) 48 48 ERROR("bool CClientBuffer::isBufferFree(int size)", 49 49 << "The requested size (" << size << " bytes) is too big to fit the buffer (" << bufferSize << " bytes), please increase the client buffer size." << endl); 50 51 if (size > maxEventSize) 52 { 53 maxEventSize = size; 54 55 if (size > estimatedMaxEventSize) 56 error(0) << "WARNING: Unexpected event of size " << size << " for server " << serverRank 57 << " (estimated max event size = " << estimatedMaxEventSize << ")" << std::endl; 58 59 if (size > maxRequestSize) maxRequestSize = size; 60 } 61 50 62 51 63 return (size <= remain() && bufferedEvents < maxBufferedEvents); -
XIOS/dev/branch_yushan_merged/src/buffer_client.hpp
r1134 r1205 18 18 #pragma omp threadprivate(maxRequestSize) 19 19 20 CClientBuffer(MPI_Comm intercomm, int serverRank, StdSize bufferSize, StdSize maxBufferedEvents);20 CClientBuffer(MPI_Comm intercomm, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize, StdSize maxBufferedEvents); 21 21 ~CClientBuffer(); 22 22 … … 33 33 int count; 34 34 int bufferedEvents; 35 int maxEventSize; 35 36 const int maxBufferedEvents; 36 37 const int bufferSize; 38 const int estimatedMaxEventSize; 37 39 const int serverRank; 38 40 bool pending; -
XIOS/dev/branch_yushan_merged/src/client.cpp
r1196 r1205 52 52 } 53 53 CTimer::get("XIOS").resume() ; 54 CTimer::get("XIOS init ").resume() ;54 CTimer::get("XIOS init/finalize").resume() ; 55 55 boost::hash<string> hashString ; 56 56 … … 151 151 152 152 CTimer::get("XIOS").resume() ; 153 CTimer::get("XIOS init ").resume() ;153 CTimer::get("XIOS init/finalize").resume() ; 154 154 155 155 if (CXios::usingServer) … … 269 269 MPI_Comm_free(&intraComm); 270 270 271 CTimer::get("XIOS finalize").suspend() ;271 CTimer::get("XIOS init/finalize").suspend() ; 272 272 CTimer::get("XIOS").suspend() ; 273 273 … … 281 281 info(20) << "Client "<<rank<<" : Client side context is finalized "<< endl ; 282 282 283 /* #pragma omp critical (_output) 284 { 285 report(0) <<" Performance report : total time spent for XIOS : "<< CTimer::get("XIOS").getCumulatedTime()<<" s"<<endl ; 286 report(0)<< " Performance report : time spent for waiting free buffer : "<< CTimer::get("Blocking time").getCumulatedTime()<<" s"<<endl ; 287 report(0)<< " Performance report : Ratio : "<< CTimer::get("Blocking time").getCumulatedTime()/CTimer::get("XIOS").getCumulatedTime()*100.<<" %"<<endl ; 288 report(0)<< " Performance report : This ratio must be close to zero. Otherwise it may be usefull to increase buffer size or numbers of server"<<endl ; 289 report(0)<< " Memory report : Current buffer_size : "<<CXios::bufferSize<<endl ; 290 report(0)<< " Memory report : Minimum buffer size required : " << CClientBuffer::maxRequestSize << " bytes" << endl ; 291 report(0)<< " Memory report : increasing it by a factor will increase performance, depending of the volume of data wrote in file at each time step of the file"<<endl ; 292 } 293 */ 283 /*#pragma omp critical (_output) 284 { 285 report(0) <<" Performance report : Whole time from XIOS init and finalize: "<< CTimer::get("XIOS init/finalize").getCumulatedTime()<<" s"<<endl ; 286 report(0) <<" Performance report : total time spent for XIOS : "<< CTimer::get("XIOS").getCumulatedTime()<<" s"<<endl ; 287 report(0)<< " Performance report : time spent for waiting free buffer : "<< CTimer::get("Blocking time").getCumulatedTime()<<" s"<<endl ; 288 report(0)<< " Performance report : Ratio : "<< CTimer::get("Blocking time").getCumulatedTime()/CTimer::get("XIOS init/finalize").getCumulatedTime()*100.<<" %"<<endl ; 289 report(0)<< " Performance report : This ratio must be close to zero. Otherwise it may be usefull to increase buffer size or numbers of server"<<endl ; 290 // report(0)<< " Memory report : Current buffer_size : "<<CXios::bufferSize<<endl ; 291 report(0)<< " Memory report : Minimum buffer size required : " << CClientBuffer::maxRequestSize << " bytes" << endl ; 292 report(0)<< " Memory report : increasing it by a factor will increase performance, depending of the volume of data wrote in file at each time step of the file"<<endl ; 293 report(100)<<CTimer::getAllCumulatedTime()<<endl ; 294 }*/ 295 294 296 } 295 297 -
XIOS/dev/branch_yushan_merged/src/config/axis_attribute_private.conf
r821 r1205 1 1 DECLARE_ATTRIBUTE_PRIVATE(int, global_zoom_begin) 2 2 DECLARE_ATTRIBUTE_PRIVATE(int, global_zoom_n) 3 DECLARE_ARRAY_PRIVATE(int, 1, global_zoom_index) -
XIOS/dev/branch_yushan_merged/src/config/field_attribute.conf
r998 r1205 16 16 DECLARE_ATTRIBUTE(bool, read_access) 17 17 DECLARE_ATTRIBUTE(bool, indexed_output) 18 DECLARE_ATTRIBUTE(bool, check_if_active) 18 19 19 20 DECLARE_ATTRIBUTE(StdString, domain_ref) -
XIOS/dev/branch_yushan_merged/src/config/file_attribute.conf
r1160 r1205 10 10 DECLARE_ATTRIBUTE(CDuration, split_freq) 11 11 DECLARE_ATTRIBUTE(StdString, split_freq_format) 12 DECLARE_ATTRIBUTE(CDuration, split_start_offset) 13 DECLARE_ATTRIBUTE(CDuration, split_end_offset) 14 DECLARE_ATTRIBUTE(string, split_last_date) 12 15 DECLARE_ATTRIBUTE(bool, enabled) 13 16 DECLARE_ENUM2(type, one_file, multiple_file) 14 17 DECLARE_ENUM2(format, netcdf4, netcdf4_classic) 15 18 DECLARE_ENUM2(convention, CF, UGRID) 19 DECLARE_ATTRIBUTE(StdString, convention_str) 16 20 DECLARE_ENUM2(par_access, collective, independent) 17 21 DECLARE_ATTRIBUTE(bool, append) -
XIOS/dev/branch_yushan_merged/src/config/zoom_axis_attribute.conf
r787 r1205 2 2 DECLARE_ATTRIBUTE(int, begin) 3 3 DECLARE_ATTRIBUTE(int, n) 4 DECLARE_ARRAY(int ,1 , index) -
XIOS/dev/branch_yushan_merged/src/context_client.cpp
r1134 r1205 234 234 error(0) << "WARNING: Unexpected request for buffer to communicate with server " << rank << std::endl; 235 235 mapBufferSize_[rank] = CXios::minBufferSize; 236 } 237 CClientBuffer* buffer = buffers[rank] = new CClientBuffer(interComm, rank, mapBufferSize_[rank], maxBufferedEvents); 236 maxEventSizes[rank] = CXios::minBufferSize; 237 } 238 CClientBuffer* buffer = buffers[rank] = new CClientBuffer(interComm, rank, mapBufferSize_[rank], maxEventSizes[rank], maxBufferedEvents); 238 239 // Notify the server 239 240 CBufferOut* bufOut = buffer->getBuffer(sizeof(StdSize)); … … 283 284 { 284 285 mapBufferSize_ = mapSize; 286 maxEventSizes = maxEventSize; 285 287 286 288 // Compute the maximum number of events that can be safely buffered. … … 298 300 299 301 if (minBufferSizeEventSizeRatio < 1.0) 302 { 300 303 ERROR("void CContextClient::setBufferSize(const std::map<int,StdSize>& mapSize, const std::map<int,StdSize>& maxEventSize)", 301 304 << "The buffer sizes and the maximum events sizes are incoherent."); 305 } 306 else if (minBufferSizeEventSizeRatio == std::numeric_limits<double>::max()) 307 minBufferSizeEventSizeRatio = 1.0; // In this case, maxBufferedEvents will never be used but we want to avoid any floating point exception 302 308 303 309 maxBufferedEvents = size_t(2 * minBufferSizeEventSizeRatio) // there is room for two local buffers on the server -
XIOS/dev/branch_yushan_merged/src/context_client.hpp
r1134 r1205 76 76 //! Mapping of server and buffer size for each connection to server 77 77 std::map<int,StdSize> mapBufferSize_; 78 //! Maximum event sizes estimated for each connection to server 79 std::map<int,StdSize> maxEventSizes; 78 80 //! Maximum number of events that can be buffered 79 81 StdSize maxBufferedEvents; -
XIOS/dev/branch_yushan_merged/src/cxios.cpp
r1161 r1205 163 163 delete globalRegistry ; 164 164 } 165 CClient::closeInfoStream();166 167 165 168 166 #ifdef XIOS_MEMTRACK … … 177 175 MemTrack::TrackDumpBlocks(); 178 176 #endif 177 178 CClient::closeInfoStream(); 179 179 180 180 #endif … … 237 237 delete globalRegistry ; 238 238 } 239 240 239 CServer::finalize(); 241 240 241 #ifdef XIOS_MEMTRACK 242 243 #ifdef XIOS_MEMTRACK_LIGHT 244 report(10) << " Memory report : current memory used by XIOS : "<< MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 245 report(10) << " Memory report : maximum memory used by XIOS : "<< MemTrack::getMaxMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 246 #endif 247 248 #ifdef XIOS_MEMTRACK_FULL 249 MemTrack::TrackListMemoryUsage() ; 250 MemTrack::TrackDumpBlocks(); 251 #endif 252 #endif 242 253 CServer::closeInfoStream(); 243 254 } -
XIOS/dev/branch_yushan_merged/src/data_output.cpp
r1176 r1205 7 7 namespace xios 8 8 { 9 /// ////////////////////// D finitions ////////////////////// ///9 /// ////////////////////// Définitions ////////////////////// /// 10 10 11 11 CDataOutput::~CDataOutput(void) -
XIOS/dev/branch_yushan_merged/src/distribution_server.cpp
r930 r1205 34 34 } 35 35 36 CDistributionServer::CDistributionServer(int rank, 37 const std::vector<CArray<int,1> >& globalIndexElements, 38 const CArray<int,1>& elementOrder, 39 const std::vector<int>& nZoomBeginServer, 40 const std::vector<int>& nZoomSizeServer, 41 const std::vector<int>& nZoomBeginGlobal, 42 const std::vector<int>& nGlobal) 43 : CDistribution(rank, nGlobal.size()), nGlobal_(nGlobal), nZoomBeginGlobal_(nZoomBeginGlobal), 44 nZoomSize_(nZoomSizeServer), nZoomBegin_(nZoomBeginServer), globalLocalIndexMap_() 45 { 46 createGlobalIndex(globalIndexElements, elementOrder); 47 } 48 36 49 CDistributionServer::~CDistributionServer() 37 50 { … … 89 102 90 103 /*! 104 Create global index on server side 105 Like the similar function on client side, this function serves on creating global index 106 for data written by the server. The global index is used to calculating local index of data 107 written on each server 108 \param[in] globalIndexElement global index on server side of each element of grid (scalar, axis, domain) 109 \param[in] elementOrder the order of elements of grid (e.x: domain->axis or domain->scalar) 110 */ 111 void CDistributionServer::createGlobalIndex(const std::vector<CArray<int,1> >& globalIndexElements, 112 const CArray<int,1>& elementOrder) 113 { 114 int numElement = elementOrder.numElements(), elementIdx = 0; 115 std::vector<int> indexMap(numElement); 116 for (int i = 0; i < numElement; ++i) 117 { 118 indexMap[i] = elementIdx; 119 if (2 == elementOrder(i)) 120 { 121 elementIdx += 2; 122 } 123 else 124 ++elementIdx; 125 } 126 127 std::vector<size_t> elementGlobalSize(numElement); 128 size_t globalSize = 1; 129 for (int i = 0; i < numElement; ++i) 130 { 131 int elementType = elementOrder(i); 132 elementGlobalSize[i] = globalSize; 133 if (2 == elementType) // domain 134 { 135 globalSize *= nGlobal_[indexMap[i]+1] * nGlobal_[indexMap[i]]; 136 } 137 else // axis or scalar 138 { 139 globalSize *= nGlobal_[indexMap[i]]; 140 } 141 } 142 143 size_t ssize = 1; 144 for (int i = 0; i < globalIndexElements.size(); ++i) ssize *= globalIndexElements[i].numElements(); 145 this->globalIndex_.resize(ssize); 146 globalLocalIndexMap_.rehash(std::ceil(ssize/globalLocalIndexMap_.max_load_factor())); 147 148 std::vector<int> idxLoop(numElement,0); 149 std::vector<int> currentIndex(numElement); 150 int innerLoopSize = globalIndexElements[0].numElements(); 151 152 size_t idx = 0; 153 while (idx<ssize) 154 { 155 for (int i = 0; i < numElement-1; ++i) 156 { 157 if (idxLoop[i] == globalIndexElements[i].numElements()) 158 { 159 idxLoop[i] = 0; 160 ++idxLoop[i+1]; 161 } 162 } 163 164 for (int i = 1; i < numElement; ++i) currentIndex[i] = globalIndexElements[i](idxLoop[i]); 165 166 size_t mulDim, globalIndex; 167 for (int i = 0; i < innerLoopSize; ++i) 168 { 169 globalIndex = 0; 170 currentIndex[0] = globalIndexElements[0](i); 171 172 for (int k = 0; k < numElement; ++k) 173 { 174 globalIndex += (currentIndex[k])*elementGlobalSize[k]; 175 } 176 globalLocalIndexMap_[globalIndex] = idx; 177 this->globalIndex_(idx) = globalIndex; 178 ++idx; 179 } 180 idxLoop[0] += innerLoopSize; 181 } 182 } 183 184 /*! 91 185 Compute local index for writing data on server 92 186 \param [in] globalIndex global index received from client -
XIOS/dev/branch_yushan_merged/src/distribution_server.hpp
r930 r1205 31 31 const std::vector<int>& nGlobal); 32 32 33 CDistributionServer(int rank, 34 const std::vector<CArray<int,1> >& globalIndexElements, 35 const CArray<int,1>& elementOrder, 36 const std::vector<int>& nZoomBeginServer, 37 const std::vector<int>& nZoomSizeServer, 38 const std::vector<int>& nZoomBeginGlobal, 39 const std::vector<int>& nGlobal); 40 33 41 /** Default destructor */ 34 42 virtual ~CDistributionServer(); … … 44 52 protected: 45 53 virtual void createGlobalIndex(); 54 void createGlobalIndex(const std::vector<CArray<int,1> >& globalIndexElements, 55 const CArray<int,1>& elementOrder); 46 56 47 57 protected: -
XIOS/dev/branch_yushan_merged/src/filter/file_writer_filter.cpp
r1119 r1205 17 17 void CFileWriterFilter::onInputReady(std::vector<CDataPacketPtr> data) 18 18 { 19 bool ignoreMissingValue = (!field->detect_missing_value.isEmpty() && 20 !field->default_value.isEmpty() && 21 field->detect_missing_value == true); 22 if (ignoreMissingValue) 19 CDataPacketPtr packet = data[0]; 20 21 const bool detectMissingValue = (!field->detect_missing_value.isEmpty() 22 && !field->default_value.isEmpty() 23 && field->detect_missing_value == true); 24 if (detectMissingValue) 23 25 { 24 double missingValue = field->default_value;25 size_t nbData = data[0]->data.numElements();26 const double missingValue = field->default_value; 27 const size_t nbData = packet->data.numElements(); 26 28 for (size_t idx = 0; idx < nbData; ++idx) 27 29 { 28 if (NumTraits<double>::isnan( data[0]->data(idx)))29 data[0]->data(idx) = missingValue;30 if (NumTraits<double>::isnan(packet->data(idx))) 31 packet->data(idx) = missingValue; 30 32 } 31 } 33 } 32 34 33 field->sendUpdateData( data[0]->data);35 field->sendUpdateData(packet->data); 34 36 } 35 37 -
XIOS/dev/branch_yushan_merged/src/filter/source_filter.cpp
r1018 r1205 37 37 if (hasMissingValue) 38 38 { 39 double nanValue = std::numeric_limits<double>::quiet_NaN();40 size_t nbData = packet->data.numElements();39 const double nanValue = std::numeric_limits<double>::quiet_NaN(); 40 const size_t nbData = packet->data.numElements(); 41 41 for (size_t idx = 0; idx < nbData; ++idx) 42 42 { … … 82 82 } 83 83 84 // Convert missing values to NaN 85 if (hasMissingValue) 86 { 87 const double nanValue = std::numeric_limits<double>::quiet_NaN(); 88 const size_t nbData = packet->data.numElements(); 89 for (size_t idx = 0; idx < nbData; ++idx) 90 { 91 if (defaultValue == packet->data(idx)) 92 packet->data(idx) = nanValue; 93 } 94 } 95 84 96 onOutputReady(packet); 85 97 } -
XIOS/dev/branch_yushan_merged/src/filter/source_filter.hpp
r1018 r1205 62 62 CGrid* grid; //!< The grid attached to the data the filter can accept 63 63 const CDuration offset; //!< The offset applied to the timestamp of all packets 64 bool hasMissingValue;65 double defaultValue;64 const bool hasMissingValue; 65 const double defaultValue; 66 66 }; // class CSourceFilter 67 67 } // namespace xios -
XIOS/dev/branch_yushan_merged/src/filter/store_filter.cpp
r1119 r1205 6 6 namespace xios 7 7 { 8 CStoreFilter::CStoreFilter(CGarbageCollector& gc, CContext* context, CGrid* grid) 8 CStoreFilter::CStoreFilter(CGarbageCollector& gc, CContext* context, CGrid* grid, 9 bool detectMissingValues /*= false*/, double missingValue /*= 0.0*/) 9 10 : CInputPin(gc, 1) 10 11 , gc(gc) 11 12 , context(context) 12 13 , grid(grid) 14 , detectMissingValues(detectMissingValues) 15 , missingValue(missingValue) 13 16 { 14 17 if (!context) … … 75 78 void CStoreFilter::onInputReady(std::vector<CDataPacketPtr> data) 76 79 { 77 packets.insert(std::make_pair(data[0]->timestamp, data[0])); 80 CDataPacketPtr packet = data[0]; 81 82 packets.insert(std::make_pair(packet->timestamp, packet)); 78 83 // The packet is always destroyed by the garbage collector 79 84 // so we register but never unregister 80 gc.registerObject(this, data[0]->timestamp); 85 gc.registerObject(this, packet->timestamp); 86 87 if (detectMissingValues) 88 { 89 const size_t nbData = packet->data.numElements(); 90 for (size_t idx = 0; idx < nbData; ++idx) 91 { 92 if (NumTraits<double>::isnan(packet->data(idx))) 93 packet->data(idx) = missingValue; 94 } 95 } 81 96 } 82 97 -
XIOS/dev/branch_yushan_merged/src/filter/store_filter.hpp
r1119 r1205 22 22 * \param context the context to which the data belongs 23 23 * \param grid the grid to which the data is attached 24 * \param detectMissingValues whether missing values should be detected 25 * \param missingValue the value to use to replace missing values 24 26 */ 25 CStoreFilter(CGarbageCollector& gc, CContext* context, CGrid* grid); 27 CStoreFilter(CGarbageCollector& gc, CContext* context, CGrid* grid, 28 bool detectMissingValues = false, double missingValue = 0.0); 26 29 27 30 /*! … … 75 78 CContext* context; //!< The context to which the data belongs 76 79 CGrid* grid; //!< The grid attached to the data the filter can accept 80 const bool detectMissingValues; //!< Whether missing values should be detected 81 const double missingValue; //!< The value to use to replace missing values 77 82 std::map<Time, CDataPacketPtr> packets; //<! The stored packets 78 83 }; // class CStoreFilter -
XIOS/dev/branch_yushan_merged/src/filter/temporal_filter.hpp
r1124 r1205 48 48 49 49 private: 50 // Warning the declaration order matters here, double-check the constructor before changing it 51 CArray<double, 1> tmpData; //!< The array of data used for temporary storage 50 52 const boost::scoped_ptr<func::CFunctor> functor; //!< The functor corresponding to the temporal operation 51 CArray<double, 1> tmpData; //!< The array of data used for temporary storage 53 const bool isOnceOperation; //!< True if the operation should be computed just once 54 const bool isInstantOperation; //!< True if the operation is instant 52 55 const CDuration samplingFreq; //!< The sampling frequency, i.e. the frequency at which the input data will be used 53 56 const CDuration samplingOffset; //!< The sampling offset, i.e. the offset after which the input data will be used … … 56 59 CDate nextOperationDate; //!< The date of the next operation 57 60 bool isFirstOperation; //!< True before the first operation was been computed 58 const bool isOnceOperation; //!< True if the operation should be computed just once59 const bool isInstantOperation; //!< True if the operation is instant60 61 }; // class CTemporalFilter 61 62 } // namespace xios -
XIOS/dev/branch_yushan_merged/src/interface/c/icdata.cpp
r1134 r1205 119 119 CTimer::get("XIOS close definition").resume(); 120 120 CContext* context = CContext::getCurrent(); 121 122 121 context->closeDefinition(); 123 124 122 CTimer::get("XIOS close definition").suspend(); 125 123 CTimer::get("XIOS").suspend(); … … 130 128 CTimer::get("XIOS").resume(); 131 129 CTimer::get("XIOS context finalize").resume(); 132 133 134 135 130 CContext* context = CContext::getCurrent(); 136 131 context->finalize(); -
XIOS/dev/branch_yushan_merged/src/interface/c_attr/icfield_attr.cpp
r1005 r1205 119 119 120 120 121 void cxios_set_field_check_if_active(field_Ptr field_hdl, bool check_if_active) 122 { 123 CTimer::get("XIOS").resume(); 124 field_hdl->check_if_active.setValue(check_if_active); 125 CTimer::get("XIOS").suspend(); 126 } 127 128 void cxios_get_field_check_if_active(field_Ptr field_hdl, bool* check_if_active) 129 { 130 CTimer::get("XIOS").resume(); 131 *check_if_active = field_hdl->check_if_active.getInheritedValue(); 132 CTimer::get("XIOS").suspend(); 133 } 134 135 bool cxios_is_defined_field_check_if_active(field_Ptr field_hdl) 136 { 137 CTimer::get("XIOS").resume(); 138 bool isDefined = field_hdl->check_if_active.hasInheritedValue(); 139 CTimer::get("XIOS").suspend(); 140 return isDefined; 141 } 142 143 121 144 void cxios_set_field_compression_level(field_Ptr field_hdl, int compression_level) 122 145 { -
XIOS/dev/branch_yushan_merged/src/interface/c_attr/icfieldgroup_attr.cpp
r1005 r1205 119 119 120 120 121 void cxios_set_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl, bool check_if_active) 122 { 123 CTimer::get("XIOS").resume(); 124 fieldgroup_hdl->check_if_active.setValue(check_if_active); 125 CTimer::get("XIOS").suspend(); 126 } 127 128 void cxios_get_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl, bool* check_if_active) 129 { 130 CTimer::get("XIOS").resume(); 131 *check_if_active = fieldgroup_hdl->check_if_active.getInheritedValue(); 132 CTimer::get("XIOS").suspend(); 133 } 134 135 bool cxios_is_defined_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl) 136 { 137 CTimer::get("XIOS").resume(); 138 bool isDefined = fieldgroup_hdl->check_if_active.hasInheritedValue(); 139 CTimer::get("XIOS").suspend(); 140 return isDefined; 141 } 142 143 121 144 void cxios_set_fieldgroup_compression_level(fieldgroup_Ptr fieldgroup_hdl, int compression_level) 122 145 { -
XIOS/dev/branch_yushan_merged/src/interface/c_attr/icfile_attr.cpp
r1052 r1205 90 90 91 91 92 void cxios_set_file_convention_str(file_Ptr file_hdl, const char * convention_str, int convention_str_size) 93 { 94 std::string convention_str_str; 95 if (!cstr2string(convention_str, convention_str_size, convention_str_str)) return; 96 CTimer::get("XIOS").resume(); 97 file_hdl->convention_str.setValue(convention_str_str); 98 CTimer::get("XIOS").suspend(); 99 } 100 101 void cxios_get_file_convention_str(file_Ptr file_hdl, char * convention_str, int convention_str_size) 102 { 103 CTimer::get("XIOS").resume(); 104 if (!string_copy(file_hdl->convention_str.getInheritedValue(), convention_str, convention_str_size)) 105 ERROR("void cxios_get_file_convention_str(file_Ptr file_hdl, char * convention_str, int convention_str_size)", << "Input string is too short"); 106 CTimer::get("XIOS").suspend(); 107 } 108 109 bool cxios_is_defined_file_convention_str(file_Ptr file_hdl) 110 { 111 CTimer::get("XIOS").resume(); 112 bool isDefined = file_hdl->convention_str.hasInheritedValue(); 113 CTimer::get("XIOS").suspend(); 114 return isDefined; 115 } 116 117 92 118 void cxios_set_file_cyclic(file_Ptr file_hdl, bool cyclic) 93 119 { -
XIOS/dev/branch_yushan_merged/src/interface/c_attr/icfilegroup_attr.cpp
r1052 r1205 90 90 91 91 92 void cxios_set_filegroup_convention_str(filegroup_Ptr filegroup_hdl, const char * convention_str, int convention_str_size) 93 { 94 std::string convention_str_str; 95 if (!cstr2string(convention_str, convention_str_size, convention_str_str)) return; 96 CTimer::get("XIOS").resume(); 97 filegroup_hdl->convention_str.setValue(convention_str_str); 98 CTimer::get("XIOS").suspend(); 99 } 100 101 void cxios_get_filegroup_convention_str(filegroup_Ptr filegroup_hdl, char * convention_str, int convention_str_size) 102 { 103 CTimer::get("XIOS").resume(); 104 if (!string_copy(filegroup_hdl->convention_str.getInheritedValue(), convention_str, convention_str_size)) 105 ERROR("void cxios_get_filegroup_convention_str(filegroup_Ptr filegroup_hdl, char * convention_str, int convention_str_size)", << "Input string is too short"); 106 CTimer::get("XIOS").suspend(); 107 } 108 109 bool cxios_is_defined_filegroup_convention_str(filegroup_Ptr filegroup_hdl) 110 { 111 CTimer::get("XIOS").resume(); 112 bool isDefined = filegroup_hdl->convention_str.hasInheritedValue(); 113 CTimer::get("XIOS").suspend(); 114 return isDefined; 115 } 116 117 92 118 void cxios_set_filegroup_cyclic(filegroup_Ptr filegroup_hdl, bool cyclic) 93 119 { -
XIOS/dev/branch_yushan_merged/src/interface/c_attr/icinterpolate_domain_attr.cpp
r1014 r1205 62 62 CTimer::get("XIOS").resume(); 63 63 bool isDefined = interpolate_domain_hdl->order.hasInheritedValue(); 64 CTimer::get("XIOS").suspend(); 65 return isDefined; 66 } 67 68 69 void cxios_set_interpolate_domain_quantity(interpolate_domain_Ptr interpolate_domain_hdl, bool quantity) 70 { 71 CTimer::get("XIOS").resume(); 72 interpolate_domain_hdl->quantity.setValue(quantity); 73 CTimer::get("XIOS").suspend(); 74 } 75 76 void cxios_get_interpolate_domain_quantity(interpolate_domain_Ptr interpolate_domain_hdl, bool* quantity) 77 { 78 CTimer::get("XIOS").resume(); 79 *quantity = interpolate_domain_hdl->quantity.getInheritedValue(); 80 CTimer::get("XIOS").suspend(); 81 } 82 83 bool cxios_is_defined_interpolate_domain_quantity(interpolate_domain_Ptr interpolate_domain_hdl) 84 { 85 CTimer::get("XIOS").resume(); 86 bool isDefined = interpolate_domain_hdl->quantity.hasInheritedValue(); 64 87 CTimer::get("XIOS").suspend(); 65 88 return isDefined; -
XIOS/dev/branch_yushan_merged/src/interface/c_attr/iczoom_axis_attr.cpp
r787 r1205 41 41 42 42 43 void cxios_set_zoom_axis_index(zoom_axis_Ptr zoom_axis_hdl, int* index, int* extent) 44 { 45 CTimer::get("XIOS").resume(); 46 CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData); 47 zoom_axis_hdl->index.reference(tmp.copy()); 48 CTimer::get("XIOS").suspend(); 49 } 50 51 void cxios_get_zoom_axis_index(zoom_axis_Ptr zoom_axis_hdl, int* index, int* extent) 52 { 53 CTimer::get("XIOS").resume(); 54 CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData); 55 tmp=zoom_axis_hdl->index.getInheritedValue(); 56 CTimer::get("XIOS").suspend(); 57 } 58 59 bool cxios_is_defined_zoom_axis_index(zoom_axis_Ptr zoom_axis_hdl) 60 { 61 CTimer::get("XIOS").resume(); 62 bool isDefined = zoom_axis_hdl->index.hasInheritedValue(); 63 CTimer::get("XIOS").suspend(); 64 return isDefined; 65 } 66 67 43 68 void cxios_set_zoom_axis_n(zoom_axis_Ptr zoom_axis_hdl, int n) 44 69 { -
XIOS/dev/branch_yushan_merged/src/interface/fortran/idata.F90
r1134 r1205 465 465 INTEGER :: f_return_comm 466 466 467 468 467 IF (PRESENT(local_comm)) THEN 469 468 f_local_comm=local_comm -
XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/field_interface_attr.F90
r1005 r1205 92 92 93 93 94 SUBROUTINE cxios_set_field_check_if_active(field_hdl, check_if_active) BIND(C) 95 USE ISO_C_BINDING 96 INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 97 LOGICAL (KIND=C_BOOL) , VALUE :: check_if_active 98 END SUBROUTINE cxios_set_field_check_if_active 99 100 SUBROUTINE cxios_get_field_check_if_active(field_hdl, check_if_active) BIND(C) 101 USE ISO_C_BINDING 102 INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 103 LOGICAL (KIND=C_BOOL) :: check_if_active 104 END SUBROUTINE cxios_get_field_check_if_active 105 106 FUNCTION cxios_is_defined_field_check_if_active(field_hdl) BIND(C) 107 USE ISO_C_BINDING 108 LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_check_if_active 109 INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 110 END FUNCTION cxios_is_defined_field_check_if_active 111 112 94 113 SUBROUTINE cxios_set_field_compression_level(field_hdl, compression_level) BIND(C) 95 114 USE ISO_C_BINDING -
XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/fieldgroup_interface_attr.F90
r1005 r1205 92 92 93 93 94 SUBROUTINE cxios_set_fieldgroup_check_if_active(fieldgroup_hdl, check_if_active) BIND(C) 95 USE ISO_C_BINDING 96 INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 97 LOGICAL (KIND=C_BOOL) , VALUE :: check_if_active 98 END SUBROUTINE cxios_set_fieldgroup_check_if_active 99 100 SUBROUTINE cxios_get_fieldgroup_check_if_active(fieldgroup_hdl, check_if_active) BIND(C) 101 USE ISO_C_BINDING 102 INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 103 LOGICAL (KIND=C_BOOL) :: check_if_active 104 END SUBROUTINE cxios_get_fieldgroup_check_if_active 105 106 FUNCTION cxios_is_defined_fieldgroup_check_if_active(fieldgroup_hdl) BIND(C) 107 USE ISO_C_BINDING 108 LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_check_if_active 109 INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 110 END FUNCTION cxios_is_defined_fieldgroup_check_if_active 111 112 94 113 SUBROUTINE cxios_set_fieldgroup_compression_level(fieldgroup_hdl, compression_level) BIND(C) 95 114 USE ISO_C_BINDING -
XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/file_interface_attr.F90
r1052 r1205 69 69 70 70 71 SUBROUTINE cxios_set_file_convention_str(file_hdl, convention_str, convention_str_size) BIND(C) 72 USE ISO_C_BINDING 73 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 74 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: convention_str 75 INTEGER (kind = C_INT) , VALUE :: convention_str_size 76 END SUBROUTINE cxios_set_file_convention_str 77 78 SUBROUTINE cxios_get_file_convention_str(file_hdl, convention_str, convention_str_size) BIND(C) 79 USE ISO_C_BINDING 80 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 81 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: convention_str 82 INTEGER (kind = C_INT) , VALUE :: convention_str_size 83 END SUBROUTINE cxios_get_file_convention_str 84 85 FUNCTION cxios_is_defined_file_convention_str(file_hdl) BIND(C) 86 USE ISO_C_BINDING 87 LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_convention_str 88 INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 89 END FUNCTION cxios_is_defined_file_convention_str 90 91 71 92 SUBROUTINE cxios_set_file_cyclic(file_hdl, cyclic) BIND(C) 72 93 USE ISO_C_BINDING -
XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/filegroup_interface_attr.F90
r1052 r1205 69 69 70 70 71 SUBROUTINE cxios_set_filegroup_convention_str(filegroup_hdl, convention_str, convention_str_size) BIND(C) 72 USE ISO_C_BINDING 73 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 74 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: convention_str 75 INTEGER (kind = C_INT) , VALUE :: convention_str_size 76 END SUBROUTINE cxios_set_filegroup_convention_str 77 78 SUBROUTINE cxios_get_filegroup_convention_str(filegroup_hdl, convention_str, convention_str_size) BIND(C) 79 USE ISO_C_BINDING 80 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 81 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: convention_str 82 INTEGER (kind = C_INT) , VALUE :: convention_str_size 83 END SUBROUTINE cxios_get_filegroup_convention_str 84 85 FUNCTION cxios_is_defined_filegroup_convention_str(filegroup_hdl) BIND(C) 86 USE ISO_C_BINDING 87 LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_convention_str 88 INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 89 END FUNCTION cxios_is_defined_filegroup_convention_str 90 91 71 92 SUBROUTINE cxios_set_filegroup_cyclic(filegroup_hdl, cyclic) BIND(C) 72 93 USE ISO_C_BINDING -
XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/ifield_attr.F90
r1005 r1205 12 12 13 13 SUBROUTINE xios(set_field_attr) & 14 ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value & 15 , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path & 16 , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref & 17 , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 14 ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 15 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 16 , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access & 17 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 18 ) 18 19 19 20 IMPLICIT NONE … … 24 25 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods 25 26 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode 27 LOGICAL , OPTIONAL, INTENT(IN) :: check_if_active 28 LOGICAL (KIND=C_BOOL) :: check_if_active_tmp 26 29 INTEGER , OPTIONAL, INTENT(IN) :: compression_level 27 30 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value … … 59 62 (field_id,field_hdl) 60 63 CALL xios(set_field_attr_hdl_) & 61 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value & 62 , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path & 63 , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref & 64 , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 64 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 65 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 66 , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access & 67 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 68 ) 65 69 66 70 END SUBROUTINE xios(set_field_attr) 67 71 68 72 SUBROUTINE xios(set_field_attr_hdl) & 69 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value & 70 , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path & 71 , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref & 72 , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 73 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 74 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 75 , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access & 76 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 77 ) 73 78 74 79 IMPLICIT NONE … … 78 83 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods 79 84 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode 85 LOGICAL , OPTIONAL, INTENT(IN) :: check_if_active 86 LOGICAL (KIND=C_BOOL) :: check_if_active_tmp 80 87 INTEGER , OPTIONAL, INTENT(IN) :: compression_level 81 88 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value … … 111 118 112 119 CALL xios(set_field_attr_hdl_) & 113 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value & 114 , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path & 115 , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref & 116 , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 120 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 121 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 122 , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access & 123 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 124 ) 117 125 118 126 END SUBROUTINE xios(set_field_attr_hdl) 119 127 120 128 SUBROUTINE xios(set_field_attr_hdl_) & 121 ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, c ompression_level_, default_value_ &122 , de tect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_, freq_op_, grid_path_ &123 , grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_, read_access_, scalar_ref_ &124 , scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_, valid_max_, valid_min_ &125 )129 ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_, compression_level_ & 130 , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_ & 131 , freq_op_, grid_path_, grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_ & 132 , read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_ & 133 , valid_max_, valid_min_ ) 126 134 127 135 IMPLICIT NONE … … 131 139 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_ 132 140 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode_ 141 LOGICAL , OPTIONAL, INTENT(IN) :: check_if_active_ 142 LOGICAL (KIND=C_BOOL) :: check_if_active__tmp 133 143 INTEGER , OPTIONAL, INTENT(IN) :: compression_level_ 134 144 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value_ … … 183 193 ENDIF 184 194 195 IF (PRESENT(check_if_active_)) THEN 196 check_if_active__tmp = check_if_active_ 197 CALL cxios_set_field_check_if_active & 198 (field_hdl%daddr, check_if_active__tmp) 199 ENDIF 200 185 201 IF (PRESENT(compression_level_)) THEN 186 202 CALL cxios_set_field_compression_level & … … 321 337 322 338 SUBROUTINE xios(get_field_attr) & 323 ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value & 324 , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path & 325 , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref & 326 , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 339 ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 340 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 341 , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access & 342 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 343 ) 327 344 328 345 IMPLICIT NONE … … 333 350 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods 334 351 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode 352 LOGICAL , OPTIONAL, INTENT(OUT) :: check_if_active 353 LOGICAL (KIND=C_BOOL) :: check_if_active_tmp 335 354 INTEGER , OPTIONAL, INTENT(OUT) :: compression_level 336 355 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value … … 368 387 (field_id,field_hdl) 369 388 CALL xios(get_field_attr_hdl_) & 370 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value & 371 , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path & 372 , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref & 373 , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 389 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 390 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 391 , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access & 392 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 393 ) 374 394 375 395 END SUBROUTINE xios(get_field_attr) 376 396 377 397 SUBROUTINE xios(get_field_attr_hdl) & 378 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value & 379 , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path & 380 , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref & 381 , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 398 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 399 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 400 , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access & 401 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 402 ) 382 403 383 404 IMPLICIT NONE … … 387 408 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods 388 409 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode 410 LOGICAL , OPTIONAL, INTENT(OUT) :: check_if_active 411 LOGICAL (KIND=C_BOOL) :: check_if_active_tmp 389 412 INTEGER , OPTIONAL, INTENT(OUT) :: compression_level 390 413 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value … … 420 443 421 444 CALL xios(get_field_attr_hdl_) & 422 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value & 423 , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path & 424 , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref & 425 , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 445 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 446 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 447 , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access & 448 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 449 ) 426 450 427 451 END SUBROUTINE xios(get_field_attr_hdl) 428 452 429 453 SUBROUTINE xios(get_field_attr_hdl_) & 430 ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, c ompression_level_, default_value_ &431 , de tect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_, freq_op_, grid_path_ &432 , grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_, read_access_, scalar_ref_ &433 , scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_, valid_max_, valid_min_ &434 )454 ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_, compression_level_ & 455 , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_ & 456 , freq_op_, grid_path_, grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_ & 457 , read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_ & 458 , valid_max_, valid_min_ ) 435 459 436 460 IMPLICIT NONE … … 440 464 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_ 441 465 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode_ 466 LOGICAL , OPTIONAL, INTENT(OUT) :: check_if_active_ 467 LOGICAL (KIND=C_BOOL) :: check_if_active__tmp 442 468 INTEGER , OPTIONAL, INTENT(OUT) :: compression_level_ 443 469 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value_ … … 492 518 ENDIF 493 519 520 IF (PRESENT(check_if_active_)) THEN 521 CALL cxios_get_field_check_if_active & 522 (field_hdl%daddr, check_if_active__tmp) 523 check_if_active_ = check_if_active__tmp 524 ENDIF 525 494 526 IF (PRESENT(compression_level_)) THEN 495 527 CALL cxios_get_field_compression_level & … … 630 662 631 663 SUBROUTINE xios(is_defined_field_attr) & 632 ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value & 633 , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path & 634 , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref & 635 , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 664 ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 665 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 666 , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access & 667 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 668 ) 636 669 637 670 IMPLICIT NONE … … 646 679 LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode 647 680 LOGICAL(KIND=C_BOOL) :: cell_methods_mode_tmp 681 LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active 682 LOGICAL(KIND=C_BOOL) :: check_if_active_tmp 648 683 LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level 649 684 LOGICAL(KIND=C_BOOL) :: compression_level_tmp … … 702 737 (field_id,field_hdl) 703 738 CALL xios(is_defined_field_attr_hdl_) & 704 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value & 705 , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path & 706 , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref & 707 , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 739 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 740 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 741 , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access & 742 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 743 ) 708 744 709 745 END SUBROUTINE xios(is_defined_field_attr) 710 746 711 747 SUBROUTINE xios(is_defined_field_attr_hdl) & 712 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value & 713 , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path & 714 , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref & 715 , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 748 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 749 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 750 , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access & 751 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 752 ) 716 753 717 754 IMPLICIT NONE … … 725 762 LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode 726 763 LOGICAL(KIND=C_BOOL) :: cell_methods_mode_tmp 764 LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active 765 LOGICAL(KIND=C_BOOL) :: check_if_active_tmp 727 766 LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level 728 767 LOGICAL(KIND=C_BOOL) :: compression_level_tmp … … 779 818 780 819 CALL xios(is_defined_field_attr_hdl_) & 781 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value & 782 , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path & 783 , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref & 784 , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 820 ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 821 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 822 , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access & 823 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 824 ) 785 825 786 826 END SUBROUTINE xios(is_defined_field_attr_hdl) 787 827 788 828 SUBROUTINE xios(is_defined_field_attr_hdl_) & 789 ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, c ompression_level_, default_value_ &790 , de tect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_, freq_op_, grid_path_ &791 , grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_, read_access_, scalar_ref_ &792 , scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_, valid_max_, valid_min_ &793 )829 ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_, compression_level_ & 830 , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_ & 831 , freq_op_, grid_path_, grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_ & 832 , read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_ & 833 , valid_max_, valid_min_ ) 794 834 795 835 IMPLICIT NONE … … 803 843 LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode_ 804 844 LOGICAL(KIND=C_BOOL) :: cell_methods_mode__tmp 845 LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active_ 846 LOGICAL(KIND=C_BOOL) :: check_if_active__tmp 805 847 LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level_ 806 848 LOGICAL(KIND=C_BOOL) :: compression_level__tmp … … 880 922 ENDIF 881 923 924 IF (PRESENT(check_if_active_)) THEN 925 check_if_active__tmp = cxios_is_defined_field_check_if_active & 926 (field_hdl%daddr) 927 check_if_active_ = check_if_active__tmp 928 ENDIF 929 882 930 IF (PRESENT(compression_level_)) THEN 883 931 compression_level__tmp = cxios_is_defined_field_compression_level & -
XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/ifieldgroup_attr.F90
r1005 r1205 12 12 13 13 SUBROUTINE xios(set_fieldgroup_attr) & 14 ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, c ompression_level, default_value&15 , de tect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path&16 , grid_ ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access &14 ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 15 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 16 , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access & 17 17 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 18 18 ) … … 25 25 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods 26 26 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode 27 LOGICAL , OPTIONAL, INTENT(IN) :: check_if_active 28 LOGICAL (KIND=C_BOOL) :: check_if_active_tmp 27 29 INTEGER , OPTIONAL, INTENT(IN) :: compression_level 28 30 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value … … 61 63 (fieldgroup_id,fieldgroup_hdl) 62 64 CALL xios(set_fieldgroup_attr_hdl_) & 63 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, c ompression_level, default_value&64 , de tect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path&65 , grid_ ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access &65 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 66 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 67 , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access & 66 68 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 67 69 ) … … 70 72 71 73 SUBROUTINE xios(set_fieldgroup_attr_hdl) & 72 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, c ompression_level, default_value&73 , de tect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path&74 , grid_ ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access &74 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 75 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 76 , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access & 75 77 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 76 78 ) … … 82 84 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods 83 85 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode 86 LOGICAL , OPTIONAL, INTENT(IN) :: check_if_active 87 LOGICAL (KIND=C_BOOL) :: check_if_active_tmp 84 88 INTEGER , OPTIONAL, INTENT(IN) :: compression_level 85 89 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value … … 116 120 117 121 CALL xios(set_fieldgroup_attr_hdl_) & 118 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, c ompression_level, default_value&119 , de tect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path&120 , grid_ ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access &122 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 123 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 124 , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access & 121 125 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 122 126 ) … … 125 129 126 130 SUBROUTINE xios(set_fieldgroup_attr_hdl_) & 127 ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, c ompression_level_ &128 , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_ &129 , freq_o p_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_, name_, operation_ &130 , prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_ &131 , unit_, valid_max_, valid_min_ )131 ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_ & 132 , compression_level_, default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_ & 133 , freq_offset_, freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_ & 134 , name_, operation_, prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_ & 135 , ts_split_freq_, unit_, valid_max_, valid_min_ ) 132 136 133 137 IMPLICIT NONE … … 137 141 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_ 138 142 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode_ 143 LOGICAL , OPTIONAL, INTENT(IN) :: check_if_active_ 144 LOGICAL (KIND=C_BOOL) :: check_if_active__tmp 139 145 INTEGER , OPTIONAL, INTENT(IN) :: compression_level_ 140 146 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value_ … … 190 196 ENDIF 191 197 198 IF (PRESENT(check_if_active_)) THEN 199 check_if_active__tmp = check_if_active_ 200 CALL cxios_set_fieldgroup_check_if_active & 201 (fieldgroup_hdl%daddr, check_if_active__tmp) 202 ENDIF 203 192 204 IF (PRESENT(compression_level_)) THEN 193 205 CALL cxios_set_fieldgroup_compression_level & … … 333 345 334 346 SUBROUTINE xios(get_fieldgroup_attr) & 335 ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, c ompression_level, default_value&336 , de tect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path&337 , grid_ ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access &347 ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 348 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 349 , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access & 338 350 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 339 351 ) … … 346 358 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods 347 359 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode 360 LOGICAL , OPTIONAL, INTENT(OUT) :: check_if_active 361 LOGICAL (KIND=C_BOOL) :: check_if_active_tmp 348 362 INTEGER , OPTIONAL, INTENT(OUT) :: compression_level 349 363 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value … … 382 396 (fieldgroup_id,fieldgroup_hdl) 383 397 CALL xios(get_fieldgroup_attr_hdl_) & 384 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, c ompression_level, default_value&385 , de tect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path&386 , grid_ ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access &398 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 399 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 400 , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access & 387 401 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 388 402 ) … … 391 405 392 406 SUBROUTINE xios(get_fieldgroup_attr_hdl) & 393 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, c ompression_level, default_value&394 , de tect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path&395 , grid_ ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access &407 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 408 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 409 , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access & 396 410 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 397 411 ) … … 403 417 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods 404 418 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode 419 LOGICAL , OPTIONAL, INTENT(OUT) :: check_if_active 420 LOGICAL (KIND=C_BOOL) :: check_if_active_tmp 405 421 INTEGER , OPTIONAL, INTENT(OUT) :: compression_level 406 422 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value … … 437 453 438 454 CALL xios(get_fieldgroup_attr_hdl_) & 439 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, c ompression_level, default_value&440 , de tect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path&441 , grid_ ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access &455 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 456 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 457 , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access & 442 458 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 443 459 ) … … 446 462 447 463 SUBROUTINE xios(get_fieldgroup_attr_hdl_) & 448 ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, c ompression_level_ &449 , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_ &450 , freq_o p_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_, name_, operation_ &451 , prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_ &452 , unit_, valid_max_, valid_min_ )464 ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_ & 465 , compression_level_, default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_ & 466 , freq_offset_, freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_ & 467 , name_, operation_, prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_ & 468 , ts_split_freq_, unit_, valid_max_, valid_min_ ) 453 469 454 470 IMPLICIT NONE … … 458 474 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_ 459 475 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode_ 476 LOGICAL , OPTIONAL, INTENT(OUT) :: check_if_active_ 477 LOGICAL (KIND=C_BOOL) :: check_if_active__tmp 460 478 INTEGER , OPTIONAL, INTENT(OUT) :: compression_level_ 461 479 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value_ … … 511 529 ENDIF 512 530 531 IF (PRESENT(check_if_active_)) THEN 532 CALL cxios_get_fieldgroup_check_if_active & 533 (fieldgroup_hdl%daddr, check_if_active__tmp) 534 check_if_active_ = check_if_active__tmp 535 ENDIF 536 513 537 IF (PRESENT(compression_level_)) THEN 514 538 CALL cxios_get_fieldgroup_compression_level & … … 654 678 655 679 SUBROUTINE xios(is_defined_fieldgroup_attr) & 656 ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, c ompression_level, default_value&657 , de tect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path&658 , grid_ ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access &680 ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 681 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 682 , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access & 659 683 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 660 684 ) … … 671 695 LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode 672 696 LOGICAL(KIND=C_BOOL) :: cell_methods_mode_tmp 697 LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active 698 LOGICAL(KIND=C_BOOL) :: check_if_active_tmp 673 699 LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level 674 700 LOGICAL(KIND=C_BOOL) :: compression_level_tmp … … 729 755 (fieldgroup_id,fieldgroup_hdl) 730 756 CALL xios(is_defined_fieldgroup_attr_hdl_) & 731 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, c ompression_level, default_value&732 , de tect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path&733 , grid_ ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access &757 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 758 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 759 , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access & 734 760 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 735 761 ) … … 738 764 739 765 SUBROUTINE xios(is_defined_fieldgroup_attr_hdl) & 740 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, c ompression_level, default_value&741 , de tect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path&742 , grid_ ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access &766 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 767 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 768 , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access & 743 769 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 744 770 ) … … 754 780 LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode 755 781 LOGICAL(KIND=C_BOOL) :: cell_methods_mode_tmp 782 LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active 783 LOGICAL(KIND=C_BOOL) :: check_if_active_tmp 756 784 LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level 757 785 LOGICAL(KIND=C_BOOL) :: compression_level_tmp … … 810 838 811 839 CALL xios(is_defined_fieldgroup_attr_hdl_) & 812 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, c ompression_level, default_value&813 , de tect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path&814 , grid_ ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access &840 ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level & 841 , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op & 842 , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access & 815 843 , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min & 816 844 ) … … 819 847 820 848 SUBROUTINE xios(is_defined_fieldgroup_attr_hdl_) & 821 ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, c ompression_level_ &822 , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_ &823 , freq_o p_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_, name_, operation_ &824 , prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_ &825 , unit_, valid_max_, valid_min_ )849 ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_ & 850 , compression_level_, default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_ & 851 , freq_offset_, freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_ & 852 , name_, operation_, prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_ & 853 , ts_split_freq_, unit_, valid_max_, valid_min_ ) 826 854 827 855 IMPLICIT NONE … … 835 863 LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode_ 836 864 LOGICAL(KIND=C_BOOL) :: cell_methods_mode__tmp 865 LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active_ 866 LOGICAL(KIND=C_BOOL) :: check_if_active__tmp 837 867 LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level_ 838 868 LOGICAL(KIND=C_BOOL) :: compression_level__tmp … … 914 944 ENDIF 915 945 946 IF (PRESENT(check_if_active_)) THEN 947 check_if_active__tmp = cxios_is_defined_fieldgroup_check_if_active & 948 (fieldgroup_hdl%daddr) 949 check_if_active_ = check_if_active__tmp 950 ENDIF 951 916 952 IF (PRESENT(compression_level_)) THEN 917 953 compression_level__tmp = cxios_is_defined_fieldgroup_compression_level & -
XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/ifile_attr.F90
r1052 r1205 12 12 13 13 SUBROUTINE xios(set_file_attr) & 14 ( file_id, append, compression_level, convention, c yclic, description, enabled, format, min_digits&15 , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq&16 , split_freq _format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name&17 , time_ units, timeseries, ts_prefix, type, uuid_format, uuid_name )14 ( file_id, append, compression_level, convention, convention_str, cyclic, description, enabled & 15 , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 16 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 17 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 18 18 19 19 IMPLICIT NONE … … 24 24 INTEGER , OPTIONAL, INTENT(IN) :: compression_level 25 25 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention 26 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str 26 27 LOGICAL , OPTIONAL, INTENT(IN) :: cyclic 27 28 LOGICAL (KIND=C_BOOL) :: cyclic_tmp … … 55 56 (file_id,file_hdl) 56 57 CALL xios(set_file_attr_hdl_) & 57 ( file_hdl, append, compression_level, convention, c yclic, description, enabled, format, min_digits&58 , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq&59 , split_freq _format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name&60 , time_ units, timeseries, ts_prefix, type, uuid_format, uuid_name )58 ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled & 59 , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 60 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 61 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 61 62 62 63 END SUBROUTINE xios(set_file_attr) 63 64 64 65 SUBROUTINE xios(set_file_attr_hdl) & 65 ( file_hdl, append, compression_level, convention, c yclic, description, enabled, format, min_digits&66 , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq&67 , split_freq _format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name&68 , time_ units, timeseries, ts_prefix, type, uuid_format, uuid_name )66 ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled & 67 , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 68 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 69 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 69 70 70 71 IMPLICIT NONE … … 74 75 INTEGER , OPTIONAL, INTENT(IN) :: compression_level 75 76 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention 77 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str 76 78 LOGICAL , OPTIONAL, INTENT(IN) :: cyclic 77 79 LOGICAL (KIND=C_BOOL) :: cyclic_tmp … … 103 105 104 106 CALL xios(set_file_attr_hdl_) & 105 ( file_hdl, append, compression_level, convention, c yclic, description, enabled, format, min_digits&106 , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq&107 , split_freq _format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name&108 , time_ units, timeseries, ts_prefix, type, uuid_format, uuid_name )107 ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled & 108 , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 109 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 110 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 109 111 110 112 END SUBROUTINE xios(set_file_attr_hdl) 111 113 112 114 SUBROUTINE xios(set_file_attr_hdl_) & 113 ( file_hdl, append_, compression_level_, convention_, cyclic_, description_, enabled_, format_ & 114 , min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_, record_offset_ & 115 , split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_, time_stamp_format_ & 116 , time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_, uuid_name_ ) 115 ( file_hdl, append_, compression_level_, convention_, convention_str_, cyclic_, description_ & 116 , enabled_, format_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_ & 117 , record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_ & 118 , time_stamp_format_, time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_ & 119 , uuid_name_ ) 117 120 118 121 IMPLICIT NONE … … 122 125 INTEGER , OPTIONAL, INTENT(IN) :: compression_level_ 123 126 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_ 127 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str_ 124 128 LOGICAL , OPTIONAL, INTENT(IN) :: cyclic_ 125 129 LOGICAL (KIND=C_BOOL) :: cyclic__tmp … … 166 170 ENDIF 167 171 172 IF (PRESENT(convention_str_)) THEN 173 CALL cxios_set_file_convention_str & 174 (file_hdl%daddr, convention_str_, len(convention_str_)) 175 ENDIF 176 168 177 IF (PRESENT(cyclic_)) THEN 169 178 cyclic__tmp = cyclic_ … … 296 305 297 306 SUBROUTINE xios(get_file_attr) & 298 ( file_id, append, compression_level, convention, c yclic, description, enabled, format, min_digits&299 , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq&300 , split_freq _format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name&301 , time_ units, timeseries, ts_prefix, type, uuid_format, uuid_name )307 ( file_id, append, compression_level, convention, convention_str, cyclic, description, enabled & 308 , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 309 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 310 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 302 311 303 312 IMPLICIT NONE … … 308 317 INTEGER , OPTIONAL, INTENT(OUT) :: compression_level 309 318 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention 319 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str 310 320 LOGICAL , OPTIONAL, INTENT(OUT) :: cyclic 311 321 LOGICAL (KIND=C_BOOL) :: cyclic_tmp … … 339 349 (file_id,file_hdl) 340 350 CALL xios(get_file_attr_hdl_) & 341 ( file_hdl, append, compression_level, convention, c yclic, description, enabled, format, min_digits&342 , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq&343 , split_freq _format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name&344 , time_ units, timeseries, ts_prefix, type, uuid_format, uuid_name )351 ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled & 352 , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 353 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 354 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 345 355 346 356 END SUBROUTINE xios(get_file_attr) 347 357 348 358 SUBROUTINE xios(get_file_attr_hdl) & 349 ( file_hdl, append, compression_level, convention, c yclic, description, enabled, format, min_digits&350 , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq&351 , split_freq _format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name&352 , time_ units, timeseries, ts_prefix, type, uuid_format, uuid_name )359 ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled & 360 , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 361 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 362 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 353 363 354 364 IMPLICIT NONE … … 358 368 INTEGER , OPTIONAL, INTENT(OUT) :: compression_level 359 369 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention 370 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str 360 371 LOGICAL , OPTIONAL, INTENT(OUT) :: cyclic 361 372 LOGICAL (KIND=C_BOOL) :: cyclic_tmp … … 387 398 388 399 CALL xios(get_file_attr_hdl_) & 389 ( file_hdl, append, compression_level, convention, c yclic, description, enabled, format, min_digits&390 , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq&391 , split_freq _format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name&392 , time_ units, timeseries, ts_prefix, type, uuid_format, uuid_name )400 ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled & 401 , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 402 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 403 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 393 404 394 405 END SUBROUTINE xios(get_file_attr_hdl) 395 406 396 407 SUBROUTINE xios(get_file_attr_hdl_) & 397 ( file_hdl, append_, compression_level_, convention_, cyclic_, description_, enabled_, format_ & 398 , min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_, record_offset_ & 399 , split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_, time_stamp_format_ & 400 , time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_, uuid_name_ ) 408 ( file_hdl, append_, compression_level_, convention_, convention_str_, cyclic_, description_ & 409 , enabled_, format_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_ & 410 , record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_ & 411 , time_stamp_format_, time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_ & 412 , uuid_name_ ) 401 413 402 414 IMPLICIT NONE … … 406 418 INTEGER , OPTIONAL, INTENT(OUT) :: compression_level_ 407 419 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_ 420 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str_ 408 421 LOGICAL , OPTIONAL, INTENT(OUT) :: cyclic_ 409 422 LOGICAL (KIND=C_BOOL) :: cyclic__tmp … … 450 463 ENDIF 451 464 465 IF (PRESENT(convention_str_)) THEN 466 CALL cxios_get_file_convention_str & 467 (file_hdl%daddr, convention_str_, len(convention_str_)) 468 ENDIF 469 452 470 IF (PRESENT(cyclic_)) THEN 453 471 CALL cxios_get_file_cyclic & … … 580 598 581 599 SUBROUTINE xios(is_defined_file_attr) & 582 ( file_id, append, compression_level, convention, c yclic, description, enabled, format, min_digits&583 , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq&584 , split_freq _format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name&585 , time_ units, timeseries, ts_prefix, type, uuid_format, uuid_name )600 ( file_id, append, compression_level, convention, convention_str, cyclic, description, enabled & 601 , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 602 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 603 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 586 604 587 605 IMPLICIT NONE … … 594 612 LOGICAL, OPTIONAL, INTENT(OUT) :: convention 595 613 LOGICAL(KIND=C_BOOL) :: convention_tmp 614 LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str 615 LOGICAL(KIND=C_BOOL) :: convention_str_tmp 596 616 LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic 597 617 LOGICAL(KIND=C_BOOL) :: cyclic_tmp … … 648 668 (file_id,file_hdl) 649 669 CALL xios(is_defined_file_attr_hdl_) & 650 ( file_hdl, append, compression_level, convention, c yclic, description, enabled, format, min_digits&651 , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq&652 , split_freq _format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name&653 , time_ units, timeseries, ts_prefix, type, uuid_format, uuid_name )670 ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled & 671 , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 672 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 673 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 654 674 655 675 END SUBROUTINE xios(is_defined_file_attr) 656 676 657 677 SUBROUTINE xios(is_defined_file_attr_hdl) & 658 ( file_hdl, append, compression_level, convention, c yclic, description, enabled, format, min_digits&659 , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq&660 , split_freq _format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name&661 , time_ units, timeseries, ts_prefix, type, uuid_format, uuid_name )678 ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled & 679 , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 680 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 681 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 662 682 663 683 IMPLICIT NONE … … 669 689 LOGICAL, OPTIONAL, INTENT(OUT) :: convention 670 690 LOGICAL(KIND=C_BOOL) :: convention_tmp 691 LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str 692 LOGICAL(KIND=C_BOOL) :: convention_str_tmp 671 693 LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic 672 694 LOGICAL(KIND=C_BOOL) :: cyclic_tmp … … 721 743 722 744 CALL xios(is_defined_file_attr_hdl_) & 723 ( file_hdl, append, compression_level, convention, c yclic, description, enabled, format, min_digits&724 , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq&725 , split_freq _format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name&726 , time_ units, timeseries, ts_prefix, type, uuid_format, uuid_name )745 ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled & 746 , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 747 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 748 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 727 749 728 750 END SUBROUTINE xios(is_defined_file_attr_hdl) 729 751 730 752 SUBROUTINE xios(is_defined_file_attr_hdl_) & 731 ( file_hdl, append_, compression_level_, convention_, cyclic_, description_, enabled_, format_ & 732 , min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_, record_offset_ & 733 , split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_, time_stamp_format_ & 734 , time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_, uuid_name_ ) 753 ( file_hdl, append_, compression_level_, convention_, convention_str_, cyclic_, description_ & 754 , enabled_, format_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_ & 755 , record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_ & 756 , time_stamp_format_, time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_ & 757 , uuid_name_ ) 735 758 736 759 IMPLICIT NONE … … 742 765 LOGICAL, OPTIONAL, INTENT(OUT) :: convention_ 743 766 LOGICAL(KIND=C_BOOL) :: convention__tmp 767 LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str_ 768 LOGICAL(KIND=C_BOOL) :: convention_str__tmp 744 769 LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic_ 745 770 LOGICAL(KIND=C_BOOL) :: cyclic__tmp … … 811 836 ENDIF 812 837 838 IF (PRESENT(convention_str_)) THEN 839 convention_str__tmp = cxios_is_defined_file_convention_str & 840 (file_hdl%daddr) 841 convention_str_ = convention_str__tmp 842 ENDIF 843 813 844 IF (PRESENT(cyclic_)) THEN 814 845 cyclic__tmp = cxios_is_defined_file_cyclic & -
XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/ifilegroup_attr.F90
r1052 r1205 12 12 13 13 SUBROUTINE xios(set_filegroup_attr) & 14 ( filegroup_id, append, compression_level, convention, c yclic, description, enabled, format&15 , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset&16 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format &14 ( filegroup_id, append, compression_level, convention, convention_str, cyclic, description, enabled & 15 , format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access & 16 , record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 17 17 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 18 18 … … 24 24 INTEGER , OPTIONAL, INTENT(IN) :: compression_level 25 25 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention 26 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str 26 27 LOGICAL , OPTIONAL, INTENT(IN) :: cyclic 27 28 LOGICAL (KIND=C_BOOL) :: cyclic_tmp … … 56 57 (filegroup_id,filegroup_hdl) 57 58 CALL xios(set_filegroup_attr_hdl_) & 58 ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format & 59 , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 60 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 61 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 59 ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description & 60 , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level & 61 , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name & 62 , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name & 63 ) 62 64 63 65 END SUBROUTINE xios(set_filegroup_attr) 64 66 65 67 SUBROUTINE xios(set_filegroup_attr_hdl) & 66 ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format & 67 , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 68 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 69 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 68 ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description & 69 , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level & 70 , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name & 71 , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name & 72 ) 70 73 71 74 IMPLICIT NONE … … 75 78 INTEGER , OPTIONAL, INTENT(IN) :: compression_level 76 79 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention 80 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str 77 81 LOGICAL , OPTIONAL, INTENT(IN) :: cyclic 78 82 LOGICAL (KIND=C_BOOL) :: cyclic_tmp … … 105 109 106 110 CALL xios(set_filegroup_attr_hdl_) & 107 ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format & 108 , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 109 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 110 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 111 ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description & 112 , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level & 113 , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name & 114 , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name & 115 ) 111 116 112 117 END SUBROUTINE xios(set_filegroup_attr_hdl) 113 118 114 119 SUBROUTINE xios(set_filegroup_attr_hdl_) & 115 ( filegroup_hdl, append_, compression_level_, convention_, c yclic_, description_, enabled_, format_ &116 , group_ref_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_ &117 , record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_ &120 ( filegroup_hdl, append_, compression_level_, convention_, convention_str_, cyclic_, description_ & 121 , enabled_, format_, group_ref_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_ & 122 , par_access_, record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_ & 118 123 , time_stamp_format_, time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_ & 119 124 , uuid_name_ ) … … 125 130 INTEGER , OPTIONAL, INTENT(IN) :: compression_level_ 126 131 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_ 132 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str_ 127 133 LOGICAL , OPTIONAL, INTENT(IN) :: cyclic_ 128 134 LOGICAL (KIND=C_BOOL) :: cyclic__tmp … … 170 176 ENDIF 171 177 178 IF (PRESENT(convention_str_)) THEN 179 CALL cxios_set_filegroup_convention_str & 180 (filegroup_hdl%daddr, convention_str_, len(convention_str_)) 181 ENDIF 182 172 183 IF (PRESENT(cyclic_)) THEN 173 184 cyclic__tmp = cyclic_ … … 305 316 306 317 SUBROUTINE xios(get_filegroup_attr) & 307 ( filegroup_id, append, compression_level, convention, c yclic, description, enabled, format&308 , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset&309 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format &318 ( filegroup_id, append, compression_level, convention, convention_str, cyclic, description, enabled & 319 , format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access & 320 , record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 310 321 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 311 322 … … 317 328 INTEGER , OPTIONAL, INTENT(OUT) :: compression_level 318 329 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention 330 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str 319 331 LOGICAL , OPTIONAL, INTENT(OUT) :: cyclic 320 332 LOGICAL (KIND=C_BOOL) :: cyclic_tmp … … 349 361 (filegroup_id,filegroup_hdl) 350 362 CALL xios(get_filegroup_attr_hdl_) & 351 ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format & 352 , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 353 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 354 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 363 ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description & 364 , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level & 365 , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name & 366 , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name & 367 ) 355 368 356 369 END SUBROUTINE xios(get_filegroup_attr) 357 370 358 371 SUBROUTINE xios(get_filegroup_attr_hdl) & 359 ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format & 360 , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 361 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 362 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 372 ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description & 373 , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level & 374 , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name & 375 , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name & 376 ) 363 377 364 378 IMPLICIT NONE … … 368 382 INTEGER , OPTIONAL, INTENT(OUT) :: compression_level 369 383 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention 384 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str 370 385 LOGICAL , OPTIONAL, INTENT(OUT) :: cyclic 371 386 LOGICAL (KIND=C_BOOL) :: cyclic_tmp … … 398 413 399 414 CALL xios(get_filegroup_attr_hdl_) & 400 ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format & 401 , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 402 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 403 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 415 ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description & 416 , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level & 417 , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name & 418 , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name & 419 ) 404 420 405 421 END SUBROUTINE xios(get_filegroup_attr_hdl) 406 422 407 423 SUBROUTINE xios(get_filegroup_attr_hdl_) & 408 ( filegroup_hdl, append_, compression_level_, convention_, c yclic_, description_, enabled_, format_ &409 , group_ref_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_ &410 , record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_ &424 ( filegroup_hdl, append_, compression_level_, convention_, convention_str_, cyclic_, description_ & 425 , enabled_, format_, group_ref_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_ & 426 , par_access_, record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_ & 411 427 , time_stamp_format_, time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_ & 412 428 , uuid_name_ ) … … 418 434 INTEGER , OPTIONAL, INTENT(OUT) :: compression_level_ 419 435 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_ 436 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str_ 420 437 LOGICAL , OPTIONAL, INTENT(OUT) :: cyclic_ 421 438 LOGICAL (KIND=C_BOOL) :: cyclic__tmp … … 463 480 ENDIF 464 481 482 IF (PRESENT(convention_str_)) THEN 483 CALL cxios_get_filegroup_convention_str & 484 (filegroup_hdl%daddr, convention_str_, len(convention_str_)) 485 ENDIF 486 465 487 IF (PRESENT(cyclic_)) THEN 466 488 CALL cxios_get_filegroup_cyclic & … … 598 620 599 621 SUBROUTINE xios(is_defined_filegroup_attr) & 600 ( filegroup_id, append, compression_level, convention, c yclic, description, enabled, format&601 , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset&602 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format &622 ( filegroup_id, append, compression_level, convention, convention_str, cyclic, description, enabled & 623 , format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access & 624 , record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 603 625 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 604 626 … … 612 634 LOGICAL, OPTIONAL, INTENT(OUT) :: convention 613 635 LOGICAL(KIND=C_BOOL) :: convention_tmp 636 LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str 637 LOGICAL(KIND=C_BOOL) :: convention_str_tmp 614 638 LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic 615 639 LOGICAL(KIND=C_BOOL) :: cyclic_tmp … … 668 692 (filegroup_id,filegroup_hdl) 669 693 CALL xios(is_defined_filegroup_attr_hdl_) & 670 ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format & 671 , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 672 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 673 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 694 ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description & 695 , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level & 696 , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name & 697 , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name & 698 ) 674 699 675 700 END SUBROUTINE xios(is_defined_filegroup_attr) 676 701 677 702 SUBROUTINE xios(is_defined_filegroup_attr_hdl) & 678 ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format & 679 , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 680 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 681 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 703 ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description & 704 , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level & 705 , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name & 706 , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name & 707 ) 682 708 683 709 IMPLICIT NONE … … 689 715 LOGICAL, OPTIONAL, INTENT(OUT) :: convention 690 716 LOGICAL(KIND=C_BOOL) :: convention_tmp 717 LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str 718 LOGICAL(KIND=C_BOOL) :: convention_str_tmp 691 719 LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic 692 720 LOGICAL(KIND=C_BOOL) :: cyclic_tmp … … 743 771 744 772 CALL xios(is_defined_filegroup_attr_hdl_) & 745 ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format & 746 , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset & 747 , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format & 748 , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name ) 773 ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description & 774 , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level & 775 , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name & 776 , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name & 777 ) 749 778 750 779 END SUBROUTINE xios(is_defined_filegroup_attr_hdl) 751 780 752 781 SUBROUTINE xios(is_defined_filegroup_attr_hdl_) & 753 ( filegroup_hdl, append_, compression_level_, convention_, c yclic_, description_, enabled_, format_ &754 , group_ref_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_ &755 , record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_ &782 ( filegroup_hdl, append_, compression_level_, convention_, convention_str_, cyclic_, description_ & 783 , enabled_, format_, group_ref_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_ & 784 , par_access_, record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_ & 756 785 , time_stamp_format_, time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_ & 757 786 , uuid_name_ ) … … 765 794 LOGICAL, OPTIONAL, INTENT(OUT) :: convention_ 766 795 LOGICAL(KIND=C_BOOL) :: convention__tmp 796 LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str_ 797 LOGICAL(KIND=C_BOOL) :: convention_str__tmp 767 798 LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic_ 768 799 LOGICAL(KIND=C_BOOL) :: cyclic__tmp … … 836 867 ENDIF 837 868 869 IF (PRESENT(convention_str_)) THEN 870 convention_str__tmp = cxios_is_defined_filegroup_convention_str & 871 (filegroup_hdl%daddr) 872 convention_str_ = convention_str__tmp 873 ENDIF 874 838 875 IF (PRESENT(cyclic_)) THEN 839 876 cyclic__tmp = cxios_is_defined_filegroup_cyclic & -
XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/iinterpolate_domain_attr.F90
r1040 r1205 12 12 13 13 SUBROUTINE xios(set_interpolate_domain_attr) & 14 ( interpolate_domain_id, mode, order, renormalize, weight_filename, write_weight )14 ( interpolate_domain_id, mode, order, quantity, renormalize, weight_filename, write_weight ) 15 15 16 16 IMPLICIT NONE … … 19 19 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode 20 20 INTEGER , OPTIONAL, INTENT(IN) :: order 21 LOGICAL , OPTIONAL, INTENT(IN) :: quantity 22 LOGICAL (KIND=C_BOOL) :: quantity_tmp 21 23 LOGICAL , OPTIONAL, INTENT(IN) :: renormalize 22 24 LOGICAL (KIND=C_BOOL) :: renormalize_tmp … … 28 30 (interpolate_domain_id,interpolate_domain_hdl) 29 31 CALL xios(set_interpolate_domain_attr_hdl_) & 30 ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight ) 32 ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight & 33 ) 31 34 32 35 END SUBROUTINE xios(set_interpolate_domain_attr) 33 36 34 37 SUBROUTINE xios(set_interpolate_domain_attr_hdl) & 35 ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight ) 38 ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight & 39 ) 36 40 37 41 IMPLICIT NONE … … 39 43 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode 40 44 INTEGER , OPTIONAL, INTENT(IN) :: order 45 LOGICAL , OPTIONAL, INTENT(IN) :: quantity 46 LOGICAL (KIND=C_BOOL) :: quantity_tmp 41 47 LOGICAL , OPTIONAL, INTENT(IN) :: renormalize 42 48 LOGICAL (KIND=C_BOOL) :: renormalize_tmp … … 46 52 47 53 CALL xios(set_interpolate_domain_attr_hdl_) & 48 ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight ) 54 ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight & 55 ) 49 56 50 57 END SUBROUTINE xios(set_interpolate_domain_attr_hdl) 51 58 52 59 SUBROUTINE xios(set_interpolate_domain_attr_hdl_) & 53 ( interpolate_domain_hdl, mode_, order_, renormalize_, weight_filename_, write_weight_ ) 60 ( interpolate_domain_hdl, mode_, order_, quantity_, renormalize_, weight_filename_, write_weight_ & 61 ) 54 62 55 63 IMPLICIT NONE … … 57 65 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode_ 58 66 INTEGER , OPTIONAL, INTENT(IN) :: order_ 67 LOGICAL , OPTIONAL, INTENT(IN) :: quantity_ 68 LOGICAL (KIND=C_BOOL) :: quantity__tmp 59 69 LOGICAL , OPTIONAL, INTENT(IN) :: renormalize_ 60 70 LOGICAL (KIND=C_BOOL) :: renormalize__tmp … … 73 83 ENDIF 74 84 85 IF (PRESENT(quantity_)) THEN 86 quantity__tmp = quantity_ 87 CALL cxios_set_interpolate_domain_quantity & 88 (interpolate_domain_hdl%daddr, quantity__tmp) 89 ENDIF 90 75 91 IF (PRESENT(renormalize_)) THEN 76 92 renormalize__tmp = renormalize_ … … 93 109 94 110 SUBROUTINE xios(get_interpolate_domain_attr) & 95 ( interpolate_domain_id, mode, order, renormalize, weight_filename, write_weight )111 ( interpolate_domain_id, mode, order, quantity, renormalize, weight_filename, write_weight ) 96 112 97 113 IMPLICIT NONE … … 100 116 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode 101 117 INTEGER , OPTIONAL, INTENT(OUT) :: order 118 LOGICAL , OPTIONAL, INTENT(OUT) :: quantity 119 LOGICAL (KIND=C_BOOL) :: quantity_tmp 102 120 LOGICAL , OPTIONAL, INTENT(OUT) :: renormalize 103 121 LOGICAL (KIND=C_BOOL) :: renormalize_tmp … … 109 127 (interpolate_domain_id,interpolate_domain_hdl) 110 128 CALL xios(get_interpolate_domain_attr_hdl_) & 111 ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight ) 129 ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight & 130 ) 112 131 113 132 END SUBROUTINE xios(get_interpolate_domain_attr) 114 133 115 134 SUBROUTINE xios(get_interpolate_domain_attr_hdl) & 116 ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight ) 135 ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight & 136 ) 117 137 118 138 IMPLICIT NONE … … 120 140 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode 121 141 INTEGER , OPTIONAL, INTENT(OUT) :: order 142 LOGICAL , OPTIONAL, INTENT(OUT) :: quantity 143 LOGICAL (KIND=C_BOOL) :: quantity_tmp 122 144 LOGICAL , OPTIONAL, INTENT(OUT) :: renormalize 123 145 LOGICAL (KIND=C_BOOL) :: renormalize_tmp … … 127 149 128 150 CALL xios(get_interpolate_domain_attr_hdl_) & 129 ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight ) 151 ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight & 152 ) 130 153 131 154 END SUBROUTINE xios(get_interpolate_domain_attr_hdl) 132 155 133 156 SUBROUTINE xios(get_interpolate_domain_attr_hdl_) & 134 ( interpolate_domain_hdl, mode_, order_, renormalize_, weight_filename_, write_weight_ ) 157 ( interpolate_domain_hdl, mode_, order_, quantity_, renormalize_, weight_filename_, write_weight_ & 158 ) 135 159 136 160 IMPLICIT NONE … … 138 162 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode_ 139 163 INTEGER , OPTIONAL, INTENT(OUT) :: order_ 164 LOGICAL , OPTIONAL, INTENT(OUT) :: quantity_ 165 LOGICAL (KIND=C_BOOL) :: quantity__tmp 140 166 LOGICAL , OPTIONAL, INTENT(OUT) :: renormalize_ 141 167 LOGICAL (KIND=C_BOOL) :: renormalize__tmp … … 154 180 ENDIF 155 181 182 IF (PRESENT(quantity_)) THEN 183 CALL cxios_get_interpolate_domain_quantity & 184 (interpolate_domain_hdl%daddr, quantity__tmp) 185 quantity_ = quantity__tmp 186 ENDIF 187 156 188 IF (PRESENT(renormalize_)) THEN 157 189 CALL cxios_get_interpolate_domain_renormalize & … … 174 206 175 207 SUBROUTINE xios(is_defined_interpolate_domain_attr) & 176 ( interpolate_domain_id, mode, order, renormalize, weight_filename, write_weight )208 ( interpolate_domain_id, mode, order, quantity, renormalize, weight_filename, write_weight ) 177 209 178 210 IMPLICIT NONE … … 183 215 LOGICAL, OPTIONAL, INTENT(OUT) :: order 184 216 LOGICAL(KIND=C_BOOL) :: order_tmp 217 LOGICAL, OPTIONAL, INTENT(OUT) :: quantity 218 LOGICAL(KIND=C_BOOL) :: quantity_tmp 185 219 LOGICAL, OPTIONAL, INTENT(OUT) :: renormalize 186 220 LOGICAL(KIND=C_BOOL) :: renormalize_tmp … … 193 227 (interpolate_domain_id,interpolate_domain_hdl) 194 228 CALL xios(is_defined_interpolate_domain_attr_hdl_) & 195 ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight ) 229 ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight & 230 ) 196 231 197 232 END SUBROUTINE xios(is_defined_interpolate_domain_attr) 198 233 199 234 SUBROUTINE xios(is_defined_interpolate_domain_attr_hdl) & 200 ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight ) 235 ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight & 236 ) 201 237 202 238 IMPLICIT NONE … … 206 242 LOGICAL, OPTIONAL, INTENT(OUT) :: order 207 243 LOGICAL(KIND=C_BOOL) :: order_tmp 244 LOGICAL, OPTIONAL, INTENT(OUT) :: quantity 245 LOGICAL(KIND=C_BOOL) :: quantity_tmp 208 246 LOGICAL, OPTIONAL, INTENT(OUT) :: renormalize 209 247 LOGICAL(KIND=C_BOOL) :: renormalize_tmp … … 214 252 215 253 CALL xios(is_defined_interpolate_domain_attr_hdl_) & 216 ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight ) 254 ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight & 255 ) 217 256 218 257 END SUBROUTINE xios(is_defined_interpolate_domain_attr_hdl) 219 258 220 259 SUBROUTINE xios(is_defined_interpolate_domain_attr_hdl_) & 221 ( interpolate_domain_hdl, mode_, order_, renormalize_, weight_filename_, write_weight_ ) 260 ( interpolate_domain_hdl, mode_, order_, quantity_, renormalize_, weight_filename_, write_weight_ & 261 ) 222 262 223 263 IMPLICIT NONE … … 227 267 LOGICAL, OPTIONAL, INTENT(OUT) :: order_ 228 268 LOGICAL(KIND=C_BOOL) :: order__tmp 269 LOGICAL, OPTIONAL, INTENT(OUT) :: quantity_ 270 LOGICAL(KIND=C_BOOL) :: quantity__tmp 229 271 LOGICAL, OPTIONAL, INTENT(OUT) :: renormalize_ 230 272 LOGICAL(KIND=C_BOOL) :: renormalize__tmp … … 246 288 ENDIF 247 289 290 IF (PRESENT(quantity_)) THEN 291 quantity__tmp = cxios_is_defined_interpolate_domain_quantity & 292 (interpolate_domain_hdl%daddr) 293 quantity_ = quantity__tmp 294 ENDIF 295 248 296 IF (PRESENT(renormalize_)) THEN 249 297 renormalize__tmp = cxios_is_defined_interpolate_domain_renormalize & -
XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/interpolate_domain_interface_attr.F90
r1040 r1205 48 48 INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl 49 49 END FUNCTION cxios_is_defined_interpolate_domain_order 50 51 52 SUBROUTINE cxios_set_interpolate_domain_quantity(interpolate_domain_hdl, quantity) BIND(C) 53 USE ISO_C_BINDING 54 INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl 55 LOGICAL (KIND=C_BOOL) , VALUE :: quantity 56 END SUBROUTINE cxios_set_interpolate_domain_quantity 57 58 SUBROUTINE cxios_get_interpolate_domain_quantity(interpolate_domain_hdl, quantity) BIND(C) 59 USE ISO_C_BINDING 60 INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl 61 LOGICAL (KIND=C_BOOL) :: quantity 62 END SUBROUTINE cxios_get_interpolate_domain_quantity 63 64 FUNCTION cxios_is_defined_interpolate_domain_quantity(interpolate_domain_hdl) BIND(C) 65 USE ISO_C_BINDING 66 LOGICAL(kind=C_BOOL) :: cxios_is_defined_interpolate_domain_quantity 67 INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl 68 END FUNCTION cxios_is_defined_interpolate_domain_quantity 50 69 51 70 -
XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/izoom_axis_attr.F90
r966 r1205 12 12 13 13 SUBROUTINE xios(set_zoom_axis_attr) & 14 ( zoom_axis_id, begin, n )14 ( zoom_axis_id, begin, index, n ) 15 15 16 16 IMPLICIT NONE … … 18 18 CHARACTER(LEN=*), INTENT(IN) ::zoom_axis_id 19 19 INTEGER , OPTIONAL, INTENT(IN) :: begin 20 INTEGER , OPTIONAL, INTENT(IN) :: index(:) 20 21 INTEGER , OPTIONAL, INTENT(IN) :: n 21 22 … … 23 24 (zoom_axis_id,zoom_axis_hdl) 24 25 CALL xios(set_zoom_axis_attr_hdl_) & 25 ( zoom_axis_hdl, begin, n )26 ( zoom_axis_hdl, begin, index, n ) 26 27 27 28 END SUBROUTINE xios(set_zoom_axis_attr) 28 29 29 30 SUBROUTINE xios(set_zoom_axis_attr_hdl) & 30 ( zoom_axis_hdl, begin, n )31 ( zoom_axis_hdl, begin, index, n ) 31 32 32 33 IMPLICIT NONE 33 34 TYPE(txios(zoom_axis)) , INTENT(IN) :: zoom_axis_hdl 34 35 INTEGER , OPTIONAL, INTENT(IN) :: begin 36 INTEGER , OPTIONAL, INTENT(IN) :: index(:) 35 37 INTEGER , OPTIONAL, INTENT(IN) :: n 36 38 37 39 CALL xios(set_zoom_axis_attr_hdl_) & 38 ( zoom_axis_hdl, begin, n )40 ( zoom_axis_hdl, begin, index, n ) 39 41 40 42 END SUBROUTINE xios(set_zoom_axis_attr_hdl) 41 43 42 44 SUBROUTINE xios(set_zoom_axis_attr_hdl_) & 43 ( zoom_axis_hdl, begin_, n_ )45 ( zoom_axis_hdl, begin_, index_, n_ ) 44 46 45 47 IMPLICIT NONE 46 48 TYPE(txios(zoom_axis)) , INTENT(IN) :: zoom_axis_hdl 47 49 INTEGER , OPTIONAL, INTENT(IN) :: begin_ 50 INTEGER , OPTIONAL, INTENT(IN) :: index_(:) 48 51 INTEGER , OPTIONAL, INTENT(IN) :: n_ 49 52 … … 51 54 CALL cxios_set_zoom_axis_begin & 52 55 (zoom_axis_hdl%daddr, begin_) 56 ENDIF 57 58 IF (PRESENT(index_)) THEN 59 CALL cxios_set_zoom_axis_index & 60 (zoom_axis_hdl%daddr, index_, SHAPE(index_)) 53 61 ENDIF 54 62 … … 61 69 62 70 SUBROUTINE xios(get_zoom_axis_attr) & 63 ( zoom_axis_id, begin, n )71 ( zoom_axis_id, begin, index, n ) 64 72 65 73 IMPLICIT NONE … … 67 75 CHARACTER(LEN=*), INTENT(IN) ::zoom_axis_id 68 76 INTEGER , OPTIONAL, INTENT(OUT) :: begin 77 INTEGER , OPTIONAL, INTENT(OUT) :: index(:) 69 78 INTEGER , OPTIONAL, INTENT(OUT) :: n 70 79 … … 72 81 (zoom_axis_id,zoom_axis_hdl) 73 82 CALL xios(get_zoom_axis_attr_hdl_) & 74 ( zoom_axis_hdl, begin, n )83 ( zoom_axis_hdl, begin, index, n ) 75 84 76 85 END SUBROUTINE xios(get_zoom_axis_attr) 77 86 78 87 SUBROUTINE xios(get_zoom_axis_attr_hdl) & 79 ( zoom_axis_hdl, begin, n )88 ( zoom_axis_hdl, begin, index, n ) 80 89 81 90 IMPLICIT NONE 82 91 TYPE(txios(zoom_axis)) , INTENT(IN) :: zoom_axis_hdl 83 92 INTEGER , OPTIONAL, INTENT(OUT) :: begin 93 INTEGER , OPTIONAL, INTENT(OUT) :: index(:) 84 94 INTEGER , OPTIONAL, INTENT(OUT) :: n 85 95 86 96 CALL xios(get_zoom_axis_attr_hdl_) & 87 ( zoom_axis_hdl, begin, n )97 ( zoom_axis_hdl, begin, index, n ) 88 98 89 99 END SUBROUTINE xios(get_zoom_axis_attr_hdl) 90 100 91 101 SUBROUTINE xios(get_zoom_axis_attr_hdl_) & 92 ( zoom_axis_hdl, begin_, n_ )102 ( zoom_axis_hdl, begin_, index_, n_ ) 93 103 94 104 IMPLICIT NONE 95 105 TYPE(txios(zoom_axis)) , INTENT(IN) :: zoom_axis_hdl 96 106 INTEGER , OPTIONAL, INTENT(OUT) :: begin_ 107 INTEGER , OPTIONAL, INTENT(OUT) :: index_(:) 97 108 INTEGER , OPTIONAL, INTENT(OUT) :: n_ 98 109 … … 100 111 CALL cxios_get_zoom_axis_begin & 101 112 (zoom_axis_hdl%daddr, begin_) 113 ENDIF 114 115 IF (PRESENT(index_)) THEN 116 CALL cxios_get_zoom_axis_index & 117 (zoom_axis_hdl%daddr, index_, SHAPE(index_)) 102 118 ENDIF 103 119 … … 110 126 111 127 SUBROUTINE xios(is_defined_zoom_axis_attr) & 112 ( zoom_axis_id, begin, n )128 ( zoom_axis_id, begin, index, n ) 113 129 114 130 IMPLICIT NONE … … 117 133 LOGICAL, OPTIONAL, INTENT(OUT) :: begin 118 134 LOGICAL(KIND=C_BOOL) :: begin_tmp 135 LOGICAL, OPTIONAL, INTENT(OUT) :: index 136 LOGICAL(KIND=C_BOOL) :: index_tmp 119 137 LOGICAL, OPTIONAL, INTENT(OUT) :: n 120 138 LOGICAL(KIND=C_BOOL) :: n_tmp … … 123 141 (zoom_axis_id,zoom_axis_hdl) 124 142 CALL xios(is_defined_zoom_axis_attr_hdl_) & 125 ( zoom_axis_hdl, begin, n )143 ( zoom_axis_hdl, begin, index, n ) 126 144 127 145 END SUBROUTINE xios(is_defined_zoom_axis_attr) 128 146 129 147 SUBROUTINE xios(is_defined_zoom_axis_attr_hdl) & 130 ( zoom_axis_hdl, begin, n )148 ( zoom_axis_hdl, begin, index, n ) 131 149 132 150 IMPLICIT NONE … … 134 152 LOGICAL, OPTIONAL, INTENT(OUT) :: begin 135 153 LOGICAL(KIND=C_BOOL) :: begin_tmp 154 LOGICAL, OPTIONAL, INTENT(OUT) :: index 155 LOGICAL(KIND=C_BOOL) :: index_tmp 136 156 LOGICAL, OPTIONAL, INTENT(OUT) :: n 137 157 LOGICAL(KIND=C_BOOL) :: n_tmp 138 158 139 159 CALL xios(is_defined_zoom_axis_attr_hdl_) & 140 ( zoom_axis_hdl, begin, n )160 ( zoom_axis_hdl, begin, index, n ) 141 161 142 162 END SUBROUTINE xios(is_defined_zoom_axis_attr_hdl) 143 163 144 164 SUBROUTINE xios(is_defined_zoom_axis_attr_hdl_) & 145 ( zoom_axis_hdl, begin_, n_ )165 ( zoom_axis_hdl, begin_, index_, n_ ) 146 166 147 167 IMPLICIT NONE … … 149 169 LOGICAL, OPTIONAL, INTENT(OUT) :: begin_ 150 170 LOGICAL(KIND=C_BOOL) :: begin__tmp 171 LOGICAL, OPTIONAL, INTENT(OUT) :: index_ 172 LOGICAL(KIND=C_BOOL) :: index__tmp 151 173 LOGICAL, OPTIONAL, INTENT(OUT) :: n_ 152 174 LOGICAL(KIND=C_BOOL) :: n__tmp … … 156 178 (zoom_axis_hdl%daddr) 157 179 begin_ = begin__tmp 180 ENDIF 181 182 IF (PRESENT(index_)) THEN 183 index__tmp = cxios_is_defined_zoom_axis_index & 184 (zoom_axis_hdl%daddr) 185 index_ = index__tmp 158 186 ENDIF 159 187 -
XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/zoom_axis_interface_attr.F90
r787 r1205 29 29 30 30 31 SUBROUTINE cxios_set_zoom_axis_index(zoom_axis_hdl, index, extent) BIND(C) 32 USE ISO_C_BINDING 33 INTEGER (kind = C_INTPTR_T), VALUE :: zoom_axis_hdl 34 INTEGER (KIND=C_INT) , DIMENSION(*) :: index 35 INTEGER (kind = C_INT), DIMENSION(*) :: extent 36 END SUBROUTINE cxios_set_zoom_axis_index 37 38 SUBROUTINE cxios_get_zoom_axis_index(zoom_axis_hdl, index, extent) BIND(C) 39 USE ISO_C_BINDING 40 INTEGER (kind = C_INTPTR_T), VALUE :: zoom_axis_hdl 41 INTEGER (KIND=C_INT) , DIMENSION(*) :: index 42 INTEGER (kind = C_INT), DIMENSION(*) :: extent 43 END SUBROUTINE cxios_get_zoom_axis_index 44 45 FUNCTION cxios_is_defined_zoom_axis_index(zoom_axis_hdl) BIND(C) 46 USE ISO_C_BINDING 47 LOGICAL(kind=C_BOOL) :: cxios_is_defined_zoom_axis_index 48 INTEGER (kind = C_INTPTR_T), VALUE :: zoom_axis_hdl 49 END FUNCTION cxios_is_defined_zoom_axis_index 50 51 31 52 SUBROUTINE cxios_set_zoom_axis_n(zoom_axis_hdl, n) BIND(C) 32 53 USE ISO_C_BINDING -
XIOS/dev/branch_yushan_merged/src/io/nc4_data_output.cpp
r1176 r1205 11 11 #include "netCdfException.hpp" 12 12 #include "exception.hpp" 13 #include "timer.hpp" 13 14 #include "uuid.hpp" 14 15 // mpi.hpp … … 79 80 80 81 81 82 StdString dimXid, dimYid ; 82 83 83 84 nc_type typePrec ; … … 1045 1046 int zoom_begin_srv = axis->zoom_begin_srv; 1046 1047 int zoom_size = (MULTI_FILE == SuperClass::type) ? zoom_size_srv 1047 : axis->global_zoom_n; 1048 int zoom_begin = (MULTI_FILE == SuperClass::type) ? zoom_begin_srv 1049 : axis->global_zoom_begin; 1048 : axis->global_zoom_size_srv; 1050 1049 1051 1050 if ((0 == zoom_size_srv) && (MULTI_FILE == SuperClass::type)) return; … … 1102 1101 1103 1102 SuperClassWriter::definition_end(); 1104 printf("SuperClass::type = %d, typePrec = %d\n", SuperClass::type, typePrec); 1103 1105 1104 switch (SuperClass::type) 1106 1105 { … … 1126 1125 std::vector<StdSize> start(1), startBounds(2) ; 1127 1126 std::vector<StdSize> count(1), countBounds(2) ; 1128 start[0] = startBounds[0] = zoom_begin_srv-axis->global_zoom_begin ;1127 start[0] = startBounds[0] = zoom_begin_srv-axis->global_zoom_begin_srv; 1129 1128 count[0] = countBounds[0] = zoom_size_srv; 1130 1129 startBounds[1] = 0; … … 1832 1831 1833 1832 singleDomain = (file->nbDomains == 1); 1833 1834 StdString conv_str ; 1835 if (file->convention_str.isEmpty()) 1836 { 1837 if (SuperClassWriter::useCFConvention) conv_str="CF-1.6" ; 1838 else conv_str="UGRID" ; 1839 } 1840 else conv_str=file->convention_str ; 1841 1834 1842 try 1835 1843 { 1836 if (SuperClassWriter::useCFConvention) 1837 this->writeFileAttributes(filename, description, 1838 StdString("CF-1.6"), 1839 StdString("An IPSL model"), 1840 this->getTimeStamp()); 1841 else 1842 this->writeFileAttributes(filename, description, 1843 StdString("UGRID"), 1844 StdString("An IPSL model"), 1845 this->getTimeStamp()); 1846 1844 this->writeFileAttributes(filename, description, 1845 conv_str, 1846 StdString("An IPSL model"), 1847 this->getTimeStamp()); 1847 1848 1848 1849 if (!appendMode) … … 1989 1990 CGrid* grid = field->grid; 1990 1991 1991 if (field->getNStep()<1) return ; 1992 if (field->getNStep()<1) 1993 { 1994 return; 1995 } 1992 1996 1993 1997 if (!grid->doGridHaveDataToWrite()) 1994 if (SuperClass::type == MULTI_FILE || !isCollective) return; 1995 1998 if (SuperClass::type == MULTI_FILE || !isCollective) 1999 { 2000 return; 2001 } 2002 2003 1996 2004 StdString fieldid = field->getFieldOutputName(); 1997 2005 … … 2118 2126 case (MULTI_FILE) : 2119 2127 { 2128 CTimer::get("Files : writing data").resume(); 2120 2129 SuperClassWriter::writeData(fieldData, fieldid, isCollective, field->getNStep() - 1); 2130 CTimer::get("Files : writing data").suspend(); 2121 2131 if (wtime) 2122 2132 { 2133 CTimer::get("Files : writing time axis").resume(); 2123 2134 if ( wtimeData) 2124 2135 { 2125 SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1); 2126 SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1); 2127 } 2136 // SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1); 2137 // SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1); 2138 SuperClassWriter::writeTimeAxisData(time_data, timeAxisId, isCollective, field->getNStep() - 1, isRoot); 2139 SuperClassWriter::writeTimeAxisDataBounds(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1, isRoot); 2140 } 2128 2141 if (wtimeCounter) 2129 2142 { 2130 SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1); 2131 if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1); 2143 // SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1); 2144 // if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1); 2145 SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1,isRoot); 2146 if (timeCounterType!=record) SuperClassWriter::writeTimeAxisDataBounds(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot); 2132 2147 } 2148 CTimer::get("Files : writing time axis").suspend(); 2133 2149 } 2134 2150 break; … … 2256 2272 } 2257 2273 2274 2275 CTimer::get("Files : writing data").resume(); 2258 2276 SuperClassWriter::writeData(fieldData, fieldid, isCollective, field->getNStep() - 1, &start, &count); 2277 CTimer::get("Files : writing data").suspend(); 2278 2259 2279 if (wtime) 2260 2280 { 2281 CTimer::get("Files : writing time axis").resume(); 2261 2282 if ( wtimeData) 2262 2283 { 2263 SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1); 2264 SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1); 2284 // SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1); 2285 // SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1); 2286 SuperClassWriter::writeTimeAxisData(time_data, timeAxisId, isCollective, field->getNStep() - 1, isRoot); 2287 SuperClassWriter::writeTimeAxisDataBounds(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1, isRoot); 2265 2288 } 2266 2289 if (wtimeCounter) 2267 2290 { 2268 SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1); 2269 if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1); 2291 // SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1); 2292 // if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1); 2293 SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1,isRoot); 2294 if (timeCounterType!=record) SuperClassWriter::writeTimeAxisDataBounds(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot); 2295 2270 2296 } 2297 CTimer::get("Files : writing time axis").suspend(); 2271 2298 } 2272 2299 -
XIOS/dev/branch_yushan_merged/src/io/onetcdf4.cpp
r1160 r1205 6 6 #include "netCdfInterface.hpp" 7 7 #include "netCdfException.hpp" 8 // mpi_std.hpp 8 #include "timer.hpp" 9 9 10 10 namespace xios … … 54 54 if (!append || !std::ifstream(filename.c_str())) 55 55 { 56 CTimer::get("Files : create").resume(); 56 57 if (wmpi) 57 58 CNetCdfInterface::createPar(filename, mode, *comm, MPI_INFO_NULL_STD, this->ncidp); 58 59 else 59 60 CNetCdfInterface::create(filename, mode, this->ncidp); 60 61 CTimer::get("Files : create").suspend(); 62 61 63 this->appendMode = false; 62 64 } … … 64 66 { 65 67 mode |= NC_WRITE; 68 CTimer::get("Files : open").resume(); 66 69 if (wmpi) 67 //CNetCdfInterface::openPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), MPI_INFO_NULL_STD, this->ncidp);68 70 CNetCdfInterface::openPar(filename, mode, *comm, MPI_INFO_NULL_STD, this->ncidp); 69 71 else 70 72 CNetCdfInterface::open(filename, mode, this->ncidp); 71 73 CTimer::get("Files : open").suspend(); 72 74 this->appendMode = true; 73 75 } … … 83 85 void CONetCDF4::close() 84 86 { 87 CTimer::get("Files : close").resume(); 85 88 CNetCdfInterface::close(this->ncidp); 89 CTimer::get("Files : close").suspend(); 86 90 } 87 91 … … 558 562 559 563 this->getWriteDataInfos(name, 0, array_size, sstart, scount, NULL, NULL); 564 560 565 this->writeData_(grpid, varid, sstart, scount, data.dataFirst()); 566 561 567 } 562 568 … … 584 590 585 591 this->getWriteDataInfos(name, record, array_size, sstart, scount, NULL, NULL); 586 if (using_netcdf_internal)587 {588 if (!isRoot)589 {590 sstart[0] = sstart[0] + 1;591 scount[0] = 0;592 }593 }594 592 this->writeData_(grpid, varid, sstart, scount, data.dataFirst()); 595 593 } 596 594 595 void CONetCDF4::writeTimeAxisDataBounds(const CArray<double, 1>& data, const StdString& name, 596 bool collective, StdSize record, bool isRoot) 597 { 598 int grpid = this->getCurrentGroup(); 599 int varid = this->getVariable(name); 600 601 map<int,size_t>::iterator it=timeAxis.find(varid); 602 if (it == timeAxis.end()) timeAxis[varid] = record; 603 else 604 { 605 if (it->second >= record) return; 606 else it->second =record; 607 } 608 609 StdSize array_size = 1; 610 std::vector<StdSize> sstart, scount; 611 612 if (this->wmpi && collective) 613 CNetCdfInterface::varParAccess(grpid, varid, NC_COLLECTIVE); 614 if (this->wmpi && !collective) 615 CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT); 616 617 this->getWriteDataInfos(name, record, array_size, sstart, scount, NULL, NULL); 618 this->writeData_(grpid, varid, sstart, scount, data.dataFirst()); 619 } 620 621 597 622 //--------------------------------------------------------------- 598 623 -
XIOS/dev/branch_yushan_merged/src/io/onetcdf4.hpp
r1160 r1205 73 73 void writeTimeAxisData(const CArray<double,1>& data, const StdString& name, 74 74 bool collective, StdSize record, bool Isroot); 75 void writeTimeAxisDataBounds(const CArray<double,1>& data, const StdString& name, 76 bool collective, StdSize record, bool Isroot); 75 77 /// Accesseur /// 76 78 const CONetCDF4Path& getCurrentPath(void) const; -
XIOS/dev/branch_yushan_merged/src/io/onetcdf4_impl.hpp
r1160 r1205 25 25 CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT); 26 26 27 CTimer::get("Files : get data infos").resume(); 27 28 this->getWriteDataInfos 28 29 (name, record, array_size, sstart, scount, start, count); 30 CTimer::get("Files : get data infos").suspend(); 31 29 32 if (data.numElements() != array_size) 30 33 { … … 54 57 CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT); 55 58 56 this->getWriteDataInfos 57 (name, record, array_size, sstart, scount, start, count); 59 CTimer::get("CONetCDF4::writeData getWriteDataInfos").resume(); 60 this->getWriteDataInfos(name, record, array_size, sstart, scount, start, count); 61 CTimer::get("CONetCDF4::writeData getWriteDataInfos").suspend(); 62 58 63 if (data.numElements()*stringArrayLen != array_size) 59 64 { … … 72 77 PtrArrayStr[it->size()]='\0' ; 73 78 } 79 CTimer::get("CONetCDF4::writeData writeData_").resume(); 74 80 this->writeData_(grpid, varid, sstart, scount, ArrayStr); 81 CTimer::get("CONetCDF4::writeData writeData_").suspend(); 75 82 delete [] ArrayStr ; 76 83 } -
XIOS/dev/branch_yushan_merged/src/memtrack.cpp
r1160 r1205 52 52 { 53 53 void addr2line(const char *file_name, char** addr, int naddr) ; 54 #ifdef XIOS_MEMTRACK_LIGHT 55 void addr2line(const char *file_name, char** addr, int naddr) {} 56 #endif 54 57 } 55 58 /* ------------------------------------------------------------ */ … … 59 62 namespace MemTrack 60 63 { 64 size_t currentMemorySize=0 ; 65 size_t maxMemorySize=0 ; 66 67 size_t getCurrentMemorySize(void) {return currentMemorySize; } 68 size_t getMaxMemorySize(void) {return maxMemorySize ; } 61 69 62 70 /* ------------------------------------------------------------ */ … … 376 384 // Get the offset to the user chunk and return it. 377 385 UserChunk *pUser = GetUserAddress(pProlog); 386 387 currentMemorySize += size ; 388 if (currentMemorySize>maxMemorySize) maxMemorySize=currentMemorySize ; 378 389 379 390 return pUser; … … 401 412 // Unlink the block header from the list and destroy it. 402 413 BlockHeader *pBlockHeader = GetHeaderAddress(pProlog); 414 currentMemorySize-=pBlockHeader->GetRequestedSize(); 403 415 BlockHeader::RemoveNode(pBlockHeader); 404 416 pBlockHeader->~BlockHeader(); -
XIOS/dev/branch_yushan_merged/src/memtrack.hpp
r1160 r1205 61 61 void TrackDumpBlocks(); 62 62 void TrackListMemoryUsage(); 63 63 size_t getCurrentMemorySize(void) ; 64 size_t getMaxMemorySize(void) ; 64 65 /* ---------------------------------------- operator * (MemStamp, ptr) */ 65 66 -
XIOS/dev/branch_yushan_merged/src/node/axis.cpp
r1134 r1205 367 367 // We don't check if the mask is valid here, just if a mask has been defined at this point. 368 368 isCompressible_ = !mask.isEmpty(); 369 } 370 371 bool CAxis::zoomByIndex() 372 { 373 return (!global_zoom_index.isEmpty() && (0 != global_zoom_index.numElements())); 369 374 } 370 375 … … 463 468 size_t nZoomCount = 0; 464 469 size_t nbIndex = index.numElements(); 465 for (size_t idx = 0; idx < nbIndex; ++idx) 470 471 int end = (0 == n) ? begin : begin + n - 1; 472 int zoom_size = zoomByIndex() ? global_zoom_index.numElements() : global_zoom_n; 473 int minInd = min(index); 474 int maxInd = max(index); 475 for (size_t idx = 0; idx < zoom_size; ++idx) 476 { 477 size_t globalZoomIndex = zoomByIndex() ? global_zoom_index(idx) : global_zoom_begin + idx; 478 if (globalZoomIndex >= minInd && globalZoomIndex <= maxInd) ++nZoomCount; 479 } 480 481 /* for (size_t idx = 0; idx < nbIndex; ++idx) 466 482 { 467 483 size_t globalIndex = index(idx); 468 484 if (globalIndex >= global_zoom_begin && globalIndex <= zoom_end) ++nZoomCount; 469 } 470 485 }*/ 486 471 487 CArray<size_t,1> globalIndexAxis(nbIndex); 488 for (size_t idx = 0; idx < nbIndex; ++idx) 489 { 490 globalIndexAxis(idx) = (size_t)index(idx); 491 } 492 472 493 std::vector<size_t> globalAxisZoom(nZoomCount); 473 494 nZoomCount = 0; 474 for (size_t idx = 0; idx < nbIndex; ++idx) 475 { 476 size_t globalIndex = index(idx); 477 globalIndexAxis(idx) = globalIndex; 478 if (globalIndex >= global_zoom_begin && globalIndex <= zoom_end) 479 { 480 globalAxisZoom[nZoomCount] = globalIndex; 495 for (size_t idx = 0; idx < zoom_size; ++idx) 496 { 497 size_t globalZoomIndex = zoomByIndex() ? global_zoom_index(idx) : global_zoom_begin + idx; 498 if (globalZoomIndex >= minInd && globalZoomIndex <= maxInd) 499 { 500 globalAxisZoom[nZoomCount] = globalZoomIndex; 481 501 ++nZoomCount; 482 502 } … … 598 618 int zoom_end = global_zoom_begin + global_zoom_n - 1; 599 619 int nb = 0; 600 for (size_t idx = 0; idx < n; ++idx)620 /* for (size_t idx = 0; idx < n; ++idx) 601 621 { 602 622 size_t globalIndex = begin + idx; 603 623 if (globalIndex >= global_zoom_begin && globalIndex <= zoom_end) ++nb; 624 }*/ 625 626 int end = (0 == n) ? begin : begin + n - 1; 627 int zoom_size = zoomByIndex() ? global_zoom_index.numElements() : global_zoom_n; 628 for (size_t idx = 0; idx < zoom_size; ++idx) 629 { 630 size_t globalZoomIndex = zoomByIndex() ? global_zoom_index(idx) : global_zoom_begin + idx; 631 if (globalZoomIndex >= begin && globalZoomIndex <= end) ++nb; 604 632 } 605 633 … … 622 650 CArray<double,1> val(nb); 623 651 nb = 0; 624 for (size_t idx = 0; idx < n; ++idx)652 /* for (size_t idx = 0; idx < n; ++idx) 625 653 { 626 654 size_t globalIndex = begin + idx; … … 628 656 { 629 657 val(nb) = value(idx); 658 ++nb; 659 } 660 }*/ 661 662 for (size_t idx = 0; idx < zoom_size; ++idx) 663 { 664 size_t globalZoomIndex = zoomByIndex() ? global_zoom_index(idx) : global_zoom_begin + idx; 665 if (globalZoomIndex >= begin && globalZoomIndex <= end) 666 { 667 val(nb) = value(globalZoomIndex-begin); 630 668 ++nb; 631 669 } … … 933 971 const int ni = serverDimensionSizes[*itRank][orderPositionInGrid]; 934 972 const int end = begin + ni - 1; 973 const bool zoomIndex = zoomByIndex(); 935 974 936 975 msgs.push_back(CMessage()); … … 940 979 msg << global_zoom_begin.getValue() << global_zoom_n.getValue(); 941 980 msg << isCompressible_; 981 msg << zoomIndex; 982 if (zoomIndex) 983 msg << global_zoom_index.getValue(); 942 984 943 985 event.push(*itRank,1,msg); … … 959 1001 { 960 1002 int ni_srv, begin_srv, end_srv, global_zoom_begin_tmp, global_zoom_n_tmp; 1003 bool zoomIndex; 1004 CArray<int,1> zoom_index_recv; 1005 std::vector<int> zoom_index_tmp; 1006 std::vector<int>::iterator itZoomBeginSrv, itZoomEndSrv, itZoomSrv; 961 1007 962 1008 buffer >> ni_srv >> begin_srv >> end_srv; 963 1009 buffer >> global_zoom_begin_tmp >> global_zoom_n_tmp; 964 1010 buffer >> isCompressible_; 1011 buffer >> zoomIndex; 1012 if (zoomIndex) 1013 { 1014 buffer >> zoom_index_recv; 1015 global_zoom_index.reference(zoom_index_recv); 1016 zoom_index_tmp.resize(global_zoom_index.numElements()); 1017 std::copy(global_zoom_index.begin(), global_zoom_index.end(), zoom_index_tmp.begin()); 1018 std::sort(zoom_index_tmp.begin(), zoom_index_tmp.end()); 1019 itZoomBeginSrv = std::lower_bound(zoom_index_tmp.begin(), zoom_index_tmp.end(), begin_srv); 1020 itZoomEndSrv = std::upper_bound(zoom_index_tmp.begin(), zoom_index_tmp.end(), end_srv); 1021 int sz = std::distance(itZoomBeginSrv, itZoomEndSrv); 1022 zoom_index_srv.resize(sz); 1023 itZoomSrv = itZoomBeginSrv; 1024 for (int i = 0; i < sz; ++i, ++itZoomSrv) 1025 { 1026 zoom_index_srv(i) = *(itZoomSrv); 1027 } 1028 } 1029 965 1030 global_zoom_begin = global_zoom_begin_tmp; 966 1031 global_zoom_n = global_zoom_n_tmp; 967 1032 int global_zoom_end = global_zoom_begin + global_zoom_n - 1; 968 1033 969 zoom_begin_srv = global_zoom_begin > begin_srv ? global_zoom_begin : begin_srv ; 970 zoom_end_srv = global_zoom_end < end_srv ? global_zoom_end : end_srv ; 1034 zoom_begin_srv = zoomIndex ? std::distance(itZoomBeginSrv, zoom_index_tmp.begin()) 1035 : global_zoom_begin > begin_srv ? global_zoom_begin : begin_srv ; 1036 zoom_end_srv = zoomIndex ? std::distance(zoom_index_tmp.begin(), itZoomEndSrv) - 1 1037 : global_zoom_end < end_srv ? global_zoom_end : end_srv ; 971 1038 zoom_size_srv = zoom_end_srv - zoom_begin_srv + 1; 1039 1040 global_zoom_begin_srv = zoomIndex ? 0 : global_zoom_begin ; 1041 global_zoom_size_srv = zoomIndex ? zoom_index_tmp.size() : global_zoom_n; 972 1042 973 1043 if (zoom_size_srv<=0) … … 978 1048 if (n_glo == n) 979 1049 { 980 zoom_begin_srv = global_zoom_begin; 981 zoom_end_srv = global_zoom_end; //zoom_end; 982 zoom_size_srv = zoom_end_srv - zoom_begin_srv + 1; 1050 zoom_begin_srv = zoomIndex ? std::distance(itZoomBeginSrv, zoom_index_tmp.begin()) 1051 : global_zoom_begin; 1052 zoom_size_srv = zoomIndex ? zoom_index_tmp.size() 1053 : global_zoom_n; 983 1054 } 984 1055 if (hasValue) … … 1043 1114 } 1044 1115 1045 1046 1047 1116 void CAxis::duplicateTransformation(CAxis* src) 1048 1117 { -
XIOS/dev/branch_yushan_merged/src/node/axis.hpp
r1134 r1205 122 122 int zoom_begin_srv, zoom_end_srv, zoom_size_srv; 123 123 int ni_srv, begin_srv, end_srv; 124 int global_zoom_begin_srv, global_zoom_end_srv, global_zoom_size_srv; 124 125 CArray<double,1> value_srv; 125 126 CArray<double,2> bound_srv; 126 127 CArray<StdString,1> label_srv; 128 CArray<int,1> zoom_index_srv; 127 129 bool hasValue; 128 130 … … 138 140 void sendDistributedValue(); 139 141 void sendNonDistributedValue(); 142 bool zoomByIndex(); 140 143 141 144 static void recvIndex(CEventServer& event); -
XIOS/dev/branch_yushan_merged/src/node/context.cpp
r1160 r1205 14 14 #include "type.hpp" 15 15 #include "xios_spl.hpp" 16 #include "timer.hpp" 17 #include "memtrack.hpp" 18 16 19 17 20 namespace xios { … … 278 281 void CContext::setClientServerBuffer() 279 282 { 280 size_t minBufferSize = CXios::minBufferSize; 283 // Estimated minimum event size for small events (10 is an arbitrary constant just for safety) 284 const size_t minEventSize = CEventClient::headerSize + getIdServer().size() + 10 * sizeof(int); 285 // Ensure there is at least some room for 20 of such events in the buffers 286 size_t minBufferSize = std::max(CXios::minBufferSize, 20 * minEventSize); 281 287 #define DECLARE_NODE(Name_, name_) \ 282 288 if (minBufferSize < sizeof(C##Name_##Definition)) minBufferSize = sizeof(C##Name_##Definition); … … 286 292 #undef DECLARE_NODE_PAR 287 293 294 // Compute the buffer sizes needed to send the attributes and data corresponding to fields 288 295 std::map<int, StdSize> maxEventSize; 289 296 std::map<int, StdSize> bufferSize = getAttributesBufferSize(maxEventSize); … … 294 301 if (it->second > bufferSize[it->first]) bufferSize[it->first] = it->second; 295 302 303 // Apply the buffer size factor and check that we are above the minimum buffer size 296 304 ite = bufferSize.end(); 297 305 for (it = bufferSize.begin(); it != ite; ++it) … … 301 309 } 302 310 303 // We consider that the minimum buffer size is also the minimum event size 304 ite = maxEventSize.end(); 305 for (it = maxEventSize.begin(); it != ite; ++it) 306 if (it->second < minBufferSize) it->second = minBufferSize; 307 311 // Leaders will have to send some control events so ensure there is some room for those in the buffers 308 312 if (client->isServerLeader()) 309 313 { 310 314 const std::list<int>& ranks = client->getRanksServerLeader(); 311 315 for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) 312 if (!bufferSize.count(*itRank)) bufferSize[*itRank] = maxEventSize[*itRank] = minBufferSize; 316 { 317 if (!bufferSize.count(*itRank)) 318 { 319 bufferSize[*itRank] = minBufferSize; 320 maxEventSize[*itRank] = minEventSize; 321 } 322 } 313 323 } 314 324 … … 401 411 void CContext::closeDefinition(void) 402 412 { 413 CTimer::get("Context : close definition").resume() ; 403 414 // There is nothing client need to send to server 404 415 if (hasClient) … … 454 465 startPrefetchingOfEnabledReadModeFiles(); 455 466 } 467 CTimer::get("Context : close definition").suspend() ; 456 468 } 457 469 … … 1206 1218 void CContext::updateCalendar(int step) 1207 1219 { 1220 #pragma omp critical (_output) 1221 {info(50) << "updateCalendar : before : " << calendar->getCurrentDate() << endl;} 1208 1222 calendar->update(step); 1209 1210 1223 #pragma omp critical (_output) 1224 {info(50) << "updateCalendar : after : " << calendar->getCurrentDate() << endl;} 1225 #ifdef XIOS_MEMTRACK_LIGHT 1226 #pragma omp critical (_output) 1227 {info(50) << " Current memory used by XIOS : "<< MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte, at timestep "<<step<<" of context "<<this->getId()<<endl ;} 1228 #endif 1211 1229 if (hasClient) 1212 1230 { … … 1255 1273 CContext* context = CObjectFactory::CreateObject<CContext>(id).get(); 1256 1274 getRoot(); 1257 //if (!hasctxt) CGroupFactory::AddChild(root, context->getShared());1258 1275 if (!hasctxt) CGroupFactory::AddChild(*root_ptr, context->getShared()); 1259 1276 -
XIOS/dev/branch_yushan_merged/src/node/field.cpp
r1203 r1205 26 26 namespace xios{ 27 27 28 /// ////////////////////// D finitions ////////////////////// ///28 /// ////////////////////// Définitions ////////////////////// /// 29 29 30 30 CField::CField(void) … … 125 125 void CField::sendUpdateData(const CArray<double,1>& data) 126 126 { 127 CTimer::get(" XIOS Send Data").resume();127 CTimer::get("Field : send data").resume(); 128 128 129 129 CContext* context = CContext::getCurrent(); … … 177 177 } 178 178 179 CTimer::get(" XIOS Send Data").suspend();179 CTimer::get("Field : send data").suspend(); 180 180 } 181 181 … … 187 187 list<CEventServer::SSubEvent>::iterator it; 188 188 string fieldId; 189 189 CTimer::get("Field : recv data").resume(); 190 190 for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it) 191 191 { … … 197 197 } 198 198 get(fieldId)->recvUpdateData(ranks,buffers); 199 CTimer::get("Field : recv data").suspend(); 199 200 } 200 201 … … 794 795 if (!areAllReferenceSolved) solveAllReferenceEnabledField(false); 795 796 797 const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true); 798 const double defaultValue = detectMissingValues ? default_value : (!default_value.isEmpty() ? default_value : 0.0); 799 796 800 // Start by building a filter which can provide the field's instant data 797 801 if (!instantDataFilter) … … 810 814 if (grid && grid != gridRef && grid->hasTransform()) 811 815 { 812 bool hasMissingValue = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true); 813 double defaultValue = hasMissingValue ? default_value : (!default_value.isEmpty() ? default_value : 0.0); 814 std::pair<boost::shared_ptr<CFilter>, boost::shared_ptr<CFilter> > filters = CSpatialTransformFilter::buildFilterGraph(gc, gridRef, grid, hasMissingValue, defaultValue); 816 std::pair<boost::shared_ptr<CFilter>, boost::shared_ptr<CFilter> > filters = CSpatialTransformFilter::buildFilterGraph(gc, gridRef, grid, detectMissingValues, defaultValue); 815 817 816 818 filter->connectOutput(filters.first, 0); … … 828 830 instantDataFilter = serverSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, 829 831 freq_offset.isEmpty() ? NoneDu : freq_offset, 830 true)); 832 true, 833 detectMissingValues, defaultValue)); 831 834 else // The data might be passed from the model 832 835 { 833 bool ignoreMissingValue = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true); 834 double defaultValue = ignoreMissingValue ? default_value : (!default_value.isEmpty() ? default_value : 0.0); 836 if (check_if_active.isEmpty()) check_if_active = false; 835 837 instantDataFilter = clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, NoneDu, false, 836 ignoreMissingValue, defaultValue)); } 838 detectMissingValues, defaultValue)); 839 } 837 840 } 838 841 … … 842 845 if (!read_access.isEmpty() && read_access) 843 846 { 844 storeFilter = boost::shared_ptr<CStoreFilter>(new CStoreFilter(gc, CContext::getCurrent(), grid)); 847 storeFilter = boost::shared_ptr<CStoreFilter>(new CStoreFilter(gc, CContext::getCurrent(), grid, 848 detectMissingValues, defaultValue)); 845 849 instantDataFilter->connectOutput(storeFilter, 0); 846 850 } … … 903 907 if (!selfReferenceFilter) 904 908 { 909 const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true); 910 const double defaultValue = detectMissingValues ? default_value : (!default_value.isEmpty() ? default_value : 0.0); 911 905 912 if (file && !file->mode.isEmpty() && file->mode == CFile::mode_attr::read) 906 913 { … … 908 915 serverSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, 909 916 freq_offset.isEmpty() ? NoneDu : freq_offset, 910 true)); 917 true, 918 detectMissingValues, defaultValue)); 911 919 912 920 selfReferenceFilter = serverSourceFilter; … … 922 930 if (!clientSourceFilter) 923 931 { 924 bool ignoreMissingValue = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true); 925 double defaultValue = ignoreMissingValue ? default_value : (!default_value.isEmpty() ? default_value : 0.0); 932 if (check_if_active.isEmpty()) check_if_active = false; 926 933 clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, NoneDu, false, 927 ignoreMissingValue, defaultValue));934 detectMissingValues, defaultValue)); 928 935 } 929 936 … … 959 966 freq_offset.setValue(NoneDu); 960 967 961 const bool ignoreMissingValue= (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true);962 968 const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true); 969 963 970 boost::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation, 964 971 CContext::getCurrent()->getCalendar()->getInitDate(), 965 972 freq_op, freq_offset, outFreq, 966 ignoreMissingValue, ignoreMissingValue? default_value : 0.0));973 detectMissingValues, detectMissingValues ? default_value : 0.0)); 967 974 instantDataFilter->connectOutput(temporalFilter, 0); 968 975 … … 999 1006 if (freq_offset.isEmpty()) freq_offset.setValue(NoneDu); 1000 1007 1001 const bool ignoreMissingValue= (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true);1008 const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true); 1002 1009 1003 1010 boost::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation, 1004 1011 CContext::getCurrent()->getCalendar()->getInitDate(), 1005 1012 freq_op, freq_offset, outFreq, 1006 ignoreMissingValue, ignoreMissingValue? default_value : 0.0));1013 detectMissingValues, detectMissingValues ? default_value : 0.0)); 1007 1014 selfReferenceFilter->connectOutput(temporalFilter, 0); 1008 1015 return temporalFilter ; -
XIOS/dev/branch_yushan_merged/src/node/field_impl.hpp
r1007 r1205 19 19 { 20 20 if (clientSourceFilter) 21 clientSourceFilter->streamData(CContext::getCurrent()->getCalendar()->getCurrentDate(), _data); 21 { 22 if (!check_if_active || isActive(true)) 23 clientSourceFilter->streamData(CContext::getCurrent()->getCalendar()->getCurrentDate(), _data); 24 } 22 25 else if (instantDataFilter) 23 26 ERROR("void CField::setData(const CArray<double, N>& _data)", -
XIOS/dev/branch_yushan_merged/src/node/file.cpp
r1172 r1205 16 16 #include "context_client.hpp" 17 17 #include "mpi.hpp" 18 #include "timer.hpp" 18 19 19 20 namespace xios { … … 274 275 if (mode.isEmpty() || mode.getValue() == mode_attr::write) 275 276 { 277 CTimer::get("Files : create headers").resume(); 276 278 if (!isOpen) createHeader(); 279 CTimer::get("Files : create headers").suspend(); 277 280 checkSync(); 278 281 } 279 282 else 280 283 { 284 CTimer::get("Files : open headers").resume(); 281 285 if (!isOpen) openInReadMode(); 286 CTimer::get("Files : open headers").suspend(); 282 287 } 283 288 checkSplit(); … … 395 400 if (!split_freq.isEmpty()) 396 401 { 397 CDate splitEnd = lastSplit + split_freq - 1 * Second; 402 CDate split_start ; 403 CDate splitEnd ; 404 if (!split_start_offset.isEmpty()) split_start=lastSplit + split_start_offset ; 405 else split_start=lastSplit ; 406 407 splitEnd = lastSplit + split_freq ; 408 if (!split_last_date.isEmpty()) 409 { 410 CDate splitLastDate=CDate::FromString(split_last_date,*CContext::getCurrent()->getCalendar()) ; 411 if( splitLastDate < splitEnd) splitEnd=splitLastDate ; 412 } 413 414 if (!split_end_offset.isEmpty()) splitEnd = splitEnd + split_end_offset; 415 else splitEnd = splitEnd - 1 * Second; 398 416 399 417 string splitFormat; … … 410 428 411 429 oss << firstPart ; 412 if (hasStartDate) oss << lastSplit.getStr(splitFormat) ;430 if (hasStartDate) oss << split_start.getStr(splitFormat) ; 413 431 oss << middlePart ; 414 432 if (hasEndDate) oss << splitEnd.getStr(splitFormat); -
XIOS/dev/branch_yushan_merged/src/node/grid.cpp
r1134 r1205 1253 1253 std::vector<CAxis*> axisList = getAxis(); 1254 1254 std::vector<int> nZoomBegin(ssize), nZoomSize(ssize), nGlob(ssize), nZoomBeginGlobal(ssize); 1255 std::vector<CArray<int,1> > globalZoomIndex(numElement); 1255 1256 for (int i = 0; i < numElement; ++i) 1256 1257 { … … 1266 1267 nZoomBeginGlobal[indexMap[i] + 1] = domainList[domainId]->global_zoom_jbegin; 1267 1268 nGlob[indexMap[i] + 1] = domainList[domainId]->nj_glo; 1269 1270 { 1271 int count = 0; 1272 globalZoomIndex[i].resize(nZoomSize[indexMap[i]]*nZoomSize[indexMap[i]+1]); 1273 for (int jdx = 0; jdx < nZoomSize[indexMap[i]+1]; ++jdx) 1274 for (int idx = 0; idx < nZoomSize[indexMap[i]]; ++idx) 1275 { 1276 globalZoomIndex[i](count) = (nZoomBegin[indexMap[i]] + idx) + (nZoomBegin[indexMap[i]+1] + jdx) * nGlob[indexMap[i]]; 1277 ++count; 1278 } 1279 } 1268 1280 ++domainId; 1269 1281 } … … 1272 1284 nZoomBegin[indexMap[i]] = axisList[axisId]->zoom_begin_srv; 1273 1285 nZoomSize[indexMap[i]] = axisList[axisId]->zoom_size_srv; 1274 nZoomBeginGlobal[indexMap[i]] = axisList[axisId]->global_zoom_begin ;1286 nZoomBeginGlobal[indexMap[i]] = axisList[axisId]->global_zoom_begin_srv; 1275 1287 nGlob[indexMap[i]] = axisList[axisId]->n_glo; 1288 if (!axisList[axisId]->global_zoom_index.isEmpty()) 1289 { 1290 globalZoomIndex[i].reference(axisList[axisId]->zoom_index_srv); 1291 } 1292 else 1293 { 1294 globalZoomIndex[i].resize(nZoomSize[indexMap[i]]); 1295 for (int idx = 0; idx < nZoomSize[indexMap[i]]; ++idx) 1296 globalZoomIndex[i](idx) = nZoomBegin[indexMap[i]] + idx; 1297 } 1298 1276 1299 ++axisId; 1277 1300 } … … 1282 1305 nZoomBeginGlobal[indexMap[i]] = 0; 1283 1306 nGlob[indexMap[i]] = 1; 1307 globalZoomIndex[i].resize(1); 1308 globalZoomIndex[i](0) = 0; 1284 1309 ++scalarId; 1285 1310 } … … 1289 1314 dataSize *= nZoomSize[i]; 1290 1315 1291 serverDistribution_ = new CDistributionServer(server->intraCommRank, nZoomBegin, nZoomSize, 1292 nZoomBeginGlobal, nGlob); 1316 /* serverDistribution_ = new CDistributionServer(server->intraCommRank, nZoomBegin, nZoomSize, 1317 nZoomBeginGlobal, nGlob);*/ 1318 serverDistribution_ = new CDistributionServer(server->intraCommRank, 1319 globalZoomIndex, axis_domain_order, 1320 nZoomBegin, nZoomSize, nZoomBeginGlobal, nGlob); 1293 1321 } 1294 1322 -
XIOS/dev/branch_yushan_merged/src/node/zoom_axis.cpp
r836 r1205 46 46 axisGlobalSize = axisDest->n_glo.getValue(); 47 47 48 begin = (this->begin.isEmpty()) ? 0 : this->begin.getValue(); 49 n = (this->n.isEmpty()) ? axisGlobalSize : this->n.getValue(); 50 end = begin+n-1; 48 bool zoomByIndex = !this->index.isEmpty() && (0 != this->index.numElements()); 49 50 if (zoomByIndex) 51 { 52 begin = min(this->index); 53 end = max(this->index); 54 n = end - begin + 1; 55 } 56 else 57 { 58 begin = (this->begin.isEmpty()) ? 0 : this->begin.getValue(); 59 n = (this->n.isEmpty()) ? axisGlobalSize : this->n.getValue(); 60 end = begin+n-1; 61 } 51 62 52 63 if (begin < 0 || begin > axisGlobalSize - 1 || end < 0 || end > axisGlobalSize - 1 … … 55 66 << "One or more attributes among 'begin' (" << begin << "), 'end' (" << end << "), 'n' (" << n << ") " 56 67 << "of axis transformation [ id = '" << axisDest->getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] are not well specified"); 68 69 if (zoomByIndex && (!this->begin.isEmpty() || !this->n.isEmpty())) 70 ERROR("CZoomAxis::checkValid(CAxis* axisDest)", 71 << "Only one type of zoom is accepted. Define zoom by index with global_zoom_index or define zoom with begin and n. " 72 << "Axis transformation [ id = '" << axisDest->getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] are not well specified"); 57 73 58 74 this->begin.setValue(begin); -
XIOS/dev/branch_yushan_merged/src/server.cpp
r1196 r1205 164 164 report(0)<<"Performance report : Time spent in processing events : "<<CTimer::get("Process events").getCumulatedTime()<<endl ; 165 165 report(0)<<"Performance report : Ratio : "<<CTimer::get("Process events").getCumulatedTime()/CTimer::get("XIOS server").getCumulatedTime()*100.<<"%"<<endl ; 166 report(100)<<CTimer::getAllCumulatedTime()<<endl ; 166 167 } 167 168 -
XIOS/dev/branch_yushan_merged/src/timer.cpp
r1160 r1205 3 3 #include <string> 4 4 #include <map> 5 #include "tracer.hpp"6 5 #include <iostream> 7 6 #include <sstream> 7 #include "tracer.hpp" 8 8 9 9 namespace xios … … 69 69 } 70 70 71 string CTimer::getAllCumulatedTime(void) 72 { 73 std::ostringstream strOut ; 74 for(std::map<std::string,CTimer>::iterator it=allTimer.begin();it!=allTimer.end();++it) 75 strOut<<"Timer : "<<it->first<<" --> cumulated time : "<<it->second.getCumulatedTime()<<std::endl ; 76 return strOut.str() ; 77 } 71 78 } -
XIOS/dev/branch_yushan_merged/src/timer.hpp
r1160 r1205 27 27 static double getTime(void); 28 28 static CTimer& get(std::string name); 29 static std::string getAllCumulatedTime(void) ; 29 30 }; 30 31 } -
XIOS/dev/branch_yushan_merged/src/transformation/Functions/average_reduction.cpp
r1160 r1205 39 39 int nbLocalIndex = localIndex.size(); 40 40 int currentlocalIndex = 0; 41 double currentWeight = 0.0; 42 43 dataOut=std::numeric_limits<double>::quiet_NaN(); 41 double currentWeight = 0.0; 44 42 45 43 for (int idx = 0; idx < nbLocalIndex; ++idx) … … 59 57 weights_(currentlocalIndex) += 1.0; 60 58 } 59 } 60 else 61 { 62 if (flagInitial[currentlocalIndex]) 63 dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 61 64 } 62 65 } -
XIOS/dev/branch_yushan_merged/src/transformation/Functions/max_reduction.cpp
r1160 r1205 36 36 { 37 37 int nbLocalIndex = localIndex.size(); 38 int currentlocalIndex = 0; 39 dataOut=std::numeric_limits<double>::quiet_NaN(); 38 int currentlocalIndex = 0; 40 39 for (int idx = 0; idx < nbLocalIndex; ++idx) 41 40 { … … 52 51 dataOut(currentlocalIndex) = std::max(*(dataInput + idx), dataOut(currentlocalIndex)); 53 52 } 53 } 54 else 55 { 56 if (flagInitial[currentlocalIndex]) 57 dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 54 58 } 55 59 } -
XIOS/dev/branch_yushan_merged/src/transformation/Functions/min_reduction.cpp
r1160 r1205 36 36 { 37 37 int nbLocalIndex = localIndex.size(); 38 int currentlocalIndex = 0; 39 dataOut=std::numeric_limits<double>::quiet_NaN(); 38 int currentlocalIndex = 0; 40 39 for (int idx = 0; idx < nbLocalIndex; ++idx) 41 40 { … … 52 51 dataOut(currentlocalIndex) = std::min(*(dataInput + idx), dataOut(currentlocalIndex)); 53 52 } 53 } 54 else 55 { 56 if (flagInitial[currentlocalIndex]) 57 dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 54 58 } 55 59 } -
XIOS/dev/branch_yushan_merged/src/transformation/Functions/sum_reduction.cpp
r1160 r1205 36 36 { 37 37 int nbLocalIndex = localIndex.size(); 38 int currentlocalIndex = 0; 39 40 dataOut=std::numeric_limits<double>::quiet_NaN(); 38 int currentlocalIndex = 0; 41 39 42 40 for (int idx = 0; idx < nbLocalIndex; ++idx) … … 54 52 dataOut(currentlocalIndex) += *(dataInput + idx); 55 53 } 54 } 55 else 56 { 57 if (flagInitial[currentlocalIndex]) 58 dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 56 59 } 57 60 } -
XIOS/dev/branch_yushan_merged/src/transformation/axis_algorithm_interpolate.cpp
r937 r1205 148 148 while (it < iteRange) 149 149 { 150 while ( ((*itsecond -*it) < precision) && itsecond < ite)150 while (itsecond < ite && ((*itsecond -*it) < precision)) 151 151 { ++itsecond; ++it; } 152 152 int index = std::distance(itb, it); -
XIOS/dev/branch_yushan_merged/src/transformation/axis_algorithm_zoom.cpp
r933 r1205 53 53 << "Zoom size is " << zoomSize_ ); 54 54 } 55 56 if (!zoomAxis->index.isEmpty()) 57 { 58 int sz = zoomAxis->index.numElements(); 59 zoomIndex_.resize(sz); 60 for (int i = 0; i < sz; ++i) 61 zoomIndex_[i] = zoomAxis->index(i); 62 63 std::sort(zoomIndex_.begin(), zoomIndex_.end()); 64 } 55 65 } 56 66 … … 60 70 void CAxisAlgorithmZoom::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 61 71 { 72 this->transformationMapping_.resize(1); 73 this->transformationWeight_.resize(1); 74 75 TransformationIndexMap& transMap = this->transformationMapping_[0]; 76 TransformationWeightMap& transWeight = this->transformationWeight_[0]; 77 62 78 StdSize niSource = axisSrc_->n.getValue(); 63 79 StdSize ibeginSource = axisSrc_->begin.getValue(); … … 69 85 if (iend < ibegin) ni = 0; 70 86 71 this->transformationMapping_.resize(1); 72 this->transformationWeight_.resize(1); 73 74 TransformationIndexMap& transMap = this->transformationMapping_[0]; 75 TransformationWeightMap& transWeight = this->transformationWeight_[0]; 76 77 for (StdSize idx = 0; idx < ni; ++idx) 87 if (!zoomIndex_.empty()) 78 88 { 79 transMap[ibegin+idx].push_back(ibegin+idx); 80 transWeight[ibegin+idx].push_back(1.0); 89 std::vector<int>::iterator itZoomBegin, itZoomEnd; 90 itZoomBegin = std::lower_bound(zoomIndex_.begin(), zoomIndex_.end(), ibeginSource); 91 itZoomEnd = std::upper_bound(zoomIndex_.begin(), zoomIndex_.end(), iendSource); 92 for (; itZoomBegin != itZoomEnd; ++itZoomBegin) 93 { 94 transMap[*itZoomBegin].push_back(*itZoomBegin); 95 transWeight[*itZoomBegin].push_back(1.0); 96 } 97 } 98 else 99 { 100 for (StdSize idx = 0; idx < ni; ++idx) 101 { 102 transMap[ibegin+idx].push_back(ibegin+idx); 103 transWeight[ibegin+idx].push_back(1.0); 104 } 81 105 } 82 106 … … 92 116 axisDest_->global_zoom_begin = zoomBegin_; 93 117 axisDest_->global_zoom_n = zoomSize_; 118 if (!zoomIndex_.empty()) 119 { 120 axisDest_->global_zoom_index.resize(zoomIndex_.size()); 121 std::copy(zoomIndex_.begin(), zoomIndex_.end(), axisDest_->global_zoom_index.begin()); 122 } 94 123 } 95 124 -
XIOS/dev/branch_yushan_merged/src/transformation/axis_algorithm_zoom.hpp
r933 r1205 48 48 StdSize zoomSize_; 49 49 50 std::vector<int> zoomIndex_; 51 50 52 private: 51 53 -
XIOS/dev/branch_yushan_merged/src/transformation/domain_algorithm_interpolate.cpp
r1155 r1205 111 111 const int constNVertex = 4; // Value by default number of vertex for rectangular domain 112 112 int nVertexSrc, nVertexDest; 113 nVertexSrc = constNVertex; 114 nVertexDest = constNVertex; 113 nVertexSrc = nVertexDest = constNVertex; 115 114 116 115 // First of all, try to retrieve the boundary values of domain source and domain destination … … 389 388 } 390 389 391 if (writeToFile_ && !readFromFile_) 392 writeRemapInfo(interpMapValue);393 exchangeRemapInfo(interpMapValue);390 if (writeToFile_ && !readFromFile_) writeRemapInfo(interpMapValue); 391 // exchangeRemapInfo(interpMapValue); 392 convertRemapInfo(interpMapValue) ; 394 393 395 394 delete [] globalSrc; … … 498 497 } 499 498 499 void CDomainAlgorithmInterpolate::convertRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue) 500 { 501 CContext* context = CContext::getCurrent(); 502 CContextClient* client=context->client; 503 int clientRank = client->clientRank; 504 505 this->transformationMapping_.resize(1); 506 this->transformationWeight_.resize(1); 507 508 TransformationIndexMap& transMap = this->transformationMapping_[0]; 509 TransformationWeightMap& transWeight = this->transformationWeight_[0]; 510 511 std::map<int,std::vector<std::pair<int,double> > >::const_iterator itb = interpMapValue.begin(), it, 512 ite = interpMapValue.end(); 513 514 for (it = itb; it != ite; ++it) 515 { 516 const std::vector<std::pair<int,double> >& tmp = it->second; 517 for (int i = 0; i < tmp.size(); ++i) 518 { 519 transMap[it->first].push_back(tmp[i].first); 520 transWeight[it->first].push_back(tmp[i].second); 521 } 522 } 523 } 500 524 501 525 /*! -
XIOS/dev/branch_yushan_merged/src/transformation/domain_algorithm_interpolate.hpp
r1134 r1205 47 47 void writeRemapInfo(std::map<int,std::vector<std::pair<int,double> > >&); 48 48 void exchangeRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue); 49 void convertRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue); 49 50 50 51 private: -
XIOS/dev/branch_yushan_merged/src/transformation/generic_algorithm_transformation.cpp
r1160 r1205 45 45 { 46 46 dataOut(localIndex[idx].first) += *(dataInput + idx) * localIndex[idx].second; 47 } 48 } 49 50 // for (int idx = 0; idx < nbLocalIndex; ++idx) 51 // { 52 // if (!flagInitial[localIndex[idx].first]) 53 // dataOut(localIndex[idx].first) = defaultValue; 54 // } 47 flagInitial[localIndex[idx].first] = true; // Reset flag to indicate not all data source are nan 48 } 49 } 50 51 // If all data source are nan then data destination must be nan 52 for (int idx = 0; idx < nbLocalIndex; ++idx) 53 { 54 if (!flagInitial[localIndex[idx].first]) 55 dataOut(localIndex[idx].first) = defaultValue; 56 } 55 57 } 56 58 else
Note: See TracChangeset
for help on using the changeset viewer.