Changeset 1200 for trunk/NEMO/OPA_SRC/IOM/iom.F90
- Timestamp:
- 2008-09-24T15:05:20+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/IOM/iom.F90
r1191 r1200 69 69 LOGICAL :: llok ! check the existence 70 70 LOGICAL :: llwrt ! local definition of ldwrt 71 LOGICAL :: llnoov ! local definition to read overlap 71 72 LOGICAL :: llstop ! local definition of ldstop 72 73 INTEGER :: iolib ! library do we use to open the file … … 104 105 ELSE ; iolib = jpnf90 105 106 ENDIF 107 ! do we read the overlap 108 ! ugly patch SM+JMM+RB to overwrite global definition in some cases 109 llnoov = (jpni * jpnj ) == jpni .AND. .NOT. lk_agrif 106 110 ! create the file name by added, if needed, TRIM(Agrif_CFixed()) and TRIM(clsuffix) 107 111 ! ============= 108 112 clname = trim(cdname) 109 113 #if defined key_agrif 110 if ( .NOT. Agrif_Root() ) clname = TRIM(Agrif_CFixed())//'_'//TRIM(clname) 114 IF ( .NOT. Agrif_Root() ) THEN 115 iln = INDEX(clname,'/') 116 cltmpn = clname(1:iln) 117 clname = clname(iln+1:LEN_TRIM(clname)) 118 clname=TRIM(cltmpn)//TRIM(Agrif_CFixed())//'_'//TRIM(clname) 119 ENDIF 111 120 #endif 112 121 ! which suffix should we use? … … 149 158 ! JMM + SM: ugly patch before getting the new version of lib_mpp) 150 159 ! idom = jpdom_local_noovlap ! default definition 151 IF( jpni*jpnj == jpnij) THEN ; idom = jpdom_local_noovlap ! default definition152 ELSE 160 IF( llnoov ) THEN ; idom = jpdom_local_noovlap ! default definition 161 ELSE ; idom = jpdom_local_full ! default definition 153 162 ENDIF 154 163 IF( PRESENT(kdom) ) idom = kdom … … 411 420 INTEGER , DIMENSION(:) , INTENT(in ), OPTIONAL :: kcount ! number of points to be read in each axis 412 421 ! 422 LOGICAL :: llnoov ! local definition to read overlap 413 423 INTEGER :: jl ! loop on number of dimension 414 424 INTEGER :: idom ! type of domain … … 437 447 ! local definition of the domain ? 438 448 idom = kdom 449 ! do we read the overlap 450 ! ugly patch SM+JMM+RB to overwrite global definition in some cases 451 llnoov = (jpni * jpnj ) == jpni .AND. .NOT. lk_agrif 439 452 ! check kcount and kstart optionals parameters... 440 453 IF( PRESENT(kcount) .AND. (.NOT. PRESENT(kstart)) ) CALL ctl_stop(trim(clinfo), 'kcount present needs kstart present') … … 520 533 ! JMM + SM: ugly patch before getting the new version of lib_mpp) 521 534 ! IF( idom /= jpdom_local_noovlap ) istart(1:2) = istart(1:2) + (/ nldi - 1, nldj - 1 /) 522 IF( jpni*jpnj == jpnij.AND. idom /= jpdom_local_noovlap ) istart(1:2) = istart(1:2) + (/ nldi - 1, nldj - 1 /)535 IF( llnoov .AND. idom /= jpdom_local_noovlap ) istart(1:2) = istart(1:2) + (/ nldi - 1, nldj - 1 /) 523 536 ! we do not read the overlap and the extra-halos -> from nldi to nlei and from nldj to nlej 524 537 ! JMM + SM: ugly patch before getting the new version of lib_mpp) 525 538 ! icnt(1:2) = (/ nlei - nldi + 1, nlej - nldj + 1 /) 526 IF( jpni*jpnj == jpnij) THEN ; icnt(1:2) = (/ nlei - nldi + 1, nlej - nldj + 1 /)527 ELSE 539 IF( llnoov ) THEN ; icnt(1:2) = (/ nlei - nldi + 1, nlej - nldj + 1 /) 540 ELSE ; icnt(1:2) = (/ nlci , nlcj /) 528 541 ENDIF 529 542 IF( PRESENT(pv_r3d) ) THEN … … 558 571 ! JMM + SM: ugly patch before getting the new version of lib_mpp) 559 572 ! ishape(1:2) = SHAPE(pv_r2d(nldi:nlei,nldj:nlej )) ; ctmp1 = 'd(nldi:nlei,nldj:nlej)' 560 IF( jpni*jpnj == jpnij) THEN ; ishape(1:2)=SHAPE(pv_r2d(nldi:nlei,nldj:nlej )) ; ctmp1='d(nldi:nlei,nldj:nlej)'561 ELSE 573 IF( llnoov ) THEN ; ishape(1:2)=SHAPE(pv_r2d(nldi:nlei,nldj:nlej )) ; ctmp1='d(nldi:nlei,nldj:nlej)' 574 ELSE ; ishape(1:2)=SHAPE(pv_r2d(1 :nlci,1 :nlcj )) ; ctmp1='d(1:nlci,1:nlcj)' 562 575 ENDIF 563 576 ENDIF … … 565 578 ! JMM + SM: ugly patch before getting the new version of lib_mpp) 566 579 ! ishape(1:3) = SHAPE(pv_r3d(nldi:nlei,nldj:nlej,:)) ; ctmp1 = 'd(nldi:nlei,nldj:nlej,:)' 567 IF( jpni*jpnj == jpnij) THEN ; ishape(1:3)=SHAPE(pv_r3d(nldi:nlei,nldj:nlej,:)) ; ctmp1='d(nldi:nlei,nldj:nlej,:)'568 ELSE 580 IF( llnoov ) THEN ; ishape(1:3)=SHAPE(pv_r3d(nldi:nlei,nldj:nlej,:)) ; ctmp1='d(nldi:nlei,nldj:nlej,:)' 581 ELSE ; ishape(1:3)=SHAPE(pv_r3d(1 :nlci,1 :nlcj,:)) ; ctmp1='d(1:nlci,1:nlcj,:)' 569 582 ENDIF 570 583 ENDIF … … 587 600 ! ELSE ; ix1 = 1 ; ix2 = icnt(1) ; iy1 = 1 ; iy2 = icnt(2) 588 601 ! ENDIF 589 IF( jpni*jpnj == jpnij) THEN602 IF( llnoov ) THEN 590 603 IF( idom /= jpdom_unknown ) THEN ; ix1 = nldi ; ix2 = nlei ; iy1 = nldj ; iy2 = nlej 591 604 ELSE ; ix1 = 1 ; ix2 = icnt(1) ; iy1 = 1 ; iy2 = icnt(2)
Note: See TracChangeset
for help on using the changeset viewer.