Changeset 2408 for LMDZ5/branches/testing/libf/phylmd/oasis.F90
- Timestamp:
- Dec 14, 2015, 11:43:09 AM (8 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 2293-2295,2297,2299-2302,2305-2313,2315,2317-2380,2382-2396
- Property svn:mergeinfo changed
-
LMDZ5/branches/testing/libf/phylmd/oasis.F90
r2056 r2408 99 99 USE wxios, ONLY : wxios_context_init 100 100 #endif 101 102 103 INCLUDE "dimensions.h" 104 INCLUDE "iniprint.h" 101 USE print_control_mod, ONLY: lunout 102 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat 105 103 106 104 ! Local variables … … 218 216 IF (ierror .NE. PRISM_Ok) THEN 219 217 abort_message=' Probleme init dans prism_init_comp ' 220 CALL abort_ gcm(modname,abort_message,1)218 CALL abort_physic(modname,abort_message,1) 221 219 ELSE 222 220 WRITE(lunout,*) 'inicma : init psmile ok ' … … 229 227 !************************************************************************************ 230 228 ig_paral(1) = 1 ! apple partition for // 231 ig_paral(2) = (jj_begin-1)* iim+ii_begin-1 ! offset232 ig_paral(3) = (jj_end* iim+ii_end) - (jj_begin*iim+ii_begin) + 1233 234 IF (mpi_rank==mpi_size-1) ig_paral(3)=ig_paral(3)+ iim-1229 ig_paral(2) = (jj_begin-1)*nbp_lon+ii_begin-1 ! offset 230 ig_paral(3) = (jj_end*nbp_lon+ii_end) - (jj_begin*nbp_lon+ii_begin) + 1 231 232 IF (mpi_rank==mpi_size-1) ig_paral(3)=ig_paral(3)+nbp_lon-1 235 233 WRITE(lunout,*) mpi_rank,'ig_paral--->',ig_paral(2),ig_paral(3) 236 234 … … 240 238 IF (ierror .NE. PRISM_Ok) THEN 241 239 abort_message=' Probleme dans prism_def_partition ' 242 CALL abort_ gcm(modname,abort_message,1)240 CALL abort_physic(modname,abort_message,1) 243 241 ELSE 244 242 WRITE(lunout,*) 'inicma : decomposition domaine psmile ok ' … … 249 247 250 248 il_var_actual_shape(1) = 1 251 il_var_actual_shape(2) = iim249 il_var_actual_shape(2) = nbp_lon 252 250 il_var_actual_shape(3) = 1 253 il_var_actual_shape(4) = jjm+1251 il_var_actual_shape(4) = nbp_lat 254 252 255 253 il_var_type = PRISM_Real … … 268 266 inforecv(jf)%name 269 267 abort_message=' Problem in call to prism_def_var_proto for fields to receive' 270 CALL abort_ gcm(modname,abort_message,1)268 CALL abort_physic(modname,abort_message,1) 271 269 ENDIF 272 270 ENDIF … … 286 284 infosend(jf)%name 287 285 abort_message=' Problem in call to prism_def_var_proto for fields to send' 288 CALL abort_ gcm(modname,abort_message,1)286 CALL abort_physic(modname,abort_message,1) 289 287 ENDIF 290 288 ENDIF … … 297 295 IF (ierror .NE. PRISM_Ok) THEN 298 296 abort_message=' Problem in call to prism_endef_proto' 299 CALL abort_ gcm(modname,abort_message,1)297 CALL abort_physic(modname,abort_message,1) 300 298 ELSE 301 299 WRITE(lunout,*) 'inicma : endef psmile ok ' … … 320 318 !====================================================================== 321 319 ! 322 INCLUDE "dimensions.h"323 INCLUDE "iniprint.h"320 USE print_control_mod, ONLY: lunout 321 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat 324 322 ! Input arguments 325 323 !************************************************************************************ … … 328 326 ! Output arguments 329 327 !************************************************************************************ 330 REAL, DIMENSION( iim, jj_nb,maxrecv), INTENT(OUT) :: tab_get328 REAL, DIMENSION(nbp_lon, jj_nb,maxrecv), INTENT(OUT) :: tab_get 331 329 332 330 ! Local variables … … 336 334 CHARACTER (len = 20) :: modname = 'fromcpl' 337 335 CHARACTER (len = 80) :: abort_message 338 REAL, DIMENSION( iim*jj_nb) :: field336 REAL, DIMENSION(nbp_lon*jj_nb) :: field 339 337 340 338 !************************************************************************************ … … 345 343 istart=ii_begin 346 344 IF (is_south_pole) THEN 347 iend=(jj_end-jj_begin)* iim+iim345 iend=(jj_end-jj_begin)*nbp_lon+nbp_lon 348 346 ELSE 349 iend=(jj_end-jj_begin)* iim+ii_end347 iend=(jj_end-jj_begin)*nbp_lon+ii_end 350 348 ENDIF 351 349 … … 354 352 field(:) = -99999. 355 353 CALL prism_get_proto(inforecv(i)%nid, ktime, field(istart:iend), ierror) 356 tab_get(:,:,i) = RESHAPE(field(:),(/ iim,jj_nb/))354 tab_get(:,:,i) = RESHAPE(field(:),(/nbp_lon,jj_nb/)) 357 355 358 356 IF (ierror .NE. PRISM_Ok .AND. ierror.NE.PRISM_Recvd .AND. & … … 362 360 WRITE (lunout,*) 'Error with receiving filed : ', inforecv(i)%name, ktime 363 361 abort_message=' Problem in prism_get_proto ' 364 CALL abort_ gcm(modname,abort_message,1)362 CALL abort_physic(modname,abort_message,1) 365 363 ENDIF 366 364 ENDIF … … 382 380 ! 383 381 ! 384 INCLUDE "dimensions.h"385 INCLUDE "iniprint.h"382 USE print_control_mod, ONLY: lunout 383 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat 386 384 ! Input arguments 387 385 !************************************************************************************ 388 386 INTEGER, INTENT(IN) :: ktime 389 387 LOGICAL, INTENT(IN) :: last 390 REAL, DIMENSION( iim, jj_nb, maxsend), INTENT(IN) :: tab_put388 REAL, DIMENSION(nbp_lon, jj_nb, maxsend), INTENT(IN) :: tab_put 391 389 392 390 ! Local variables … … 396 394 INTEGER :: wstart,wend 397 395 INTEGER :: ierror, i 398 REAL, DIMENSION( iim*jj_nb) :: field396 REAL, DIMENSION(nbp_lon*jj_nb) :: field 399 397 CHARACTER (len = 20),PARAMETER :: modname = 'intocpl' 400 398 CHARACTER (len = 80) :: abort_message … … 411 409 istart=ii_begin 412 410 IF (is_south_pole) THEN 413 iend=(jj_end-jj_begin)* iim+iim411 iend=(jj_end-jj_begin)*nbp_lon+nbp_lon 414 412 ELSE 415 iend=(jj_end-jj_begin)* iim+ii_end413 iend=(jj_end-jj_begin)*nbp_lon+ii_end 416 414 ENDIF 417 415 … … 419 417 wstart=istart 420 418 wend=iend 421 IF (is_north_pole) wstart=istart+ iim-1422 IF (is_south_pole) wend=iend- iim+1419 IF (is_north_pole) wstart=istart+nbp_lon-1 420 IF (is_south_pole) wend=iend-nbp_lon+1 423 421 424 422 DO i = 1, maxsend 425 423 IF (infosend(i)%action) THEN 426 field = RESHAPE(tab_put(:,:,i),(/ iim*jj_nb/))424 field = RESHAPE(tab_put(:,:,i),(/nbp_lon*jj_nb/)) 427 425 CALL writefield_phy(infosend(i)%name,field(wstart:wend),1) 428 426 END IF … … 436 434 DO i = 1, maxsend 437 435 IF (infosend(i)%action .AND. infosend(i)%nid .NE. -1 ) THEN 438 field = RESHAPE(tab_put(:,:,i),(/ iim*jj_nb/))436 field = RESHAPE(tab_put(:,:,i),(/nbp_lon*jj_nb/)) 439 437 CALL prism_put_proto(infosend(i)%nid, ktime, field(istart:iend), ierror) 440 438 … … 444 442 WRITE (lunout,*) 'Error with sending field :', infosend(i)%name, ktime 445 443 abort_message=' Problem in prism_put_proto ' 446 CALL abort_ gcm(modname,abort_message,1)444 CALL abort_physic(modname,abort_message,1) 447 445 ENDIF 448 446 ENDIF … … 459 457 IF (ierror .NE. PRISM_Ok) THEN 460 458 abort_message=' Problem in prism_terminate_proto ' 461 CALL abort_ gcm(modname,abort_message,1)459 CALL abort_physic(modname,abort_message,1) 462 460 ENDIF 463 461 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.