Changeset 611
- Timestamp:
- 06/10/15 10:39:11 (10 years ago)
- Location:
- XIOS
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/branchs/xios-1.0/src/config/domain_attribute.conf
r501 r611 60 60 DECLARE_ARRAY(double, 2, bounds_lon) 61 61 DECLARE_ARRAY(double, 2, bounds_lat) 62 DECLARE_ARRAY(double, 2, area) 62 63 63 64 DECLARE_ENUM3(type,regular,curvilinear,unstructured) -
XIOS/branchs/xios-1.0/src/interface/c_attr/icdomain_attr.cpp
r581 r611 17 17 typedef xios::CDomain* domain_Ptr; 18 18 19 void cxios_set_domain_area(domain_Ptr domain_hdl, double* area, int extent1, int extent2) 20 { 21 CTimer::get("XIOS").resume(); 22 CArray<double,2> tmp(area,shape(extent1,extent2),neverDeleteData) ; 23 domain_hdl->area.reference(tmp.copy()); 24 domain_hdl->sendAttributToServer(domain_hdl->area); 25 CTimer::get("XIOS").suspend(); 26 } 27 28 void cxios_get_domain_area(domain_Ptr domain_hdl, double* area, int extent1, int extent2) 29 { 30 CTimer::get("XIOS").resume(); 31 CArray<double,2> tmp(area,shape(extent1,extent2),neverDeleteData) ; 32 tmp=domain_hdl->area.getInheritedValue() ; 33 CTimer::get("XIOS").suspend(); 34 } 35 36 bool cxios_is_defined_domain_area(domain_Ptr domain_hdl ) 37 { 38 CTimer::get("XIOS").resume(); 39 bool isDefined = domain_hdl->area.hasInheritedValue(); 40 CTimer::get("XIOS").suspend(); 41 return isDefined; 42 } 43 44 45 19 46 void cxios_set_domain_bounds_lat(domain_Ptr domain_hdl, double* bounds_lat, int extent1, int extent2) 20 47 { -
XIOS/branchs/xios-1.0/src/interface/c_attr/icdomaingroup_attr.cpp
r581 r611 17 17 typedef xios::CDomainGroup* domaingroup_Ptr; 18 18 19 void cxios_set_domaingroup_area(domaingroup_Ptr domaingroup_hdl, double* area, int extent1, int extent2) 20 { 21 CTimer::get("XIOS").resume(); 22 CArray<double,2> tmp(area,shape(extent1,extent2),neverDeleteData) ; 23 domaingroup_hdl->area.reference(tmp.copy()); 24 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->area); 25 CTimer::get("XIOS").suspend(); 26 } 27 28 void cxios_get_domaingroup_area(domaingroup_Ptr domaingroup_hdl, double* area, int extent1, int extent2) 29 { 30 CTimer::get("XIOS").resume(); 31 CArray<double,2> tmp(area,shape(extent1,extent2),neverDeleteData) ; 32 tmp=domaingroup_hdl->area.getInheritedValue() ; 33 CTimer::get("XIOS").suspend(); 34 } 35 36 bool cxios_is_defined_domaingroup_area(domaingroup_Ptr domaingroup_hdl ) 37 { 38 CTimer::get("XIOS").resume(); 39 bool isDefined = domaingroup_hdl->area.hasInheritedValue(); 40 CTimer::get("XIOS").suspend(); 41 return isDefined; 42 } 43 44 45 19 46 void cxios_set_domaingroup_bounds_lat(domaingroup_Ptr domaingroup_hdl, double* bounds_lat, int extent1, int extent2) 20 47 { -
XIOS/branchs/xios-1.0/src/interface/fortran_attr/domain_interface_attr.f90
r501 r611 9 9 10 10 11 SUBROUTINE cxios_set_domain_area(domain_hdl, area, extent1, extent2) BIND(C) 12 USE ISO_C_BINDING 13 INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl 14 REAL (KIND=C_DOUBLE) , DIMENSION(*) :: area 15 INTEGER (kind = C_INT), VALUE :: extent1 16 INTEGER (kind = C_INT), VALUE :: extent2 17 END SUBROUTINE cxios_set_domain_area 18 19 SUBROUTINE cxios_get_domain_area(domain_hdl, area, extent1, extent2) BIND(C) 20 USE ISO_C_BINDING 21 INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl 22 REAL (KIND=C_DOUBLE) , DIMENSION(*) :: area 23 INTEGER (kind = C_INT), VALUE :: extent1 24 INTEGER (kind = C_INT), VALUE :: extent2 25 END SUBROUTINE cxios_get_domain_area 26 27 FUNCTION cxios_is_defined_domain_area(domain_hdl ) BIND(C) 28 USE ISO_C_BINDING 29 LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_area 30 INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl 31 END FUNCTION cxios_is_defined_domain_area 32 33 11 34 SUBROUTINE cxios_set_domain_bounds_lat(domain_hdl, bounds_lat, extent1, extent2) BIND(C) 12 35 USE ISO_C_BINDING -
XIOS/branchs/xios-1.0/src/interface/fortran_attr/domaingroup_interface_attr.f90
r501 r611 9 9 10 10 11 SUBROUTINE cxios_set_domaingroup_area(domaingroup_hdl, area, extent1, extent2) BIND(C) 12 USE ISO_C_BINDING 13 INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl 14 REAL (KIND=C_DOUBLE) , DIMENSION(*) :: area 15 INTEGER (kind = C_INT), VALUE :: extent1 16 INTEGER (kind = C_INT), VALUE :: extent2 17 END SUBROUTINE cxios_set_domaingroup_area 18 19 SUBROUTINE cxios_get_domaingroup_area(domaingroup_hdl, area, extent1, extent2) BIND(C) 20 USE ISO_C_BINDING 21 INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl 22 REAL (KIND=C_DOUBLE) , DIMENSION(*) :: area 23 INTEGER (kind = C_INT), VALUE :: extent1 24 INTEGER (kind = C_INT), VALUE :: extent2 25 END SUBROUTINE cxios_get_domaingroup_area 26 27 FUNCTION cxios_is_defined_domaingroup_area(domaingroup_hdl ) BIND(C) 28 USE ISO_C_BINDING 29 LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_area 30 INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl 31 END FUNCTION cxios_is_defined_domaingroup_area 32 33 11 34 SUBROUTINE cxios_set_domaingroup_bounds_lat(domaingroup_hdl, bounds_lat, extent1, extent2) BIND(C) 12 35 USE ISO_C_BINDING -
XIOS/branchs/xios-1.0/src/interface/fortran_attr/idomain_attr.F90
r501 r611 12 12 13 13 SUBROUTINE xios(set_domain_attr) & 14 ( domain_id, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&15 , data_ n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index, jbegin, jend&16 , latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name &14 ( domain_id, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 15 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index & 16 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name & 17 17 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj & 18 18 , zoom_nj_loc ) … … 21 21 TYPE(txios(domain)) :: domain_hdl 22 22 CHARACTER(LEN=*), INTENT(IN) ::domain_id 23 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area(:,:) 23 24 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat(:,:) 24 25 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon(:,:) … … 62 63 CALL xios(get_domain_handle)(domain_id,domain_hdl) 63 64 CALL xios(set_domain_attr_hdl_) & 64 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&65 , data_ n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index, jbegin, jend&66 , latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name &65 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 66 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index & 67 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name & 67 68 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj & 68 69 , zoom_nj_loc ) … … 71 72 72 73 SUBROUTINE xios(set_domain_attr_hdl) & 73 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&74 , data_ n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index, jbegin, jend&75 , latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name &74 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 75 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index & 76 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name & 76 77 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj & 77 78 , zoom_nj_loc ) … … 79 80 IMPLICIT NONE 80 81 TYPE(txios(domain)) , INTENT(IN) :: domain_hdl 82 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area(:,:) 81 83 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat(:,:) 82 84 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon(:,:) … … 119 121 120 122 CALL xios(set_domain_attr_hdl_) & 121 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&122 , data_ n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index, jbegin, jend&123 , latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name &123 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 124 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index & 125 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name & 124 126 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj & 125 127 , zoom_nj_loc ) … … 128 130 129 131 SUBROUTINE xios(set_domain_attr_hdl_) & 130 ( domain_hdl, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ &132 ( domain_hdl, area_, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ & 131 133 , data_jbegin_, data_n_index_, data_ni_, data_nj_, domain_group_ref_, i_index_, ibegin_, iend_ & 132 134 , j_index_, jbegin_, jend_, latvalue_, long_name_, lonvalue_, mask_, name_, ni_, ni_glo_, nj_ & … … 136 138 IMPLICIT NONE 137 139 TYPE(txios(domain)) , INTENT(IN) :: domain_hdl 140 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area_(:,:) 138 141 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_(:,:) 139 142 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_(:,:) … … 175 178 INTEGER , OPTIONAL, INTENT(IN) :: zoom_nj_loc_ 176 179 180 IF (PRESENT(area_)) THEN 181 CALL cxios_set_domain_area(domain_hdl%daddr, area_,size(area_,1),size(area_,2)) 182 ENDIF 183 177 184 IF (PRESENT(bounds_lat_)) THEN 178 185 CALL cxios_set_domain_bounds_lat(domain_hdl%daddr, bounds_lat_,size(bounds_lat_,1),size(bounds_lat_,2)) … … 330 337 331 338 SUBROUTINE xios(get_domain_attr) & 332 ( domain_id, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&333 , data_ n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index, jbegin, jend&334 , latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name &339 ( domain_id, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 340 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index & 341 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name & 335 342 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj & 336 343 , zoom_nj_loc ) … … 339 346 TYPE(txios(domain)) :: domain_hdl 340 347 CHARACTER(LEN=*), INTENT(IN) ::domain_id 348 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area(:,:) 341 349 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat(:,:) 342 350 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon(:,:) … … 380 388 CALL xios(get_domain_handle)(domain_id,domain_hdl) 381 389 CALL xios(get_domain_attr_hdl_) & 382 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&383 , data_ n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index, jbegin, jend&384 , latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name &390 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 391 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index & 392 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name & 385 393 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj & 386 394 , zoom_nj_loc ) … … 389 397 390 398 SUBROUTINE xios(get_domain_attr_hdl) & 391 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&392 , data_ n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index, jbegin, jend&393 , latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name &399 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 400 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index & 401 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name & 394 402 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj & 395 403 , zoom_nj_loc ) … … 397 405 IMPLICIT NONE 398 406 TYPE(txios(domain)) , INTENT(IN) :: domain_hdl 407 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area(:,:) 399 408 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat(:,:) 400 409 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon(:,:) … … 437 446 438 447 CALL xios(get_domain_attr_hdl_) & 439 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&440 , data_ n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index, jbegin, jend&441 , latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name &448 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 449 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index & 450 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name & 442 451 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj & 443 452 , zoom_nj_loc ) … … 446 455 447 456 SUBROUTINE xios(get_domain_attr_hdl_) & 448 ( domain_hdl, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ &457 ( domain_hdl, area_, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ & 449 458 , data_jbegin_, data_n_index_, data_ni_, data_nj_, domain_group_ref_, i_index_, ibegin_, iend_ & 450 459 , j_index_, jbegin_, jend_, latvalue_, long_name_, lonvalue_, mask_, name_, ni_, ni_glo_, nj_ & … … 454 463 IMPLICIT NONE 455 464 TYPE(txios(domain)) , INTENT(IN) :: domain_hdl 465 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area_(:,:) 456 466 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_(:,:) 457 467 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_(:,:) … … 493 503 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_nj_loc_ 494 504 505 IF (PRESENT(area_)) THEN 506 CALL cxios_get_domain_area(domain_hdl%daddr, area_,size(area_,1),size(area_,2)) 507 ENDIF 508 495 509 IF (PRESENT(bounds_lat_)) THEN 496 510 CALL cxios_get_domain_bounds_lat(domain_hdl%daddr, bounds_lat_,size(bounds_lat_,1),size(bounds_lat_,2)) … … 648 662 649 663 SUBROUTINE xios(is_defined_domain_attr) & 650 ( domain_id, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&651 , data_ n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index, jbegin, jend&652 , latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name &664 ( domain_id, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 665 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index & 666 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name & 653 667 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj & 654 668 , zoom_nj_loc ) … … 657 671 TYPE(txios(domain)) :: domain_hdl 658 672 CHARACTER(LEN=*), INTENT(IN) ::domain_id 673 LOGICAL, OPTIONAL, INTENT(OUT) :: area 674 LOGICAL(KIND=C_BOOL) :: area_tmp 659 675 LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat 660 676 LOGICAL(KIND=C_BOOL) :: bounds_lat_tmp … … 734 750 CALL xios(get_domain_handle)(domain_id,domain_hdl) 735 751 CALL xios(is_defined_domain_attr_hdl_) & 736 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&737 , data_ n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index, jbegin, jend&738 , latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name &752 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 753 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index & 754 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name & 739 755 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj & 740 756 , zoom_nj_loc ) … … 743 759 744 760 SUBROUTINE xios(is_defined_domain_attr_hdl) & 745 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&746 , data_ n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index, jbegin, jend&747 , latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name &761 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 762 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index & 763 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name & 748 764 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj & 749 765 , zoom_nj_loc ) … … 751 767 IMPLICIT NONE 752 768 TYPE(txios(domain)) , INTENT(IN) :: domain_hdl 769 LOGICAL, OPTIONAL, INTENT(OUT) :: area 770 LOGICAL(KIND=C_BOOL) :: area_tmp 753 771 LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat 754 772 LOGICAL(KIND=C_BOOL) :: bounds_lat_tmp … … 827 845 828 846 CALL xios(is_defined_domain_attr_hdl_) & 829 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&830 , data_ n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index, jbegin, jend&831 , latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name &847 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 848 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, i_index, ibegin, iend, j_index & 849 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name & 832 850 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj & 833 851 , zoom_nj_loc ) … … 836 854 837 855 SUBROUTINE xios(is_defined_domain_attr_hdl_) & 838 ( domain_hdl, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ &856 ( domain_hdl, area_, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ & 839 857 , data_jbegin_, data_n_index_, data_ni_, data_nj_, domain_group_ref_, i_index_, ibegin_, iend_ & 840 858 , j_index_, jbegin_, jend_, latvalue_, long_name_, lonvalue_, mask_, name_, ni_, ni_glo_, nj_ & … … 844 862 IMPLICIT NONE 845 863 TYPE(txios(domain)) , INTENT(IN) :: domain_hdl 864 LOGICAL, OPTIONAL, INTENT(OUT) :: area_ 865 LOGICAL(KIND=C_BOOL) :: area__tmp 846 866 LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_ 847 867 LOGICAL(KIND=C_BOOL) :: bounds_lat__tmp … … 919 939 LOGICAL(KIND=C_BOOL) :: zoom_nj_loc__tmp 920 940 941 IF (PRESENT(area_)) THEN 942 area__tmp=cxios_is_defined_domain_area(domain_hdl%daddr) 943 area_=area__tmp 944 ENDIF 945 921 946 IF (PRESENT(bounds_lat_)) THEN 922 947 bounds_lat__tmp=cxios_is_defined_domain_bounds_lat(domain_hdl%daddr) -
XIOS/branchs/xios-1.0/src/interface/fortran_attr/idomaingroup_attr.F90
r501 r611 12 12 13 13 SUBROUTINE xios(set_domaingroup_attr) & 14 ( domaingroup_id, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &14 ( domaingroup_id, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 15 15 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, group_ref, i_index, ibegin & 16 16 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & … … 21 21 TYPE(txios(domaingroup)) :: domaingroup_hdl 22 22 CHARACTER(LEN=*), INTENT(IN) ::domaingroup_id 23 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area(:,:) 23 24 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat(:,:) 24 25 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon(:,:) … … 63 64 CALL xios(get_domaingroup_handle)(domaingroup_id,domaingroup_hdl) 64 65 CALL xios(set_domaingroup_attr_hdl_) & 65 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &66 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 66 67 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, group_ref, i_index, ibegin & 67 68 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & … … 72 73 73 74 SUBROUTINE xios(set_domaingroup_attr_hdl) & 74 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &75 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 75 76 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, group_ref, i_index, ibegin & 76 77 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & … … 80 81 IMPLICIT NONE 81 82 TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl 83 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area(:,:) 82 84 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat(:,:) 83 85 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon(:,:) … … 121 123 122 124 CALL xios(set_domaingroup_attr_hdl_) & 123 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &125 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 124 126 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, group_ref, i_index, ibegin & 125 127 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & … … 130 132 131 133 SUBROUTINE xios(set_domaingroup_attr_hdl_) & 132 ( domaingroup_hdl, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ &134 ( domaingroup_hdl, area_, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ & 133 135 , data_jbegin_, data_n_index_, data_ni_, data_nj_, domain_group_ref_, group_ref_, i_index_, ibegin_ & 134 136 , iend_, j_index_, jbegin_, jend_, latvalue_, long_name_, lonvalue_, mask_, name_, ni_, ni_glo_ & … … 138 140 IMPLICIT NONE 139 141 TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl 142 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area_(:,:) 140 143 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_(:,:) 141 144 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_(:,:) … … 178 181 INTEGER , OPTIONAL, INTENT(IN) :: zoom_nj_loc_ 179 182 183 IF (PRESENT(area_)) THEN 184 CALL cxios_set_domaingroup_area(domaingroup_hdl%daddr, area_,size(area_,1),size(area_,2)) 185 ENDIF 186 180 187 IF (PRESENT(bounds_lat_)) THEN 181 188 CALL cxios_set_domaingroup_bounds_lat(domaingroup_hdl%daddr, bounds_lat_,size(bounds_lat_,1),size(bounds_lat_,2)) … … 337 344 338 345 SUBROUTINE xios(get_domaingroup_attr) & 339 ( domaingroup_id, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &346 ( domaingroup_id, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 340 347 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, group_ref, i_index, ibegin & 341 348 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & … … 346 353 TYPE(txios(domaingroup)) :: domaingroup_hdl 347 354 CHARACTER(LEN=*), INTENT(IN) ::domaingroup_id 355 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area(:,:) 348 356 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat(:,:) 349 357 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon(:,:) … … 388 396 CALL xios(get_domaingroup_handle)(domaingroup_id,domaingroup_hdl) 389 397 CALL xios(get_domaingroup_attr_hdl_) & 390 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &398 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 391 399 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, group_ref, i_index, ibegin & 392 400 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & … … 397 405 398 406 SUBROUTINE xios(get_domaingroup_attr_hdl) & 399 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &407 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 400 408 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, group_ref, i_index, ibegin & 401 409 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & … … 405 413 IMPLICIT NONE 406 414 TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl 415 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area(:,:) 407 416 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat(:,:) 408 417 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon(:,:) … … 446 455 447 456 CALL xios(get_domaingroup_attr_hdl_) & 448 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &457 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 449 458 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, group_ref, i_index, ibegin & 450 459 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & … … 455 464 456 465 SUBROUTINE xios(get_domaingroup_attr_hdl_) & 457 ( domaingroup_hdl, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ &466 ( domaingroup_hdl, area_, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ & 458 467 , data_jbegin_, data_n_index_, data_ni_, data_nj_, domain_group_ref_, group_ref_, i_index_, ibegin_ & 459 468 , iend_, j_index_, jbegin_, jend_, latvalue_, long_name_, lonvalue_, mask_, name_, ni_, ni_glo_ & … … 463 472 IMPLICIT NONE 464 473 TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl 474 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area_(:,:) 465 475 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_(:,:) 466 476 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_(:,:) … … 503 513 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_nj_loc_ 504 514 515 IF (PRESENT(area_)) THEN 516 CALL cxios_get_domaingroup_area(domaingroup_hdl%daddr, area_,size(area_,1),size(area_,2)) 517 ENDIF 518 505 519 IF (PRESENT(bounds_lat_)) THEN 506 520 CALL cxios_get_domaingroup_bounds_lat(domaingroup_hdl%daddr, bounds_lat_,size(bounds_lat_,1),size(bounds_lat_,2)) … … 662 676 663 677 SUBROUTINE xios(is_defined_domaingroup_attr) & 664 ( domaingroup_id, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &678 ( domaingroup_id, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 665 679 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, group_ref, i_index, ibegin & 666 680 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & … … 671 685 TYPE(txios(domaingroup)) :: domaingroup_hdl 672 686 CHARACTER(LEN=*), INTENT(IN) ::domaingroup_id 687 LOGICAL, OPTIONAL, INTENT(OUT) :: area 688 LOGICAL(KIND=C_BOOL) :: area_tmp 673 689 LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat 674 690 LOGICAL(KIND=C_BOOL) :: bounds_lat_tmp … … 750 766 CALL xios(get_domaingroup_handle)(domaingroup_id,domaingroup_hdl) 751 767 CALL xios(is_defined_domaingroup_attr_hdl_) & 752 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &768 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 753 769 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, group_ref, i_index, ibegin & 754 770 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & … … 759 775 760 776 SUBROUTINE xios(is_defined_domaingroup_attr_hdl) & 761 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &777 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 762 778 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, group_ref, i_index, ibegin & 763 779 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & … … 767 783 IMPLICIT NONE 768 784 TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl 785 LOGICAL, OPTIONAL, INTENT(OUT) :: area 786 LOGICAL(KIND=C_BOOL) :: area_tmp 769 787 LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat 770 788 LOGICAL(KIND=C_BOOL) :: bounds_lat_tmp … … 845 863 846 864 CALL xios(is_defined_domaingroup_attr_hdl_) & 847 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &865 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 848 866 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, group_ref, i_index, ibegin & 849 867 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & … … 854 872 855 873 SUBROUTINE xios(is_defined_domaingroup_attr_hdl_) & 856 ( domaingroup_hdl, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ &874 ( domaingroup_hdl, area_, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ & 857 875 , data_jbegin_, data_n_index_, data_ni_, data_nj_, domain_group_ref_, group_ref_, i_index_, ibegin_ & 858 876 , iend_, j_index_, jbegin_, jend_, latvalue_, long_name_, lonvalue_, mask_, name_, ni_, ni_glo_ & … … 862 880 IMPLICIT NONE 863 881 TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl 882 LOGICAL, OPTIONAL, INTENT(OUT) :: area_ 883 LOGICAL(KIND=C_BOOL) :: area__tmp 864 884 LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_ 865 885 LOGICAL(KIND=C_BOOL) :: bounds_lat__tmp … … 939 959 LOGICAL(KIND=C_BOOL) :: zoom_nj_loc__tmp 940 960 961 IF (PRESENT(area_)) THEN 962 area__tmp=cxios_is_defined_domaingroup_area(domaingroup_hdl%daddr) 963 area_=area__tmp 964 ENDIF 965 941 966 IF (PRESENT(bounds_lat_)) THEN 942 967 bounds_lat__tmp=cxios_is_defined_domaingroup_bounds_lat(domaingroup_hdl%daddr) -
XIOS/branchs/xios-1.0/src/node/domain.cpp
r610 r611 21 21 CDomain::CDomain(void) 22 22 : CObjectTemplate<CDomain>(), CDomainAttributes() 23 , isChecked(false), relFiles()23 , isChecked(false), hasBounds(false), hasArea(false), relFiles() 24 24 { /* Ne rien faire de plus */ } 25 25 26 26 CDomain::CDomain(const StdString & id) 27 27 : CObjectTemplate<CDomain>(id), CDomainAttributes() 28 , isChecked(false), relFiles()28 , isChecked(false), hasBounds(false), hasArea(false), relFiles() 29 29 { /* Ne rien faire de plus */ } 30 30 … … 108 108 for(int j=0;j<nj;j++) mask(0,j)=mask_tmp(j,0) ; 109 109 } 110 111 if (!area.isEmpty()) 112 area.transposeSelf(1, 0); 113 110 114 ni=1 ; 111 115 ibegin=1 ; … … 533 537 } 534 538 539 void CDomain::checkArea(void) 540 { 541 hasArea = !area.isEmpty(); 542 if (hasArea) 543 { 544 if (area.extent(0) != ni || area.extent(1) != nj) 545 { 546 ERROR("void CDomain::checkArea(void)", 547 "The area attribute must be of size ni x nj."); 548 } 549 } 550 } 551 535 552 //---------------------------------------------------------------- 536 553 … … 543 560 this->checkZoom(); 544 561 this->checkBounds(); 562 this->checkArea(); 545 563 546 564 if (context->hasClient) … … 561 579 computeConnectedServer() ; 562 580 sendServerAttribut() ; 563 sendLonLat ();581 sendLonLatArea(); 564 582 } 565 583 … … 701 719 702 720 703 void CDomain::sendLonLat (void)721 void CDomain::sendLonLatArea(void) 704 722 { 705 723 int ns,n,i,j,ind,nv; … … 709 727 // send lon lat for each connected server 710 728 CEventClient event(getType(), EVENT_ID_LON_LAT); 729 CEventClient eventArea(getType(), EVENT_ID_AREA); 711 730 712 731 list<CMessage> list_msg; 732 list<CMessage> list_msgArea; 713 733 list<CArray<int,1> > list_indi,list_indj; 714 734 list<CArray<double,1> >list_lon,list_lat; 715 735 list<CArray<double,2> >list_boundslon,list_boundslat; 736 list<CArray<double,1> > list_area; 716 737 717 738 for (int ns = 0; ns < connectedServer.size(); ns++) … … 729 750 list_boundslat.push_back(CArray<double,2>(nvertex, nbData)); 730 751 } 752 if (hasArea) 753 list_area.push_back(CArray<double,1>(nbData)); 731 754 732 755 CArray<int,1>& indi = list_indi.back(); … … 758 781 indi(n) = ibegin + i_index(i - ibegin + 1, j - jbegin + 1) - 1; 759 782 indj(n) = jbegin + j_index(i - ibegin + 1, j - jbegin + 1) - 1; 783 784 if (hasArea) 785 list_area.back()(n) = area(i - ibegin + 1, j - jbegin + 1); 760 786 } 761 787 … … 768 794 769 795 event.push(connectedServer[ns], nbSenders[ns], list_msg.back()); 796 797 if (hasArea) 798 { 799 list_msgArea.push_back(CMessage()); 800 list_msgArea.back() << this->getId() << list_area.back(); 801 eventArea.push(connectedServer[ns], nbSenders[ns], list_msgArea.back()); 802 } 770 803 } 771 804 772 805 client->sendEvent(event); 806 if (hasArea) 807 client->sendEvent(eventArea); 773 808 } 774 809 … … 787 822 case EVENT_ID_LON_LAT: 788 823 recvLonLat(event); 824 return true; 825 break; 826 case EVENT_ID_AREA: 827 recvArea(event); 789 828 return true; 790 829 break; … … 837 876 bounds_lat_srv = 0. ; 838 877 } 878 879 if (hasArea) 880 area_srv.resize(zoom_ni_srv * zoom_nj_srv); 839 881 } 840 882 … … 882 924 } 883 925 } 884 //---------------------------------------------------------------- 885 886 887 888 ///--------------------------------------------------------------- 889 926 927 void CDomain::recvArea(CEventServer& event) 928 { 929 list<CEventServer::SSubEvent>::iterator it; 930 for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it) 931 { 932 CBufferIn* buffer = it->buffer; 933 string domainId; 934 *buffer >> domainId; 935 get(domainId)->recvArea(it->rank, *buffer); 936 } 937 } 938 939 void CDomain::recvArea(int rank, CBufferIn& buffer) 940 { 941 CArray<int,1> &indi = indiSrv[rank], &indj = indjSrv[rank]; 942 CArray<double,1> clientArea; 943 944 buffer >> clientArea; 945 946 int i, j, ind_srv; 947 for (int ind = 0; ind < indi.numElements(); ind++) 948 { 949 i = indi(ind); j = indj(ind); 950 ind_srv = (i - (zoom_ibegin_srv - 1)) + (j - (zoom_jbegin_srv - 1)) * zoom_ni_srv; 951 area_srv(ind_srv) = clientArea(ind); 952 } 953 } 890 954 } // namespace xios -
XIOS/branchs/xios-1.0/src/node/domain.hpp
r610 r611 37 37 enum EEventId 38 38 { 39 EVENT_ID_SERVER_ATTRIBUT, EVENT_ID_LON_LAT 39 EVENT_ID_SERVER_ATTRIBUT, EVENT_ID_LON_LAT, EVENT_ID_AREA 40 40 } ; 41 41 … … 71 71 void checkZoom(void); 72 72 void checkBounds(void); 73 void checkArea(void); 73 74 74 75 … … 100 101 CArray<double, 1> lonvalue_srv, latvalue_srv ; 101 102 CArray<double, 2> bounds_lon_srv, bounds_lat_srv ; 103 CArray<double, 1> area_srv; 102 104 103 105 … … 119 121 void completeLonLatClient(void); 120 122 void sendServerAttribut(void); 121 void sendLonLat (void);123 void sendLonLatArea(void); 122 124 void computeConnectedServer(void); 125 123 126 static bool dispatchEvent(CEventServer& event); 124 127 static void recvServerAttribut(CEventServer& event); 125 128 static void recvLonLat(CEventServer& event); 129 static void recvArea(CEventServer& event); 126 130 void recvServerAttribut(CBufferIn& buffer); 127 131 void recvLonLat(int rank, CBufferIn& buffer); 132 void recvArea(int rank, CBufferIn& buffer); 128 133 129 134 /// Destructeur /// … … 139 144 bool isCurvilinear ; 140 145 bool hasBounds ; 146 bool hasArea; 147 141 148 private : 142 143 149 /// Proriétés protégées /// 144 150 bool isChecked; -
XIOS/branchs/xios-1.0/src/output/nc4_data_output.cpp
r609 r611 98 98 99 99 string lonid,latid,bounds_lonid,bounds_latid ; 100 string areaId = "area" + appendDomid; 100 101 /* 101 102 StdString lonid_loc = (server->intraCommSize > 1) … … 209 210 //SuperClassWriter::setDefaultValue(maskid, &dvm); 210 211 212 if (domain->hasArea) 213 { 214 SuperClassWriter::addVariable(areaId, NC_FLOAT, dim0); 215 SuperClassWriter::addAttribute("units", StdString("m2"), &areaId); 216 } 217 211 218 SuperClassWriter::definition_end(); 212 219 … … 224 231 break; 225 232 } 233 234 if (domain->hasArea) 235 SuperClassWriter::writeData(domain->area_srv, areaId, isCollective, 0); 236 226 237 SuperClassWriter::definition_start(); 227 238 … … 232 243 SuperClassWriter::addDimension(dimXid, domain->zoom_ni.getValue()); 233 244 SuperClassWriter::addDimension(dimYid, domain->zoom_nj.getValue()); 234 235 245 236 246 switch (domain->type) … … 253 263 break; 254 264 } 265 266 if (domain->hasArea) 267 { 268 dim0.clear(); 269 dim0.push_back(dimYid); dim0.push_back(dimXid); 270 SuperClassWriter::addVariable(areaId, NC_FLOAT, dim0); 271 SuperClassWriter::addAttribute("units", StdString("m2"), &areaId); 272 dim0.clear(); 273 } 274 255 275 this->writeAxisAttributes 256 276 (lonid, "X", "longitude", "Longitude", "degrees_east", domid); … … 258 278 (latid, "Y", "latitude", "Latitude", "degrees_north", domid); 259 279 260 261 280 SuperClassWriter::definition_end(); 281 262 282 switch (domain->type) 263 283 { … … 268 288 if (domain->isEmpty()) 269 289 { 270 start[0]=0 ; start 290 start[0]=0 ; start[1]=0 ; 271 291 count[0]=0 ; count[1]=0 ; 272 292 } … … 306 326 } 307 327 } 328 329 if (domain->hasArea) 330 { 331 std::vector<StdSize> start(2); 332 std::vector<StdSize> count(2); 333 334 if (domain->isEmpty()) 335 { 336 start[0] = 0; start[1] = 0; 337 count[0] = 0; count[1] = 0; 338 } 339 else 340 { 341 start[1] = domain->zoom_ibegin_srv - domain->zoom_ibegin.getValue(); 342 start[0] = domain->zoom_jbegin_srv - domain->zoom_jbegin.getValue(); 343 count[1] = domain->zoom_ni_srv; 344 count[0] = domain->zoom_nj_srv; 345 } 346 347 SuperClassWriter::writeData(domain->area_srv, areaId, isCollective, 0, &start, &count); 348 } 349 308 350 SuperClassWriter::definition_start(); 351 309 352 break; 310 353 } … … 349 392 350 393 string lonid,latid,bounds_lonid,bounds_latid ; 394 string areaId = "area" + appendDomid; 351 395 352 396 try … … 385 429 dim0.push_back(dimXid); 386 430 431 if (domain->hasArea) 432 { 433 SuperClassWriter::addVariable(areaId, NC_FLOAT, dim0); 434 SuperClassWriter::addAttribute("units", StdString("m2"), &areaId); 435 } 436 387 437 SuperClassWriter::definition_end(); 388 438 … … 395 445 SuperClassWriter::writeData(domain->bounds_lat_srv, bounds_latid, isCollective, 0); 396 446 } 447 448 if (domain->hasArea) 449 SuperClassWriter::writeData(domain->area_srv, areaId, isCollective, 0); 450 397 451 SuperClassWriter::definition_start(); 398 452 break ; … … 424 478 } 425 479 480 if (domain->hasArea) 481 { 482 dim0.clear(); 483 dim0.push_back(dimXid); 484 SuperClassWriter::addVariable(areaId, NC_FLOAT, dim0); 485 SuperClassWriter::addAttribute("units", StdString("m2"), &areaId); 486 } 487 426 488 SuperClassWriter::definition_end(); 427 489 … … 454 516 } 455 517 518 if (domain->hasArea) 519 SuperClassWriter::writeData(domain->area_srv, areaId, isCollective, 0, &start, &count); 456 520 457 521 SuperClassWriter::definition_start(); … … 740 804 SuperClassWriter::addAttribute("interval_write", duration.toString(), &fieldid); 741 805 } 806 807 if (domain->hasArea) 808 SuperClassWriter::addAttribute("cell_measures", "area: area" + appendDomid, &fieldid); 742 809 743 810 if (!field->default_value.isEmpty()) -
XIOS/trunk/src/config/domain_attribute.conf
r540 r611 60 60 DECLARE_ARRAY(double, 2, bounds_lon) 61 61 DECLARE_ARRAY(double, 2, bounds_lat) 62 DECLARE_ARRAY(double, 2, area) 62 63 63 64 DECLARE_ENUM3(type,regular,curvilinear,unstructured) -
XIOS/trunk/src/interface/c_attr/icdomain_attr.cpp
r591 r611 18 18 typedef xios::CDomain* domain_Ptr; 19 19 20 void cxios_set_domain_area(domain_Ptr domain_hdl, double* area, int extent1, int extent2) 21 { 22 CTimer::get("XIOS").resume(); 23 CArray<double,2> tmp(area, shape(extent1, extent2), neverDeleteData); 24 domain_hdl->area.reference(tmp.copy()); 25 CTimer::get("XIOS").suspend(); 26 } 27 28 void cxios_get_domain_area(domain_Ptr domain_hdl, double* area, int extent1, int extent2) 29 { 30 CTimer::get("XIOS").resume(); 31 CArray<double,2> tmp(area, shape(extent1, extent2), neverDeleteData); 32 tmp=domain_hdl->area.getInheritedValue(); 33 CTimer::get("XIOS").suspend(); 34 } 35 36 bool cxios_is_defined_domain_area(domain_Ptr domain_hdl) 37 { 38 CTimer::get("XIOS").resume(); 39 bool isDefined = domain_hdl->area.hasInheritedValue(); 40 CTimer::get("XIOS").suspend(); 41 return isDefined; 42 } 43 44 20 45 void cxios_set_domain_bounds_lat(domain_Ptr domain_hdl, double* bounds_lat, int extent1, int extent2) 21 46 { -
XIOS/trunk/src/interface/c_attr/icdomaingroup_attr.cpp
r591 r611 18 18 typedef xios::CDomainGroup* domaingroup_Ptr; 19 19 20 void cxios_set_domaingroup_area(domaingroup_Ptr domaingroup_hdl, double* area, int extent1, int extent2) 21 { 22 CTimer::get("XIOS").resume(); 23 CArray<double,2> tmp(area, shape(extent1, extent2), neverDeleteData); 24 domaingroup_hdl->area.reference(tmp.copy()); 25 CTimer::get("XIOS").suspend(); 26 } 27 28 void cxios_get_domaingroup_area(domaingroup_Ptr domaingroup_hdl, double* area, int extent1, int extent2) 29 { 30 CTimer::get("XIOS").resume(); 31 CArray<double,2> tmp(area, shape(extent1, extent2), neverDeleteData); 32 tmp=domaingroup_hdl->area.getInheritedValue(); 33 CTimer::get("XIOS").suspend(); 34 } 35 36 bool cxios_is_defined_domaingroup_area(domaingroup_Ptr domaingroup_hdl) 37 { 38 CTimer::get("XIOS").resume(); 39 bool isDefined = domaingroup_hdl->area.hasInheritedValue(); 40 CTimer::get("XIOS").suspend(); 41 return isDefined; 42 } 43 44 20 45 void cxios_set_domaingroup_bounds_lat(domaingroup_Ptr domaingroup_hdl, double* bounds_lat, int extent1, int extent2) 21 46 { -
XIOS/trunk/src/interface/fortran_attr/domain_interface_attr.F90
r581 r611 10 10 ! Do not call directly / interface FORTRAN 2003 <-> C99 11 11 12 SUBROUTINE cxios_set_domain_area(domain_hdl, area, extent1, extent2) BIND(C) 13 USE ISO_C_BINDING 14 INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl 15 REAL (KIND=C_DOUBLE) , DIMENSION(*) :: area 16 INTEGER (kind = C_INT), VALUE :: extent1 17 INTEGER (kind = C_INT), VALUE :: extent2 18 END SUBROUTINE cxios_set_domain_area 19 20 SUBROUTINE cxios_get_domain_area(domain_hdl, area, extent1, extent2) BIND(C) 21 USE ISO_C_BINDING 22 INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl 23 REAL (KIND=C_DOUBLE) , DIMENSION(*) :: area 24 INTEGER (kind = C_INT), VALUE :: extent1 25 INTEGER (kind = C_INT), VALUE :: extent2 26 END SUBROUTINE cxios_get_domain_area 27 28 FUNCTION cxios_is_defined_domain_area(domain_hdl) BIND(C) 29 USE ISO_C_BINDING 30 LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_area 31 INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl 32 END FUNCTION cxios_is_defined_domain_area 33 34 12 35 SUBROUTINE cxios_set_domain_bounds_lat(domain_hdl, bounds_lat, extent1, extent2) BIND(C) 13 36 USE ISO_C_BINDING -
XIOS/trunk/src/interface/fortran_attr/domaingroup_interface_attr.F90
r581 r611 10 10 ! Do not call directly / interface FORTRAN 2003 <-> C99 11 11 12 SUBROUTINE cxios_set_domaingroup_area(domaingroup_hdl, area, extent1, extent2) BIND(C) 13 USE ISO_C_BINDING 14 INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl 15 REAL (KIND=C_DOUBLE) , DIMENSION(*) :: area 16 INTEGER (kind = C_INT), VALUE :: extent1 17 INTEGER (kind = C_INT), VALUE :: extent2 18 END SUBROUTINE cxios_set_domaingroup_area 19 20 SUBROUTINE cxios_get_domaingroup_area(domaingroup_hdl, area, extent1, extent2) BIND(C) 21 USE ISO_C_BINDING 22 INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl 23 REAL (KIND=C_DOUBLE) , DIMENSION(*) :: area 24 INTEGER (kind = C_INT), VALUE :: extent1 25 INTEGER (kind = C_INT), VALUE :: extent2 26 END SUBROUTINE cxios_get_domaingroup_area 27 28 FUNCTION cxios_is_defined_domaingroup_area(domaingroup_hdl) BIND(C) 29 USE ISO_C_BINDING 30 LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_area 31 INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl 32 END FUNCTION cxios_is_defined_domaingroup_area 33 34 12 35 SUBROUTINE cxios_set_domaingroup_bounds_lat(domaingroup_hdl, bounds_lat, extent1, extent2) BIND(C) 13 36 USE ISO_C_BINDING -
XIOS/trunk/src/interface/fortran_attr/idomain_attr.F90
r581 r611 12 12 13 13 SUBROUTINE xios(set_domain_attr) & 14 ( domain_id, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&15 , data_ n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin, iend, j_index&16 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name&17 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj&18 , zoom_n j_loc )14 ( domain_id, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 15 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin & 16 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & 17 , nvertex, standard_name, type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni & 18 , zoom_ni_loc, zoom_nj, zoom_nj_loc ) 19 19 20 20 IMPLICIT NONE 21 21 TYPE(txios(domain)) :: domain_hdl 22 22 CHARACTER(LEN=*), INTENT(IN) ::domain_id 23 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area(:,:) 23 24 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat(:,:) 24 25 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon(:,:) … … 63 64 CALL xios(get_domain_handle)(domain_id,domain_hdl) 64 65 CALL xios(set_domain_attr_hdl_) & 65 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&66 , data_ n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin, iend, j_index&67 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name&68 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj&69 , zoom_n j_loc )66 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 67 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin & 68 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & 69 , nvertex, standard_name, type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni & 70 , zoom_ni_loc, zoom_nj, zoom_nj_loc ) 70 71 71 72 END SUBROUTINE xios(set_domain_attr) 72 73 73 74 SUBROUTINE xios(set_domain_attr_hdl) & 74 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&75 , data_ n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin, iend, j_index&76 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name&77 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj&78 , zoom_n j_loc )75 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 76 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin & 77 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & 78 , nvertex, standard_name, type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni & 79 , zoom_ni_loc, zoom_nj, zoom_nj_loc ) 79 80 80 81 IMPLICIT NONE 81 82 TYPE(txios(domain)) , INTENT(IN) :: domain_hdl 83 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area(:,:) 82 84 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat(:,:) 83 85 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon(:,:) … … 121 123 122 124 CALL xios(set_domain_attr_hdl_) & 123 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&124 , data_ n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin, iend, j_index&125 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name&126 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj&127 , zoom_n j_loc )125 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 126 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin & 127 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & 128 , nvertex, standard_name, type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni & 129 , zoom_ni_loc, zoom_nj, zoom_nj_loc ) 128 130 129 131 END SUBROUTINE xios(set_domain_attr_hdl) 130 132 131 133 SUBROUTINE xios(set_domain_attr_hdl_) & 132 ( domain_hdl, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ &134 ( domain_hdl, area_, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ & 133 135 , data_jbegin_, data_n_index_, data_ni_, data_nj_, domain_group_ref_, domain_ref_, i_index_ & 134 136 , ibegin_, iend_, j_index_, jbegin_, jend_, latvalue_, long_name_, lonvalue_, mask_, name_, ni_ & … … 138 140 IMPLICIT NONE 139 141 TYPE(txios(domain)) , INTENT(IN) :: domain_hdl 142 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area_(:,:) 140 143 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_(:,:) 141 144 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_(:,:) … … 178 181 INTEGER , OPTIONAL, INTENT(IN) :: zoom_nj_loc_ 179 182 183 IF (PRESENT(area_)) THEN 184 CALL cxios_set_domain_area(domain_hdl%daddr, area_, size(area_,1), size(area_,2)) 185 ENDIF 186 180 187 IF (PRESENT(bounds_lat_)) THEN 181 188 CALL cxios_set_domain_bounds_lat(domain_hdl%daddr, bounds_lat_, size(bounds_lat_,1), size(bounds_lat_,2)) … … 335 342 336 343 SUBROUTINE xios(get_domain_attr) & 337 ( domain_id, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&338 , data_ n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin, iend, j_index&339 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name&340 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj&341 , zoom_n j_loc )344 ( domain_id, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 345 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin & 346 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & 347 , nvertex, standard_name, type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni & 348 , zoom_ni_loc, zoom_nj, zoom_nj_loc ) 342 349 343 350 IMPLICIT NONE 344 351 TYPE(txios(domain)) :: domain_hdl 345 352 CHARACTER(LEN=*), INTENT(IN) ::domain_id 353 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area(:,:) 346 354 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat(:,:) 347 355 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon(:,:) … … 386 394 CALL xios(get_domain_handle)(domain_id,domain_hdl) 387 395 CALL xios(get_domain_attr_hdl_) & 388 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&389 , data_ n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin, iend, j_index&390 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name&391 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj&392 , zoom_n j_loc )396 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 397 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin & 398 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & 399 , nvertex, standard_name, type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni & 400 , zoom_ni_loc, zoom_nj, zoom_nj_loc ) 393 401 394 402 END SUBROUTINE xios(get_domain_attr) 395 403 396 404 SUBROUTINE xios(get_domain_attr_hdl) & 397 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&398 , data_ n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin, iend, j_index&399 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name&400 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj&401 , zoom_n j_loc )405 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 406 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin & 407 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & 408 , nvertex, standard_name, type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni & 409 , zoom_ni_loc, zoom_nj, zoom_nj_loc ) 402 410 403 411 IMPLICIT NONE 404 412 TYPE(txios(domain)) , INTENT(IN) :: domain_hdl 413 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area(:,:) 405 414 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat(:,:) 406 415 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon(:,:) … … 444 453 445 454 CALL xios(get_domain_attr_hdl_) & 446 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&447 , data_ n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin, iend, j_index&448 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name&449 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj&450 , zoom_n j_loc )455 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 456 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin & 457 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & 458 , nvertex, standard_name, type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni & 459 , zoom_ni_loc, zoom_nj, zoom_nj_loc ) 451 460 452 461 END SUBROUTINE xios(get_domain_attr_hdl) 453 462 454 463 SUBROUTINE xios(get_domain_attr_hdl_) & 455 ( domain_hdl, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ &464 ( domain_hdl, area_, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ & 456 465 , data_jbegin_, data_n_index_, data_ni_, data_nj_, domain_group_ref_, domain_ref_, i_index_ & 457 466 , ibegin_, iend_, j_index_, jbegin_, jend_, latvalue_, long_name_, lonvalue_, mask_, name_, ni_ & … … 461 470 IMPLICIT NONE 462 471 TYPE(txios(domain)) , INTENT(IN) :: domain_hdl 472 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area_(:,:) 463 473 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_(:,:) 464 474 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_(:,:) … … 501 511 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_nj_loc_ 502 512 513 IF (PRESENT(area_)) THEN 514 CALL cxios_get_domain_area(domain_hdl%daddr, area_, size(area_,1), size(area_,2)) 515 ENDIF 516 503 517 IF (PRESENT(bounds_lat_)) THEN 504 518 CALL cxios_get_domain_bounds_lat(domain_hdl%daddr, bounds_lat_, size(bounds_lat_,1), size(bounds_lat_,2)) … … 658 672 659 673 SUBROUTINE xios(is_defined_domain_attr) & 660 ( domain_id, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&661 , data_ n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin, iend, j_index&662 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name&663 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj&664 , zoom_n j_loc )674 ( domain_id, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 675 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin & 676 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & 677 , nvertex, standard_name, type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni & 678 , zoom_ni_loc, zoom_nj, zoom_nj_loc ) 665 679 666 680 IMPLICIT NONE 667 681 TYPE(txios(domain)) :: domain_hdl 668 682 CHARACTER(LEN=*), INTENT(IN) ::domain_id 683 LOGICAL, OPTIONAL, INTENT(OUT) :: area 684 LOGICAL(KIND=C_BOOL) :: area_tmp 669 685 LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat 670 686 LOGICAL(KIND=C_BOOL) :: bounds_lat_tmp … … 746 762 CALL xios(get_domain_handle)(domain_id,domain_hdl) 747 763 CALL xios(is_defined_domain_attr_hdl_) & 748 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&749 , data_ n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin, iend, j_index&750 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name&751 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj&752 , zoom_n j_loc )764 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 765 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin & 766 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & 767 , nvertex, standard_name, type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni & 768 , zoom_ni_loc, zoom_nj, zoom_nj_loc ) 753 769 754 770 END SUBROUTINE xios(is_defined_domain_attr) 755 771 756 772 SUBROUTINE xios(is_defined_domain_attr_hdl) & 757 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&758 , data_ n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin, iend, j_index&759 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name&760 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj&761 , zoom_n j_loc )773 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 774 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin & 775 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & 776 , nvertex, standard_name, type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni & 777 , zoom_ni_loc, zoom_nj, zoom_nj_loc ) 762 778 763 779 IMPLICIT NONE 764 780 TYPE(txios(domain)) , INTENT(IN) :: domain_hdl 781 LOGICAL, OPTIONAL, INTENT(OUT) :: area 782 LOGICAL(KIND=C_BOOL) :: area_tmp 765 783 LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat 766 784 LOGICAL(KIND=C_BOOL) :: bounds_lat_tmp … … 841 859 842 860 CALL xios(is_defined_domain_attr_hdl_) & 843 ( domain_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin&844 , data_ n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin, iend, j_index&845 , jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo, nvertex, standard_name&846 , type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni, zoom_ni_loc, zoom_nj&847 , zoom_n j_loc )861 ( domain_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 862 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, i_index, ibegin & 863 , iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo, nj, nj_glo & 864 , nvertex, standard_name, type, zoom_ibegin, zoom_ibegin_loc, zoom_jbegin, zoom_jbegin_loc, zoom_ni & 865 , zoom_ni_loc, zoom_nj, zoom_nj_loc ) 848 866 849 867 END SUBROUTINE xios(is_defined_domain_attr_hdl) 850 868 851 869 SUBROUTINE xios(is_defined_domain_attr_hdl_) & 852 ( domain_hdl, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ &870 ( domain_hdl, area_, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ & 853 871 , data_jbegin_, data_n_index_, data_ni_, data_nj_, domain_group_ref_, domain_ref_, i_index_ & 854 872 , ibegin_, iend_, j_index_, jbegin_, jend_, latvalue_, long_name_, lonvalue_, mask_, name_, ni_ & … … 858 876 IMPLICIT NONE 859 877 TYPE(txios(domain)) , INTENT(IN) :: domain_hdl 878 LOGICAL, OPTIONAL, INTENT(OUT) :: area_ 879 LOGICAL(KIND=C_BOOL) :: area__tmp 860 880 LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_ 861 881 LOGICAL(KIND=C_BOOL) :: bounds_lat__tmp … … 935 955 LOGICAL(KIND=C_BOOL) :: zoom_nj_loc__tmp 936 956 957 IF (PRESENT(area_)) THEN 958 area__tmp = cxios_is_defined_domain_area(domain_hdl%daddr) 959 area_ = area__tmp 960 ENDIF 961 937 962 IF (PRESENT(bounds_lat_)) THEN 938 963 bounds_lat__tmp = cxios_is_defined_domain_bounds_lat(domain_hdl%daddr) -
XIOS/trunk/src/interface/fortran_attr/idomaingroup_attr.F90
r581 r611 12 12 13 13 SUBROUTINE xios(set_domaingroup_attr) & 14 ( domaingroup_id, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &14 ( domaingroup_id, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 15 15 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, group_ref, i_index & 16 16 , ibegin, iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo & … … 21 21 TYPE(txios(domaingroup)) :: domaingroup_hdl 22 22 CHARACTER(LEN=*), INTENT(IN) ::domaingroup_id 23 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area(:,:) 23 24 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat(:,:) 24 25 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon(:,:) … … 64 65 CALL xios(get_domaingroup_handle)(domaingroup_id,domaingroup_hdl) 65 66 CALL xios(set_domaingroup_attr_hdl_) & 66 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &67 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 67 68 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, group_ref, i_index & 68 69 , ibegin, iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo & … … 73 74 74 75 SUBROUTINE xios(set_domaingroup_attr_hdl) & 75 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &76 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 76 77 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, group_ref, i_index & 77 78 , ibegin, iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo & … … 81 82 IMPLICIT NONE 82 83 TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl 84 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area(:,:) 83 85 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat(:,:) 84 86 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon(:,:) … … 123 125 124 126 CALL xios(set_domaingroup_attr_hdl_) & 125 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &127 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 126 128 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, group_ref, i_index & 127 129 , ibegin, iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo & … … 132 134 133 135 SUBROUTINE xios(set_domaingroup_attr_hdl_) & 134 ( domaingroup_hdl, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ &136 ( domaingroup_hdl, area_, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ & 135 137 , data_jbegin_, data_n_index_, data_ni_, data_nj_, domain_group_ref_, domain_ref_, group_ref_ & 136 138 , i_index_, ibegin_, iend_, j_index_, jbegin_, jend_, latvalue_, long_name_, lonvalue_, mask_ & … … 140 142 IMPLICIT NONE 141 143 TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl 144 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area_(:,:) 142 145 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_(:,:) 143 146 REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_(:,:) … … 181 184 INTEGER , OPTIONAL, INTENT(IN) :: zoom_nj_loc_ 182 185 186 IF (PRESENT(area_)) THEN 187 CALL cxios_set_domaingroup_area(domaingroup_hdl%daddr, area_, size(area_,1), size(area_,2)) 188 ENDIF 189 183 190 IF (PRESENT(bounds_lat_)) THEN 184 191 CALL cxios_set_domaingroup_bounds_lat(domaingroup_hdl%daddr, bounds_lat_, size(bounds_lat_,1), size(bounds_lat_,2)) … … 342 349 343 350 SUBROUTINE xios(get_domaingroup_attr) & 344 ( domaingroup_id, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &351 ( domaingroup_id, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 345 352 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, group_ref, i_index & 346 353 , ibegin, iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo & … … 351 358 TYPE(txios(domaingroup)) :: domaingroup_hdl 352 359 CHARACTER(LEN=*), INTENT(IN) ::domaingroup_id 360 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area(:,:) 353 361 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat(:,:) 354 362 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon(:,:) … … 394 402 CALL xios(get_domaingroup_handle)(domaingroup_id,domaingroup_hdl) 395 403 CALL xios(get_domaingroup_attr_hdl_) & 396 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &404 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 397 405 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, group_ref, i_index & 398 406 , ibegin, iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo & … … 403 411 404 412 SUBROUTINE xios(get_domaingroup_attr_hdl) & 405 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &413 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 406 414 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, group_ref, i_index & 407 415 , ibegin, iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo & … … 411 419 IMPLICIT NONE 412 420 TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl 421 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area(:,:) 413 422 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat(:,:) 414 423 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon(:,:) … … 453 462 454 463 CALL xios(get_domaingroup_attr_hdl_) & 455 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &464 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 456 465 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, group_ref, i_index & 457 466 , ibegin, iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo & … … 462 471 463 472 SUBROUTINE xios(get_domaingroup_attr_hdl_) & 464 ( domaingroup_hdl, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ &473 ( domaingroup_hdl, area_, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ & 465 474 , data_jbegin_, data_n_index_, data_ni_, data_nj_, domain_group_ref_, domain_ref_, group_ref_ & 466 475 , i_index_, ibegin_, iend_, j_index_, jbegin_, jend_, latvalue_, long_name_, lonvalue_, mask_ & … … 470 479 IMPLICIT NONE 471 480 TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl 481 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area_(:,:) 472 482 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_(:,:) 473 483 REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_(:,:) … … 511 521 INTEGER , OPTIONAL, INTENT(OUT) :: zoom_nj_loc_ 512 522 523 IF (PRESENT(area_)) THEN 524 CALL cxios_get_domaingroup_area(domaingroup_hdl%daddr, area_, size(area_,1), size(area_,2)) 525 ENDIF 526 513 527 IF (PRESENT(bounds_lat_)) THEN 514 528 CALL cxios_get_domaingroup_bounds_lat(domaingroup_hdl%daddr, bounds_lat_, size(bounds_lat_,1), size(bounds_lat_,2)) … … 672 686 673 687 SUBROUTINE xios(is_defined_domaingroup_attr) & 674 ( domaingroup_id, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &688 ( domaingroup_id, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 675 689 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, group_ref, i_index & 676 690 , ibegin, iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo & … … 681 695 TYPE(txios(domaingroup)) :: domaingroup_hdl 682 696 CHARACTER(LEN=*), INTENT(IN) ::domaingroup_id 697 LOGICAL, OPTIONAL, INTENT(OUT) :: area 698 LOGICAL(KIND=C_BOOL) :: area_tmp 683 699 LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat 684 700 LOGICAL(KIND=C_BOOL) :: bounds_lat_tmp … … 762 778 CALL xios(get_domaingroup_handle)(domaingroup_id,domaingroup_hdl) 763 779 CALL xios(is_defined_domaingroup_attr_hdl_) & 764 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &780 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 765 781 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, group_ref, i_index & 766 782 , ibegin, iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo & … … 771 787 772 788 SUBROUTINE xios(is_defined_domaingroup_attr_hdl) & 773 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &789 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 774 790 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, group_ref, i_index & 775 791 , ibegin, iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo & … … 779 795 IMPLICIT NONE 780 796 TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl 797 LOGICAL, OPTIONAL, INTENT(OUT) :: area 798 LOGICAL(KIND=C_BOOL) :: area_tmp 781 799 LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat 782 800 LOGICAL(KIND=C_BOOL) :: bounds_lat_tmp … … 859 877 860 878 CALL xios(is_defined_domaingroup_attr_hdl_) & 861 ( domaingroup_hdl, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index &879 ( domaingroup_hdl, area, bounds_lat, bounds_lon, data_dim, data_i_index, data_ibegin, data_j_index & 862 880 , data_jbegin, data_n_index, data_ni, data_nj, domain_group_ref, domain_ref, group_ref, i_index & 863 881 , ibegin, iend, j_index, jbegin, jend, latvalue, long_name, lonvalue, mask, name, ni, ni_glo & … … 868 886 869 887 SUBROUTINE xios(is_defined_domaingroup_attr_hdl_) & 870 ( domaingroup_hdl, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ &888 ( domaingroup_hdl, area_, bounds_lat_, bounds_lon_, data_dim_, data_i_index_, data_ibegin_, data_j_index_ & 871 889 , data_jbegin_, data_n_index_, data_ni_, data_nj_, domain_group_ref_, domain_ref_, group_ref_ & 872 890 , i_index_, ibegin_, iend_, j_index_, jbegin_, jend_, latvalue_, long_name_, lonvalue_, mask_ & … … 876 894 IMPLICIT NONE 877 895 TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl 896 LOGICAL, OPTIONAL, INTENT(OUT) :: area_ 897 LOGICAL(KIND=C_BOOL) :: area__tmp 878 898 LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_ 879 899 LOGICAL(KIND=C_BOOL) :: bounds_lat__tmp … … 955 975 LOGICAL(KIND=C_BOOL) :: zoom_nj_loc__tmp 956 976 977 IF (PRESENT(area_)) THEN 978 area__tmp = cxios_is_defined_domaingroup_area(domaingroup_hdl%daddr) 979 area_ = area__tmp 980 ENDIF 981 957 982 IF (PRESENT(bounds_lat_)) THEN 958 983 bounds_lat__tmp = cxios_is_defined_domaingroup_bounds_lat(domaingroup_hdl%daddr) -
XIOS/trunk/src/node/domain.cpp
r610 r611 24 24 : CObjectTemplate<CDomain>(), CDomainAttributes() 25 25 , isChecked(false), relFiles(), isClientChecked(false), nbConnectedClients_(), indSrv_(), connectedServerRank_() 26 , isDistributed_(false)26 , hasBounds(false), hasArea(false), isDistributed_(false) 27 27 { /* Ne rien faire de plus */ } 28 28 … … 30 30 : CObjectTemplate<CDomain>(id), CDomainAttributes() 31 31 , isChecked(false), relFiles(), isClientChecked(false), nbConnectedClients_(), indSrv_(), connectedServerRank_() 32 , isDistributed_(false)32 , hasBounds(false), hasArea(false), isDistributed_(false) 33 33 { /* Ne rien faire de plus */ } 34 34 … … 119 119 for(int j=0;j<nj;j++) mask(0,j)=mask_tmp(j,0) ; 120 120 } 121 122 if (!area.isEmpty()) 123 area.transposeSelf(1, 0); 124 121 125 ni=1 ; 122 126 ibegin=0 ; … … 553 557 { 554 558 hasBounds=true ; 555 556 559 } 557 560 else … … 562 565 } 563 566 567 void CDomain::checkArea(void) 568 { 569 hasArea = !area.isEmpty(); 570 if (hasArea) 571 { 572 if (area.extent(0) != ni || area.extent(1) != nj) 573 { 574 ERROR("void CDomain::checkArea(void)", 575 "The area attribute must be of size ni x nj."); 576 } 577 } 578 } 579 564 580 //---------------------------------------------------------------- 565 581 // Divide function checkAttributes into 2 seperate ones … … 573 589 this->checkZoom(); 574 590 this->checkBounds(); 591 this->checkArea(); 575 592 576 593 if (context->hasClient) … … 601 618 { 602 619 sendServerAttribut() ; 603 sendLonLat () ;620 sendLonLatArea() ; 604 621 } 605 622 … … 615 632 this->checkZoom(); 616 633 this->checkBounds(); 634 this->checkArea(); 617 635 618 636 if (context->hasClient) … … 633 651 computeConnectedServer() ; 634 652 sendServerAttribut() ; 635 sendLonLat () ;653 sendLonLatArea() ; 636 654 } 637 655 … … 790 808 } 791 809 792 void CDomain::sendLonLat (void)810 void CDomain::sendLonLatArea(void) 793 811 { 794 812 int ns, n, i, j, ind, nv, idx; … … 800 818 CEventClient eventLon(getType(), EVENT_ID_LON); 801 819 CEventClient eventLat(getType(), EVENT_ID_LAT); 802 803 list<CMessage> list_msgsIndex, list_msgsLon, list_msgsLat; 820 CEventClient eventArea(getType(), EVENT_ID_AREA); 821 822 list<CMessage> list_msgsIndex, list_msgsLon, list_msgsLat, list_msgsArea; 804 823 list<CArray<int,1> > list_indi, list_indj; 805 824 list<CArray<double,1> > list_lon, list_lat; 806 825 list<CArray<double,2> > list_boundslon, list_boundslat; 826 list<CArray<double,1> > list_area; 807 827 808 828 std::map<int, std::vector<size_t> >::const_iterator it, iteMap; … … 826 846 list_boundslat.push_back(CArray<double,2>(nvertex, nbData)); 827 847 } 848 if (hasArea) 849 list_area.push_back(CArray<double,1>(nbData)); 828 850 829 851 CArray<int,1>& indi = list_indi.back(); … … 856 878 indi(n) = ibegin + i_index(i - ibegin, j - jbegin); 857 879 indj(n) = jbegin + j_index(i - ibegin, j - jbegin); 880 881 if (hasArea) 882 list_area.back()(n) = area(i - ibegin, j - jbegin); 858 883 } 859 884 … … 879 904 eventLon.push(rank, nbConnectedClients_[rank], list_msgsLon.back()); 880 905 eventLat.push(rank, nbConnectedClients_[rank], list_msgsLat.back()); 906 907 if (hasArea) 908 { 909 list_msgsArea.push_back(CMessage()); 910 list_msgsArea.back() << this->getId() << list_area.back(); 911 eventArea.push(rank, nbConnectedClients_[rank], list_msgsArea.back()); 912 } 881 913 } 882 914 … … 884 916 client->sendEvent(eventLon); 885 917 client->sendEvent(eventLat); 918 if (hasArea) 919 client->sendEvent(eventArea); 886 920 } 887 921 … … 909 943 return true; 910 944 break; 945 case EVENT_ID_AREA: 946 recvArea(event); 947 return true; 948 break; 911 949 default: 912 950 ERROR("bool CContext::dispatchEvent(CEventServer& event)", … … 956 994 bounds_lat_srv = 0. ; 957 995 } 996 997 if (hasArea) 998 area_srv.resize(zoom_ni_srv * zoom_nj_srv); 958 999 } 959 1000 … … 1047 1088 } 1048 1089 1090 void CDomain::recvArea(CEventServer& event) 1091 { 1092 list<CEventServer::SSubEvent>::iterator it; 1093 for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it) 1094 { 1095 CBufferIn* buffer = it->buffer; 1096 string domainId; 1097 *buffer >> domainId; 1098 get(domainId)->recvArea(it->rank, *buffer); 1099 } 1100 } 1101 1102 void CDomain::recvArea(int rank, CBufferIn& buffer) 1103 { 1104 CArray<int,1> &indi = indiSrv[rank], &indj = indjSrv[rank]; 1105 CArray<double,1> clientArea; 1106 1107 buffer >> clientArea; 1108 1109 int i, j, ind_srv; 1110 for (int ind = 0; ind < indi.numElements(); ind++) 1111 { 1112 i = indi(ind); j = indj(ind); 1113 ind_srv = (i - zoom_ibegin_srv) + (j - zoom_jbegin_srv) * zoom_ni_srv; 1114 area_srv(ind_srv) = clientArea(ind); 1115 } 1116 } 1117 1049 1118 //---------------------------------------------------------------- 1050 1119 -
XIOS/trunk/src/node/domain.hpp
r610 r611 38 38 enum EEventId 39 39 { 40 EVENT_ID_SERVER_ATTRIBUT, EVENT_ID_INDEX, EVENT_ID_LON, EVENT_ID_LAT 40 EVENT_ID_SERVER_ATTRIBUT, EVENT_ID_INDEX, EVENT_ID_LON, EVENT_ID_LAT, EVENT_ID_AREA 41 41 } ; 42 42 … … 76 76 void checkZoom(void); 77 77 void checkBounds(void); 78 void checkArea(void); 78 79 79 80 … … 106 107 CArray<double, 1> lonvalue_srv, latvalue_srv ; 107 108 CArray<double, 2> bounds_lon_srv, bounds_lat_srv ; 109 CArray<double, 1> area_srv; 108 110 109 111 … … 127 129 void completeLonLatClient(void); 128 130 void sendServerAttribut(void) ; 129 void sendLonLat (void);131 void sendLonLatArea(void); 130 132 void computeConnectedServer(void) ; 133 131 134 static bool dispatchEvent(CEventServer& event); 132 135 static void recvServerAttribut(CEventServer& event); … … 134 137 static void recvLon(CEventServer& event); 135 138 static void recvLat(CEventServer& event); 139 static void recvArea(CEventServer& event); 136 140 void recvServerAttribut(CBufferIn& buffer); 137 141 void recvIndex(int rank, CBufferIn& buffer); 138 142 void recvLon(int rank, CBufferIn& buffer); 139 143 void recvLat(int rank, CBufferIn& buffer); 144 void recvArea(int rank, CBufferIn& buffer); 140 145 141 146 /// Destructeur /// … … 151 156 bool isCurvilinear ; 152 157 bool hasBounds ; 158 bool hasArea; 153 159 private : 154 160 -
XIOS/trunk/src/output/nc4_data_output.cpp
r609 r611 99 99 100 100 string lonid,latid,bounds_lonid,bounds_latid ; 101 string areaId = "area" + appendDomid; 101 102 /* 102 103 StdString lonid_loc = (server->intraCommSize > 1) … … 118 119 if (server->intraCommSize > 1) 119 120 { 120 121 121 // SuperClassWriter::addDimension(lonid, domain->zoom_ni.getValue()); 122 122 // SuperClassWriter::addDimension(latid, domain->zoom_nj.getValue()); … … 211 211 //SuperClassWriter::setDefaultValue(maskid, &dvm); 212 212 213 if (domain->hasArea) 214 { 215 SuperClassWriter::addVariable(areaId, NC_FLOAT, dim0); 216 SuperClassWriter::addAttribute("units", StdString("m2"), &areaId); 217 } 218 213 219 SuperClassWriter::definition_end(); 214 220 … … 226 232 break; 227 233 } 234 235 if (domain->hasArea) 236 SuperClassWriter::writeData(domain->area_srv, areaId, isCollective, 0); 237 228 238 SuperClassWriter::definition_start(); 229 239 … … 234 244 SuperClassWriter::addDimension(dimXid, domain->zoom_ni.getValue()); 235 245 SuperClassWriter::addDimension(dimYid, domain->zoom_nj.getValue()); 236 237 246 238 247 switch (domain->type) … … 255 264 break; 256 265 } 266 267 if (domain->hasArea) 268 { 269 dim0.clear(); 270 dim0.push_back(dimYid); dim0.push_back(dimXid); 271 SuperClassWriter::addVariable(areaId, NC_FLOAT, dim0); 272 SuperClassWriter::addAttribute("units", StdString("m2"), &areaId); 273 dim0.clear(); 274 } 275 257 276 this->writeAxisAttributes 258 277 (lonid, "X", "longitude", "Longitude", "degrees_east", domid); … … 260 279 (latid, "Y", "latitude", "Latitude", "degrees_north", domid); 261 280 262 263 281 SuperClassWriter::definition_end(); 282 264 283 switch (domain->type) 265 284 { … … 270 289 if (domain->isEmpty()) 271 290 { 272 start[0]=0 ; start 291 start[0]=0 ; start[1]=0 ; 273 292 count[0]=0 ; count[1]=0 ; 274 293 } … … 308 327 } 309 328 } 329 330 if (domain->hasArea) 331 { 332 std::vector<StdSize> start(2); 333 std::vector<StdSize> count(2); 334 335 if (domain->isEmpty()) 336 { 337 start[0] = 0; start[1] = 0; 338 count[0] = 0; count[1] = 0; 339 } 340 else 341 { 342 start[1] = domain->zoom_ibegin_srv - domain->zoom_ibegin.getValue(); 343 start[0] = domain->zoom_jbegin_srv - domain->zoom_jbegin.getValue(); 344 count[1] = domain->zoom_ni_srv; 345 count[0] = domain->zoom_nj_srv; 346 } 347 348 SuperClassWriter::writeData(domain->area_srv, areaId, isCollective, 0, &start, &count); 349 } 350 310 351 SuperClassWriter::definition_start(); 311 352 break; … … 351 392 352 393 string lonid,latid,bounds_lonid,bounds_latid ; 394 string areaId = "area" + appendDomid; 353 395 354 396 try … … 387 429 dim0.push_back(dimXid); 388 430 431 if (domain->hasArea) 432 { 433 SuperClassWriter::addVariable(areaId, NC_FLOAT, dim0); 434 SuperClassWriter::addAttribute("units", StdString("m2"), &areaId); 435 } 436 389 437 SuperClassWriter::definition_end(); 390 438 … … 397 445 SuperClassWriter::writeData(domain->bounds_lat_srv, bounds_latid, isCollective, 0); 398 446 } 447 448 if (domain->hasArea) 449 SuperClassWriter::writeData(domain->area_srv, areaId, isCollective, 0); 450 399 451 SuperClassWriter::definition_start(); 400 452 break ; … … 426 478 } 427 479 480 if (domain->hasArea) 481 { 482 dim0.clear(); 483 dim0.push_back(dimXid); 484 SuperClassWriter::addVariable(areaId, NC_FLOAT, dim0); 485 SuperClassWriter::addAttribute("units", StdString("m2"), &areaId); 486 } 487 428 488 SuperClassWriter::definition_end(); 429 489 … … 456 516 } 457 517 518 if (domain->hasArea) 519 SuperClassWriter::writeData(domain->area_srv, areaId, isCollective, 0, &start, &count); 458 520 459 521 SuperClassWriter::definition_start(); … … 607 669 StdString dimXid,dimYid; 608 670 std::deque<StdString> dimIdList, dimCoordList; 671 bool hasArea = false; 672 StdString cellMeasures = "area:"; 609 673 610 674 for (int i = 0; i < numElement; ++i) … … 639 703 break ; 640 704 } 705 if (domain->hasArea) 706 { 707 hasArea = true; 708 cellMeasures += " area" + appendDomid; 709 } 641 710 ++idxDomain; 642 711 } … … 754 823 SuperClassWriter::addAttribute("interval_write", duration.toString(), &fieldid); 755 824 } 825 826 if (hasArea) 827 SuperClassWriter::addAttribute("cell_measures", cellMeasures, &fieldid); 756 828 757 829 if (!field->default_value.isEmpty())
Note: See TracChangeset
for help on using the changeset viewer.