- Timestamp:
- 2015-07-15T17:46:12+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/SAO_SRC/nemogcm.F90
r5063 r5600 53 53 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 54 54 USE step ! NEMO time-stepping (stp routine) 55 #if defined key_oasis356 55 USE cpl_oasis3 ! OASIS3 coupling 57 #elif defined key_oasis458 USE cpl_oasis4 ! OASIS4 coupling (not working)59 #endif60 56 USE lib_mpp ! distributed memory computing 61 57 #if defined key_iomput 62 58 USE xios 63 59 #endif 64 USE lbcnfd, ONLY: isendto, nsndto ! Setup of north fold exchanges60 USE lbcnfd, ONLY: isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 65 61 66 62 ! Stand Alone Observation operator modules … … 124 120 INTEGER :: ios 125 121 CHARACTER(len=80), DIMENSION(16) :: cltxt 126 ! !122 ! 127 123 NAMELIST/namctl/ ln_ctl, nn_print, nn_ictls, nn_ictle, & 128 124 & nn_isplt, nn_jsplt, nn_jctls, nn_jctle, & 129 125 & nn_bench, nn_timing 130 126 NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 131 & jpizoom, jpjzoom, jperio 127 & jpizoom, jpjzoom, jperio, ln_use_jattr 132 128 !!---------------------------------------------------------------------- 133 129 ! 134 130 cltxt = '' 131 cxios_context = 'nemo' 135 132 ! 136 133 ! ! Open reference namelist and configuration namelist files … … 168 165 nperio = 0 169 166 jperio = 0 167 ln_use_jattr = .false. 170 168 ENDIF 171 169 #endif … … 178 176 #if defined key_iomput 179 177 IF( Agrif_Root() ) THEN 180 # if defined key_oasis3 || defined key_oasis4 181 CALL cpl_prism_init( ilocal_comm ) ! nemo local communicator given by oasis 182 CALL xios_initialize( "oceanx",local_comm=ilocal_comm ) 183 # else 184 CALL xios_initialize( "nemo",return_comm=ilocal_comm ) 185 # endif 186 ENDIF 187 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection 178 IF( lk_oasis ) THEN 179 CALL cpl_init( "oceanx", ilocal_comm ) ! nemo local communicator given by oasis 180 CALL xios_initialize( "not used",local_comm=ilocal_comm ) ! send nemo communicator to xios 181 ELSE 182 CALL xios_initialize( "for_xios_mpi_id",return_comm=ilocal_comm ) ! nemo local communicator given by xios 183 ENDIF 184 ENDIF 185 ! Nodes selection (control print return in cltxt) 186 narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) 188 187 #else 189 # if defined key_oasis3 || defined key_oasis4 190 IF( Agrif_Root() ) THEN 191 CALL cpl_prism_init( ilocal_comm ) ! nemo local communicator given by oasis 192 ENDIF 193 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection (control print return in cltxt) 194 # else 195 ilocal_comm = 0 196 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop ) ! Nodes selection (control print return in cltxt) 197 # endif 188 IF( lk_oasis ) THEN 189 IF( Agrif_Root() ) THEN 190 CALL cpl_init( "oceanx", ilocal_comm ) ! nemo local communicator given by oasis 191 ENDIF 192 ! Nodes selection (control print return in cltxt) 193 narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) 194 ELSE 195 ilocal_comm = 0 196 ! Nodes selection (control print return in cltxt) 197 narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop ) 198 ENDIF 198 199 #endif 199 200 narea = narea + 1 ! mynode return the rank of proc (0 --> jpnij -1 ) … … 340 341 WRITE(numout,*) ' left bottom j index of the zoom (in data domain) jpizoom = ', jpjzoom 341 342 WRITE(numout,*) ' lateral cond. type (between 0 and 6) jperio = ', jperio 343 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 342 344 ENDIF 343 345 ! ! Parameter control … … 467 469 INTEGER, DIMENSION(nfactmax) :: ifact ! Array of factors 468 470 !!---------------------------------------------------------------------- 469 471 ! 470 472 ierr = 0 471 473 ! 472 474 CALL factorise( ifact, nfactmax, nfact, num_pes, ierr ) 473 475 ! 474 476 IF( nfact <= 1 ) THEN 475 477 WRITE (numout, *) 'WARNING: factorisation of number of PEs failed' … … 513 515 INTEGER, PARAMETER :: ntest = 14 514 516 INTEGER :: ilfax(ntest) 515 517 ! 516 518 ! lfax contains the set of allowed factors. 517 519 data (ilfax(jl),jl=1,ntest) / 16384, 8192, 4096, 2048, 1024, 512, 256, & … … 564 566 565 567 #if defined key_mpp_mpi 568 566 569 SUBROUTINE nemo_northcomms 567 570 !!====================================================================== … … 598 601 !loop over the other north-fold processes to find the processes 599 602 !managing the points belonging to the sxT-dxT range 600 DO jn = jpnij - jpni +1, jpnij601 IF ( njmppt(jn) == njmppmax ) THEN603 604 DO jn = 1, jpni 602 605 !sxT is the first point (in the global domain) of the jn 603 606 !process 604 sxT = n imppt(jn)607 sxT = nfiimpp(jn, jpnj) 605 608 !dxT is the last point (in the global domain) of the jn 606 609 !process 607 dxT = n imppt(jn) + nlcit(jn) - 1610 dxT = nfiimpp(jn, jpnj) + nfilcit(jn, jpnj) - 1 608 611 IF ((sxM .gt. sxT) .AND. (sxM .lt. dxT)) THEN 609 612 nsndto = nsndto + 1 610 isendto(nsndto) = jn613 isendto(nsndto) = jn 611 614 ELSEIF ((sxM .le. sxT) .AND. (dxM .ge. dxT)) THEN 612 615 nsndto = nsndto + 1 613 isendto(nsndto) = jn616 isendto(nsndto) = jn 614 617 ELSEIF ((dxM .lt. dxT) .AND. (sxT .lt. dxM)) THEN 615 618 nsndto = nsndto + 1 616 isendto(nsndto) = jn619 isendto(nsndto) = jn 617 620 END IF 618 END IF619 621 END DO 622 nfsloop = 1 623 nfeloop = nlci 624 DO jn = 2,jpni-1 625 IF(nfipproc(jn,jpnj) .eq. (narea - 1)) THEN 626 IF (nfipproc(jn - 1 ,jpnj) .eq. -1) THEN 627 nfsloop = nldi 628 ENDIF 629 IF (nfipproc(jn + 1,jpnj) .eq. -1) THEN 630 nfeloop = nlei 631 ENDIF 632 ENDIF 633 END DO 634 620 635 ENDIF 621 636 l_north_nogather = .TRUE. … … 626 641 END SUBROUTINE nemo_northcomms 627 642 #endif 643 628 644 !!====================================================================== 629 645 END MODULE nemogcm
Note: See TracChangeset
for help on using the changeset viewer.