Ignore:
Timestamp:
03/26/18 17:15:45 (6 years ago)
Author:
yushan
Message:

test_remap modified to follow trunk. memory free issue in mapper.cpp solved by changing tags. Yet need to know why.

Location:
XIOS/dev/branch_openmp/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/src/io/inetcdf4.cpp

    r1462 r1463  
    494494  } 
    495495 
    496  
     496/* 
    497497  bool CINetCDF4::isRectilinear(const StdString& name, const CVarPath* const path) 
    498498  { 
     
    513513    return true; 
    514514  } 
    515  
    516 /* 
    517   bool CINetCDF4::isRectilinear_1459(const StdString& name, const CVarPath* const path) 
     515*/ 
     516 
     517  bool CINetCDF4::isRectilinear(const StdString& name, const CVarPath* const path) 
    518518  { 
    519519    std::list<StdString> varCoords = this->getCoordinatesIdList(name, path); 
     
    557557    return (varDims1D.size() == 2); 
    558558  } 
    559 */ 
     559 
    560560 
    561561  bool CINetCDF4::isCurvilinear(const StdString& name, const CVarPath* const path) 
  • XIOS/dev/branch_openmp/src/test/test_remap_omp.f90

    r1338 r1463  
    206206                            bounds_lon_1D=dst_boundslon, bounds_lat_1D=dst_boundslat, nvertex=dst_nvertex) 
    207207 
    208   CALL xios_set_domain_attr("src_domain_unstructured_read", ni_glo=src_ni_glo, ibegin=src_ibegin, ni=src_ni, type="unstructured") 
    209   CALL xios_set_domain_attr("src_domain_unstructured_read", lonvalue_1D=src_lon_tmp, latvalue_1D=src_lat_tmp, & 
    210                             bounds_lon_1D=src_boundslon, bounds_lat_1D=src_boundslat, nvertex=src_nvertex) 
     208  !CALL xios_set_domain_attr("src_domain_unstructured_read", ni_glo=src_ni_glo, ibegin=src_ibegin, ni=src_ni, type="unstructured") 
     209  !CALL xios_set_domain_attr("src_domain_unstructured_read", lonvalue_1D=src_lon_tmp, latvalue_1D=src_lat_tmp, & 
     210  !                          bounds_lon_1D=src_boundslon, bounds_lat_1D=src_boundslat, nvertex=src_nvertex) 
    211211 
    212212 
     
    220220  ALLOCATE(tmp_field_0(src_tmp_ni*src_tmp_nj)) 
    221221 
    222   CALL xios_get_axis_attr("src_axis_curvilinear_read", n=src_tmp_n) 
    223   CALL xios_get_domain_attr("src_domain_curvilinear_read", ni=src_tmp_ni, nj=src_tmp_nj) 
    224   ALLOCATE(tmp_field_1(src_tmp_ni*src_tmp_nj*src_tmp_n)) 
    225  
    226   CALL xios_get_domain_attr("src_domain_unstructured_read", ni=src_tmp_ni, nj=src_tmp_nj) 
    227   ALLOCATE(tmp_field_2(src_tmp_ni*src_tmp_nj)) 
    228    
    229   CALL xios_recv_field("src_field_regular", tmp_field_0) 
    230   CALL xios_recv_field("src_field_curvilinear", tmp_field_1) 
    231   CALL xios_recv_field("src_field_unstructured", tmp_field_2) 
    232  
    233   DO ts=1,10 
     222  !CALL xios_get_axis_attr("src_axis_curvilinear_read", n=src_tmp_n) 
     223  !CALL xios_get_domain_attr("src_domain_curvilinear_read", ni=src_tmp_ni, nj=src_tmp_nj) 
     224  !ALLOCATE(tmp_field_1(src_tmp_ni*src_tmp_nj*src_tmp_n)) 
     225 
     226  !CALL xios_get_domain_attr("src_domain_unstructured_read", ni=src_tmp_ni, nj=src_tmp_nj) 
     227  !ALLOCATE(tmp_field_2(src_tmp_ni*src_tmp_nj)) 
     228   
     229  DO ts=1,1 
     230    CALL xios_recv_field("src_field_regular", tmp_field_0) 
     231    !CALL xios_recv_field("src_field_curvilinear", tmp_field_1) 
     232    !CALL xios_recv_field("src_field_unstructured", tmp_field_2) 
    234233    CALL xios_update_calendar(ts) 
     234     
     235    !DO i=1,src_ni 
     236    !  src_field_2D_clone(i) = src_field_2D(i) 
     237    !  IF ((23.5 * ts < src_lat(i)) .AND. (src_lat(i) < 65.5 *ts) .AND. (0 < src_lon(i)) .AND. (src_lon(i) < 30*ts)) THEN       
     238    !    src_field_2D_clone(i) = missing_value     
     239    !  ENDIF 
     240    !ENDDO 
     241 
    235242    CALL xios_send_field("src_field_2D",src_field_2D) 
    236      
    237     DO i=1,src_ni 
    238       src_field_2D_clone(i) = src_field_2D(i) 
    239       IF ((23.5 * ts < src_lat(i)) .AND. (src_lat(i) < 65.5 *ts) .AND. (0 < src_lon(i)) .AND. (src_lon(i) < 30*ts)) THEN       
    240         src_field_2D_clone(i) = missing_value     
    241       ENDIF 
    242     ENDDO 
    243  
    244     CALL xios_send_field("src_field_2D_clone",src_field_2D_clone) 
     243    CALL xios_send_field("src_field_2D_clone",src_field_2D) 
    245244    CALL xios_send_field("src_field_3D",src_field_3D) 
    246     CALL xios_send_field("src_field_3D_clone",src_field_3D) 
    247     CALL xios_send_field("src_field_4D",src_field_4D) 
    248     CALL xios_send_field("src_field_3D_pression",src_field_pression) 
     245    !CALL xios_send_field("src_field_4D",src_field_4D) 
     246    !CALL xios_send_field("src_field_3D_pression",src_field_pression) 
    249247    CALL xios_send_field("tmp_field_0",tmp_field_0) 
    250     CALL xios_send_field("tmp_field_1",tmp_field_1) 
    251     CALL xios_send_field("tmp_field_2",tmp_field_2) 
     248    !CALL xios_send_field("tmp_field_1",tmp_field_1) 
     249    !CALL xios_send_field("tmp_field_2",tmp_field_2) 
    252250    CALL wait_us(5000) ; 
    253251   ENDDO 
     
    257255  DEALLOCATE(src_lon, src_lat, src_boundslon,src_boundslat, src_field_2D) 
    258256  DEALLOCATE(dst_lon, dst_lat, dst_boundslon,dst_boundslat) 
    259   DEALLOCATE(tmp_field_0, tmp_field_1, tmp_field_2) 
    260  
     257  DEALLOCATE(tmp_field_0) 
     258  !DEALLOCATE(tmp_field_1) 
     259  !DEALLOCATE(tmp_field_2) 
     260   
    261261  CALL xios_finalize() 
    262262   
Note: See TracChangeset for help on using the changeset viewer.