New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 12745 for NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/IOM/iom.F90 – NEMO

Ignore:
Timestamp:
2020-04-14T08:14:07+02:00 (4 years ago)
Author:
smasson
Message:

Extra_Halo: iom cleaning and fix ICB restartability, see #2366

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/IOM/iom.F90

    r12738 r12745  
    762762      ENDIF 
    763763      IF( llwrt ) THEN 
    764          idompar(:,1) = (/ nlei  - nldi + 1, nlej - nldj + 1 /) 
    765          idompar(:,2) = (/ nimpp + nldi - 1, njmpp + nldj - 1 /) 
    766          idompar(:,3) = (/ nimpp + nlei - 1, njmpp + nlej - 1 /) 
    767          idompar(:,4) = (/ 0               , 0                /) 
    768          idompar(:,5) = (/ 0               , 0                /) 
     764         idompar(:,1) = (/ nlei - nldi + 1, nlej - nldj + 1 /) 
     765         idompar(:,2) = (/ mig(nldi)      , mjg(nldj)      /) 
     766         idompar(:,3) = (/ mig(nlei)      , mjg(nlej)      /) 
     767         idompar(:,4) = (/ 0              , 0               /) 
     768         idompar(:,5) = (/ 0              , 0               /) 
    769769      ENDIF 
    770770      ! Open the NetCDF file 
     
    10811081         IF( PRESENT(kcount) .AND. .NOT. PRESENT(kstart) ) CALL ctl_stop(trim(clinfo), 'kcount present needs kstart present') 
    10821082         IF( PRESENT(kstart) .AND. .NOT. PRESENT(kcount) ) CALL ctl_stop(trim(clinfo), 'kstart present needs kcount present') 
    1083          IF( PRESENT(kstart) .AND. idom /= jpdom_unknown .AND.  idom /= jpdom_auto_xy ) & 
     1083         IF( PRESENT(kstart) .AND. idom /= jpdom_unknown .AND. idom /= jpdom_auto_xy ) & 
    10841084            &          CALL ctl_stop(TRIM(clinfo), 'kstart present needs idom = jpdom_unknown or idom = jpdom_auto_xy') 
     1085         IF( idom == jpdom_auto_xy .AND. .NOT. PRESENT(kstart) ) & 
     1086            &          CALL ctl_stop(TRIM(clinfo), 'idom = jpdom_auto_xy requires kstart to be present') 
    10851087         ! 
    10861088         ! Search for the variable in the data base (eventually actualize data) 
     
    10961098            ! 
    10971099            ! Identify the domain in case of jpdom_auto definition 
    1098             ll_only3rd = idom == jpdom_auto_xy             ! depth is specified if idom == jpdom_auto_xy  
    10991100            IF( idom == jpdom_auto .OR. idom == jpdom_auto_xy ) THEN             
    11001101               idom = jpdom_global   ! default 
     
    11451146            ! definition of istart and icnt 
    11461147            ! 
    1147             icnt  (:) = 1   ! default definition (simple way to deal with special cases listed above)  
    1148             istart(:) = 1   ! default definition (simple way to deal with special cases listed above)  
    1149             istart(idmspc+1) = itime 
     1148            icnt  (:) = 1              ! default definition (simple way to deal with special cases listed above)  
     1149            istart(:) = 1              ! default definition (simple way to deal with special cases listed above)  
     1150            istart(idmspc+1) = itime   ! temporal dimenstion 
    11501151            ! 
    1151             IF( PRESENT(kstart) .AND. .NOT. ll_only3rd ) THEN  
    1152                istart(1:idmspc) = kstart(1:idmspc)  
    1153                icnt  (1:idmspc) = kcount(1:idmspc) 
    1154             ELSE 
    1155                IF(idom == jpdom_unknown ) THEN 
    1156                   icnt(1:idmspc) = idimsz(1:idmspc) 
    1157                ELSE  
    1158                   IF( .NOT. PRESENT(pv_r1d) ) THEN   !   not a 1D array 
    1159                      ! we do not read the overlap and the extra-halos -> from nldi to nlei and from nldj to nlej  
    1160                      IF( idom == jpdom_global )   istart(1:2) = (/ mig(nldi), mjg(nldj) /) 
    1161                      icnt(1:2) = (/ nlei - nldi + 1, nlej - nldj + 1 /) 
    1162                      IF( PRESENT(pv_r3d) ) THEN 
    1163                         IF( ll_only3rd .AND. PRESENT(kstart) ) THEN   ;   istart(3) = kstart(3)   ;   icnt(3) = kcount(3) 
    1164                         ELSE                                          ;                               icnt(3) = inlev 
    1165                         ENDIF 
    1166                      ENDIF 
     1152            IF( idom == jpdom_unknown ) THEN 
     1153               IF( PRESENT(kstart) .AND. idom /= jpdom_auto_xy ) THEN  
     1154                  istart(1:idmspc) = kstart(1:idmspc)  
     1155                  icnt  (1:idmspc) = kcount(1:idmspc) 
     1156               ELSE 
     1157                  icnt  (1:idmspc) = idimsz(1:idmspc) 
     1158               ENDIF 
     1159            ELSE   !   not a 1D array as pv_r1d requires jpdom_unknown 
     1160               ! we do not read the overlap and the extra-halos -> from nldi to nlei and from nldj to nlej  
     1161               IF( idom == jpdom_global )   istart(1:2) = (/ mig(nldi), mjg(nldj) /) 
     1162               icnt(1:2) = (/ nlei - nldi + 1, nlej - nldj + 1 /) 
     1163               IF( PRESENT(pv_r3d) ) THEN 
     1164                  IF( idom == jpdom_auto_xy ) THEN 
     1165                     istart(3) = kstart(3) 
     1166                     icnt  (3) = kcount(3) 
     1167                  ELSE 
     1168                     icnt  (3) = inlev 
    11671169                  ENDIF 
    11681170               ENDIF 
Note: See TracChangeset for help on using the changeset viewer.