- Timestamp:
- 2020-07-16T15:27:24+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_pkg/src/OCE/nemogcm.F90
r11913 r13311 41 41 !! nemo_alloc : dynamical allocation 42 42 !!---------------------------------------------------------------------- 43 USE mod_oasis ! RSRH temp 43 44 USE step_oce ! module used in the ocean time stepping module (step.F90) 44 45 USE phycst ! physical constant (par_cst routine) … … 130 131 !! Madec, 2008, internal report, IPSL. 131 132 !!---------------------------------------------------------------------- 132 INTEGER :: istp ! time step index133 INTEGER :: istp, nerror ! time step index 133 134 REAL(wp):: zstptiming ! elapsed time for 1 time step 134 135 !!---------------------------------------------------------------------- … … 200 201 ENDIF 201 202 202 IF (lk_oasis) THEN 203 CALL sbc_cpl_snd( istp ) ! Coupling to atmos 204 ENDIF 203 ! RSRH. You can compile with OASIS but not want to do any 204 ! coupling. We need to cater for that properly! 205 IF (ln_cpl) CALL sbc_cpl_snd( istp ) ! Coupling to atmos 206 205 207 CALL stp ( istp ) 206 208 istp = istp + 1 … … 239 241 IF( ln_timing ) CALL timing_finalize 240 242 ! 243 write(numout,*) "RSRH calling nemo_closefile " , lk_oasis; flush(numout) 241 244 CALL nemo_closefile 245 write(numout,*) "RSRH done closefiles " , lk_oasis; flush(numout) 242 246 ! 243 247 #if defined key_iomput 244 CALL xios_finalize ! end mpp communications with xios 245 IF( lk_oasis ) CALL cpl_finalize ! end coupling and mpp communications with OASIS 248 CALL xios_finalize() ! end mpp communications with xios 249 250 IF (lk_oasis) CALL oasis_terminate(nerror) 251 CALL mppstop ! RSRH temp for development 252 !IF( lk_oasis ) CALL cpl_finalize() ! end coupling and mpp communications with OASIS 246 253 #else 247 IF ( lk_oasis ) THEN ; CALL cpl_finalize ! end coupling and mpp communications with OASIS 248 ELSEIF( lk_mpp ) THEN ; CALL mppstop ! end mpp communications 254 IF ( lk_oasis ) THEN 255 CALL cpl_finalize() ! end coupling and mpp communications with OASIS 256 ELSEIF( lk_mpp ) THEN 257 CALL mppstop ! end mpp communications 249 258 ENDIF 250 259 #endif 251 260 ! 252 261 IF(lwm) THEN 253 IF( nstop == 0 ) THEN ; STOP 0 254 ELSE ; STOP 123 262 IF( nstop == 0 ) THEN 263 STOP 0 264 ELSE 265 STOP 123 255 266 ENDIF 256 267 ENDIF … … 265 276 !! ** Purpose : initialization of the NEMO GCM 266 277 !!---------------------------------------------------------------------- 267 INTEGER :: ios, ilocal_comm 278 INTEGER :: ios, ilocal_comm, nerror, ncomp_id, llmpi_init, ierr ! local integers 268 279 !! 269 280 NAMELIST/namctl/ ln_ctl , sn_cfctl, nn_print, nn_ictls, nn_ictle, & … … 281 292 ! 282 293 #if defined key_iomput 283 IF( Agrif_Root() ) THEN 284 IF( lk_oasis ) THEN 285 CALL cpl_init( "toyoce", ilocal_comm ) ! nemo local communicator given by oasis 286 CALL xios_initialize( "not used" , local_comm =ilocal_comm ) ! send nemo communicator to xios 287 ELSE 288 CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm ) ! nemo local communicator given by xios 289 ENDIF 294 ! IF( Agrif_Root() ) THEN 295 ! IF( lk_oasis ) THEN 296 ! CALL cpl_init( "toyoce", ilocal_comm ) ! nemo local communicator given by oasis 297 ! CALL xios_initialize( "not used" , local_comm =ilocal_comm ) ! send nemo communicator to xios 298 ! ELSE 299 ! CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm ) ! nemo local communicator given by xios 300 ! ENDIF 301 ! ENDIF 302 ! RSRH simplify initialisaton for test 303 IF( lk_oasis ) THEN 304 CALL mpi_init(nerror) 305 CALL oasis_init_comp ( ncomp_id, "toyoce", nerror, .FALSE. ) 306 ! CALL cpl_init( "toyoce", ilocal_comm ) 307 CALL oasis_get_localcomm ( ilocal_comm , nerror ) 308 CALL xios_initialize( "toyoce", local_comm =ilocal_comm ) 290 309 ENDIF 291 310 CALL mpp_start( ilocal_comm ) … … 330 349 lwp = (narea == 1) .OR. ln_ctl ! control of all listing output print 331 350 ! 351 WRITE(numout,*) "RSRH NEMO start local com=",ilocal_comm ; flush(numout) 352 WRITE(numout,*) "RSRH NEMO my rank=",mpprank ; flush(numout) 332 353 IF(lwp) THEN ! open listing units 333 354 ! … … 335 356 & CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE., narea ) 336 357 ! 358 359 WRITE(numout,*) "RSRH NEMO start local com=",ilocal_comm ; flush(numout) 360 WRITE(numout,*) "RSRH NEMO my rank=",mpprank ; flush(numout) 361 337 362 WRITE(numout,*) 338 363 WRITE(numout,*) ' CNRS - NERC - Met OFFICE - MERCATOR-ocean - CMCC' … … 625 650 ! 626 651 CALL iom_close ! close all input/output files managed by iom_* 652 653 write(numout,*) "RSRH after iom_close";flush(numout) 627 654 ! 628 655 IF( numstp /= -1 ) CLOSE( numstp ) ! time-step file … … 640 667 IF( numdct_salt /= -1 ) CLOSE( numdct_salt ) ! salt transports 641 668 ! 642 numout = 6 ! redefine numout in case it is used after this point...669 ! numout = 6 ! redefine numout in case it is used after this point... 643 670 ! 644 671 END SUBROUTINE nemo_closefile
Note: See TracChangeset
for help on using the changeset viewer.