[325] | 1 | /* ************************************************************************** * |
---|
[335] | 2 | * Copyright © IPSL/LSCE, xios, Avril 2010 - Octobre 2011 * |
---|
[325] | 3 | * ************************************************************************** */ |
---|
| 4 | |
---|
| 5 | #include <boost/multi_array.hpp> |
---|
[1542] | 6 | #include <memory> |
---|
[325] | 7 | #include <string> |
---|
[489] | 8 | #include <cstring> |
---|
[325] | 9 | #include <iostream> |
---|
| 10 | |
---|
| 11 | |
---|
[591] | 12 | #include "xios.hpp" |
---|
[325] | 13 | #include "oasis_cinterface.hpp" |
---|
| 14 | |
---|
[352] | 15 | #include "attribute_template.hpp" |
---|
| 16 | #include "object_template.hpp" |
---|
| 17 | #include "group_template.hpp" |
---|
[325] | 18 | |
---|
| 19 | #include "icutil.hpp" |
---|
| 20 | #include "cxios.hpp" |
---|
[342] | 21 | #include "client.hpp" |
---|
[325] | 22 | #include "field.hpp" |
---|
[352] | 23 | #include "context.hpp" |
---|
[403] | 24 | #include "context_client.hpp" |
---|
[382] | 25 | #include "mpi.hpp" |
---|
[347] | 26 | #include "timer.hpp" |
---|
[369] | 27 | #include "array_new.hpp" |
---|
[325] | 28 | |
---|
[403] | 29 | |
---|
[325] | 30 | extern "C" |
---|
| 31 | { |
---|
| 32 | // /////////////////////////////// Définitions ////////////////////////////// // |
---|
| 33 | |
---|
| 34 | // ----------------------- Redéfinition de types ---------------------------- |
---|
[489] | 35 | |
---|
[325] | 36 | typedef enum { NETCDF4 = 0 } XFileType; |
---|
[489] | 37 | |
---|
[593] | 38 | typedef xios::CContext* XContextPtr; |
---|
[325] | 39 | |
---|
| 40 | // -------------------- Traitement des données ------------------------------ |
---|
[576] | 41 | |
---|
| 42 | // This function is not exported to the public Fortran interface, |
---|
| 43 | // it is only used from the parse_xml.exe standalone test tool. |
---|
| 44 | void cxios_init(void) |
---|
[1622] | 45 | TRY |
---|
[576] | 46 | { |
---|
| 47 | CXios::initialize(); |
---|
| 48 | } |
---|
[1622] | 49 | CATCH_DUMP_STACK |
---|
[576] | 50 | |
---|
[1054] | 51 | void cxios_init_server(void) |
---|
[1622] | 52 | TRY |
---|
[325] | 53 | { |
---|
[1054] | 54 | CXios::initServerSide(); |
---|
[325] | 55 | } |
---|
[1622] | 56 | CATCH_DUMP_STACK |
---|
[325] | 57 | |
---|
[593] | 58 | void cxios_init_client(const char* client_id , int len_client_id, MPI_Fint* f_local_comm, MPI_Fint* f_return_comm ) |
---|
[1622] | 59 | TRY |
---|
[325] | 60 | { |
---|
[489] | 61 | std::string str; |
---|
[1639] | 62 | MPI_Comm local_comm; |
---|
| 63 | MPI_Comm return_comm; |
---|
[489] | 64 | |
---|
[325] | 65 | if (!cstr2string(client_id, len_client_id, str)) return; |
---|
[347] | 66 | |
---|
[593] | 67 | int initialized; |
---|
[1639] | 68 | MPI_Initialized(&initialized); |
---|
[593] | 69 | if (initialized) local_comm=MPI_Comm_f2c(*f_local_comm); |
---|
| 70 | else local_comm=MPI_COMM_NULL; |
---|
| 71 | CXios::initClientSide(str, local_comm, return_comm); |
---|
| 72 | *f_return_comm=MPI_Comm_c2f(return_comm); |
---|
| 73 | CTimer::get("XIOS init").suspend(); |
---|
| 74 | CTimer::get("XIOS").suspend(); |
---|
[325] | 75 | } |
---|
[1622] | 76 | CATCH_DUMP_STACK |
---|
[325] | 77 | |
---|
[593] | 78 | void cxios_context_initialize(const char* context_id , int len_context_id, MPI_Fint* f_comm) |
---|
[1622] | 79 | TRY |
---|
[325] | 80 | { |
---|
[489] | 81 | std::string str; |
---|
[1639] | 82 | MPI_Comm comm; |
---|
[489] | 83 | |
---|
[325] | 84 | if (!cstr2string(context_id, len_context_id, str)) return; |
---|
[593] | 85 | CTimer::get("XIOS").resume(); |
---|
| 86 | CTimer::get("XIOS init context").resume(); |
---|
| 87 | comm=MPI_Comm_f2c(*f_comm); |
---|
| 88 | CClient::registerContext(str, comm); |
---|
| 89 | CTimer::get("XIOS init context").suspend(); |
---|
| 90 | CTimer::get("XIOS").suspend(); |
---|
[325] | 91 | } |
---|
[1622] | 92 | CATCH_DUMP_STACK |
---|
[489] | 93 | |
---|
[1587] | 94 | void cxios_oasis_enddef() |
---|
[1622] | 95 | TRY |
---|
[1587] | 96 | { |
---|
| 97 | CTimer::get("XIOS").resume(); |
---|
| 98 | CClient::callOasisEnddef(); |
---|
| 99 | CTimer::get("XIOS").suspend(); |
---|
| 100 | } |
---|
[1622] | 101 | CATCH_DUMP_STACK |
---|
[1587] | 102 | |
---|
[593] | 103 | void cxios_context_is_initialized(const char* context_id , int len_context_id, bool* initialized) |
---|
[1622] | 104 | TRY |
---|
[461] | 105 | { |
---|
[489] | 106 | std::string str; |
---|
| 107 | |
---|
[461] | 108 | if (!cstr2string(context_id, len_context_id, str)) return; |
---|
[593] | 109 | CTimer::get("XIOS").resume(); |
---|
| 110 | CContext* context = CContext::get(str, str); |
---|
| 111 | *initialized=context->isInitialized(); |
---|
| 112 | CTimer::get("XIOS").suspend(); |
---|
[489] | 113 | } |
---|
[1622] | 114 | CATCH_DUMP_STACK |
---|
[489] | 115 | |
---|
[1622] | 116 | void cxios_context_close_definition() |
---|
| 117 | TRY |
---|
[325] | 118 | { |
---|
[593] | 119 | CTimer::get("XIOS").resume(); |
---|
| 120 | CTimer::get("XIOS close definition").resume(); |
---|
| 121 | CContext* context = CContext::getCurrent(); |
---|
| 122 | context->closeDefinition(); |
---|
| 123 | CTimer::get("XIOS close definition").suspend(); |
---|
| 124 | CTimer::get("XIOS").suspend(); |
---|
[489] | 125 | } |
---|
[1622] | 126 | CATCH_DUMP_STACK |
---|
[325] | 127 | |
---|
| 128 | void cxios_context_finalize() |
---|
[1622] | 129 | TRY |
---|
[325] | 130 | { |
---|
[593] | 131 | CTimer::get("XIOS").resume(); |
---|
| 132 | CTimer::get("XIOS context finalize").resume(); |
---|
| 133 | CContext* context = CContext::getCurrent(); |
---|
| 134 | context->finalize(); |
---|
| 135 | CTimer::get("XIOS context finalize").suspend(); |
---|
| 136 | CTimer::get("XIOS").suspend(); |
---|
[325] | 137 | } |
---|
[1622] | 138 | CATCH_DUMP_STACK |
---|
[489] | 139 | |
---|
[325] | 140 | void cxios_finalize() |
---|
[1622] | 141 | TRY |
---|
[325] | 142 | { |
---|
[593] | 143 | CTimer::get("XIOS").resume(); |
---|
| 144 | CTimer::get("XIOS finalize").resume(); |
---|
| 145 | CXios::clientFinalize(); |
---|
[325] | 146 | } |
---|
[1622] | 147 | CATCH_DUMP_STACK |
---|
[325] | 148 | |
---|
[445] | 149 | void cxios_solve_inheritance() |
---|
[1622] | 150 | TRY |
---|
[445] | 151 | { |
---|
[593] | 152 | CTimer::get("XIOS").resume(); |
---|
| 153 | CContext* context = CContext::getCurrent(); |
---|
| 154 | context->solveAllInheritance(false); |
---|
| 155 | CTimer::get("XIOS").suspend(); |
---|
[489] | 156 | } |
---|
[1622] | 157 | CATCH_DUMP_STACK |
---|
[489] | 158 | |
---|
| 159 | /*! \brief This group of functions retrieve variable information from the configuration file (.xml) |
---|
| 160 | * |
---|
| 161 | * These functions provide intermediate C interfaces to get variable information of the configuration file (e.x iodef.xml), |
---|
| 162 | * from a Fortran one, for example the value of a variable with id = "using_server". |
---|
| 163 | * Each function corresponds to each basic type. |
---|
| 164 | * \param varId [in] id of the variable that we'd like to get |
---|
| 165 | * \param varIdSize [in] size of the variable type (integer, float, double, string) |
---|
| 166 | * \param dataInt [in/out] the retrieved data |
---|
| 167 | * \param isVarExisted [in/out] Verify whether variable with varId exists |
---|
| 168 | */ |
---|
[593] | 169 | void cxios_get_variable_data_k8(const char* varId, int varIdSize, double* data, bool* isVarExisted) |
---|
[1622] | 170 | TRY |
---|
[489] | 171 | { |
---|
| 172 | std::string varIdStr; |
---|
| 173 | if (!cstr2string(varId, varIdSize, varIdStr)) return; |
---|
| 174 | |
---|
| 175 | CTimer::get("XIOS").resume(); |
---|
| 176 | CTimer::get("XIOS get variable data").resume(); |
---|
| 177 | |
---|
| 178 | CContext* context = CContext::getCurrent(); |
---|
| 179 | *isVarExisted = CVariable::has(context->getId(), varIdStr); |
---|
| 180 | |
---|
| 181 | if (*isVarExisted) |
---|
| 182 | { |
---|
[593] | 183 | *data = CVariable::get(context->getId(), varIdStr)->getData<double>(); |
---|
[489] | 184 | } |
---|
| 185 | |
---|
[593] | 186 | CTimer::get("XIOS get variable data").suspend(); |
---|
| 187 | CTimer::get("XIOS").suspend(); |
---|
[489] | 188 | } |
---|
[1622] | 189 | CATCH_DUMP_STACK |
---|
[489] | 190 | |
---|
[593] | 191 | void cxios_get_variable_data_k4(const char* varId, int varIdSize, float* data, bool* isVarExisted) |
---|
[1622] | 192 | TRY |
---|
[489] | 193 | { |
---|
| 194 | std::string varIdStr; |
---|
| 195 | if (!cstr2string(varId, varIdSize, varIdStr)) return; |
---|
| 196 | |
---|
| 197 | CTimer::get("XIOS").resume(); |
---|
| 198 | CTimer::get("XIOS get variable data").resume(); |
---|
| 199 | |
---|
| 200 | CContext* context = CContext::getCurrent(); |
---|
| 201 | *isVarExisted = CVariable::has(context->getId(), varIdStr); |
---|
| 202 | |
---|
| 203 | if (*isVarExisted) |
---|
| 204 | { |
---|
[593] | 205 | *data = CVariable::get(context->getId(), varIdStr)->getData<float>(); |
---|
[489] | 206 | } |
---|
| 207 | |
---|
[593] | 208 | CTimer::get("XIOS get variable data").suspend(); |
---|
| 209 | CTimer::get("XIOS").suspend(); |
---|
[489] | 210 | } |
---|
[1622] | 211 | CATCH_DUMP_STACK |
---|
[489] | 212 | |
---|
[593] | 213 | void cxios_get_variable_data_int(const char* varId, int varIdSize, int* data, bool* isVarExisted) |
---|
[1622] | 214 | TRY |
---|
[489] | 215 | { |
---|
| 216 | std::string varIdStr; |
---|
| 217 | if (!cstr2string(varId, varIdSize, varIdStr)) return; |
---|
| 218 | |
---|
| 219 | CTimer::get("XIOS").resume(); |
---|
| 220 | CTimer::get("XIOS get variable data").resume(); |
---|
| 221 | |
---|
| 222 | CContext* context = CContext::getCurrent(); |
---|
| 223 | *isVarExisted = CVariable::has(context->getId(), varIdStr); |
---|
| 224 | |
---|
| 225 | if (*isVarExisted) |
---|
| 226 | { |
---|
[593] | 227 | *data = CVariable::get(context->getId(), varIdStr)->getData<int>(); |
---|
[489] | 228 | } |
---|
| 229 | |
---|
[593] | 230 | CTimer::get("XIOS get variable data").suspend(); |
---|
| 231 | CTimer::get("XIOS").suspend(); |
---|
[489] | 232 | } |
---|
[1622] | 233 | CATCH_DUMP_STACK |
---|
[489] | 234 | |
---|
[593] | 235 | void cxios_get_variable_data_logic(const char* varId, int varIdSize, bool* data, bool* isVarExisted) |
---|
[1622] | 236 | TRY |
---|
[489] | 237 | { |
---|
| 238 | std::string varIdStr; |
---|
| 239 | if (!cstr2string(varId, varIdSize, varIdStr)) return; |
---|
| 240 | |
---|
| 241 | CTimer::get("XIOS").resume(); |
---|
| 242 | CTimer::get("XIOS get variable data").resume(); |
---|
| 243 | |
---|
| 244 | CContext* context = CContext::getCurrent(); |
---|
| 245 | *isVarExisted = CVariable::has(context->getId(), varIdStr); |
---|
| 246 | |
---|
| 247 | if (*isVarExisted) |
---|
| 248 | { |
---|
[593] | 249 | *data = CVariable::get(context->getId(), varIdStr)->getData<bool>(); |
---|
[489] | 250 | } |
---|
| 251 | |
---|
[593] | 252 | CTimer::get("XIOS get variable data").suspend(); |
---|
| 253 | CTimer::get("XIOS").suspend(); |
---|
[489] | 254 | } |
---|
[1622] | 255 | CATCH_DUMP_STACK |
---|
[489] | 256 | |
---|
[593] | 257 | void cxios_get_variable_data_char(const char* varId, int varIdSize, char* data, int dataSizeIn, bool* isVarExisted) |
---|
[1622] | 258 | TRY |
---|
[489] | 259 | { |
---|
| 260 | std::string varIdStr; |
---|
| 261 | if (!cstr2string(varId, varIdSize, varIdStr)) return; |
---|
| 262 | |
---|
| 263 | CTimer::get("XIOS").resume(); |
---|
| 264 | CTimer::get("XIOS get variable data").resume(); |
---|
| 265 | |
---|
| 266 | CContext* context = CContext::getCurrent(); |
---|
| 267 | *isVarExisted = CVariable::has(context->getId(), varIdStr); |
---|
| 268 | |
---|
| 269 | if (*isVarExisted) |
---|
| 270 | { |
---|
[593] | 271 | int dataSizeOut = CVariable::get(context->getId(), varIdStr)->getData<string>().length(); |
---|
| 272 | strncpy(data, CVariable::get(context->getId(), varIdStr)->getData<string>().c_str(), std::min(dataSizeIn, dataSizeOut)); |
---|
[489] | 273 | } |
---|
| 274 | |
---|
[593] | 275 | CTimer::get("XIOS get variable data").suspend(); |
---|
| 276 | CTimer::get("XIOS").suspend(); |
---|
[489] | 277 | } |
---|
[1622] | 278 | CATCH_DUMP_STACK |
---|
[489] | 279 | |
---|
| 280 | /*! \brief This group of functions write information into existing variable in the configuration file (.xml) |
---|
| 281 | * |
---|
| 282 | * These functions provide intermediate C interfaces to get variable information of the configuration file (e.x iodef.xml), |
---|
| 283 | * from a Fortran one, for example the value of a variable with id = "using_server". |
---|
| 284 | * Each function corresponds to each basic type. |
---|
| 285 | * \param varId [in] id of the variable that we'd like to get |
---|
| 286 | * \param varIdSize [in] size of the variable type (integer, float, double, string) |
---|
| 287 | * \param data [in] the input data |
---|
| 288 | * \param isVarExisted [in/out] Verify whether variable with varId exists |
---|
| 289 | */ |
---|
[593] | 290 | void cxios_set_variable_data_k8(const char* varId, int varIdSize, double data, bool* isVarExisted) |
---|
[1622] | 291 | TRY |
---|
| 292 | { |
---|
[489] | 293 | std::string varIdStr; |
---|
| 294 | if (!cstr2string(varId, varIdSize, varIdStr)) return; |
---|
| 295 | |
---|
| 296 | CTimer::get("XIOS").resume(); |
---|
| 297 | CTimer::get("XIOS set variable data").resume(); |
---|
| 298 | |
---|
[593] | 299 | CContext* context = CContext::getCurrent(); |
---|
[489] | 300 | *isVarExisted = CVariable::has(context->getId(), varIdStr); |
---|
| 301 | |
---|
| 302 | if (*isVarExisted) |
---|
| 303 | { |
---|
[593] | 304 | CVariable::get(context->getId(), varIdStr)->setData<double>(data); |
---|
| 305 | //CVariable::get(context->getId(), varIdStr)->sendValue(); |
---|
[489] | 306 | } |
---|
| 307 | |
---|
[593] | 308 | CTimer::get("XIOS set variable data").suspend(); |
---|
| 309 | CTimer::get("XIOS").suspend(); |
---|
[489] | 310 | } |
---|
[1622] | 311 | CATCH_DUMP_STACK |
---|
[489] | 312 | |
---|
[593] | 313 | void cxios_set_variable_data_k4(const char* varId, int varIdSize, float data, bool* isVarExisted) |
---|
[1622] | 314 | TRY |
---|
[489] | 315 | { |
---|
| 316 | std::string varIdStr; |
---|
| 317 | if (!cstr2string(varId, varIdSize, varIdStr)) return; |
---|
| 318 | |
---|
| 319 | CTimer::get("XIOS").resume(); |
---|
| 320 | CTimer::get("XIOS set variable data").resume(); |
---|
| 321 | |
---|
[593] | 322 | CContext* context = CContext::getCurrent(); |
---|
[489] | 323 | *isVarExisted = CVariable::has(context->getId(), varIdStr); |
---|
| 324 | |
---|
| 325 | if (*isVarExisted) |
---|
| 326 | { |
---|
[593] | 327 | CVariable::get(context->getId(), varIdStr)->setData<float>(data); |
---|
| 328 | //CVariable::get(context->getId(), varIdStr)->sendValue(); |
---|
[489] | 329 | } |
---|
| 330 | |
---|
[593] | 331 | CTimer::get("XIOS set variable data").suspend(); |
---|
| 332 | CTimer::get("XIOS").suspend(); |
---|
[489] | 333 | } |
---|
[1622] | 334 | CATCH_DUMP_STACK |
---|
[489] | 335 | |
---|
[593] | 336 | void cxios_set_variable_data_int(const char* varId, int varIdSize, int data, bool* isVarExisted) |
---|
[1622] | 337 | TRY |
---|
[489] | 338 | { |
---|
| 339 | std::string varIdStr; |
---|
| 340 | if (!cstr2string(varId, varIdSize, varIdStr)) return; |
---|
| 341 | |
---|
| 342 | CTimer::get("XIOS").resume(); |
---|
| 343 | CTimer::get("XIOS set variable data").resume(); |
---|
| 344 | |
---|
[593] | 345 | CContext* context = CContext::getCurrent(); |
---|
[489] | 346 | *isVarExisted = CVariable::has(context->getId(), varIdStr); |
---|
| 347 | |
---|
| 348 | if (*isVarExisted) |
---|
| 349 | { |
---|
[593] | 350 | CVariable::get(context->getId(), varIdStr)->setData<int>(data); |
---|
| 351 | //CVariable::get(context->getId(), varIdStr)->sendValue(); |
---|
[489] | 352 | } |
---|
| 353 | |
---|
| 354 | |
---|
[593] | 355 | CTimer::get("XIOS set variable data").suspend(); |
---|
| 356 | CTimer::get("XIOS").suspend(); |
---|
[489] | 357 | } |
---|
[1622] | 358 | CATCH_DUMP_STACK |
---|
[489] | 359 | |
---|
[593] | 360 | void cxios_set_variable_data_logic(const char* varId, int varIdSize, bool data, bool* isVarExisted) |
---|
[1622] | 361 | TRY |
---|
[489] | 362 | { |
---|
| 363 | std::string varIdStr; |
---|
| 364 | if (!cstr2string(varId, varIdSize, varIdStr)) return; |
---|
| 365 | |
---|
| 366 | CTimer::get("XIOS").resume(); |
---|
| 367 | CTimer::get("XIOS set variable data").resume(); |
---|
| 368 | |
---|
[593] | 369 | CContext* context = CContext::getCurrent(); |
---|
[489] | 370 | *isVarExisted = CVariable::has(context->getId(), varIdStr); |
---|
| 371 | |
---|
| 372 | if (*isVarExisted) |
---|
| 373 | { |
---|
[593] | 374 | CVariable::get(context->getId(), varIdStr)->setData<bool>(data); |
---|
| 375 | //CVariable::get(context->getId(), varIdStr)->sendValue(); |
---|
[489] | 376 | } |
---|
| 377 | |
---|
[593] | 378 | CTimer::get("XIOS set variable data").suspend(); |
---|
| 379 | CTimer::get("XIOS").suspend(); |
---|
[489] | 380 | } |
---|
[1622] | 381 | CATCH_DUMP_STACK |
---|
[489] | 382 | |
---|
[593] | 383 | void cxios_set_variable_data_char(const char* varId, int varIdSize, const char* data, int dataSizeIn, bool* isVarExisted) |
---|
[1622] | 384 | TRY |
---|
| 385 | { |
---|
[489] | 386 | std::string varIdStr, dataStr; |
---|
| 387 | if (!cstr2string(varId, varIdSize, varIdStr)) return; |
---|
| 388 | if (!cstr2string(data, dataSizeIn, dataStr)) |
---|
| 389 | { |
---|
| 390 | *isVarExisted = false; |
---|
| 391 | return; |
---|
| 392 | } |
---|
| 393 | |
---|
| 394 | CTimer::get("XIOS").resume(); |
---|
| 395 | CTimer::get("XIOS set variable data").resume(); |
---|
| 396 | |
---|
[593] | 397 | CContext* context = CContext::getCurrent(); |
---|
[489] | 398 | *isVarExisted = CVariable::has(context->getId(), varIdStr); |
---|
| 399 | |
---|
| 400 | if (*isVarExisted) |
---|
| 401 | { |
---|
[593] | 402 | CVariable::get(context->getId(), varIdStr)->setData<string>(dataStr); |
---|
| 403 | //CVariable::get(context->getId(), varIdStr)->sendValue(); |
---|
[489] | 404 | } |
---|
| 405 | |
---|
[593] | 406 | CTimer::get("XIOS set variable data").suspend(); |
---|
| 407 | CTimer::get("XIOS").suspend(); |
---|
[489] | 408 | } |
---|
[1622] | 409 | CATCH_DUMP_STACK |
---|
[489] | 410 | |
---|
[325] | 411 | // ---------------------- Ecriture des données ------------------------------ |
---|
[2025] | 412 | |
---|
| 413 | void cxios_write_data_k80_hdl(CField* field, double* data_k8, int data_Xsize) |
---|
[1622] | 414 | TRY |
---|
[586] | 415 | { |
---|
[593] | 416 | CTimer::get("XIOS").resume(); |
---|
| 417 | CTimer::get("XIOS send field").resume(); |
---|
| 418 | CContext* context = CContext::getCurrent(); |
---|
[704] | 419 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 420 | context->checkBuffersAndListen(); |
---|
[593] | 421 | CArray<double, 1> data(data_k8, shape(data_Xsize), neverDeleteData); |
---|
[2025] | 422 | field->setData(data); |
---|
[593] | 423 | CTimer::get("XIOS send field").suspend(); |
---|
| 424 | CTimer::get("XIOS").suspend(); |
---|
[586] | 425 | } |
---|
[1622] | 426 | CATCH_DUMP_STACK |
---|
[586] | 427 | |
---|
[2025] | 428 | void cxios_write_data_k80(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize) |
---|
[1622] | 429 | TRY |
---|
[586] | 430 | { |
---|
| 431 | std::string fieldid_str; |
---|
[593] | 432 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 433 | cxios_write_data_k80_hdl(CField::get(fieldid_str), data_k8, data_Xsize) ; |
---|
| 434 | } |
---|
| 435 | CATCH_DUMP_STACK |
---|
[586] | 436 | |
---|
[2025] | 437 | |
---|
| 438 | |
---|
| 439 | |
---|
[2131] | 440 | void cxios_write_data_k81_hdl(CField* field, double* data_k8, int data_Xsize, int tileid) |
---|
[2025] | 441 | TRY |
---|
| 442 | { |
---|
[593] | 443 | CTimer::get("XIOS").resume(); |
---|
| 444 | CTimer::get("XIOS send field").resume(); |
---|
[586] | 445 | |
---|
[593] | 446 | CContext* context = CContext::getCurrent(); |
---|
[704] | 447 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 448 | context->checkBuffersAndListen(); |
---|
[593] | 449 | |
---|
| 450 | CArray<double, 1> data(data_k8, shape(data_Xsize), neverDeleteData); |
---|
[2131] | 451 | field->setData(data, tileid); |
---|
[593] | 452 | |
---|
| 453 | CTimer::get("XIOS send field").suspend(); |
---|
| 454 | CTimer::get("XIOS").suspend(); |
---|
[586] | 455 | } |
---|
[1622] | 456 | CATCH_DUMP_STACK |
---|
[2025] | 457 | |
---|
[2131] | 458 | void cxios_write_data_k81(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int tileid) |
---|
[1622] | 459 | TRY |
---|
[325] | 460 | { |
---|
| 461 | std::string fieldid_str; |
---|
[489] | 462 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2131] | 463 | cxios_write_data_k81_hdl(CField::get(fieldid_str), data_k8, data_Xsize, tileid) ; |
---|
[2025] | 464 | |
---|
| 465 | } |
---|
| 466 | CATCH_DUMP_STACK |
---|
[489] | 467 | |
---|
[2025] | 468 | |
---|
| 469 | |
---|
[2131] | 470 | void cxios_write_data_k82_hdl(CField* field, double* data_k8, int data_Xsize, int data_Ysize, int tileid) |
---|
[2025] | 471 | TRY |
---|
| 472 | { |
---|
[593] | 473 | CTimer::get("XIOS").resume(); |
---|
| 474 | CTimer::get("XIOS send field").resume(); |
---|
| 475 | |
---|
| 476 | CContext* context = CContext::getCurrent(); |
---|
[704] | 477 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 478 | context->checkBuffersAndListen(); |
---|
[593] | 479 | |
---|
| 480 | CArray<double, 2>data(data_k8, shape(data_Xsize, data_Ysize), neverDeleteData); |
---|
[2131] | 481 | field->setData(data, tileid); |
---|
[593] | 482 | |
---|
| 483 | CTimer::get("XIOS send field").suspend(); |
---|
| 484 | CTimer::get("XIOS").suspend(); |
---|
[325] | 485 | } |
---|
[1622] | 486 | CATCH_DUMP_STACK |
---|
[489] | 487 | |
---|
[2131] | 488 | void cxios_write_data_k82(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int data_Ysize, int tileid) |
---|
[1622] | 489 | TRY |
---|
[325] | 490 | { |
---|
| 491 | std::string fieldid_str; |
---|
| 492 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2131] | 493 | cxios_write_data_k82_hdl(CField::get(fieldid_str), data_k8, data_Xsize, data_Ysize, tileid) ; |
---|
[2025] | 494 | } |
---|
| 495 | CATCH_DUMP_STACK |
---|
[489] | 496 | |
---|
[2025] | 497 | |
---|
| 498 | |
---|
| 499 | |
---|
| 500 | |
---|
| 501 | |
---|
[2131] | 502 | void cxios_write_data_k83_hdl(CField* field, double* data_k8, int data_Xsize, int data_Ysize, int data_Zsize, int tileid) |
---|
[2025] | 503 | TRY |
---|
| 504 | { |
---|
[593] | 505 | CTimer::get("XIOS").resume(); |
---|
| 506 | CTimer::get("XIOS send field").resume(); |
---|
[489] | 507 | |
---|
[593] | 508 | CContext* context = CContext::getCurrent(); |
---|
[704] | 509 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 510 | context->checkBuffersAndListen(); |
---|
[593] | 511 | |
---|
| 512 | CArray<double, 3>data(data_k8, shape(data_Xsize, data_Ysize, data_Zsize), neverDeleteData); |
---|
[2131] | 513 | field->setData(data, tileid); |
---|
[593] | 514 | |
---|
| 515 | CTimer::get("XIOS send field").suspend(); |
---|
| 516 | CTimer::get("XIOS").suspend(); |
---|
[325] | 517 | } |
---|
[1622] | 518 | CATCH_DUMP_STACK |
---|
[2025] | 519 | |
---|
[2131] | 520 | void cxios_write_data_k83(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int data_Ysize, int data_Zsize, int tileid) |
---|
[1622] | 521 | TRY |
---|
[932] | 522 | { |
---|
| 523 | std::string fieldid_str; |
---|
| 524 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2131] | 525 | cxios_write_data_k83_hdl(CField::get(fieldid_str), data_k8, data_Xsize, data_Ysize, data_Zsize, tileid) ; |
---|
[932] | 526 | |
---|
[2025] | 527 | |
---|
| 528 | } |
---|
| 529 | CATCH_DUMP_STACK |
---|
| 530 | |
---|
| 531 | |
---|
| 532 | |
---|
| 533 | |
---|
| 534 | |
---|
| 535 | |
---|
[2131] | 536 | void cxios_write_data_k84_hdl(CField* field, double* data_k8, int data_0size, int data_1size, int data_2size, int data_3size, int tileid) |
---|
[2025] | 537 | TRY |
---|
| 538 | { |
---|
[932] | 539 | CTimer::get("XIOS").resume(); |
---|
| 540 | CTimer::get("XIOS send field").resume(); |
---|
| 541 | |
---|
| 542 | CContext* context = CContext::getCurrent(); |
---|
| 543 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 544 | context->checkBuffersAndListen(); |
---|
| 545 | |
---|
| 546 | CArray<double, 4>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size), neverDeleteData); |
---|
[2131] | 547 | field->setData(data, tileid); |
---|
[932] | 548 | |
---|
| 549 | CTimer::get("XIOS send field").suspend(); |
---|
| 550 | CTimer::get("XIOS").suspend(); |
---|
| 551 | } |
---|
[1622] | 552 | CATCH_DUMP_STACK |
---|
[932] | 553 | |
---|
[2131] | 554 | void cxios_write_data_k84(const char* fieldid, int fieldid_size, double* data_k8, |
---|
| 555 | int data_0size, int data_1size, int data_2size, |
---|
| 556 | int data_3size, int tileid) |
---|
[1622] | 557 | TRY |
---|
[932] | 558 | { |
---|
| 559 | std::string fieldid_str; |
---|
| 560 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
| 561 | |
---|
| 562 | CTimer::get("XIOS").resume(); |
---|
| 563 | CTimer::get("XIOS send field").resume(); |
---|
[2131] | 564 | cxios_write_data_k84_hdl(CField::get(fieldid_str), data_k8, data_0size, data_1size, data_2size, data_3size, tileid) ; |
---|
[2025] | 565 | } |
---|
| 566 | CATCH_DUMP_STACK |
---|
[932] | 567 | |
---|
[2025] | 568 | |
---|
| 569 | |
---|
| 570 | |
---|
| 571 | |
---|
| 572 | void cxios_write_data_k85_hdl(CField* field, double* data_k8, |
---|
| 573 | int data_0size, int data_1size, int data_2size, |
---|
[2131] | 574 | int data_3size, int data_4size, int tileid) |
---|
[2025] | 575 | TRY |
---|
| 576 | { |
---|
| 577 | CTimer::get("XIOS").resume(); |
---|
| 578 | CTimer::get("XIOS send field").resume(); |
---|
| 579 | |
---|
[932] | 580 | CContext* context = CContext::getCurrent(); |
---|
| 581 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 582 | context->checkBuffersAndListen(); |
---|
| 583 | |
---|
| 584 | CArray<double, 5>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size, data_4size), neverDeleteData); |
---|
[2131] | 585 | field->setData(data, tileid); |
---|
[932] | 586 | |
---|
| 587 | CTimer::get("XIOS send field").suspend(); |
---|
| 588 | CTimer::get("XIOS").suspend(); |
---|
| 589 | } |
---|
[1622] | 590 | CATCH_DUMP_STACK |
---|
[932] | 591 | |
---|
[2025] | 592 | void cxios_write_data_k85(const char* fieldid, int fieldid_size, double* data_k8, |
---|
[932] | 593 | int data_0size, int data_1size, int data_2size, |
---|
[2131] | 594 | int data_3size, int data_4size, int tileid) |
---|
[1622] | 595 | TRY |
---|
[932] | 596 | { |
---|
| 597 | std::string fieldid_str; |
---|
| 598 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2131] | 599 | cxios_write_data_k85_hdl(CField::get(fieldid_str), data_k8, data_0size, data_1size, data_2size, data_3size, data_4size, tileid) ; |
---|
[932] | 600 | |
---|
[2025] | 601 | } |
---|
| 602 | CATCH_DUMP_STACK |
---|
| 603 | |
---|
| 604 | |
---|
| 605 | |
---|
| 606 | void cxios_write_data_k86_hdl(CField* field, double* data_k8, |
---|
| 607 | int data_0size, int data_1size, int data_2size, |
---|
[2131] | 608 | int data_3size, int data_4size, int data_5size, int tileid) |
---|
[2025] | 609 | TRY |
---|
| 610 | { |
---|
| 611 | |
---|
[932] | 612 | CTimer::get("XIOS").resume(); |
---|
| 613 | CTimer::get("XIOS send field").resume(); |
---|
| 614 | |
---|
| 615 | CContext* context = CContext::getCurrent(); |
---|
| 616 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 617 | context->checkBuffersAndListen(); |
---|
| 618 | |
---|
| 619 | CArray<double, 6>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size), neverDeleteData); |
---|
[2131] | 620 | field->setData(data, tileid); |
---|
[932] | 621 | |
---|
| 622 | CTimer::get("XIOS send field").suspend(); |
---|
| 623 | CTimer::get("XIOS").suspend(); |
---|
| 624 | } |
---|
[1622] | 625 | CATCH_DUMP_STACK |
---|
[2025] | 626 | |
---|
| 627 | void cxios_write_data_k86(const char* fieldid, int fieldid_size, double* data_k8, |
---|
| 628 | int data_0size, int data_1size, int data_2size, |
---|
[2131] | 629 | int data_3size, int data_4size, int data_5size, int tileid) |
---|
[2025] | 630 | TRY |
---|
| 631 | { |
---|
| 632 | std::string fieldid_str; |
---|
| 633 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2131] | 634 | cxios_write_data_k86_hdl(CField::get(fieldid_str), data_k8, data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, tileid) ; |
---|
[932] | 635 | |
---|
[2025] | 636 | } |
---|
| 637 | CATCH_DUMP_STACK |
---|
| 638 | |
---|
| 639 | |
---|
| 640 | |
---|
| 641 | |
---|
| 642 | void cxios_write_data_k87_hdl(CField* field, double* data_k8, |
---|
[932] | 643 | int data_0size, int data_1size, int data_2size, |
---|
| 644 | int data_3size, int data_4size, int data_5size, |
---|
[2131] | 645 | int data_6size, int tileid) |
---|
[1622] | 646 | TRY |
---|
[932] | 647 | { |
---|
| 648 | CTimer::get("XIOS").resume(); |
---|
| 649 | CTimer::get("XIOS send field").resume(); |
---|
| 650 | |
---|
| 651 | CContext* context = CContext::getCurrent(); |
---|
| 652 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 653 | context->checkBuffersAndListen(); |
---|
| 654 | |
---|
| 655 | CArray<double, 7>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size), neverDeleteData); |
---|
[2131] | 656 | field->setData(data, tileid); |
---|
[932] | 657 | |
---|
| 658 | CTimer::get("XIOS send field").suspend(); |
---|
| 659 | CTimer::get("XIOS").suspend(); |
---|
| 660 | } |
---|
[1622] | 661 | CATCH_DUMP_STACK |
---|
[2025] | 662 | |
---|
| 663 | void cxios_write_data_k87(const char* fieldid, int fieldid_size, double* data_k8, |
---|
| 664 | int data_0size, int data_1size, int data_2size, |
---|
| 665 | int data_3size, int data_4size, int data_5size, |
---|
[2131] | 666 | int data_6size, int tileid) |
---|
[1622] | 667 | TRY |
---|
[325] | 668 | { |
---|
| 669 | std::string fieldid_str; |
---|
[489] | 670 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2131] | 671 | cxios_write_data_k87_hdl(CField::get(fieldid_str), data_k8, data_0size, data_1size, data_2size, data_3size, data_4size, |
---|
| 672 | data_5size, data_6size, tileid) ; |
---|
[2025] | 673 | } |
---|
| 674 | CATCH_DUMP_STACK |
---|
| 675 | |
---|
[347] | 676 | |
---|
[2025] | 677 | |
---|
| 678 | |
---|
| 679 | |
---|
| 680 | void cxios_write_data_k40_hdl(CField* field, float* data_k4, int data_Xsize) |
---|
| 681 | TRY |
---|
| 682 | { |
---|
[593] | 683 | CTimer::get("XIOS").resume(); |
---|
| 684 | CTimer::get("XIOS send field").resume(); |
---|
| 685 | CContext* context = CContext::getCurrent(); |
---|
[704] | 686 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 687 | context->checkBuffersAndListen(); |
---|
[369] | 688 | |
---|
[593] | 689 | CArray<float, 1> data_tmp(data_k4, shape(data_Xsize), neverDeleteData); |
---|
| 690 | CArray<double, 1> data(data_Xsize) ; |
---|
| 691 | data = data_tmp; |
---|
[2025] | 692 | field->setData(data); |
---|
[593] | 693 | CTimer::get("XIOS send field").suspend(); |
---|
| 694 | CTimer::get("XIOS").suspend(); |
---|
[325] | 695 | } |
---|
[1622] | 696 | CATCH_DUMP_STACK |
---|
[489] | 697 | |
---|
[2025] | 698 | void cxios_write_data_k40(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize) |
---|
[1622] | 699 | TRY |
---|
[325] | 700 | { |
---|
| 701 | std::string fieldid_str; |
---|
[593] | 702 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 703 | cxios_write_data_k40_hdl(CField::get(fieldid_str), data_k4, data_Xsize); |
---|
[347] | 704 | |
---|
[2025] | 705 | } |
---|
| 706 | CATCH_DUMP_STACK |
---|
| 707 | |
---|
| 708 | |
---|
[2131] | 709 | void cxios_write_data_k41_hdl(CField* field, float* data_k4, int data_Xsize, int tileid) |
---|
[2025] | 710 | TRY |
---|
| 711 | { |
---|
[593] | 712 | CTimer::get("XIOS").resume(); |
---|
| 713 | CTimer::get("XIOS send field").resume(); |
---|
[403] | 714 | |
---|
[593] | 715 | CContext* context = CContext::getCurrent(); |
---|
[704] | 716 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 717 | context->checkBuffersAndListen(); |
---|
[593] | 718 | |
---|
| 719 | CArray<float, 1> data_tmp(data_k4, shape(data_Xsize), neverDeleteData); |
---|
| 720 | CArray<double, 1> data(data_Xsize); |
---|
| 721 | data = data_tmp; |
---|
[2131] | 722 | field->setData(data, tileid); |
---|
[593] | 723 | |
---|
| 724 | CTimer::get("XIOS send field").suspend(); |
---|
| 725 | CTimer::get("XIOS").suspend(); |
---|
[325] | 726 | } |
---|
[1622] | 727 | CATCH_DUMP_STACK |
---|
[489] | 728 | |
---|
[2131] | 729 | void cxios_write_data_k41(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int tileid) |
---|
[1622] | 730 | TRY |
---|
[325] | 731 | { |
---|
| 732 | std::string fieldid_str; |
---|
[489] | 733 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2131] | 734 | cxios_write_data_k41_hdl(CField::get(fieldid_str), data_k4, data_Xsize, tileid); |
---|
[2025] | 735 | } |
---|
| 736 | CATCH_DUMP_STACK |
---|
[347] | 737 | |
---|
[2025] | 738 | |
---|
[2131] | 739 | void cxios_write_data_k42_hdl(CField* field, float* data_k4, int data_Xsize, int data_Ysize, int tileid) |
---|
[2025] | 740 | TRY |
---|
| 741 | { |
---|
[593] | 742 | CTimer::get("XIOS").resume(); |
---|
| 743 | CTimer::get("XIOS send field").resume(); |
---|
[403] | 744 | |
---|
[593] | 745 | CContext* context = CContext::getCurrent(); |
---|
[704] | 746 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 747 | context->checkBuffersAndListen(); |
---|
[593] | 748 | |
---|
| 749 | CArray<float, 2> data_tmp(data_k4, shape(data_Xsize, data_Ysize), neverDeleteData); |
---|
| 750 | CArray<double, 2> data(data_Xsize, data_Ysize); |
---|
| 751 | data = data_tmp; |
---|
[2131] | 752 | field->setData(data, tileid); |
---|
[593] | 753 | |
---|
| 754 | CTimer::get("XIOS send field").suspend(); |
---|
| 755 | CTimer::get("XIOS").suspend(); |
---|
[325] | 756 | } |
---|
[1622] | 757 | CATCH_DUMP_STACK |
---|
[489] | 758 | |
---|
[2131] | 759 | void cxios_write_data_k42(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize, int tileid) |
---|
[1622] | 760 | TRY |
---|
[325] | 761 | { |
---|
| 762 | std::string fieldid_str; |
---|
[593] | 763 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2131] | 764 | cxios_write_data_k42_hdl(CField::get(fieldid_str), data_k4, data_Xsize,data_Ysize, tileid); |
---|
[2025] | 765 | } |
---|
| 766 | CATCH_DUMP_STACK |
---|
[489] | 767 | |
---|
[2025] | 768 | |
---|
| 769 | |
---|
| 770 | |
---|
[2131] | 771 | void cxios_write_data_k43_hdl(CField* field, float* data_k4, int data_Xsize, int data_Ysize, int data_Zsize, int tileid) |
---|
[2025] | 772 | TRY |
---|
| 773 | { |
---|
[593] | 774 | CTimer::get("XIOS").resume(); |
---|
| 775 | CTimer::get("XIOS send field").resume(); |
---|
| 776 | |
---|
| 777 | CContext* context = CContext::getCurrent(); |
---|
[704] | 778 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 779 | context->checkBuffersAndListen(); |
---|
[593] | 780 | |
---|
| 781 | CArray<float, 3> data_tmp(data_k4, shape(data_Xsize, data_Ysize, data_Zsize), neverDeleteData); |
---|
| 782 | CArray<double, 3> data(data_Xsize, data_Ysize, data_Zsize); |
---|
| 783 | data = data_tmp; |
---|
[2131] | 784 | field->setData(data, tileid); |
---|
[593] | 785 | |
---|
| 786 | CTimer::get("XIOS send field").suspend(); |
---|
| 787 | CTimer::get("XIOS").suspend(); |
---|
| 788 | } |
---|
[1622] | 789 | CATCH_DUMP_STACK |
---|
[2025] | 790 | |
---|
[2131] | 791 | void cxios_write_data_k43(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize, int data_Zsize, int tileid) |
---|
[2025] | 792 | TRY |
---|
| 793 | { |
---|
| 794 | std::string fieldid_str; |
---|
| 795 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2131] | 796 | cxios_write_data_k43_hdl(CField::get(fieldid_str), data_k4, data_Xsize,data_Ysize, data_Zsize, tileid); |
---|
[2025] | 797 | } |
---|
| 798 | CATCH_DUMP_STACK |
---|
| 799 | |
---|
[593] | 800 | |
---|
[2025] | 801 | |
---|
| 802 | void cxios_write_data_k44_hdl(CField* field, float* data_k4, |
---|
[932] | 803 | int data_0size, int data_1size, int data_2size, |
---|
[2131] | 804 | int data_3size, int tileid) |
---|
[1622] | 805 | TRY |
---|
[932] | 806 | { |
---|
| 807 | CTimer::get("XIOS").resume(); |
---|
| 808 | CTimer::get("XIOS send field").resume(); |
---|
| 809 | |
---|
| 810 | CContext* context = CContext::getCurrent(); |
---|
| 811 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 812 | context->checkBuffersAndListen(); |
---|
| 813 | |
---|
| 814 | CArray<float, 4> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size), neverDeleteData); |
---|
| 815 | CArray<double, 4> data(data_0size, data_1size, data_2size, data_3size); |
---|
| 816 | data = data_tmp; |
---|
[2131] | 817 | field->setData(data, tileid); |
---|
[932] | 818 | |
---|
| 819 | CTimer::get("XIOS send field").suspend(); |
---|
| 820 | CTimer::get("XIOS").suspend(); |
---|
| 821 | } |
---|
[1622] | 822 | CATCH_DUMP_STACK |
---|
[932] | 823 | |
---|
[2025] | 824 | void cxios_write_data_k44(const char* fieldid, int fieldid_size, float* data_k4, |
---|
[932] | 825 | int data_0size, int data_1size, int data_2size, |
---|
[2131] | 826 | int data_3size, int tileid) |
---|
[1622] | 827 | TRY |
---|
[932] | 828 | { |
---|
| 829 | std::string fieldid_str; |
---|
| 830 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2131] | 831 | cxios_write_data_k44_hdl(CField::get(fieldid_str), data_k4, data_0size, data_1size, data_2size, data_3size, tileid) ; |
---|
[2025] | 832 | } |
---|
| 833 | CATCH_DUMP_STACK |
---|
[932] | 834 | |
---|
[2025] | 835 | |
---|
| 836 | |
---|
| 837 | |
---|
| 838 | void cxios_write_data_k45_hdl(CField* field, float* data_k4, |
---|
| 839 | int data_0size, int data_1size, int data_2size, |
---|
[2131] | 840 | int data_3size, int data_4size, int tileid) |
---|
[2025] | 841 | TRY |
---|
| 842 | { |
---|
[932] | 843 | CTimer::get("XIOS").resume(); |
---|
| 844 | CTimer::get("XIOS send field").resume(); |
---|
| 845 | |
---|
| 846 | CContext* context = CContext::getCurrent(); |
---|
| 847 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 848 | context->checkBuffersAndListen(); |
---|
| 849 | |
---|
| 850 | CArray<float, 5> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size, data_4size), neverDeleteData); |
---|
| 851 | CArray<double, 5> data(data_0size, data_1size, data_2size, data_3size, data_4size); |
---|
| 852 | data = data_tmp; |
---|
[2131] | 853 | field->setData(data, tileid); |
---|
[932] | 854 | |
---|
| 855 | CTimer::get("XIOS send field").suspend(); |
---|
| 856 | CTimer::get("XIOS").suspend(); |
---|
| 857 | } |
---|
[1622] | 858 | CATCH_DUMP_STACK |
---|
[932] | 859 | |
---|
[2025] | 860 | void cxios_write_data_k45(const char* fieldid, int fieldid_size, float* data_k4, |
---|
[932] | 861 | int data_0size, int data_1size, int data_2size, |
---|
[2131] | 862 | int data_3size, int data_4size, int tileid) |
---|
[1622] | 863 | TRY |
---|
[932] | 864 | { |
---|
| 865 | std::string fieldid_str; |
---|
| 866 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2131] | 867 | cxios_write_data_k45_hdl(CField::get(fieldid_str), data_k4, data_0size, data_1size, data_2size, data_3size, data_4size, tileid) ; |
---|
[2025] | 868 | } |
---|
| 869 | CATCH_DUMP_STACK |
---|
[932] | 870 | |
---|
[2025] | 871 | |
---|
| 872 | |
---|
| 873 | void cxios_write_data_k46_hdl(CField* field, float* data_k4, |
---|
| 874 | int data_0size, int data_1size, int data_2size, |
---|
[2131] | 875 | int data_3size, int data_4size, int data_5size, int tileid) |
---|
[2025] | 876 | TRY |
---|
| 877 | { |
---|
[932] | 878 | CTimer::get("XIOS").resume(); |
---|
| 879 | CTimer::get("XIOS send field").resume(); |
---|
| 880 | |
---|
| 881 | CContext* context = CContext::getCurrent(); |
---|
| 882 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 883 | context->checkBuffersAndListen(); |
---|
| 884 | |
---|
| 885 | CArray<float, 6> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size), neverDeleteData); |
---|
| 886 | CArray<double, 6> data(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size); |
---|
| 887 | data = data_tmp; |
---|
[2131] | 888 | field->setData(data, tileid); |
---|
[932] | 889 | |
---|
| 890 | CTimer::get("XIOS send field").suspend(); |
---|
| 891 | CTimer::get("XIOS").suspend(); |
---|
| 892 | } |
---|
[1622] | 893 | CATCH_DUMP_STACK |
---|
[932] | 894 | |
---|
[2025] | 895 | void cxios_write_data_k46(const char* fieldid, int fieldid_size, float* data_k4, |
---|
[932] | 896 | int data_0size, int data_1size, int data_2size, |
---|
[2131] | 897 | int data_3size, int data_4size, int data_5size, int tileid) |
---|
[1622] | 898 | TRY |
---|
[932] | 899 | { |
---|
| 900 | std::string fieldid_str; |
---|
| 901 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2131] | 902 | cxios_write_data_k46_hdl(CField::get(fieldid_str), data_k4, data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, tileid) ; |
---|
[2025] | 903 | } |
---|
| 904 | CATCH_DUMP_STACK |
---|
[932] | 905 | |
---|
[2025] | 906 | |
---|
| 907 | void cxios_write_data_k47_hdl(CField* field, float* data_k4, |
---|
| 908 | int data_0size, int data_1size, int data_2size, |
---|
| 909 | int data_3size, int data_4size, int data_5size, |
---|
[2131] | 910 | int data_6size, int tileid) |
---|
[2025] | 911 | TRY |
---|
| 912 | { |
---|
[932] | 913 | CTimer::get("XIOS").resume(); |
---|
| 914 | CTimer::get("XIOS send field").resume(); |
---|
| 915 | |
---|
| 916 | CContext* context = CContext::getCurrent(); |
---|
| 917 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 918 | context->checkBuffersAndListen(); |
---|
| 919 | |
---|
| 920 | CArray<float, 7> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size), neverDeleteData); |
---|
| 921 | CArray<double, 7> data(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size); |
---|
| 922 | data = data_tmp; |
---|
[2131] | 923 | field->setData(data, tileid); |
---|
[932] | 924 | |
---|
| 925 | CTimer::get("XIOS send field").suspend(); |
---|
| 926 | CTimer::get("XIOS").suspend(); |
---|
| 927 | } |
---|
[1622] | 928 | CATCH_DUMP_STACK |
---|
[932] | 929 | |
---|
[2025] | 930 | void cxios_write_data_k47(const char* fieldid, int fieldid_size, float* data_k4, |
---|
| 931 | int data_0size, int data_1size, int data_2size, |
---|
| 932 | int data_3size, int data_4size, int data_5size, |
---|
[2131] | 933 | int data_6size, int tileid) |
---|
[1622] | 934 | TRY |
---|
[961] | 935 | { |
---|
| 936 | std::string fieldid_str; |
---|
| 937 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2131] | 938 | cxios_write_data_k47_hdl(CField::get(fieldid_str), data_k4, data_0size, data_1size, data_2size, data_3size, data_4size, |
---|
| 939 | data_5size, data_6size, tileid) ; |
---|
[2025] | 940 | } |
---|
| 941 | CATCH_DUMP_STACK |
---|
[961] | 942 | |
---|
[2025] | 943 | |
---|
| 944 | // ---------------------- Lecture des données ------------------------------ |
---|
| 945 | |
---|
| 946 | void cxios_read_data_k80_hdl(CField* field, double* data_k8, int data_Xsize) |
---|
| 947 | TRY |
---|
| 948 | { |
---|
[961] | 949 | CTimer::get("XIOS").resume(); |
---|
| 950 | CTimer::get("XIOS recv field").resume(); |
---|
| 951 | |
---|
| 952 | CContext* context = CContext::getCurrent(); |
---|
| 953 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 954 | context->checkBuffersAndListen(); |
---|
| 955 | |
---|
| 956 | CArray<double, 1> data(data_k8, shape(data_Xsize), neverDeleteData); |
---|
[2025] | 957 | field->getData(data); |
---|
[961] | 958 | |
---|
| 959 | CTimer::get("XIOS recv field").suspend(); |
---|
| 960 | CTimer::get("XIOS").suspend(); |
---|
| 961 | } |
---|
[1622] | 962 | CATCH_DUMP_STACK |
---|
[961] | 963 | |
---|
[2025] | 964 | void cxios_read_data_k80(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize) |
---|
[1622] | 965 | TRY |
---|
[593] | 966 | { |
---|
| 967 | std::string fieldid_str; |
---|
[489] | 968 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 969 | cxios_read_data_k80_hdl(CField::get(fieldid_str), data_k8, data_Xsize) ; |
---|
| 970 | } |
---|
| 971 | CATCH_DUMP_STACK |
---|
| 972 | |
---|
| 973 | |
---|
| 974 | void cxios_read_data_k81_hdl(CField* field, double* data_k8, int data_Xsize) |
---|
| 975 | TRY |
---|
| 976 | { |
---|
[593] | 977 | CTimer::get("XIOS").resume(); |
---|
| 978 | CTimer::get("XIOS recv field").resume(); |
---|
[369] | 979 | |
---|
[593] | 980 | CContext* context = CContext::getCurrent(); |
---|
[704] | 981 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 982 | context->checkBuffersAndListen(); |
---|
[489] | 983 | |
---|
[593] | 984 | CArray<double, 1> data(data_k8, shape(data_Xsize), neverDeleteData); |
---|
[2025] | 985 | field->getData(data); |
---|
[347] | 986 | |
---|
[593] | 987 | CTimer::get("XIOS recv field").suspend(); |
---|
| 988 | CTimer::get("XIOS").suspend(); |
---|
| 989 | } |
---|
[1622] | 990 | CATCH_DUMP_STACK |
---|
[593] | 991 | |
---|
[2025] | 992 | void cxios_read_data_k81(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize) |
---|
[1622] | 993 | TRY |
---|
[593] | 994 | { |
---|
| 995 | std::string fieldid_str; |
---|
| 996 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 997 | cxios_read_data_k81_hdl(CField::get(fieldid_str), data_k8, data_Xsize) ; |
---|
| 998 | } |
---|
| 999 | CATCH_DUMP_STACK |
---|
[593] | 1000 | |
---|
[2025] | 1001 | void cxios_read_data_k82_hdl(CField* field, double* data_k8, int data_Xsize, int data_Ysize) |
---|
| 1002 | TRY |
---|
| 1003 | { |
---|
[593] | 1004 | CTimer::get("XIOS").resume(); |
---|
| 1005 | CTimer::get("XIOS recv field").resume(); |
---|
| 1006 | |
---|
| 1007 | CContext* context = CContext::getCurrent(); |
---|
[704] | 1008 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 1009 | context->checkBuffersAndListen(); |
---|
[593] | 1010 | |
---|
| 1011 | CArray<double, 2>data(data_k8, shape(data_Xsize, data_Ysize), neverDeleteData); |
---|
[2025] | 1012 | field->getData(data); |
---|
[593] | 1013 | |
---|
| 1014 | CTimer::get("XIOS recv field").suspend(); |
---|
| 1015 | CTimer::get("XIOS").suspend(); |
---|
| 1016 | } |
---|
[1622] | 1017 | CATCH_DUMP_STACK |
---|
[593] | 1018 | |
---|
[2025] | 1019 | void cxios_read_data_k82(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int data_Ysize) |
---|
[1622] | 1020 | TRY |
---|
[593] | 1021 | { |
---|
| 1022 | std::string fieldid_str; |
---|
| 1023 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 1024 | cxios_read_data_k82_hdl(CField::get(fieldid_str), data_k8, data_Xsize, data_Ysize) ; |
---|
| 1025 | } |
---|
| 1026 | CATCH_DUMP_STACK |
---|
[593] | 1027 | |
---|
[2025] | 1028 | |
---|
| 1029 | void cxios_read_data_k83_hdl(CField* field, double* data_k8, int data_Xsize, int data_Ysize, int data_Zsize) |
---|
| 1030 | TRY |
---|
| 1031 | { |
---|
[593] | 1032 | CTimer::get("XIOS").resume(); |
---|
| 1033 | CTimer::get("XIOS recv field").resume(); |
---|
| 1034 | |
---|
| 1035 | CContext* context = CContext::getCurrent(); |
---|
[704] | 1036 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 1037 | context->checkBuffersAndListen(); |
---|
[593] | 1038 | |
---|
| 1039 | CArray<double, 3>data(data_k8, shape(data_Xsize, data_Ysize, data_Zsize), neverDeleteData); |
---|
[2025] | 1040 | field->getData(data); |
---|
[593] | 1041 | |
---|
| 1042 | CTimer::get("XIOS recv field").suspend(); |
---|
| 1043 | CTimer::get("XIOS").suspend(); |
---|
| 1044 | } |
---|
[1622] | 1045 | CATCH_DUMP_STACK |
---|
[593] | 1046 | |
---|
[2025] | 1047 | |
---|
| 1048 | void cxios_read_data_k83(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int data_Ysize, int data_Zsize) |
---|
[1622] | 1049 | TRY |
---|
[932] | 1050 | { |
---|
| 1051 | std::string fieldid_str; |
---|
| 1052 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 1053 | cxios_read_data_k83_hdl(CField::get(fieldid_str), data_k8, data_Xsize, data_Ysize, data_Zsize) ; |
---|
| 1054 | } |
---|
| 1055 | CATCH_DUMP_STACK |
---|
[932] | 1056 | |
---|
[2025] | 1057 | void cxios_read_data_k84_hdl(CField* field, double* data_k8, |
---|
| 1058 | int data_0size, int data_1size, int data_2size, |
---|
| 1059 | int data_3size) |
---|
| 1060 | TRY |
---|
| 1061 | { |
---|
[932] | 1062 | CTimer::get("XIOS").resume(); |
---|
| 1063 | CTimer::get("XIOS recv field").resume(); |
---|
| 1064 | |
---|
| 1065 | CContext* context = CContext::getCurrent(); |
---|
| 1066 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 1067 | context->checkBuffersAndListen(); |
---|
| 1068 | |
---|
| 1069 | CArray<double, 4>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size), neverDeleteData); |
---|
[2025] | 1070 | field->getData(data); |
---|
[932] | 1071 | |
---|
| 1072 | CTimer::get("XIOS recv field").suspend(); |
---|
| 1073 | CTimer::get("XIOS").suspend(); |
---|
| 1074 | } |
---|
[1622] | 1075 | CATCH_DUMP_STACK |
---|
[932] | 1076 | |
---|
[2025] | 1077 | void cxios_read_data_k84(const char* fieldid, int fieldid_size, double* data_k8, |
---|
[932] | 1078 | int data_0size, int data_1size, int data_2size, |
---|
[2025] | 1079 | int data_3size) |
---|
[1622] | 1080 | TRY |
---|
[932] | 1081 | { |
---|
| 1082 | std::string fieldid_str; |
---|
| 1083 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 1084 | cxios_read_data_k84_hdl(CField::get(fieldid_str), data_k8, data_0size, data_1size, data_2size, data_3size) ; |
---|
| 1085 | } |
---|
| 1086 | CATCH_DUMP_STACK |
---|
[932] | 1087 | |
---|
[2025] | 1088 | void cxios_read_data_k85_hdl(CField* field, double* data_k8, |
---|
| 1089 | int data_0size, int data_1size, int data_2size, |
---|
| 1090 | int data_3size, int data_4size) |
---|
| 1091 | TRY |
---|
| 1092 | { |
---|
[932] | 1093 | CTimer::get("XIOS").resume(); |
---|
| 1094 | CTimer::get("XIOS recv field").resume(); |
---|
| 1095 | |
---|
| 1096 | CContext* context = CContext::getCurrent(); |
---|
| 1097 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 1098 | context->checkBuffersAndListen(); |
---|
| 1099 | |
---|
| 1100 | CArray<double, 5>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size, data_4size), neverDeleteData); |
---|
[2025] | 1101 | field->getData(data); |
---|
[932] | 1102 | |
---|
| 1103 | CTimer::get("XIOS recv field").suspend(); |
---|
| 1104 | CTimer::get("XIOS").suspend(); |
---|
| 1105 | } |
---|
[1622] | 1106 | CATCH_DUMP_STACK |
---|
[932] | 1107 | |
---|
[2025] | 1108 | void cxios_read_data_k85(const char* fieldid, int fieldid_size, double* data_k8, |
---|
[932] | 1109 | int data_0size, int data_1size, int data_2size, |
---|
[2025] | 1110 | int data_3size, int data_4size) |
---|
[1622] | 1111 | TRY |
---|
[932] | 1112 | { |
---|
| 1113 | std::string fieldid_str; |
---|
| 1114 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 1115 | cxios_read_data_k85_hdl(CField::get(fieldid_str), data_k8, data_0size, data_1size, data_2size, data_3size, data_4size) ; |
---|
| 1116 | } |
---|
| 1117 | CATCH_DUMP_STACK |
---|
[932] | 1118 | |
---|
[2025] | 1119 | void cxios_read_data_k86_hdl(CField* field, double* data_k8, |
---|
| 1120 | int data_0size, int data_1size, int data_2size, |
---|
| 1121 | int data_3size, int data_4size, int data_5size) |
---|
| 1122 | TRY |
---|
| 1123 | { |
---|
[932] | 1124 | CTimer::get("XIOS").resume(); |
---|
| 1125 | CTimer::get("XIOS recv field").resume(); |
---|
| 1126 | |
---|
| 1127 | CContext* context = CContext::getCurrent(); |
---|
| 1128 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 1129 | context->checkBuffersAndListen(); |
---|
| 1130 | |
---|
| 1131 | CArray<double, 6>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size), neverDeleteData); |
---|
[2025] | 1132 | field->getData(data); |
---|
[932] | 1133 | |
---|
| 1134 | CTimer::get("XIOS recv field").suspend(); |
---|
| 1135 | CTimer::get("XIOS").suspend(); |
---|
| 1136 | } |
---|
[1622] | 1137 | CATCH_DUMP_STACK |
---|
[932] | 1138 | |
---|
[2025] | 1139 | void cxios_read_data_k86(const char* fieldid, int fieldid_size, double* data_k8, |
---|
[932] | 1140 | int data_0size, int data_1size, int data_2size, |
---|
[2025] | 1141 | int data_3size, int data_4size, int data_5size) |
---|
[1622] | 1142 | TRY |
---|
[932] | 1143 | { |
---|
| 1144 | std::string fieldid_str; |
---|
| 1145 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 1146 | cxios_read_data_k86_hdl(CField::get(fieldid_str), data_k8, data_0size, data_1size, data_2size, data_3size, data_4size, data_5size) ; |
---|
| 1147 | } |
---|
| 1148 | CATCH_DUMP_STACK |
---|
[932] | 1149 | |
---|
[2025] | 1150 | void cxios_read_data_k87_hdl(CField* field, double* data_k8, |
---|
| 1151 | int data_0size, int data_1size, int data_2size, |
---|
| 1152 | int data_3size, int data_4size, int data_5size, |
---|
| 1153 | int data_6size) |
---|
| 1154 | TRY |
---|
| 1155 | { |
---|
[932] | 1156 | CTimer::get("XIOS").resume(); |
---|
| 1157 | CTimer::get("XIOS recv field").resume(); |
---|
| 1158 | |
---|
| 1159 | CContext* context = CContext::getCurrent(); |
---|
| 1160 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 1161 | context->checkBuffersAndListen(); |
---|
| 1162 | |
---|
| 1163 | CArray<double, 7>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size), neverDeleteData); |
---|
[2025] | 1164 | field->getData(data); |
---|
[932] | 1165 | |
---|
| 1166 | CTimer::get("XIOS recv field").suspend(); |
---|
| 1167 | CTimer::get("XIOS").suspend(); |
---|
| 1168 | } |
---|
[1622] | 1169 | CATCH_DUMP_STACK |
---|
[932] | 1170 | |
---|
[2025] | 1171 | void cxios_read_data_k87(const char* fieldid, int fieldid_size, double* data_k8, |
---|
| 1172 | int data_0size, int data_1size, int data_2size, |
---|
| 1173 | int data_3size, int data_4size, int data_5size, |
---|
| 1174 | int data_6size) |
---|
[1622] | 1175 | TRY |
---|
[961] | 1176 | { |
---|
| 1177 | std::string fieldid_str; |
---|
| 1178 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 1179 | cxios_read_data_k87_hdl(CField::get(fieldid_str), data_k8, data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size) ; |
---|
| 1180 | } |
---|
| 1181 | CATCH_DUMP_STACK |
---|
[961] | 1182 | |
---|
[2025] | 1183 | |
---|
| 1184 | |
---|
| 1185 | |
---|
| 1186 | |
---|
| 1187 | |
---|
| 1188 | void cxios_read_data_k40_hdl(CField* field, float* data_k4, int data_Xsize) |
---|
| 1189 | TRY |
---|
| 1190 | { |
---|
[961] | 1191 | CTimer::get("XIOS").resume(); |
---|
| 1192 | CTimer::get("XIOS recv field").resume(); |
---|
| 1193 | |
---|
| 1194 | CContext* context = CContext::getCurrent(); |
---|
| 1195 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 1196 | context->checkBuffersAndListen(); |
---|
| 1197 | |
---|
| 1198 | CArray<double, 1> data(data_Xsize); |
---|
[2025] | 1199 | field->getData(data); |
---|
[961] | 1200 | CArray<float, 1> data_tmp(data_k4, shape(data_Xsize), neverDeleteData); |
---|
| 1201 | data_tmp = data; |
---|
| 1202 | |
---|
| 1203 | CTimer::get("XIOS recv field").suspend(); |
---|
| 1204 | CTimer::get("XIOS").suspend(); |
---|
| 1205 | } |
---|
[1622] | 1206 | CATCH_DUMP_STACK |
---|
[961] | 1207 | |
---|
[2025] | 1208 | void cxios_read_data_k40(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize) |
---|
[1622] | 1209 | TRY |
---|
[593] | 1210 | { |
---|
| 1211 | std::string fieldid_str; |
---|
| 1212 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 1213 | cxios_read_data_k40_hdl(CField::get(fieldid_str), data_k4, data_Xsize) ; |
---|
| 1214 | } |
---|
| 1215 | CATCH_DUMP_STACK |
---|
[593] | 1216 | |
---|
[2025] | 1217 | |
---|
| 1218 | |
---|
| 1219 | void cxios_read_data_k41_hdl(CField* field, float* data_k4, int data_Xsize) |
---|
| 1220 | TRY |
---|
| 1221 | { |
---|
[593] | 1222 | CTimer::get("XIOS").resume(); |
---|
| 1223 | CTimer::get("XIOS recv field").resume(); |
---|
| 1224 | |
---|
| 1225 | CContext* context = CContext::getCurrent(); |
---|
[704] | 1226 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 1227 | context->checkBuffersAndListen(); |
---|
[593] | 1228 | |
---|
| 1229 | CArray<double, 1> data(data_Xsize); |
---|
[2025] | 1230 | field->getData(data); |
---|
[593] | 1231 | CArray<float, 1> data_tmp(data_k4, shape(data_Xsize), neverDeleteData); |
---|
| 1232 | data_tmp = data; |
---|
| 1233 | |
---|
| 1234 | CTimer::get("XIOS recv field").suspend(); |
---|
| 1235 | CTimer::get("XIOS").suspend(); |
---|
| 1236 | } |
---|
[1622] | 1237 | CATCH_DUMP_STACK |
---|
[593] | 1238 | |
---|
[2025] | 1239 | void cxios_read_data_k41(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize) |
---|
[1622] | 1240 | TRY |
---|
[593] | 1241 | { |
---|
| 1242 | std::string fieldid_str; |
---|
| 1243 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 1244 | cxios_read_data_k41_hdl(CField::get(fieldid_str), data_k4, data_Xsize) ; |
---|
| 1245 | } |
---|
| 1246 | CATCH_DUMP_STACK |
---|
[593] | 1247 | |
---|
[2025] | 1248 | |
---|
| 1249 | |
---|
| 1250 | |
---|
| 1251 | void cxios_read_data_k42_hdl(CField* field, float* data_k4, int data_Xsize, int data_Ysize) |
---|
| 1252 | TRY |
---|
| 1253 | { |
---|
[593] | 1254 | CTimer::get("XIOS").resume(); |
---|
| 1255 | CTimer::get("XIOS recv field").resume(); |
---|
| 1256 | |
---|
| 1257 | CContext* context = CContext::getCurrent(); |
---|
[704] | 1258 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 1259 | context->checkBuffersAndListen(); |
---|
[593] | 1260 | |
---|
| 1261 | CArray<double, 2> data(data_Xsize, data_Ysize); |
---|
[2025] | 1262 | field->getData(data); |
---|
[593] | 1263 | CArray<float, 2> data_tmp(data_k4, shape(data_Xsize, data_Ysize), neverDeleteData); |
---|
| 1264 | data_tmp = data; |
---|
| 1265 | |
---|
| 1266 | CTimer::get("XIOS recv field").suspend(); |
---|
| 1267 | CTimer::get("XIOS").suspend(); |
---|
| 1268 | } |
---|
[1622] | 1269 | CATCH_DUMP_STACK |
---|
[593] | 1270 | |
---|
[2025] | 1271 | void cxios_read_data_k42(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize) |
---|
[1622] | 1272 | TRY |
---|
[593] | 1273 | { |
---|
| 1274 | std::string fieldid_str; |
---|
| 1275 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 1276 | cxios_read_data_k42_hdl(CField::get(fieldid_str), data_k4, data_Xsize, data_Ysize) ; |
---|
| 1277 | } |
---|
| 1278 | CATCH_DUMP_STACK |
---|
[593] | 1279 | |
---|
[2025] | 1280 | |
---|
| 1281 | |
---|
| 1282 | void cxios_read_data_k43_hdl(CField* field, float* data_k4, int data_Xsize, int data_Ysize, int data_Zsize) |
---|
| 1283 | TRY |
---|
| 1284 | { |
---|
[593] | 1285 | CTimer::get("XIOS").resume(); |
---|
| 1286 | CTimer::get("XIOS recv field").resume(); |
---|
| 1287 | |
---|
| 1288 | CContext* context = CContext::getCurrent(); |
---|
[704] | 1289 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 1290 | context->checkBuffersAndListen(); |
---|
[593] | 1291 | |
---|
| 1292 | CArray<double, 3> data(data_Xsize, data_Ysize, data_Zsize); |
---|
[2025] | 1293 | field->getData(data); |
---|
[593] | 1294 | CArray<float, 3> data_tmp(data_k4, shape(data_Xsize, data_Ysize, data_Zsize), neverDeleteData); |
---|
| 1295 | data_tmp = data; |
---|
| 1296 | |
---|
| 1297 | CTimer::get("XIOS recv field").suspend(); |
---|
| 1298 | CTimer::get("XIOS").suspend(); |
---|
[489] | 1299 | } |
---|
[1622] | 1300 | CATCH_DUMP_STACK |
---|
[932] | 1301 | |
---|
[2025] | 1302 | void cxios_read_data_k43(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize, int data_Zsize) |
---|
[1622] | 1303 | TRY |
---|
[932] | 1304 | { |
---|
| 1305 | std::string fieldid_str; |
---|
| 1306 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 1307 | cxios_read_data_k43_hdl(CField::get(fieldid_str), data_k4,data_Xsize, data_Ysize, data_Zsize) ; |
---|
| 1308 | } |
---|
| 1309 | CATCH_DUMP_STACK |
---|
[932] | 1310 | |
---|
[2025] | 1311 | |
---|
| 1312 | void cxios_read_data_k44_hdl(CField* field, float* data_k4, |
---|
| 1313 | int data_0size, int data_1size, int data_2size, |
---|
| 1314 | int data_3size) |
---|
| 1315 | TRY |
---|
| 1316 | { |
---|
[932] | 1317 | CTimer::get("XIOS").resume(); |
---|
| 1318 | CTimer::get("XIOS recv field").resume(); |
---|
| 1319 | |
---|
| 1320 | CContext* context = CContext::getCurrent(); |
---|
| 1321 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 1322 | context->checkBuffersAndListen(); |
---|
| 1323 | |
---|
| 1324 | CArray<double, 4> data(data_0size, data_1size, data_2size, data_3size); |
---|
[2025] | 1325 | field->getData(data); |
---|
[932] | 1326 | CArray<float, 4> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size), neverDeleteData); |
---|
| 1327 | data_tmp = data; |
---|
| 1328 | |
---|
| 1329 | CTimer::get("XIOS recv field").suspend(); |
---|
| 1330 | CTimer::get("XIOS").suspend(); |
---|
| 1331 | } |
---|
[1622] | 1332 | CATCH_DUMP_STACK |
---|
[932] | 1333 | |
---|
[2025] | 1334 | void cxios_read_data_k44(const char* fieldid, int fieldid_size, float* data_k4, |
---|
[932] | 1335 | int data_0size, int data_1size, int data_2size, |
---|
[2025] | 1336 | int data_3size) |
---|
[1622] | 1337 | TRY |
---|
[932] | 1338 | { |
---|
| 1339 | std::string fieldid_str; |
---|
| 1340 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 1341 | cxios_read_data_k44_hdl(CField::get(fieldid_str), data_k4, data_0size, data_1size, data_2size, data_3size) ; |
---|
| 1342 | } |
---|
| 1343 | CATCH_DUMP_STACK |
---|
[932] | 1344 | |
---|
[2025] | 1345 | |
---|
| 1346 | |
---|
| 1347 | void cxios_read_data_k45_hdl(CField* field, float* data_k4, |
---|
| 1348 | int data_0size, int data_1size, int data_2size, |
---|
| 1349 | int data_3size, int data_4size) |
---|
| 1350 | TRY |
---|
| 1351 | { |
---|
[932] | 1352 | CTimer::get("XIOS").resume(); |
---|
| 1353 | CTimer::get("XIOS recv field").resume(); |
---|
| 1354 | |
---|
| 1355 | CContext* context = CContext::getCurrent(); |
---|
| 1356 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 1357 | context->checkBuffersAndListen(); |
---|
| 1358 | |
---|
| 1359 | CArray<double, 5> data(data_0size, data_1size, data_2size, data_3size, data_4size); |
---|
[2025] | 1360 | field->getData(data); |
---|
[932] | 1361 | CArray<float, 5> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size, data_4size), neverDeleteData); |
---|
| 1362 | data_tmp = data; |
---|
| 1363 | |
---|
| 1364 | CTimer::get("XIOS recv field").suspend(); |
---|
| 1365 | CTimer::get("XIOS").suspend(); |
---|
| 1366 | } |
---|
[1622] | 1367 | CATCH_DUMP_STACK |
---|
[932] | 1368 | |
---|
[2025] | 1369 | void cxios_read_data_k45(const char* fieldid, int fieldid_size, float* data_k4, |
---|
[932] | 1370 | int data_0size, int data_1size, int data_2size, |
---|
[2025] | 1371 | int data_3size, int data_4size) |
---|
[1622] | 1372 | TRY |
---|
[932] | 1373 | { |
---|
| 1374 | std::string fieldid_str; |
---|
| 1375 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 1376 | cxios_read_data_k45_hdl(CField::get(fieldid_str), data_k4, data_0size, data_1size, data_2size, data_3size, data_4size) ; |
---|
| 1377 | } |
---|
| 1378 | CATCH_DUMP_STACK |
---|
[932] | 1379 | |
---|
[2025] | 1380 | |
---|
| 1381 | void cxios_read_data_k46_hdl(CField* field, float* data_k4, |
---|
| 1382 | int data_0size, int data_1size, int data_2size, |
---|
| 1383 | int data_3size, int data_4size, int data_5size) |
---|
| 1384 | TRY |
---|
| 1385 | { |
---|
[932] | 1386 | CTimer::get("XIOS").resume(); |
---|
| 1387 | CTimer::get("XIOS recv field").resume(); |
---|
| 1388 | |
---|
| 1389 | CContext* context = CContext::getCurrent(); |
---|
| 1390 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 1391 | context->checkBuffersAndListen(); |
---|
| 1392 | |
---|
| 1393 | CArray<double, 6> data(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size); |
---|
[2025] | 1394 | field->getData(data); |
---|
[932] | 1395 | CArray<float, 6> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size), neverDeleteData); |
---|
| 1396 | data_tmp = data; |
---|
| 1397 | |
---|
| 1398 | CTimer::get("XIOS recv field").suspend(); |
---|
| 1399 | CTimer::get("XIOS").suspend(); |
---|
| 1400 | } |
---|
[1622] | 1401 | CATCH_DUMP_STACK |
---|
[932] | 1402 | |
---|
[2025] | 1403 | void cxios_read_data_k46(const char* fieldid, int fieldid_size, float* data_k4, |
---|
[932] | 1404 | int data_0size, int data_1size, int data_2size, |
---|
[2025] | 1405 | int data_3size, int data_4size, int data_5size) |
---|
[1622] | 1406 | TRY |
---|
[932] | 1407 | { |
---|
| 1408 | std::string fieldid_str; |
---|
| 1409 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
[2025] | 1410 | cxios_read_data_k46_hdl(CField::get(fieldid_str), data_k4, data_0size, data_1size, data_2size, data_3size, data_4size, data_5size) ; |
---|
| 1411 | } |
---|
| 1412 | CATCH_DUMP_STACK |
---|
[932] | 1413 | |
---|
[2025] | 1414 | |
---|
| 1415 | |
---|
| 1416 | void cxios_read_data_k47_hdl(CField* field, float* data_k4, |
---|
| 1417 | int data_0size, int data_1size, int data_2size, |
---|
| 1418 | int data_3size, int data_4size, int data_5size, |
---|
| 1419 | int data_6size) |
---|
| 1420 | TRY |
---|
| 1421 | { |
---|
[932] | 1422 | CTimer::get("XIOS").resume(); |
---|
| 1423 | CTimer::get("XIOS recv field").resume(); |
---|
| 1424 | |
---|
| 1425 | CContext* context = CContext::getCurrent(); |
---|
| 1426 | if (!context->hasServer && !context->client->isAttachedModeEnabled()) |
---|
| 1427 | context->checkBuffersAndListen(); |
---|
| 1428 | |
---|
| 1429 | CArray<double, 7> data(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size); |
---|
[2025] | 1430 | field->getData(data); |
---|
[932] | 1431 | CArray<float, 7> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size), neverDeleteData); |
---|
| 1432 | data_tmp = data; |
---|
| 1433 | |
---|
| 1434 | CTimer::get("XIOS recv field").suspend(); |
---|
| 1435 | CTimer::get("XIOS").suspend(); |
---|
| 1436 | } |
---|
[1622] | 1437 | CATCH_DUMP_STACK |
---|
[2025] | 1438 | |
---|
| 1439 | void cxios_read_data_k47(const char* fieldid, int fieldid_size, float* data_k4, |
---|
| 1440 | int data_0size, int data_1size, int data_2size, |
---|
| 1441 | int data_3size, int data_4size, int data_5size, |
---|
| 1442 | int data_6size) |
---|
| 1443 | TRY |
---|
| 1444 | { |
---|
| 1445 | std::string fieldid_str; |
---|
| 1446 | if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; |
---|
| 1447 | cxios_read_data_k47_hdl(CField::get(fieldid_str), data_k4, data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size) ; |
---|
| 1448 | } |
---|
| 1449 | CATCH_DUMP_STACK |
---|
| 1450 | |
---|
[325] | 1451 | } // extern "C" |
---|