Changeset 3900 for dynamico_lmdz/aquaplanet/LMDZ5
- Timestamp:
- Feb 2, 2016, 10:21:39 AM (9 years ago)
- Location:
- dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/geometry_mod.f90
r3825 r3900 29 29 !$OMP THREADPRIVATE(cell_area) 30 30 31 INTEGER,SAVE,ALLOCATABLE :: ind_cell_glo(:) ! global indice of a local cell 32 !$OMP THREADPRIVATE(ind_cell_glo) 31 33 32 34 CONTAINS 33 35 34 SUBROUTINE init_geometry(longitude_, latitude_, boundslon_, boundslat_, cell_area_, dx_, dy_)36 SUBROUTINE init_geometry(longitude_, latitude_, boundslon_, boundslat_, cell_area_,ind_cell_glo_, dx_, dy_) 35 37 USE dimphy, ONLY: klon 36 38 USE mod_grid_phy_lmdz, ONLY: nvertex … … 42 44 REAL :: boundslat_(klon,nvertex) 43 45 REAL :: cell_area_(klon) 46 INTEGER :: ind_cell_glo_(klon) 44 47 REAL,OPTIONAL :: dx_(klon) 45 48 REAL,OPTIONAL :: dy_(klon) … … 52 55 ALLOCATE(boundslat(klon,nvertex)) 53 56 ALLOCATE(cell_area(klon)) 57 ALLOCATE(ind_cell_glo(klon)) 54 58 IF (PRESENT(dx_)) ALLOCATE(dx(klon)) 55 59 IF (PRESENT(dy_))ALLOCATE(dy(klon)) … … 62 66 boundslat(:,:) = boundslat_(:,:) 63 67 cell_area(:) = cell_area_(:) 68 ind_cell_glo(:) = ind_cell_glo_(:) 64 69 IF (PRESENT(dx_)) dx(:) = dx_(:) 65 70 IF (PRESENT(dy_)) dy(:) = dy_(:) -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/iostart.F90
r3814 r3900 129 129 USE netcdf 130 130 USE dimphy 131 USE geometry_mod 131 132 USE mod_grid_phy_lmdz 132 133 USE mod_phys_lmdz_para … … 138 139 139 140 REAL :: field_glo(klon_glo,field_size) 141 REAL :: field_glo_tmp(klon_glo,field_size) 142 INTEGER :: ind_cell_glo_glo(klon_glo) 140 143 LOGICAL :: tmp_found 141 144 INTEGER :: varid 142 INTEGER :: ierr 143 144 IF (is_mpi_root .AND. is_omp_root) THEN 145 INTEGER :: ierr,i 146 147 ! IF (is_master) ALLOCATE(ind_cell_glo_glo(1:klon_glo)) 148 CALL gather(ind_cell_glo,ind_cell_glo_glo) 149 150 IF (is_master) THEN 145 151 146 152 ierr=NF90_INQ_VARID(nid_start,Field_name,varid) 147 153 148 154 IF (ierr==NF90_NOERR) THEN 149 CALL body(field_glo )155 CALL body(field_glo_tmp) 150 156 tmp_found=.TRUE. 151 157 ELSE … … 158 164 159 165 IF (tmp_found) THEN 166 IF (is_master) THEN 167 DO i=1,klon_glo 168 field_glo(i,:)=field_glo_tmp(ind_cell_glo_glo(i),:) 169 ENDDO 170 ENDIF 160 171 CALL scatter(field_glo,field) 161 172 ENDIF … … 384 395 USE netcdf 385 396 USE dimphy 397 USE geometry_mod 386 398 USE mod_grid_phy_lmdz 387 399 USE mod_phys_lmdz_para … … 393 405 394 406 REAL :: field_glo(klon_glo,field_size) 395 INTEGER :: ierr 407 REAL :: field_glo_tmp(klon_glo,field_size) 408 INTEGER,ALLOCATABLE :: ind_cell_glo_glo(:) 409 INTEGER :: ierr,i 396 410 INTEGER :: nvarid 397 411 INTEGER :: idim 398 412 399 413 400 CALL gather(field,field_glo) 401 402 IF (is_mpi_root .AND. is_omp_root) THEN 414 IF (is_master) ALLOCATE(ind_cell_glo_glo(klon_glo)) 415 CALL gather(ind_cell_glo,ind_cell_glo_glo) 416 417 CALL gather(field,field_glo_tmp) 418 419 IF (is_master) THEN 420 421 DO i=1,klon_glo 422 field_glo(ind_cell_glo_glo(i),:)=field_glo_tmp(i,:) 423 ENDDO 424 403 425 404 426 IF (field_size==1) THEN -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/wxios.F90
r3882 r3900 314 314 315 315 SUBROUTINE wxios_domain_param_unstructured 316 USE geometry_mod, ONLY : longitude, latitude, boundslon, boundslat 316 USE geometry_mod, ONLY : longitude, latitude, boundslon, boundslat,ind_cell_glo 317 317 USE mod_grid_phy_lmdz, ONLY : nvertex, klon_glo 318 318 USE mod_phys_lmdz_para … … 323 323 REAL :: boundslon_mpi(klon_mpi,nvertex) 324 324 REAL :: boundslat_mpi(klon_mpi,nvertex) 325 INTEGER :: ind_cell_glo_mpi(klon_mpi) 325 326 TYPE(xios_domaingroup) :: dom 326 327 … … 330 331 CALL gather_omp(boundslon*180/PI,boundslon_mpi) 331 332 CALL gather_omp(boundslat*180/PI,boundslat_mpi) 333 CALL gather_omp(ind_cell_glo,ind_cell_glo_mpi) 334 332 335 333 336 !$OMP MASTER … … 336 339 !On parametrise le domaine: 337 340 CALL xios_set_attr(dom, ni_glo=klon_glo, ibegin=ij_begin-1, ni=ij_nb, type="unstructured") 338 CALL xios_set_attr(dom, nvertex=nvertex, lonvalue_1d=lon_mpi, latvalue_1d=lat_mpi, bounds_lon_1d=TRANSPOSE(boundslon_mpi), bounds_lat_1d=TRANSPOSE(boundslat_mpi) ) 341 CALL xios_set_attr(dom, nvertex=nvertex, lonvalue_1d=lon_mpi, latvalue_1d=lat_mpi, & 342 bounds_lon_1d=TRANSPOSE(boundslon_mpi), bounds_lat_1d=TRANSPOSE(boundslat_mpi) ) 343 CALL xios_set_attr(dom, i_index=ind_cell_glo_mpi(:)-1) 339 344 !$OMP END MASTER 340 345
Note: See TracChangeset
for help on using the changeset viewer.