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 13895 for NEMO – NEMO

Changeset 13895 for NEMO


Ignore:
Timestamp:
2020-11-27T00:30:21+01:00 (3 years ago)
Author:
techene
Message:

#2574 => led to restart reorganization and some cleaning

Location:
NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/DOM/domain.F90

    r13874 r13895  
    5050   USE lbclnk         ! ocean lateral boundary condition (or mpp link) 
    5151   USE lib_mpp        ! distributed memory computing library 
     52   USE restart        ! only for lrst_oce 
    5253 
    5354   IMPLICIT NONE 
     
    8687      INTEGER ::   ji, jj, jk, jt   ! dummy loop indices 
    8788      INTEGER ::   iconf = 0    ! local integers 
     89      REAL(wp)::   zrdt 
    8890      CHARACTER (len=64) ::   cform = "(A12, 3(A13, I7))"  
    8991      INTEGER , DIMENSION(jpi,jpj) ::   ik_top , ik_bot       ! top and bottom ocean level 
     
    144146      ENDIF 
    145147      ! 
     148      ! 
     149      IF( ln_rstart ) THEN             ! check consistency between ln_rstart and ln_1st_euler 
     150         ! 
     151         IF(lwp) WRITE(numout,*) 'dom_nam : open the restart file' 
     152         CALL rst_read_open                                                !- open the restart file 
     153         ! 
     154         IF( iom_varid( numror, 'rdt', ldstop = .FALSE. ) > 0 )   THEN     !- check time-step consistency and force Euler restart if changed 
     155            CALL iom_get( numror, 'rdt', zrdt, ldxios = lrxios ) 
     156            IF( zrdt /= rn_Dt ) THEN 
     157               IF(lwp) WRITE( numout,*) 
     158               IF(lwp) WRITE( numout,*) 'ssh_init_rst:  rdt not equal to the read one' 
     159               IF(lwp) WRITE( numout,*) 
     160               IF(lwp) WRITE( numout,*) '      ==>>>   forced euler first time-step' 
     161               l_1st_euler =  .TRUE. 
     162            ENDIF 
     163         ENDIF 
     164         ! 
     165         IF( iom_varid( numror, 'sshb', ldstop = .FALSE. ) <= 0 ) THEN   !- check absence of one of the Kbb field (here sshb) 
     166            !                                                            !  (any Kbb field is missing ==> all Kbb fields are missing) 
     167            IF( .NOT.l_1st_euler ) THEN 
     168               CALL ctl_warn ('ssh_init_rst: ssh at Kbb not found in restart files ',   & 
     169                  &                         'l_1st_euler forced to .true. and ',        & 
     170                  &                         'ssh(Kbb) = ssh(Kmm) '                    ) 
     171               l_1st_euler = .TRUE. 
     172            ENDIF 
     173         ENDIF 
     174      ENDIF 
     175      ! 
    146176      CALL dom_hgr                      ! Horizontal mesh 
    147177 
     
    577607   SUBROUTINE domain_cfg( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
    578608      !!---------------------------------------------------------------------- 
    579       !!                     ***  ROUTINE dom_nam  *** 
     609      !!                     ***  ROUTINE domain_cfg  *** 
    580610      !!                     
    581611      !! ** Purpose :   read the domain size in domain configuration file 
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/DOM/domvvl.F90

    r13874 r13895  
    787787      !! ** Purpose :   Read or write VVL file in restart file 
    788788      !! 
    789       !! ** Method  :   use of IOM library 
    790       !!                if the restart does not contain vertical scale factors, 
    791       !!                they are set to the _0 values 
    792       !!                if the restart does not contain vertical scale factors increments (z_tilde), 
    793       !!                they are set to 0. 
     789      !! ** Method  : * restart comes from a linear ssh simulation : 
     790      !!                   an attempt to read e3t_n stops simulation 
     791      !!              * restart comes from a z-star, z-tilde, or layer : 
     792      !!                   read e3t_n and e3t_b 
     793      !!              * restart comes from a z-star : 
     794      !!                   set tilde_e3t_n, tilde_e3t_n, and hdiv_lf to 0 
     795      !!              * restart comes from layer : 
     796      !!                   read tilde_e3t_n and tilde_e3t_b 
     797      !!                   set hdiv_lf to 0 
     798      !!              * restart comes from a z-tilde: 
     799      !!                   read tilde_e3t_n, tilde_e3t_b, and hdiv_lf 
     800      !! 
     801      !!              NB: if l_1st_euler = T (ln_1st_euler or ssh_b not found) 
     802      !!                   Kbb fields set to Kmm ones 
    794803      !!---------------------------------------------------------------------- 
    795804      INTEGER         , INTENT(in) ::   kt        ! ocean time-step 
     
    797806      CHARACTER(len=*), INTENT(in) ::   cdrw      ! "READ"/"WRITE" flag 
    798807      ! 
    799       INTEGER ::   ji, jj, jk 
    800       INTEGER ::   id1, id2, id3, id4, id5     ! local integers 
    801       !!---------------------------------------------------------------------- 
    802       ! 
    803       IF( TRIM(cdrw) == 'READ' ) THEN        ! Read/initialise  
    804          !                                   ! =============== 
    805          IF( ln_rstart ) THEN                   !* Read the restart file 
    806             CALL rst_read_open                  !  open the restart file if necessary 
     808      INTEGER ::   ji, jj, jk      ! dummy loop indices 
     809      INTEGER ::   id3, id4, id5   ! local integers 
     810      !!---------------------------------------------------------------------- 
     811      ! 
     812      !                                      !=====================! 
     813      IF( TRIM(cdrw) == 'READ' ) THEN        !  Read / initialise  ! 
     814         !                                   !=====================! 
     815         ! 
     816         IF( ln_rstart ) THEN                   !==  Read the restart file  ==! 
    807817            ! 
    808             id1 = iom_varid( numror, 'e3t_b', ldstop = .FALSE. ) 
    809             id2 = iom_varid( numror, 'e3t_n', ldstop = .FALSE. ) 
    810             id3 = iom_varid( numror, 'tilde_e3t_b', ldstop = .FALSE. ) 
     818            CALL rst_read_open                                          !*  open the restart file if necessary 
     819            !                                         ! --------- ! 
     820            !                                         ! all cases ! 
     821            !                                         ! --------- ! 
     822            ! 
     823            id3 = iom_varid( numror, 'tilde_e3t_b', ldstop = .FALSE. )  !*  check presence 
    811824            id4 = iom_varid( numror, 'tilde_e3t_n', ldstop = .FALSE. ) 
    812             id5 = iom_varid( numror, 'hdiv_lf', ldstop = .FALSE. ) 
     825            id5 = iom_varid( numror, 'hdiv_lf'    , ldstop = .FALSE. ) 
    813826            ! 
    814             !                             ! --------- ! 
    815             !                             ! all cases ! 
    816             !                             ! --------- ! 
    817             ! 
    818             IF( MIN( id1, id2 ) > 0 ) THEN       ! all required arrays exist 
     827            !                                                           !*  scale factors 
     828            IF(lwp) WRITE(numout,*)    '          Kmm scale factor read in the restart file' 
     829            CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 
     830            WHERE ( tmask(:,:,:) == 0.0_wp )  
     831               e3t(:,:,:,Kmm) = e3t_0(:,:,:) 
     832            END WHERE 
     833            IF( l_1st_euler ) THEN                       ! euler 
     834               IF(lwp) WRITE(numout,*) '          Euler first time step : e3t(Kbb) = e3t(Kmm)' 
     835               e3t(:,:,:,Kmm) = e3t(:,:,:,Kbb) 
     836            ELSE                                         ! leap frog 
     837               IF(lwp) WRITE(numout,*) '          Kbb scale factor read in the restart file' 
    819838               CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 
    820                CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 
    821                ! needed to restart if land processor not computed  
    822                IF(lwp) write(numout,*) 'dom_vvl_rst : e3t(:,:,:,Kbb) and e3t(:,:,:,Kmm) found in restart files' 
    823839               WHERE ( tmask(:,:,:) == 0.0_wp )  
    824                   e3t(:,:,:,Kmm) = e3t_0(:,:,:) 
    825840                  e3t(:,:,:,Kbb) = e3t_0(:,:,:) 
    826841               END WHERE 
    827                IF( l_1st_euler ) THEN 
    828                   e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 
    829                ENDIF 
    830             ELSE IF( id1 > 0 ) THEN 
    831                IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : e3t(:,:,:,Kmm) not found in restart files' 
    832                IF(lwp) write(numout,*) 'e3t_n set equal to e3t_b.' 
    833                IF(lwp) write(numout,*) 'l_1st_euler is forced to true' 
    834                CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 
    835                e3t(:,:,:,Kmm) = e3t(:,:,:,Kbb) 
    836                l_1st_euler = .true. 
    837             ELSE IF( id2 > 0 ) THEN 
    838                IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : e3t(:,:,:,Kbb) not found in restart files' 
    839                IF(lwp) write(numout,*) 'e3t_b set equal to e3t_n.' 
    840                IF(lwp) write(numout,*) 'l_1st_euler is forced to true' 
    841                CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 
    842                e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 
    843                l_1st_euler = .true. 
    844             ELSE 
    845                IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : e3t(:,:,:,Kmm) not found in restart file' 
    846                IF(lwp) write(numout,*) 'Compute scale factor from sshn' 
    847                IF(lwp) write(numout,*) 'l_1st_euler is forced to true' 
    848                DO jk = 1, jpk 
    849                   e3t(:,:,jk,Kmm) =  e3t_0(:,:,jk) * ( ht_0(:,:) + ssh(:,:,Kmm) ) & 
    850                       &                          / ( ht_0(:,:) + 1._wp - ssmask(:,:) ) * tmask(:,:,jk)   & 
    851                       &          + e3t_0(:,:,jk)                               * (1._wp -tmask(:,:,jk)) 
    852                END DO 
    853                e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 
    854                l_1st_euler = .true. 
    855842            ENDIF 
    856             !                             ! ----------- ! 
    857             IF( ln_vvl_zstar ) THEN       ! z_star case ! 
    858                !                          ! ----------- ! 
     843            !                                         ! ------------ ! 
     844            IF( ln_vvl_zstar ) THEN                   ! z_star case ! 
     845               !                                      ! ------------ ! 
    859846               IF( MIN( id3, id4 ) > 0 ) THEN 
    860847                  CALL ctl_stop( 'dom_vvl_rst: z_star cannot restart from a z_tilde or layer run' ) 
    861848               ENDIF 
    862                !                          ! ----------------------- ! 
    863             ELSE                          ! z_tilde and layer cases ! 
    864                !                          ! ----------------------- ! 
    865                IF( MIN( id3, id4 ) > 0 ) THEN  ! all required arrays exist 
    866                   CALL iom_get( numror, jpdom_auto, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lrxios ) 
     849               !                                      ! ------------------------ ! 
     850            ELSE                                      !  z_tilde and layer cases ! 
     851               !                                      ! ------------------------ ! 
     852               ! 
     853               IF( id4 > 0 ) THEN                                       !*  scale factor increments 
     854                  IF(lwp) WRITE(numout,*)    '          Kmm scale factor increments read in the restart file' 
    867855                  CALL iom_get( numror, jpdom_auto, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lrxios ) 
    868                ELSE                            ! one at least array is missing 
     856                  IF( l_1st_euler ) THEN                 ! euler 
     857                     IF(lwp) WRITE(numout,*) '          Euler first time step : tilde_e3t(Kbb) = tilde_e3t(Kmm)' 
     858                     tilde_e3t_b(:,:,:) = tilde_e3t_n(:,:,:) 
     859                  ELSE                                   ! leap frog 
     860                     IF(lwp) WRITE(numout,*) '          Kbb scale factor increments read in the restart file' 
     861                     CALL iom_get( numror, jpdom_auto, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lrxios ) 
     862                  ENDIF 
     863               ELSE  
    869864                  tilde_e3t_b(:,:,:) = 0.0_wp 
    870865                  tilde_e3t_n(:,:,:) = 0.0_wp 
    871866               ENDIF 
    872                !                          ! ------------ ! 
    873                IF( ln_vvl_ztilde ) THEN   ! z_tilde case ! 
    874                   !                       ! ------------ ! 
     867               !                                      ! ------------ ! 
     868               IF( ln_vvl_ztilde ) THEN               ! z_tilde case ! 
     869                  !                                   ! ------------ ! 
    875870                  IF( id5 > 0 ) THEN  ! required array exists 
    876871                     CALL iom_get( numror, jpdom_auto, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lrxios ) 
    877872                  ELSE                ! array is missing 
    878                      hdiv_lf(:,:,:) = 0.0_wp 
     873                     hdiv_lf(:,:,:) = 0.0_wp  
    879874                  ENDIF 
    880875               ENDIF 
    881876            ENDIF 
    882877            ! 
    883          ELSE                                   !* Initialize at "rest" with ssh 
     878         ELSE                                   !==  Initialize at "rest" with ssh  ==! 
    884879            ! 
    885880            DO jk = 1, jpk 
    886                e3t(:,:,jk,Kmm) =  e3t_0(:,:,jk) * ( 1._wp + ssh(:,:,Kmm)  / ( ht_0(:,:) + 1._wp - ssmask(:,:) ) * tmask(:,:,jk) ) 
     881               e3t(:,:,jk,Kmm) =  e3t_0(:,:,jk) * ( 1._wp + ssh(:,:,Kmm) * r1_ht_0(:,:) * tmask(:,:,jk) ) 
    887882            END DO 
    888883            e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 
     
    892887               tilde_e3t_n(:,:,:) = 0._wp 
    893888               IF( ln_vvl_ztilde ) hdiv_lf(:,:,:) = 0._wp 
    894             END IF 
    895          ENDIF 
    896          ! 
    897       ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN   ! Create restart file 
    898          !                                   ! =================== 
     889            ENDIF 
     890         ENDIF 
     891         !                                       !=======================! 
     892      ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN       !  Create restart file  ! 
     893         !                                       !=======================! 
     894         ! 
    899895         IF(lwp) WRITE(numout,*) '---- dom_vvl_rst ----' 
    900896         IF( lwxios ) CALL iom_swap(      cwxios_context          ) 
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/DYN/dynspg_ts.F90

    r13696 r13895  
    932932      IF( TRIM(cdrw) == 'READ' ) THEN        ! Read/initialise  
    933933         !                                   ! --------------- 
    934          IF( ln_rstart .AND. ln_bt_fw .AND. (.NOT.l_1st_euler) ) THEN    !* Read the restart file 
     934         IF( ln_rstart .AND. ln_bt_fw .AND. .NOT.l_1st_euler ) THEN    !* Read the restart file 
    935935            CALL iom_get( numror, jpdom_auto, 'ub2_b'  , ub2_b  (:,:), cd_type = 'U', psgn = -1._wp, ldxios = lrxios )    
    936936            CALL iom_get( numror, jpdom_auto, 'vb2_b'  , vb2_b  (:,:), cd_type = 'V', psgn = -1._wp, ldxios = lrxios )  
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/DYN/sshwzv.F90

    r13874 r13895  
    448448      !!                   USE of IOM library to read ssh in the restart file 
    449449      !!                   Leap-Frog: Kbb and Kmm are read except for l_1st_euler=T 
    450       !!                              or Kbb not found  
     450      !! 
    451451      !!              * otherwise  
    452452      !!                   call user defined ssh or 
     
    458458      ! 
    459459      INTEGER ::   ji, jj, jk 
    460       INTEGER ::   id_sshb, id_sshn     ! local integers 
    461460      !!---------------------------------------------------------------------- 
    462461      ! 
     
    465464         !                         !=============================! 
    466465         ! 
    467          CALL rst_read_open                    !*  open the restart file 
    468          ! 
    469          id_sshb = iom_varid( numror, 'sshb', ldstop = .FALSE. ) 
    470          id_sshn = iom_varid( numror, 'sshn', ldstop = .FALSE. ) 
    471          ! 
    472          IF( id_sshb <= 0 .AND. .NOT.l_1st_euler ) THEN 
    473             CALL ctl_warn ('ssh_init_rst: ssh at Kbb not found in restart files ',   & 
    474                &                         'l_1st_euler forced to .true. and ',        & 
    475                &                         'ssh(Kbb) = ssh(Kmm) '                    ) 
    476             l_1st_euler = .TRUE. 
    477          ENDIF 
    478          ! 
    479          IF( id_sshn <= 0 ) THEN       ! A restart require sshn present in the restart file 
    480             CALL ctl_stop('STOP', 'ssh_init_rst: ssh at Kmm not found in the restart file') 
    481             ! 
    482          ELSE                          ! read ssh at Kmm 
    483             CALL iom_get( numror, jpdom_auto, 'sshn'   , ssh(:,:,Kmm), ldxios = lrxios    ) 
    484             ! 
    485             IF( l_1st_euler ) THEN     ! Euler at first time-step: ssh_Kbb = ssh_Kmm 
    486                ssh(:,:,Kbb) = ssh(:,:,Kmm) 
    487                ! 
    488             ELSE                       ! read ssh at Kbb 
    489                CALL iom_get( numror, jpdom_auto, 'sshb', ssh(:,:,Kbb), ldxios = lrxios ) 
    490             ENDIF 
     466         !                                     !*  Read ssh at Kmm 
     467         IF(lwp) WRITE(numout,*)    '          Kmm sea surface height read in the restart file' 
     468         CALL iom_get( numror, jpdom_auto, 'sshn'   , ssh(:,:,Kmm), ldxios = lrxios ) 
     469         ! 
     470         IF( l_1st_euler ) THEN                !* Euler at first time-step 
     471            IF(lwp) WRITE(numout,*) '          Euler first time step : ssh(Kbb) = ssh(Kmm)' 
     472            ssh(:,:,Kbb) = ssh(:,:,Kmm) 
     473            ! 
     474         ELSE                                  !* read ssh at Kbb 
     475            IF(lwp) WRITE(numout,*) '          Kbb sea surface height read in the restart file' 
     476            CALL iom_get( numror, jpdom_auto, 'sshb', ssh(:,:,Kbb), ldxios = lrxios ) 
    491477         ENDIF 
    492478         !                         !============================! 
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/IOM/restart.F90

    r13874 r13895  
    240240      !! ** Method  :   Read in restart.nc fields which are necessary for restart 
    241241      !! 
     242      !!                NB: restart file openned           in DOM/domain.F90:dom_init 
     243      !!                    before field in restart tested in DOM/domain.F90:dom_init 
     244      !!                    (sshb) 
     245      !! 
    242246      !!                NB: ssh is read or set in DYN/sshwzv:shh_init_rst 
    243247      !!                    but is written     in IOM/restart:rst_write 
    244248      !!---------------------------------------------------------------------- 
    245249      INTEGER, INTENT(in) ::   Kbb, Kmm   ! ocean time level indices 
    246       REAL(wp) ::   zrdt 
    247250      INTEGER  ::   jk 
    248251      REAL(wp), DIMENSION(jpi, jpj, jpk) :: w3d 
    249252      !!---------------------------------------------------------------------- 
    250  
    251       CALL rst_read_open            ! open restart for reading (if not already opened) 
    252  
    253       !                             ! Check time-step consistency and force Euler restart if changed 
    254       IF( iom_varid( numror, 'rdt', ldstop = .FALSE. ) > 0 )   THEN 
    255          CALL iom_get( numror, 'rdt', zrdt, ldxios = lrxios ) 
    256          IF( zrdt /= rn_Dt ) THEN 
    257             IF(lwp) WRITE( numout,*) 
    258             IF(lwp) WRITE( numout,*) 'rst_read:  rdt not equal to the read one' 
    259             IF(lwp) WRITE( numout,*) 
    260             IF(lwp) WRITE( numout,*) '      ==>>>   forced euler first time-step' 
    261             l_1st_euler =  .TRUE. 
    262          ENDIF 
    263       ENDIF 
    264  
     253      ! 
    265254      CALL iom_delay_rst( 'READ', 'OCE', numror )   ! read only ocean delayed global communication variables 
    266        
    267       !                             ! Diurnal DSST  
     255      ! 
     256      !                             !* Diurnal DSST  
    268257      IF( ln_diurnal )   CALL iom_get( numror, jpdom_auto, 'Dsst' , x_dsst, ldxios = lrxios )  
    269258      IF ( ln_diurnal_only ) THEN  
     
    275264         RETURN  
    276265      ENDIF   
    277        
    278       IF( iom_varid( numror, 'ub', ldstop = .FALSE. ) > 0 ) THEN 
    279          ! before fields 
     266      ! 
     267      !                             !*  Read Kmm fields 
     268      IF(lwp) WRITE(numout,*)    '           Kmm u, v and T-S fields read in the restart file' 
     269      CALL iom_get( numror, jpdom_auto, 'un'     , uu(:,:,:       ,Kmm), ldxios = lrxios, cd_type = 'U', psgn = -1._wp ) 
     270      CALL iom_get( numror, jpdom_auto, 'vn'     , vv(:,:,:       ,Kmm), ldxios = lrxios, cd_type = 'V', psgn = -1._wp ) 
     271      CALL iom_get( numror, jpdom_auto, 'tn'     , ts(:,:,:,jp_tem,Kmm), ldxios = lrxios ) 
     272      CALL iom_get( numror, jpdom_auto, 'sn'     , ts(:,:,:,jp_sal,Kmm), ldxios = lrxios ) 
     273      ! 
     274      IF( l_1st_euler ) THEN        !*  Euler restart 
     275         IF(lwp) WRITE(numout,*) '           Kbb u, v and T-S fields set to Kmm values' 
     276         ts(:,:,:,:,Kbb) = ts(:,:,:,:,Kmm)         ! all before fields set to now values 
     277         uu(:,:,:  ,Kbb) = uu(:,:,:  ,Kmm) 
     278         vv(:,:,:  ,Kbb) = vv(:,:,:  ,Kmm) 
     279      ELSE                          !* Leap frog restart 
     280         IF(lwp) WRITE(numout,*) '           Kbb u, v and T-S fields read in the restart file' 
    280281         CALL iom_get( numror, jpdom_auto, 'ub'     , uu(:,:,:       ,Kbb), ldxios = lrxios, cd_type = 'U', psgn = -1._wp ) 
    281282         CALL iom_get( numror, jpdom_auto, 'vb'     , vv(:,:,:       ,Kbb), ldxios = lrxios, cd_type = 'V', psgn = -1._wp ) 
    282283         CALL iom_get( numror, jpdom_auto, 'tb'     , ts(:,:,:,jp_tem,Kbb), ldxios = lrxios ) 
    283284         CALL iom_get( numror, jpdom_auto, 'sb'     , ts(:,:,:,jp_sal,Kbb), ldxios = lrxios ) 
    284       ELSE 
    285          l_1st_euler =  .TRUE.      ! before field not found, forced euler 1st time-step 
    286       ENDIF 
    287       ! 
    288       ! now fields 
    289       CALL iom_get( numror, jpdom_auto, 'un'     , uu(:,:,:       ,Kmm), ldxios = lrxios, cd_type = 'U', psgn = -1._wp ) 
    290       CALL iom_get( numror, jpdom_auto, 'vn'     , vv(:,:,:       ,Kmm), ldxios = lrxios, cd_type = 'V', psgn = -1._wp ) 
    291       CALL iom_get( numror, jpdom_auto, 'tn'     , ts(:,:,:,jp_tem,Kmm), ldxios = lrxios ) 
    292       CALL iom_get( numror, jpdom_auto, 'sn'     , ts(:,:,:,jp_sal,Kmm), ldxios = lrxios ) 
     285      ENDIF 
    293286      ! 
    294287      IF( iom_varid( numror, 'rhop', ldstop = .FALSE. ) > 0 ) THEN 
     
    298291      ENDIF 
    299292      ! 
    300       IF( l_1st_euler ) THEN                 ! Euler restart  
    301          ts(:,:,:,:,Kbb) = ts(:,:,:,:,Kmm)         ! all before fields set to now values 
    302          uu(:,:,:  ,Kbb) = uu(:,:,:  ,Kmm) 
    303          vv(:,:,:  ,Kbb) = vv(:,:,:  ,Kmm) 
    304       ENDIF 
    305       ! 
    306293   END SUBROUTINE rst_read 
    307294 
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/ISF/isfcpl.F90

    r13734 r13895  
    1010 
    1111   !!---------------------------------------------------------------------- 
    12    !!   isfrst : read/write iceshelf variables in/from restart 
     12   !!   isfrst        : read/write iceshelf variables in/from restart 
    1313   !!---------------------------------------------------------------------- 
    14    USE isf_oce                          ! ice shelf variable 
     14   USE oce            ! ocean dynamics and tracers 
     15#if defined key_qco 
     16   USE domqco  , ONLY : dom_qco_zgr      ! vertical scale factor interpolation 
     17#else 
     18   USE domvvl  , ONLY : dom_vvl_zgr      ! vertical scale factor interpolation 
     19#endif 
     20   USE domutl  , ONLY : dom_ngb          ! find the closest grid point from a given lon/lat position 
     21   USE isf_oce        ! ice shelf variable 
    1522   USE isfutils, ONLY : debug 
    16    USE lib_mpp , ONLY: mpp_sum, mpp_max ! mpp routine 
    17 #if ! defined key_qco 
    18    USE domvvl  , ONLY: dom_vvl_zgr      ! vertical scale factor interpolation 
    19 #else 
    20    USE domqco   , ONLY: dom_qco_zgr      ! vertical scale factor interpolation 
    21 #endif 
    22    USE domutl  , ONLY: dom_ngb          ! find the closest grid point from a given lon/lat position 
    2323   ! 
    24    USE oce            ! ocean dynamics and tracers 
    2524   USE in_out_manager ! I/O manager 
    2625   USE iom            ! I/O library 
     26   USE lib_mpp , ONLY : mpp_sum, mpp_max ! mpp routine 
    2727   ! 
    2828   IMPLICIT NONE 
     
    3434 
    3535   TYPE isfcons 
    36       INTEGER :: ii     ! i global 
    37       INTEGER :: jj     ! j global 
    38       INTEGER :: kk     ! k level 
    39       REAL(wp):: dvol   ! volume increment 
    40       REAL(wp):: dsal   ! salt increment 
    41       REAL(wp):: dtem   ! heat increment 
    42       REAL(wp):: lon    ! lon 
    43       REAL(wp):: lat    ! lat 
    44       INTEGER :: ngb    ! 0/1 (valid location or not (ie on halo or no neigbourg)) 
     36      INTEGER ::   ii     ! i global 
     37      INTEGER ::   jj     ! j global 
     38      INTEGER ::   kk     ! k level 
     39      REAL(wp)::   dvol   ! volume increment 
     40      REAL(wp)::   dsal   ! salt increment 
     41      REAL(wp)::   dtem   ! heat increment 
     42      REAL(wp)::   lon    ! lon 
     43      REAL(wp)::   lat    ! lat 
     44      INTEGER ::   ngb    ! 0/1 (valid location or not (ie on halo or no neigbourg)) 
    4545   END TYPE 
    4646   ! 
     
    130130      ! 
    131131   END SUBROUTINE isfcpl_init 
    132    !  
    133    SUBROUTINE isfcpl_rst_write(kt, Kmm) 
     132 
     133    
     134   SUBROUTINE isfcpl_rst_write( kt, Kmm ) 
    134135      !!--------------------------------------------------------------------- 
    135136      !!                   ***  ROUTINE iscpl_rst_write  *** 
     
    164165   END SUBROUTINE isfcpl_rst_write 
    165166 
     167    
    166168   SUBROUTINE isfcpl_ssh(Kbb, Kmm, Kaa) 
    167169      !!----------------------------------------------------------------------  
     
    195197         zdssmask(:,:) = ssmask(:,:) - zssmask0(:,:) 
    196198         DO_2D( 0, 0, 0, 0 ) 
    197             jip1=ji+1; jim1=ji-1; 
    198             jjp1=jj+1; jjm1=jj-1; 
     199            jip1=ji+1   ;   jim1=ji-1 
     200            jjp1=jj+1   ;   jjm1=jj-1 
    199201            ! 
    200202            zsummsk = zssmask0(jip1,jj) + zssmask0(jim1,jj) + zssmask0(ji,jjp1) + zssmask0(ji,jjm1) 
     
    202204            IF (zdssmask(ji,jj) == 1._wp .AND. zsummsk /= 0._wp) THEN 
    203205               ssh(ji,jj,Kmm)=( zssh(jip1,jj)*zssmask0(jip1,jj)     & 
    204                &           + zssh(jim1,jj)*zssmask0(jim1,jj)     & 
    205                &           + zssh(ji,jjp1)*zssmask0(ji,jjp1)     & 
    206                &           + zssh(ji,jjm1)*zssmask0(ji,jjm1)) / zsummsk 
     206                  &           + zssh(jim1,jj)*zssmask0(jim1,jj)     & 
     207                  &           + zssh(ji,jjp1)*zssmask0(ji,jjp1)     & 
     208                  &           + zssh(ji,jjm1)*zssmask0(ji,jjm1)) / zsummsk 
    207209               zssmask_b(ji,jj) = 1._wp 
    208210            ENDIF 
     
    238240   END SUBROUTINE isfcpl_ssh 
    239241 
     242    
    240243   SUBROUTINE isfcpl_tra(Kmm) 
    241244      !!----------------------------------------------------------------------  
     
    386389      !  
    387390   END SUBROUTINE isfcpl_tra 
     391    
    388392 
    389393   SUBROUTINE isfcpl_vol(Kmm) 
     
    477481         risfcpl_ssh(:,:) = risfcpl_ssh(:,:) + risfcpl_vol(:,:,jk) * r1_e1e2t(:,:) 
    478482      END DO 
    479  
     483      ! 
    480484   END SUBROUTINE isfcpl_vol 
    481485 
     486    
    482487   SUBROUTINE isfcpl_cons(Kmm) 
    483488      !!----------------------------------------------------------------------  
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/ISF/isfrst.F90

    r13286 r13895  
    2828   !!---------------------------------------------------------------------- 
    2929CONTAINS 
    30    !  
    31    SUBROUTINE isfrst_read(cdisf, ptsc, pfwf, ptsc_b, pfwf_b ) 
     30    
     31   SUBROUTINE isfrst_read( cdisf, ptsc, pfwf, ptsc_b, pfwf_b ) 
    3232      !!--------------------------------------------------------------------- 
    3333      !! 
     
    5151      ! 
    5252      ! read restart 
    53       IF( iom_varid( numror, cfwf_b, ldstop = .FALSE. ) > 0 ) THEN 
     53      IF( .NOT.l_1st_euler ) THEN 
    5454         IF(lwp) WRITE(numout,*) '          nit000-1 isf tracer content forcing fields read in the restart file' 
    5555         CALL iom_get( numror, jpdom_auto, cfwf_b, pfwf_b(:,:)        , ldxios = lrxios )   ! before ice shelf melt 
     
    6262      ! 
    6363      IF( lwxios ) THEN 
    64          CALL iom_set_rstw_var_active(TRIM(chc_b )) 
    65          CALL iom_set_rstw_var_active(TRIM(csc_b )) 
    66          CALL iom_set_rstw_var_active(TRIM(cfwf_b)) 
     64         CALL iom_set_rstw_var_active( TRIM(chc_b ) ) 
     65         CALL iom_set_rstw_var_active( TRIM(csc_b ) ) 
     66         CALL iom_set_rstw_var_active( TRIM(cfwf_b) ) 
    6767      ENDIF 
     68      ! 
     69   END SUBROUTINE isfrst_read 
    6870 
    69    END SUBROUTINE isfrst_read 
    70    !  
    71    SUBROUTINE isfrst_write(kt, cdisf, ptsc, pfwf ) 
     71    
     72   SUBROUTINE isfrst_write( kt, cdisf, ptsc, pfwf ) 
    7273      !!--------------------------------------------------------------------- 
    7374      !! 
     
    102103      ! 
    103104   END SUBROUTINE isfrst_write 
    104    ! 
     105    
     106   !!====================================================================== 
    105107END MODULE isfrst 
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/SBC/sbcapr.F90

    r13286 r13895  
    152152         !                                      ! ---------------------------------------- ! 
    153153         !                                            !* Restart: read in restart file 
    154          IF( ln_rstart .AND. iom_varid( numror, 'ssh_ibb', ldstop = .FALSE. ) > 0 ) THEN  
     154         IF( ln_rstart .AND. .NOT.l_1st_euler ) THEN  
    155155            IF(lwp) WRITE(numout,*) 'sbc_apr:   ssh_ibb read in the restart file' 
    156156            CALL iom_get( numror, jpdom_auto, 'ssh_ibb', ssh_ibb, ldxios = lrxios )   ! before inv. barometer ssh 
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/SBC/sbcmod.F90

    r13286 r13895  
    504504      IF( kt == nit000 ) THEN                          !   set the forcing field at nit000 - 1    ! 
    505505         !                                             ! ---------------------------------------- ! 
    506          IF( ln_rstart .AND.    &                               !* Restart: read in restart file 
    507             & iom_varid( numror, 'utau_b', ldstop = .FALSE. ) > 0 ) THEN 
    508             IF(lwp) WRITE(numout,*) '          nit000-1 surface forcing fields red in the restart file' 
    509             CALL iom_get( numror, jpdom_auto, 'utau_b', utau_b, ldxios = lrxios, cd_type = 'U', psgn = -1._wp )   ! before i-stress  (U-point) 
    510             CALL iom_get( numror, jpdom_auto, 'vtau_b', vtau_b, ldxios = lrxios, cd_type = 'V', psgn = -1._wp )   ! before j-stress  (V-point) 
    511             CALL iom_get( numror, jpdom_auto,  'qns_b',  qns_b, ldxios = lrxios )   ! before non solar heat flux (T-point) 
    512             ! The 3D heat content due to qsr forcing is treated in traqsr 
    513             ! CALL iom_get( numror, jpdom_auto, 'qsr_b' , qsr_b, ldxios = lrxios  ) ! before     solar heat flux (T-point) 
    514             CALL iom_get( numror, jpdom_auto, 'emp_b', emp_b, ldxios = lrxios  )    ! before     freshwater flux (T-point) 
     506         IF( ln_rstart .AND. .NOT.l_1st_euler ) THEN            !* Restart: read in restart file 
     507            IF(lwp) WRITE(numout,*) '          nit000-1 surface forcing fields read in the restart file' 
     508            CALL iom_get( numror, jpdom_auto, 'utau_b', utau_b, ldxios = lrxios, cd_type = 'U', psgn = -1._wp )   ! i-stress 
     509            CALL iom_get( numror, jpdom_auto, 'vtau_b', vtau_b, ldxios = lrxios, cd_type = 'V', psgn = -1._wp )   ! j-stress 
     510            CALL iom_get( numror, jpdom_auto,  'qns_b',  qns_b, ldxios = lrxios                               )   ! non solar heat flux 
     511            CALL iom_get( numror, jpdom_auto,  'emp_b',  emp_b, ldxios = lrxios                               )   ! freshwater flux 
     512            ! NB: The 3D heat content due to qsr forcing (qsr_hc_b) is treated in traqsr 
    515513            ! To ensure restart capability with 3.3x/3.4 restart files    !! to be removed in v3.6 
    516514            IF( iom_varid( numror, 'sfx_b', ldstop = .FALSE. ) > 0 ) THEN 
     
    549547      !                                                ! ---------------------------------------- ! 
    550548      IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN 
    551          CALL iom_put( "empmr"  , emp    - rnf )                ! upward water flux 
    552          CALL iom_put( "empbmr" , emp_b  - rnf )                ! before upward water flux ( needed to recalculate the time evolution of ssh in offline ) 
    553          CALL iom_put( "saltflx", sfx  )                        ! downward salt flux (includes virtual salt flux beneath ice in linear free surface case) 
    554          CALL iom_put( "fmmflx", fmmflx  )                      ! Freezing-melting water flux 
    555          CALL iom_put( "qt"    , qns  + qsr )                   ! total heat flux 
    556          CALL iom_put( "qns"   , qns        )                   ! solar heat flux 
    557          CALL iom_put( "qsr"   ,       qsr  )                   ! solar heat flux 
     549         CALL iom_put( "empmr"  , emp   - rnf )                ! upward water flux 
     550         CALL iom_put( "empbmr" , emp_b - rnf )                ! before upward water flux ( needed to recalculate the time evolution of ssh in offline ) 
     551         CALL iom_put( "saltflx", sfx         )                ! downward salt flux (includes virtual salt flux beneath ice in linear free surface case) 
     552         CALL iom_put( "fmmflx" , fmmflx      )                ! Freezing-melting water flux 
     553         CALL iom_put( "qt"     , qns + qsr   )                ! total heat flux 
     554         CALL iom_put( "qns"    , qns         )                ! solar heat flux 
     555         CALL iom_put( "qsr"    ,       qsr   )                ! solar heat flux 
    558556         IF( nn_ice > 0 .OR. ll_opa )   CALL iom_put( "ice_cover", fr_i )   ! ice fraction 
    559          CALL iom_put( "taum"  , taum       )                   ! wind stress module 
    560          CALL iom_put( "wspd"  , wndm       )                   ! wind speed  module over free ocean or leads in presence of sea-ice 
    561          CALL iom_put( "qrp", qrp )                             ! heat flux damping 
    562          CALL iom_put( "erp", erp )                             ! freshwater flux damping 
     557         CALL iom_put( "taum"   , taum        )                ! wind stress module 
     558         CALL iom_put( "wspd"   , wndm        )                ! wind speed  module over free ocean or leads in presence of sea-ice 
     559         CALL iom_put( "qrp"    , qrp         )                ! heat flux damping 
     560         CALL iom_put( "erp"    , erp         )                ! freshwater flux damping 
    563561      ENDIF 
    564562      ! 
     
    567565      ! 
    568566      IF(sn_cfctl%l_prtctl) THEN     ! print mean trends (used for debugging) 
    569          CALL prt_ctl(tab2d_1=fr_i             , clinfo1=' fr_i     - : ', mask1=tmask ) 
    570          CALL prt_ctl(tab2d_1=(emp-rnf)        , clinfo1=' emp-rnf  - : ', mask1=tmask ) 
    571          CALL prt_ctl(tab2d_1=(sfx-rnf)        , clinfo1=' sfx-rnf  - : ', mask1=tmask ) 
    572          CALL prt_ctl(tab2d_1=qns              , clinfo1=' qns      - : ', mask1=tmask ) 
    573          CALL prt_ctl(tab2d_1=qsr              , clinfo1=' qsr      - : ', mask1=tmask ) 
    574          CALL prt_ctl(tab3d_1=tmask            , clinfo1=' tmask    - : ', mask1=tmask, kdim=jpk ) 
     567         CALL prt_ctl(tab2d_1=fr_i                , clinfo1=' fr_i     - : ', mask1=tmask ) 
     568         CALL prt_ctl(tab2d_1=(emp-rnf)           , clinfo1=' emp-rnf  - : ', mask1=tmask ) 
     569         CALL prt_ctl(tab2d_1=(sfx-rnf)           , clinfo1=' sfx-rnf  - : ', mask1=tmask ) 
     570         CALL prt_ctl(tab2d_1=qns                 , clinfo1=' qns      - : ', mask1=tmask ) 
     571         CALL prt_ctl(tab2d_1=qsr                 , clinfo1=' qsr      - : ', mask1=tmask ) 
     572         CALL prt_ctl(tab3d_1=tmask               , clinfo1=' tmask    - : ', mask1=tmask, kdim=jpk ) 
    575573         CALL prt_ctl(tab3d_1=ts(:,:,:,jp_tem,Kmm), clinfo1=' sst      - : ', mask1=tmask, kdim=1   ) 
    576574         CALL prt_ctl(tab3d_1=ts(:,:,:,jp_sal,Kmm), clinfo1=' sss      - : ', mask1=tmask, kdim=1   ) 
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/SBC/sbcrnf.F90

    r13295 r13895  
    157157      IF( kt == nit000 ) THEN                          !   set the forcing field at nit000 - 1    ! 
    158158         !                                             ! ---------------------------------------- ! 
    159          IF( ln_rstart .AND.    &                               !* Restart: read in restart file 
    160             & iom_varid( numror, 'rnf_b', ldstop = .FALSE. ) > 0 ) THEN 
     159         IF( ln_rstart .AND. .NOT.l_1st_euler ) THEN         !* Restart: read in restart file 
    161160            IF(lwp) WRITE(numout,*) '          nit000-1 runoff forcing fields red in the restart file', lrxios 
    162             CALL iom_get( numror, jpdom_auto, 'rnf_b', rnf_b, ldxios = lrxios )     ! before runoff 
     161            CALL iom_get( numror, jpdom_auto, 'rnf_b'   , rnf_b                , ldxios = lrxios )   ! before runoff 
    163162            CALL iom_get( numror, jpdom_auto, 'rnf_hc_b', rnf_tsc_b(:,:,jp_tem), ldxios = lrxios )   ! before heat content of runoff 
    164163            CALL iom_get( numror, jpdom_auto, 'rnf_sc_b', rnf_tsc_b(:,:,jp_sal), ldxios = lrxios )   ! before salinity content of runoff 
    165          ELSE                                                   !* no restart: set from nit000 values 
     164         ELSE                                                !* no restart: set from nit000 values 
    166165            IF(lwp) WRITE(numout,*) '          nit000-1 runoff forcing fields set to nit000' 
    167166            rnf_b    (:,:  ) = rnf    (:,:  ) 
     
    176175            &                    'at it= ', kt,' date= ', ndastp 
    177176         IF(lwp) WRITE(numout,*) '~~~~' 
    178          IF( lwxios ) CALL iom_swap(      cwxios_context          ) 
    179          CALL iom_rstput( kt, nitrst, numrow, 'rnf_b' , rnf, ldxios = lwxios ) 
     177         IF( lwxios ) CALL iom_swap(      cwxios_context         ) 
     178         CALL iom_rstput( kt, nitrst, numrow, 'rnf_b'   , rnf                , ldxios = lwxios ) 
    180179         CALL iom_rstput( kt, nitrst, numrow, 'rnf_hc_b', rnf_tsc(:,:,jp_tem), ldxios = lwxios ) 
    181180         CALL iom_rstput( kt, nitrst, numrow, 'rnf_sc_b', rnf_tsc(:,:,jp_sal), ldxios = lwxios ) 
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/TRA/traqsr.F90

    r13295 r13895  
    135135      !                         !-----------------------------------! 
    136136      IF( kt == nit000 ) THEN          !==  1st time step  ==! 
    137          IF( ln_rstart .AND. iom_varid( numror, 'qsr_hc_b', ldstop = .FALSE. ) > 0  .AND. .NOT.l_1st_euler ) THEN    ! read in restart 
     137         IF( ln_rstart .AND. .NOT.l_1st_euler ) THEN    ! read in restart 
    138138            IF(lwp) WRITE(numout,*) '          nit000-1 qsr tracer content forcing field read in the restart file' 
    139139            z1_2 = 0.5_wp 
    140140            CALL iom_get( numror, jpdom_auto, 'qsr_hc_b', qsr_hc_b, ldxios = lrxios )   ! before heat content trend due to Qsr flux 
    141          ELSE                                           ! No restart or restart not found: Euler forward time stepping 
     141         ELSE                                           ! No restart or Euler forward at 1st time step 
    142142            z1_2 = 1._wp 
    143143            qsr_hc_b(:,:,:) = 0._wp 
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/TRA/trasbc.F90

    r13295 r13895  
    7272      !!              - send trends to trdtra module for further diagnostics(l_trdtra=T) 
    7373      !!---------------------------------------------------------------------- 
    74       INTEGER,                                   INTENT(in   ) :: kt         ! ocean time-step index 
    75       INTEGER,                                   INTENT(in   ) :: Kmm, Krhs  ! time level indices 
    76       REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts        ! active tracers and RHS of tracer equation 
     74      INTEGER,                                   INTENT(in   ) ::   kt         ! ocean time-step index 
     75      INTEGER,                                   INTENT(in   ) ::   Kmm, Krhs  ! time level indices 
     76      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) ::   pts        ! active tracers and RHS of tracer Eq. 
    7777      ! 
    7878      INTEGER  ::   ji, jj, jk, jn              ! dummy loop indices   
     
    107107      !                             !==  Set before sbc tracer content fields  ==! 
    108108      IF( kt == nit000 ) THEN             !* 1st time-step 
    109          IF( ln_rstart .AND.    &               ! Restart: read in restart file 
    110               & iom_varid( numror, 'sbc_hc_b', ldstop = .FALSE. ) > 0 ) THEN 
     109         IF( ln_rstart .AND. .NOT.l_1st_euler ) THEN      ! Restart: read in restart file 
    111110            IF(lwp) WRITE(numout,*) '          nit000-1 sbc tracer content field read in the restart file' 
    112111            zfact = 0.5_wp 
    113             sbc_tsc(:,:,:) = 0._wp 
     112            sbc_tsc(:,:,:) = 0._wp            ! CAUTION: here only the halos should be set to 0 due to rst_put 
    114113            CALL iom_get( numror, jpdom_auto, 'sbc_hc_b', sbc_tsc_b(:,:,jp_tem), ldxios = lrxios )   ! before heat content sbc trend 
    115114            CALL iom_get( numror, jpdom_auto, 'sbc_sc_b', sbc_tsc_b(:,:,jp_sal), ldxios = lrxios )   ! before salt content sbc trend 
    116          ELSE                                   ! No restart or restart not found: Euler forward time stepping 
     115         ELSE                                             ! No restart or restart not found: Euler forward time stepping 
    117116            zfact = 1._wp 
    118             sbc_tsc(:,:,:) = 0._wp 
     117            sbc_tsc  (:,:,:) = 0._wp          ! CAUTION: here only the halos of sbc_tsc should be set to 0 
    119118            sbc_tsc_b(:,:,:) = 0._wp 
    120119         ENDIF 
     
    124123      ENDIF 
    125124      !                             !==  Now sbc tracer content fields  ==! 
    126       DO_2D( 0, 1, 0, 0 ) 
     125      DO_2D( 0, 0, 0, 0 ) 
    127126         sbc_tsc(ji,jj,jp_tem) = r1_rho0_rcp * qns(ji,jj)   ! non solar heat flux 
    128127         sbc_tsc(ji,jj,jp_sal) = r1_rho0     * sfx(ji,jj)   ! salt flux due to freezing/melting 
    129128      END_2D 
    130129      IF( ln_linssh ) THEN                !* linear free surface   
    131          DO_2D( 0, 1, 0, 0 ) 
     130         DO_2D( 0, 0, 0, 0 ) 
    132131            sbc_tsc(ji,jj,jp_tem) = sbc_tsc(ji,jj,jp_tem) + r1_rho0 * emp(ji,jj) * pts(ji,jj,1,jp_tem,Kmm) 
    133132            sbc_tsc(ji,jj,jp_sal) = sbc_tsc(ji,jj,jp_sal) + r1_rho0 * emp(ji,jj) * pts(ji,jj,1,jp_sal,Kmm) 
     
    138137      ! 
    139138      DO jn = 1, jpts               !==  update tracer trend  ==! 
    140          DO_2D( 0, 1, 0, 0 ) 
     139         DO_2D( 0, 0, 0, 0 ) 
    141140            pts(ji,jj,1,jn,Krhs) = pts(ji,jj,1,jn,Krhs) + zfact * ( sbc_tsc_b(ji,jj,jn) + sbc_tsc(ji,jj,jn) )    & 
    142141               &                                                / e3t(ji,jj,1,Kmm) 
     
    157156      IF( ln_rnf ) THEN         ! input of heat and salt due to river runoff  
    158157         zfact = 0.5_wp 
    159          DO_2D( 0, 1, 0, 0 ) 
     158         DO_2D( 0, 0, 0, 0 ) 
    160159            IF( rnf(ji,jj) /= 0._wp ) THEN 
    161160               zdep = zfact / h_rnf(ji,jj) 
     
    182181          ! 
    183182         IF( ln_linssh ) THEN  
    184             DO_2D( 0, 1, 0, 0 ) 
     183            DO_2D( 0, 0, 0, 0 ) 
    185184               ztim = ssh_iau(ji,jj) / e3t(ji,jj,1,Kmm) 
    186185               pts(ji,jj,1,jp_tem,Krhs) = pts(ji,jj,1,jp_tem,Krhs) + pts(ji,jj,1,jp_tem,Kmm) * ztim 
     
    188187            END_2D 
    189188         ELSE 
    190             DO_2D( 0, 1, 0, 0 ) 
     189            DO_2D( 0, 0, 0, 0 ) 
    191190               ztim = ssh_iau(ji,jj) / ( ht(ji,jj) + 1. - ssmask(ji, jj) ) 
    192191               pts(ji,jj,:,jp_tem,Krhs) = pts(ji,jj,:,jp_tem,Krhs) + pts(ji,jj,:,jp_tem,Kmm) * ztim 
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/nemogcm.F90

    r13678 r13895  
    415415     CALL Agrif_Declare_Var_ini   !  "      "   "   "      "  DOM 
    416416#endif 
    417                            CALL     dom_init( Nbb, Nnn, Naa, "OPA") ! Domain 
     417                           CALL     dom_init( Nbb, Nnn, Naa, "OCE") ! Domain 
    418418      IF( ln_crs       )   CALL     crs_init(      Nnn )       ! coarsened grid: domain initialization  
    419419      IF( sn_cfctl%l_prtctl )   & 
     
    500500      IF( lk_asminc    )   CALL asm_inc_init( Nbb, Nnn, Nrhs )   ! Initialize assimilation increments 
    501501      ! 
     502!!st move iom_close(numror) at the end of nemo_init ==> KO 
     503!!st      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     504!!st      ! File manipulation at the end of the first time step 
     505!!st      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<                          
     506!!st                                        CALL iom_close( numror )   ! close input  ocean restart file 
     507!!st         IF(lwm)                        CALL FLUSH    ( numond )   ! flush output namelist oce 
     508!!st         IF(lwm .AND. numoni /= -1 )    CALL FLUSH    ( numoni )   ! flush output namelist ice (if exist) 
     509!!st end 
     510 
    502511      IF(lwp) WRITE(numout,cform_aaa)           ! Flag AAAAAAA 
    503512      ! 
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/step.F90

    r13608 r13895  
    331331      IF( ln_diaobs .AND. nstop == 0 )  CALL dia_obs( kstp, Nnn )  ! obs-minus-model (assimilation) diags (after dynamics update) 
    332332 
     333!!st move iom_close(numror) at the end of nemo_init ==> KO 
    333334      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    334335      ! File manipulation at the end of the first time step 
     
    339340         IF(lwm .AND. numoni /= -1 )    CALL FLUSH    ( numoni )   ! flush output namelist ice (if exist) 
    340341      ENDIF 
     342!!st end 
    341343 
    342344      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
Note: See TracChangeset for help on using the changeset viewer.