- Timestamp:
- 2021-09-21T17:32:52+02:00 (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage3_spmd/src/OCE/nemogcm.F90
r13443 r15276 100 100 101 101 PUBLIC nemo_gcm ! called by model.F90 102 PUBLIC nemo_gcm_init ! called by nemo_gcm or external subroutine 103 PUBLIC nemo_gcm_run ! called by nemo_gcm or external subroutine 104 PUBLIC nemo_gcm_finalise ! called by nemo_gcm or external subroutine 102 105 PUBLIC nemo_init ! needed by AGRIF 103 106 PUBLIC nemo_alloc ! needed by TAM … … 124 127 !! curvilinear mesh on the sphere. 125 128 !! 126 !! ** Method : - model general initialization 127 !! - launch the time-stepping (stp routine) 128 !! - finalize the run by closing files and communications 129 !! ** Method : - calls nemo_gcm_init, nemo_gcm_run, nemo_gcm_finalise 129 130 !! 130 131 !! References : Madec, Delecluse, Imbard, and Levy, 1997: internal report, IPSL. 131 132 !! Madec, 2008, internal report, IPSL. 132 133 !!---------------------------------------------------------------------- 133 INTEGER :: istp, nerror ! time step index 134 REAL(wp):: zstptiming ! elapsed time for 1 time step 135 !!---------------------------------------------------------------------- 136 ! 134 CALL nemo_gcm_init 135 CALL nemo_gcm_run 136 CALL nemo_gcm_finalise 137 END SUBROUTINE nemo_gcm 138 139 SUBROUTINE nemo_gcm_init 140 !!---------------------------------------------------------------------- 141 !! *** ROUTINE nemo_gcm_init *** 142 !! 143 !! ** Purpose : NEMO solves the primitive equations on an orthogonal 144 !! curvilinear mesh on the sphere. 145 !! 146 !! ** Method : - model general initialization 147 !! 148 !! References : Madec, Delecluse, Imbard, and Levy, 1997: internal report, IPSL. 149 !! Madec, 2008, internal report, IPSL. 150 !!---------------------------------------------------------------------- 137 151 #if defined key_agrif 138 152 CALL Agrif_Init_Grids() ! AGRIF: set the meshes … … 151 165 # endif 152 166 #endif 167 END SUBROUTINE nemo_gcm_init 168 169 SUBROUTINE nemo_gcm_run 170 !!---------------------------------------------------------------------- 171 !! *** ROUTINE nemo_gcm_run *** 172 !! 173 !! ** Purpose : NEMO solves the primitive equations on an orthogonal 174 !! curvilinear mesh on the sphere. 175 !! 176 !! ** Method : - launch the time-stepping (stp routine) 177 !! 178 !! References : Madec, Delecluse, Imbard, and Levy, 1997: internal report, IPSL. 179 !! Madec, 2008, internal report, IPSL. 180 !!---------------------------------------------------------------------- 181 INTEGER :: istp ! time step index 182 REAL(wp):: zstptiming ! elapsed time for 1 time step 183 !!---------------------------------------------------------------------- 184 ! 153 185 ! check that all process are still there... If some process have an error, 154 186 ! they will never enter in step and other processes will wait until the end of the cpu time! … … 248 280 write(numout,*) "RSRH done closefiles " , lk_oasis; flush(numout) 249 281 ! 282 END SUBROUTINE nemo_gcm_run 283 284 SUBROUTINE nemo_gcm_finalise 285 !!---------------------------------------------------------------------- 286 !! *** ROUTINE nemo_gcm_finalise *** 287 !! 288 !! ** Purpose : NEMO solves the primitive equations on an orthogonal 289 !! curvilinear mesh on the sphere. 290 !! 291 !! ** Method : - finalize the run by closing files and communications 292 !! 293 !! References : Madec, Delecluse, Imbard, and Levy, 1997: internal report, IPSL. 294 !! Madec, 2008, internal report, IPSL. 295 !!---------------------------------------------------------------------- 296 integer :: nerror 297 !!---------------------------------------------------------------------- 298 ! 250 299 #if defined key_iomput 251 300 CALL xios_finalize() ! end mpp communications with xios … … 262 311 #endif 263 312 ! 264 IF(lwm) THEN 265 IF( nstop == 0 ) THEN 266 STOP 0 267 ELSE 268 STOP 123 313 IF (.NOT. mpi_pre_initialised) THEN 314 IF(lwm) THEN 315 IF( nstop == 0 ) THEN 316 STOP 0 317 ELSE 318 STOP 123 319 ENDIF 269 320 ENDIF 270 321 ENDIF 271 322 ! 272 END SUBROUTINE nemo_gcm 323 END SUBROUTINE nemo_gcm_finalise 273 324 274 325 … … 294 345 ! !-------------------------------------------------! 295 346 ! 347 CALL set_mpi_pre_initialised() 296 348 #if defined key_iomput 297 349 ! IF( Agrif_Root() ) THEN … … 305 357 ! RSRH simplify initialisaton for test 306 358 IF( lk_oasis ) THEN 307 CALL mpi_init(nerror) 359 IF (.NOT. mpi_pre_initialised) THEN 360 CALL mpi_init(nerror) 361 ENDIF 308 362 CALL oasis_init_comp ( ncomp_id, "toyoce", nerror, .TRUE. ) 309 363 ! CALL cpl_init( "toyoce", ilocal_comm )
Note: See TracChangeset
for help on using the changeset viewer.