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

Changeset 14661 for NEMO


Ignore:
Timestamp:
2021-03-31T17:18:48+02:00 (3 years ago)
Author:
vsmart
Message:

Changes made to run from cap code. Restructure of nemogcm into init, run, finalise subroutines and do not use mpi initialisation/finalisation or STOP if key_spmd set

Location:
NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage2_spmd/src/OCE
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage2_spmd/src/OCE/LBC/lib_mpp.F90

    r13311 r14661  
    692692      ELSE 
    693693         CALL mppsync 
     694#if !defined key_spmd 
    694695         CALL mpi_finalize( info ) 
     696#endif 
    695697      ENDIF 
    696698      IF( ll_abort ) STOP 123 
  • NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage2_spmd/src/OCE/nemo.f90

    r11715 r14661  
    1616   !!---------------------------------------------------------------------- 
    1717   ! 
    18    CALL nemo_gcm           ! NEMO direct code 
     18   CALL nemo_gcm_init           ! NEMO direct code 
     19   CALL nemo_gcm_run 
     20   CALL nemo_gcm_finalise 
    1921   !  
    2022   !!====================================================================== 
  • NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage2_spmd/src/OCE/nemogcm.F90

    r13443 r14661  
    117117CONTAINS 
    118118 
    119    SUBROUTINE nemo_gcm 
    120       !!---------------------------------------------------------------------- 
    121       !!                     ***  ROUTINE nemo_gcm  *** 
     119   SUBROUTINE nemo_gcm_init 
     120      !!---------------------------------------------------------------------- 
     121      !!                     ***  ROUTINE nemo_gcm_init  *** 
    122122      !! 
    123123      !! ** Purpose :   NEMO solves the primitive equations on an orthogonal 
     
    125125      !! 
    126126      !! ** Method  : - model general initialization 
    127       !!              - launch the time-stepping (stp routine) 
    128       !!              - finalize the run by closing files and communications 
    129127      !! 
    130128      !! References : Madec, Delecluse, Imbard, and Levy, 1997:  internal report, IPSL. 
    131129      !!              Madec, 2008, internal report, IPSL. 
    132130      !!---------------------------------------------------------------------- 
    133       INTEGER ::   istp, nerror   ! time step index 
    134       REAL(wp)::   zstptiming   ! elapsed time for 1 time step 
    135       !!---------------------------------------------------------------------- 
    136       ! 
    137131#if defined key_agrif 
    138132      CALL Agrif_Init_Grids()      ! AGRIF: set the meshes 
     
    151145# endif 
    152146#endif 
     147   END SUBROUTINE nemo_gcm_init 
     148 
     149   SUBROUTINE nemo_gcm_run 
     150      !!---------------------------------------------------------------------- 
     151      !!                     ***  ROUTINE nemo_gcm_run  *** 
     152      !! 
     153      !! ** Purpose :   NEMO solves the primitive equations on an orthogonal 
     154      !!              curvilinear mesh on the sphere. 
     155      !! 
     156      !! ** Method  : - launch the time-stepping (stp routine) 
     157      !! 
     158      !! References : Madec, Delecluse, Imbard, and Levy, 1997:  internal report, IPSL. 
     159      !!              Madec, 2008, internal report, IPSL. 
     160      !!---------------------------------------------------------------------- 
     161      INTEGER ::   istp   ! time step index 
     162      REAL(wp)::   zstptiming   ! elapsed time for 1 time step 
     163      !!---------------------------------------------------------------------- 
     164      ! 
    153165      ! check that all process are still there... If some process have an error, 
    154166      ! they will never enter in step and other processes will wait until the end of the cpu time! 
     
    248260      write(numout,*) "RSRH done closefiles " , lk_oasis; flush(numout) 
    249261      ! 
     262   END SUBROUTINE nemo_gcm_run 
     263 
     264   SUBROUTINE nemo_gcm_finalise 
     265      !!---------------------------------------------------------------------- 
     266      !!                     ***  ROUTINE nemo_gcm_run  *** 
     267      !! 
     268      !! ** Purpose :   NEMO solves the primitive equations on an orthogonal 
     269      !!              curvilinear mesh on the sphere. 
     270      !! 
     271      !! ** Method  : - finalize the run by closing files and communications 
     272      !! 
     273      !! References : Madec, Delecluse, Imbard, and Levy, 1997:  internal report, IPSL. 
     274      !!              Madec, 2008, internal report, IPSL. 
     275      !!---------------------------------------------------------------------- 
     276      integer :: nerror 
     277      !!---------------------------------------------------------------------- 
     278      ! 
    250279#if defined key_iomput 
    251280      CALL xios_finalize()  ! end mpp communications with xios 
     
    262291#endif 
    263292      ! 
     293#if !defined key_spmd 
    264294      IF(lwm) THEN 
    265295         IF( nstop == 0 ) THEN    
     
    269299         ENDIF 
    270300      ENDIF 
    271       ! 
    272    END SUBROUTINE nemo_gcm 
     301#endif 
     302      ! 
     303   END SUBROUTINE nemo_gcm_finalise 
    273304 
    274305 
     
    305336! RSRH simplify initialisaton for test 
    306337      IF( lk_oasis ) THEN 
     338#if !defined key_spmd 
    307339          CALL mpi_init(nerror) 
     340#endif 
    308341          CALL oasis_init_comp ( ncomp_id, "toyoce", nerror, .TRUE. ) 
    309342!          CALL cpl_init( "toyoce", ilocal_comm )  
Note: See TracChangeset for help on using the changeset viewer.