Changeset 3605 for LMDZ6/branches/Ocean_skin/libf/phylmd/oasis.F90
- Timestamp:
- Nov 21, 2019, 4:43:45 PM (5 years ago)
- Location:
- LMDZ6/branches/Ocean_skin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Ocean_skin
-
LMDZ6/branches/Ocean_skin/libf/phylmd/oasis.F90
r3102 r3605 104 104 #ifdef CPP_XIOS 105 105 USE wxios, ONLY : wxios_context_init 106 USE xios 106 107 #endif 107 108 USE print_control_mod, ONLY: lunout 108 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat 109 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, grid_type, unstructured, regular_lonlat 110 USE geometry_mod, ONLY: ind_cell_glo 111 USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi_para_nb 112 113 109 114 110 115 ! Local variables … … 113 118 INTEGER :: ierror, il_commlocal 114 119 INTEGER :: il_part_id 115 INTEGER, DIMENSION(3) :: ig_paral120 INTEGER, ALLOCATABLE :: ig_paral(:) 116 121 INTEGER, DIMENSION(2) :: il_var_nodims 117 122 INTEGER, DIMENSION(4) :: il_var_actual_shape … … 136 141 ! Define the model name 137 142 ! 138 clmodnam = 'LMDZ' ! as in $NBMODEL in Cpl/Nam/namcouple.tmp 143 IF (grid_type==unstructured) THEN 144 clmodnam = 'icosa' ! as in $NBMODEL in Cpl/Nam/namcouple.tmp 145 ELSE IF (grid_type==regular_lonlat) THEN 146 clmodnam = 'LMDZ' ! as in $NBMODEL in Cpl/Nam/namcouple.tmp 147 ELSE 148 abort_message='Pb : type of grid unknown' 149 CALL abort_physic(modname,abort_message,1) 150 ENDIF 139 151 140 152 … … 236 248 ! Domain decomposition 237 249 !************************************************************************************ 238 ig_paral(1) = 1 ! apple partition for // 239 ig_paral(2) = (jj_begin-1)*nbp_lon+ii_begin-1 ! offset 240 ig_paral(3) = (jj_end*nbp_lon+ii_end) - (jj_begin*nbp_lon+ii_begin) + 1 241 242 IF (mpi_rank==mpi_size-1) ig_paral(3)=ig_paral(3)+nbp_lon-1 250 IF (grid_type==unstructured) THEN 251 252 ALLOCATE( ig_paral(klon_mpi_para_nb(mpi_rank) + 2) ) 253 254 ig_paral(1) = 4 ! points partition for // 255 ig_paral(2) = klon_mpi_para_nb(mpi_rank) ! nb of local cells 256 257 DO jf=1, klon_mpi_para_nb(mpi_rank) 258 ig_paral(2+jf) = ind_cell_glo(jf) 259 ENDDO 260 261 ELSE IF (grid_type==regular_lonlat) THEN 262 263 ALLOCATE( ig_paral(3) ) 264 265 ig_paral(1) = 1 ! apple partition for // 266 ig_paral(2) = (jj_begin-1)*nbp_lon+ii_begin-1 ! offset 267 ig_paral(3) = (jj_end*nbp_lon+ii_end) - (jj_begin*nbp_lon+ii_begin) + 1 268 269 IF (mpi_rank==mpi_size-1) ig_paral(3)=ig_paral(3)+nbp_lon-1 270 ELSE 271 abort_message='Pb : type of grid unknown' 272 CALL abort_physic(modname,abort_message,1) 273 ENDIF 274 275 243 276 WRITE(lunout,*) mpi_rank,'ig_paral--->',ig_paral(2),ig_paral(3) 244 277 … … 253 286 ENDIF 254 287 255 il_var_nodims(1) = 2 256 il_var_nodims(2) = 1 257 258 il_var_actual_shape(1) = 1 259 il_var_actual_shape(2) = nbp_lon 260 il_var_actual_shape(3) = 1 261 il_var_actual_shape(4) = nbp_lat 288 il_var_nodims(1) = 2 ! rank of field array (1d or 2d) 289 il_var_nodims(2) = 1 ! always 1 in current oasis version" doc oasis3mct p18 290 291 il_var_actual_shape(1) = 1 ! min of 1st dimension (always 1) 292 il_var_actual_shape(2) = nbp_lon ! max of 1st dimension 293 il_var_actual_shape(3) = 1 ! min of 2nd dimension (always 1) 294 il_var_actual_shape(4) = nbp_lat ! max of 2nd dimension 262 295 263 296 il_var_type = PRISM_Real … … 302 335 ! End definition 303 336 !************************************************************************************ 337 #ifdef CPP_XIOS 338 CALL xios_oasis_enddef() 339 #endif 304 340 CALL prism_enddef_proto(ierror) 305 341 IF (ierror .NE. PRISM_Ok) THEN … … 311 347 312 348 #ifdef CPP_XIOS 313 CALL wxios_context_init()349 ! CALL wxios_context_init() 314 350 #endif 315 351
Note: See TracChangeset
for help on using the changeset viewer.