Changeset 715
- Timestamp:
- 10/05/15 14:43:48 (9 years ago)
- Location:
- XIOS/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/inputs/REMAP/iodef.xml
r709 r715 8 8 <field_definition level="1" > 9 9 <field id="src_field" operation="instant" grid_ref="src_grid"/> 10 <field id="dst_field " operation="instant" field_ref="src_field" grid_ref="dst_grid"/>11 <field id=" dst_field_regular" operation="instant" field_ref="src_field" grid_ref="dst_grid_regular"/>10 <field id="dst_field_regular" operation="instant" field_ref="tmp_field" grid_ref="dst_grid_regular"/> 11 <field id="tmp_field" operation="instant" grid_ref="src_grid_regular"/> 12 12 </field_definition> 13 13 14 14 15 <file_definition type=" one_file" par_access="collective" output_freq="1ts" output_level="10" enabled=".TRUE.">15 <file_definition type="multiple_file" par_access="collective" output_freq="1ts" output_level="10" enabled=".TRUE."> 16 16 <file id="output" name="output"> 17 <field field_ref="src_field" name="field" />17 <!-- <field field_ref="src_field" name="field" />--> 18 18 </file> 19 19 <file id="output_dst" name="output_dst"> 20 <field field_ref="dst_field" name="field" />20 <!-- <field id="test" field_ref="dst_field" name="field" />--> 21 21 </file> 22 <file id="output_dst_regular" name="output_dst_regular" >22 <file id="output_dst_regular" name="output_dst_regular" type="one_file"> 23 23 <field field_ref="dst_field_regular" name="field" /> 24 </file> 25 26 <file id="output_src_regular" name="output_src_regular" mode="read" type="multiple_file"> 27 <field id="src_field_regular" name="field" grid_ref="src_grid_regular" operation="instant"/> 28 </file> 29 <file id="output_regular" name="output_regular" mode="write"> 30 <!-- <field field_ref="field_regular" name="field" />--> 24 31 </file> 25 32 </file_definition> … … 35 42 <interpolate_domain/> 36 43 </domain> 37 <domain id="dst_domain_regular" domain_src="src_domain " ni_glo="180" nj_glo="90">44 <domain id="dst_domain_regular" domain_src="src_domain_regular" ni_glo="90" nj_glo="60" type="rectilinear"> 38 45 <generate_rectilinear_domain /> 39 46 <interpolate_domain/> 47 </domain> 48 <domain id="src_domain_regular" ni_glo="180" nj_glo="90" type="rectilinear"> 49 <generate_rectilinear_domain /> 40 50 </domain> 41 51 </domain_definition> … … 50 60 <grid id="src_grid"> 51 61 <domain domain_ref="src_domain" /> 62 </grid> 63 <grid id="src_grid_regular"> 64 <domain domain_ref="src_domain_regular" /> 52 65 </grid> 53 66 </grid_definition> -
XIOS/trunk/src/node/domain.cpp
r691 r715 35 35 , isClientAfterTransformationChecked(false), hasLonLat(false) 36 36 , lonvalue_client(), latvalue_client(), bounds_lon_client(), bounds_lat_client() 37 , srcObject_(0) 37 , srcObject_(0), isRedistributed_(false) 38 38 { /* Ne rien faire de plus */ } 39 39 … … 45 45 , isClientAfterTransformationChecked(false), hasLonLat(false) 46 46 , lonvalue_client(), latvalue_client(), bounds_lon_client(), bounds_lat_client() 47 , srcObject_(0) 47 , srcObject_(0), isRedistributed_(false) 48 48 { /* Ne rien faire de plus */ } 49 49 … … 171 171 void CDomain::redistribute(int nbLocalDomain) 172 172 { 173 if (this->isRedistributed_) return; 173 174 if (type_attr::rectilinear == type) 174 175 { … … 270 271 // Now fill other attributes 271 272 fillInRectilinearLonLat(); 272 // fillInRectilinearBoundLonLat(); 273 this->isRedistributed_ = true; 274 info <<"now, we are here " << std::endl; 275 info << "domain " << this->getId() << " ni " << ni.getValue() << " nj " << nj.getValue() << std::endl; 273 276 } 274 277 } … … 327 330 } 328 331 } 332 333 /*! 334 Temporary function to verify whether a rectilinear domain is created automatically. 335 The domain is distributed into number of parts which are equal to number of clients (intracomm) 336 */ 337 void CDomain::checkGenerate() 338 { 339 TransMapTypes trans = this->getAllTransformations(); 340 TransMapTypes::const_iterator it = trans.begin(), ite = trans.end(); 341 int transOrder = 0; 342 for (; it != ite; ++it, ++transOrder) 343 { 344 ETranformationType transType = it->first; 345 if ((TRANS_GENERATE_RECTILINEAR_DOMAIN == transType) && (0 == transOrder)) 346 { 347 CContext* context = CContext::getCurrent(); 348 CContextClient* client = context->client; 349 int nbClient; 350 MPI_Comm_size(client->intraComm,&nbClient); 351 this->redistribute(nbClient); 352 break; 353 } 354 } 355 } 356 329 357 330 358 void CDomain::checkDomain(void) … … 942 970 CContext* context=CContext::getCurrent(); 943 971 972 this->checkGenerate(); 944 973 this->checkDomain(); 945 974 this->checkBounds(); -
XIOS/trunk/src/node/domain.hpp
r688 r715 164 164 void checkArea(void); 165 165 void checkLonLat(); 166 void checkGenerate(); 166 167 167 168 void checkTransformations(); … … 189 190 //! True if and only if the data defined on the domain can be outputted in a compressed way 190 191 bool isCompressible_; 192 bool isRedistributed_; 191 193 TransMapTypes transformationMap_; 192 194 std::vector<int> nGlobDomain_; -
XIOS/trunk/src/test/test_remap.f90
r709 r715 20 20 DOUBLE PRECISION,ALLOCATABLE :: src_boundslon(:,:), dst_boundslon(:,:) 21 21 DOUBLE PRECISION,ALLOCATABLE :: src_boundslat(:,:), dst_boundslat(:,:) 22 DOUBLE PRECISION,ALLOCATABLE :: src_field(:) 22 DOUBLE PRECISION,ALLOCATABLE :: src_field(:), tmp_field(:) 23 23 INTEGER :: src_ni_glo, dst_ni_glo; 24 24 INTEGER :: src_nvertex, dst_nvertex; … … 119 119 bounds_lon_1D=dst_boundslon, bounds_lat_1D=dst_boundslat, nvertex=dst_nvertex) 120 120 121 CALL xios_set_domain_attr("dst_domain_regular", type="rectilinear")121 ! CALL xios_set_domain_attr("dst_domain_regular", type="rectilinear") 122 122 123 124 ALLOCATE(tmp_field(180*90/2)) 123 125 dtime%second = 3600 124 126 CALL xios_set_timestep(dtime) … … 127 129 128 130 DO ts=1,1 131 CALL xios_recv_field("src_field_regular", tmp_field) 129 132 CALL xios_update_calendar(ts) 130 CALL xios_send_field("src_field",src_field) 133 ! CALL xios_send_field("src_field",src_field) 134 CALL xios_send_field("tmp_field",tmp_field) 131 135 CALL wait_us(5000) ; 132 136 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.