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 5600 for branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/SAO_SRC – NEMO

Ignore:
Timestamp:
2015-07-15T17:46:12+02:00 (9 years ago)
Author:
andrewryan
Message:

merged in latest version of trunk alongside changes to SAO_SRC to be compatible with latest OBS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/SAO_SRC/nemogcm.F90

    r5063 r5600  
    5353   USE lib_fortran     ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    5454   USE step            ! NEMO time-stepping                 (stp     routine) 
    55 #if defined key_oasis3 
    5655   USE cpl_oasis3      ! OASIS3 coupling 
    57 #elif defined key_oasis4 
    58    USE cpl_oasis4      ! OASIS4 coupling (not working) 
    59 #endif 
    6056   USE lib_mpp         ! distributed memory computing 
    6157#if defined key_iomput 
    6258   USE xios 
    6359#endif 
    64    USE lbcnfd, ONLY: isendto, nsndto ! Setup of north fold exchanges  
     60   USE lbcnfd, ONLY: isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges  
    6561 
    6662   ! Stand Alone Observation operator modules 
     
    124120      INTEGER ::   ios 
    125121      CHARACTER(len=80), DIMENSION(16) ::   cltxt 
    126       !! 
     122      ! 
    127123      NAMELIST/namctl/ ln_ctl, nn_print, nn_ictls, nn_ictle,   & 
    128124         &             nn_isplt, nn_jsplt, nn_jctls, nn_jctle,   & 
    129125         &             nn_bench, nn_timing 
    130126      NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 
    131          &             jpizoom, jpjzoom, jperio 
     127         &             jpizoom, jpjzoom, jperio, ln_use_jattr 
    132128      !!---------------------------------------------------------------------- 
    133129      ! 
    134130      cltxt = '' 
     131      cxios_context = 'nemo' 
    135132      ! 
    136133      !                             ! Open reference namelist and configuration namelist files 
     
    168165      nperio  = 0 
    169166      jperio  = 0 
     167      ln_use_jattr = .false. 
    170168   ENDIF 
    171169#endif 
     
    178176#if defined key_iomput 
    179177      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 ) 
    188187#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 
    198199#endif 
    199200      narea = narea + 1                                     ! mynode return the rank of proc (0 --> jpnij -1 ) 
     
    340341         WRITE(numout,*) '      left bottom j index of the zoom (in data domain) jpizoom = ', jpjzoom 
    341342         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 
    342344      ENDIF 
    343345      !                             ! Parameter control 
     
    467469      INTEGER, DIMENSION(nfactmax) :: ifact ! Array of factors 
    468470      !!---------------------------------------------------------------------- 
    469  
     471      ! 
    470472      ierr = 0 
    471  
     473      ! 
    472474      CALL factorise( ifact, nfactmax, nfact, num_pes, ierr ) 
    473  
     475      ! 
    474476      IF( nfact <= 1 ) THEN 
    475477         WRITE (numout, *) 'WARNING: factorisation of number of PEs failed' 
     
    513515      INTEGER, PARAMETER :: ntest = 14 
    514516      INTEGER :: ilfax(ntest) 
    515  
     517      ! 
    516518      ! lfax contains the set of allowed factors. 
    517519      data (ilfax(jl),jl=1,ntest) / 16384, 8192, 4096, 2048, 1024, 512, 256,  & 
     
    564566 
    565567#if defined key_mpp_mpi 
     568 
    566569   SUBROUTINE nemo_northcomms 
    567570      !!====================================================================== 
     
    598601          !loop over the other north-fold processes to find the processes 
    599602          !managing the points belonging to the sxT-dxT range 
    600           DO jn = jpnij - jpni +1, jpnij 
    601              IF ( njmppt(jn) == njmppmax ) THEN 
     603   
     604          DO jn = 1, jpni 
    602605                !sxT is the first point (in the global domain) of the jn 
    603606                !process 
    604                 sxT = nimppt(jn) 
     607                sxT = nfiimpp(jn, jpnj) 
    605608                !dxT is the last point (in the global domain) of the jn 
    606609                !process 
    607                 dxT = nimppt(jn) + nlcit(jn) - 1 
     610                dxT = nfiimpp(jn, jpnj) + nfilcit(jn, jpnj) - 1 
    608611                IF ((sxM .gt. sxT) .AND. (sxM .lt. dxT)) THEN 
    609612                   nsndto = nsndto + 1 
    610                    isendto(nsndto) = jn 
     613                     isendto(nsndto) = jn 
    611614                ELSEIF ((sxM .le. sxT) .AND. (dxM .ge. dxT)) THEN 
    612615                   nsndto = nsndto + 1 
    613                    isendto(nsndto) = jn 
     616                     isendto(nsndto) = jn 
    614617                ELSEIF ((dxM .lt. dxT) .AND. (sxT .lt. dxM)) THEN 
    615618                   nsndto = nsndto + 1 
    616                    isendto(nsndto) = jn 
     619                     isendto(nsndto) = jn 
    617620                END IF 
    618              END IF 
    619621          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 
    620635      ENDIF 
    621636      l_north_nogather = .TRUE. 
     
    626641   END SUBROUTINE nemo_northcomms 
    627642#endif 
     643 
    628644   !!====================================================================== 
    629645END MODULE nemogcm 
Note: See TracChangeset for help on using the changeset viewer.