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 9210 for branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90 – NEMO

Ignore:
Timestamp:
2018-01-11T16:41:21+01:00 (6 years ago)
Author:
gm
Message:

dev_merge_2017: merge a 4th mpp_max (stop, see WP2017/HPC03) cleaning in nemo_gcm routine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90

    r9169 r9210  
    154154      !                            !-----------------------! 
    155155      istp = nit000 
     156      ! 
    156157#if defined key_c1d 
    157          DO WHILE ( istp <= nitend .AND. nstop == 0 ) 
    158             CALL stp_c1d( istp ) 
     158      DO WHILE ( istp <= nitend .AND. nstop == 0 )    !==  C1D time-stepping  ==! 
     159         CALL stp_c1d( istp ) 
     160         istp = istp + 1 
     161      END DO 
     162#else 
     163 
     164!!gm     This data assimilation calls should be part of the initialisation (i.e. put in asm_inc_init) 
     165      ! 
     166      IF( lk_asminc ) THEN                            !==  data assimilation  ==!   (done prior to time stepping) 
     167         IF( ln_bkgwri )   CALL asm_bkg_wri( nit000 - 1 )      ! Output background fields 
     168         IF( ln_asmdin ) THEN                                  ! Direct initialization 
     169            IF( ln_trainc )   CALL tra_asm_inc( nit000 - 1 )      ! Tracers 
     170            IF( ln_dyninc )   CALL dyn_asm_inc( nit000 - 1 )      ! Dynamics 
     171            IF( ln_sshinc )   CALL ssh_asm_inc( nit000 - 1 )      ! SSH 
     172         ENDIF 
     173      ENDIF 
     174!!gm end 
     175      ! 
     176# if defined key_agrif 
     177      !                                               !==  AGRIF time-stepping  ==! 
     178      CALL Agrif_Regrid() 
     179      DO WHILE( istp <= nitend .AND. nstop == 0 ) 
     180         CALL stp 
     181         istp = istp + 1 
     182      END DO 
     183      ! 
     184      IF( .NOT. Agrif_Root() ) THEN 
     185         CALL Agrif_ParentGrid_To_ChildGrid() 
     186         IF( ln_diaobs )   CALL dia_obs_wri 
     187         IF( ln_timing )   CALL timing_finalize 
     188         CALL Agrif_ChildGrid_To_ParentGrid() 
     189      ENDIF 
     190      ! 
     191# else 
     192      ! 
     193      IF( .NOT.ln_diurnal_only ) THEN                 !==  Standard time-stepping  ==! 
     194         ! 
     195         DO WHILE( istp <= nitend .AND. nstop == 0 ) 
     196            CALL stp        ( istp )  
    159197            istp = istp + 1 
    160198         END DO 
    161 #else 
    162           IF( lk_asminc ) THEN 
    163              IF( ln_bkgwri ) CALL asm_bkg_wri( nit000 - 1 )    ! Output background fields 
    164              IF( ln_asmdin ) THEN                        ! Direct initialization 
    165                 IF( ln_trainc ) CALL tra_asm_inc( nit000 - 1 )    ! Tracers 
    166                 IF( ln_dyninc ) CALL dyn_asm_inc( nit000 - 1 )    ! Dynamics 
    167                 IF( ln_sshinc ) CALL ssh_asm_inc( nit000 - 1 )    ! SSH 
    168              ENDIF 
    169           ENDIF 
    170  
    171 #if defined key_agrif 
    172           CALL Agrif_Regrid() 
    173 #endif 
    174  
    175          DO WHILE ( istp <= nitend .AND. nstop == 0 ) 
    176 #if defined key_agrif 
    177             CALL stp                         ! AGRIF: time stepping 
    178 #else 
    179             IF ( .NOT. ln_diurnal_only ) THEN  
    180                CALL stp( istp )                 ! standard time stepping  
    181             ELSE  
    182                CALL stp_diurnal( istp )        ! time step only the diurnal SST  
    183             ENDIF  
    184 #endif 
     199         ! 
     200      ELSE                                            !==  diurnal SST time-steeping only  ==! 
     201         ! 
     202         DO WHILE( istp <= nitend .AND. nstop == 0 ) 
     203            CALL stp_diurnal( istp )   ! time step only the diurnal SST  
    185204            istp = istp + 1 
    186             IF( lk_mpp )   CALL mpp_max( nstop ) 
    187205         END DO 
    188 #endif 
    189  
     206         ! 
     207      ENDIF 
     208      ! 
     209# endif 
     210      ! 
     211#endif 
     212      ! 
    190213      IF( ln_diaobs   )   CALL dia_obs_wri 
    191214      ! 
     
    199222      IF( nstop /= 0 .AND. lwp ) THEN        ! error print 
    200223         WRITE(numout,cform_err) 
    201          WRITE(numout,*) nstop, ' error have been found' 
    202       ENDIF 
    203       ! 
    204 #if defined key_agrif 
    205       IF( .NOT. Agrif_Root() ) THEN 
    206          CALL Agrif_ParentGrid_To_ChildGrid() 
    207          IF( ln_diaobs )        CALL dia_obs_wri 
    208          IF( ln_timing )   CALL timing_finalize 
    209          CALL Agrif_ChildGrid_To_ParentGrid() 
    210       ENDIF 
    211 #endif 
     224         WRITE(numout,*) 'nemo_gcm: a total of ', nstop, ' errors have been found' 
     225         WRITE(numout,*) 
     226      ENDIF 
     227      ! 
    212228      IF( ln_timing )   CALL timing_finalize 
    213229      ! 
     
    215231      ! 
    216232#if defined key_iomput 
    217       CALL xios_finalize                     ! end mpp communications with xios 
    218       IF( lk_oasis )   CALL cpl_finalize     ! end coupling and mpp communications with OASIS 
     233                                    CALL xios_finalize  ! end mpp communications with xios 
     234      IF( lk_oasis     )            CALL cpl_finalize   ! end coupling and mpp communications with OASIS 
    219235#else 
    220       IF( lk_oasis ) THEN  
    221          CALL cpl_finalize                   ! end coupling and mpp communications with OASIS 
    222       ELSE 
    223          IF( lk_mpp )   CALL mppstop         ! end mpp communications 
     236      IF    ( lk_oasis ) THEN   ;   CALL cpl_finalize   ! end coupling and mpp communications with OASIS 
     237      ELSEIF( lk_mpp   ) THEN   ;   CALL mppstop        ! end mpp communications 
    224238      ENDIF 
    225239#endif 
Note: See TracChangeset for help on using the changeset viewer.