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 12465 – NEMO

Changeset 12465


Ignore:
Timestamp:
2020-02-26T10:27:04+01:00 (4 years ago)
Author:
jcastill
Message:

Changes as in the original branch but updated to vn4.1

Location:
NEMO/branches/UKMO/r12083_coupling_sequence/src/OCE
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/r12083_coupling_sequence/src/OCE/DIA/diawri.F90

    r11715 r12465  
    932932      ENDIF 
    933933#endif 
     934 
     935      IF (cdfile_name == "output.abort") THEN   
     936         CALL ctl_stop('STOP', 'NEMO abort from dia_wri_state')   
     937      END IF 
    934938      ! 
    935939      CALL iom_close( inum ) 
  • NEMO/branches/UKMO/r12083_coupling_sequence/src/OCE/LBC/lib_mpp.F90

    r11715 r12465  
    670670      !! 
    671671      !!---------------------------------------------------------------------- 
     672#if defined key_oasis3 
     673      USE mod_oasis      ! coupling routines 
     674#endif 
     675 
    672676      LOGICAL, OPTIONAL, INTENT(in) :: ld_abort    ! source process number 
    673677      LOGICAL ::   ll_abort 
     
    681685         CALL mpi_abort( MPI_COMM_WORLD ) 
    682686      ELSE 
     687#if defined key_oasis3   
     688      ! If we're trying to shut down cleanly then we need to consider the fact   
     689      ! that this could be part of an MPMD configuration - we don't want to   
     690      ! leave other components deadlocked.   
     691        CALL oasis_abort(nproc,"mppstop","NEMO initiated abort")   
     692#else 
    683693         CALL mppsync 
    684694         CALL mpi_finalize( info ) 
    685       ENDIF 
    686 #endif 
    687       IF( ll_abort ) STOP 123 
     695#endif 
     696      ENDIF 
     697#endif 
     698      IF( ll_abort ) CALL ctl_stop ('STOP', 'NEMO abort mppstop')  
    688699      ! 
    689700   END SUBROUTINE mppstop 
  • NEMO/branches/UKMO/r12083_coupling_sequence/src/OCE/SBC/sbccpl.F90

    r11715 r12465  
    219219      ALLOCATE( a_i(jpi,jpj,1) , STAT=ierr(2) )  ! used in sbcice_if.F90 (done here as there is no sbc_ice_if_init) 
    220220#endif 
    221       ALLOCATE( xcplmask(jpi,jpj,0:nn_cplmodel) , STAT=ierr(3) ) 
     221      !ALLOCATE( xcplmask(jpi,jpj,nn_cplmodel) , STAT=ierr(3) )     
     222      ! Hardwire three models as nn_cplmodel has not been read in from the namelist yet.     
     223      ALLOCATE( xcplmask(jpi,jpj,0:3) , STAT=ierr(3) ) 
    222224      ! 
    223225      IF( .NOT. ln_apr_dyn ) ALLOCATE( ssh_ib(jpi,jpj), ssh_ibb(jpi,jpj), apr(jpi, jpj), STAT=ierr(4) )  
     
    333335 
    334336      !                                   ! allocate sbccpl arrays 
    335       IF( sbc_cpl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_cpl_alloc : unable to allocate arrays' ) 
     337!      IF( sbc_cpl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_cpl_alloc : unable to allocate arrays' ) 
    336338      
    337339      ! ================================ ! 
  • NEMO/branches/UKMO/r12083_coupling_sequence/src/OCE/SBC/sbcice_cice.F90

    r11715 r12465  
    269269      ENDIF 
    270270      ! 
     271      ! In coupled mode get extra fields from CICE for passing back to atmosphere   
     272      IF ( ksbc == jp_purecpl ) CALL cice_sbc_hadgam(nit000)   
     273      ! 
    271274   END SUBROUTINE cice_sbc_init 
    272275 
     
    664667      !!--------------------------------------------------------------------- 
    665668      ! 
    666       IF( kt == nit000 )  THEN 
    667          IF(lwp) WRITE(numout,*)'cice_sbc_hadgam' 
    668          IF( sbc_cpl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_cpl_alloc : unable to allocate arrays' ) 
    669       ENDIF 
    670  
    671669      !                                         ! =========================== ! 
    672670      !                                         !   Prepare Coupling fields   ! 
  • NEMO/branches/UKMO/r12083_coupling_sequence/src/OCE/SBC/sbcmod.F90

    r11715 r12465  
    291291      !                             !* OASIS initialization 
    292292      ! 
    293       IF( lk_oasis )   CALL sbc_cpl_init( nn_ice )   ! Must be done before: (1) first time step 
    294       !                                              !                      (2) the use of nn_fsbc 
     293      IF( lk_oasis ) THEN   
     294         IF( sbc_cpl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_cpl_alloc : unable to allocate arrays' )    
     295         CALL sbc_cpl_init( nn_ice )   ! Must be done before: (1) first time step   
     296                                       ! (2) the use of nn_fsbc   
     297      ENDIF 
    295298      !     nn_fsbc initialization if OPA-SAS coupling via OASIS 
    296299      !     SAS time-step has to be declared in OASIS (mandatory) -> nn_fsbc has to be modified accordingly 
  • NEMO/branches/UKMO/r12083_coupling_sequence/src/OCE/nemogcm.F90

    r11715 r12465  
    8787   USE lbcnfd  , ONLY : isendto, nsndto, nfsloop, nfeloop   ! Setup of north fold exchanges  
    8888   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
     89   USE sbccpl 
    8990#if defined key_iomput 
    9091   USE xios           ! xIOserver 
     
    199200            ENDIF 
    200201             
     202            IF (lk_oasis) CALL sbc_cpl_snd( istp )  ! Coupling to atmos 
    201203            CALL stp        ( istp )  
     204            ! We don't couple on the final timestep because   
     205            ! our restart file has already been written   
     206            ! and contains all the necessary data for a   
     207            ! restart. sbc_cpl_snd could be called here   
     208            ! but it would require   
     209            ! a) A test to ensure it was not performed   
     210            !    on the very last time-step   
     211            ! b) the presence of another call to   
     212            !    sbc_cpl_snd call prior to the main DO loop   
     213            ! This solution produces identical results   
     214            ! with fewer lines of code. 
    202215            istp = istp + 1 
    203216 
     
    279292      IF( Agrif_Root() ) THEN 
    280293         IF( lk_oasis ) THEN 
    281             CALL cpl_init( "oceanx", ilocal_comm )                               ! nemo local communicator given by oasis 
     294            CALL cpl_init( "toyoce", ilocal_comm )                               ! nemo local communicator given by oasis 
    282295            CALL xios_initialize( "not used"       , local_comm =ilocal_comm )   ! send nemo communicator to xios 
    283296         ELSE 
     
    289302      IF( lk_oasis ) THEN 
    290303         IF( Agrif_Root() ) THEN 
    291             CALL cpl_init( "oceanx", ilocal_comm )          ! nemo local communicator given by oasis 
     304            CALL cpl_init( "toyoce", ilocal_comm )          ! nemo local communicator given by oasis 
    292305         ENDIF 
    293306         CALL mpp_start( ilocal_comm ) 
     
    493506      ! 
    494507      IF(lwp) WRITE(numout,cform_aaa)           ! Flag AAAAAAA 
     508      ! 
     509      IF (nstop > 0) THEN   
     510        CALL CTL_STOP('STOP','Critical errors in NEMO initialisation')   
     511      END IF 
    495512      ! 
    496513      IF( ln_timing    )   CALL timing_stop( 'nemo_init') 
  • NEMO/branches/UKMO/r12083_coupling_sequence/src/OCE/step.F90

    r11715 r12465  
    295295      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    296296                         CALL stp_ctl      ( kstp, indic ) 
     297 
     298      IF( indic < 0  ) THEN 
     299                         CALL ctl_stop('STOP','NEMO failure in stp') 
     300      ENDIF 
    297301                          
    298302      IF( kstp == nit000 ) THEN                          ! 1st time step only 
     
    305309      ! Coupled mode 
    306310      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    307 !!gm why lk_oasis and not lk_cpl ???? 
    308       IF( lk_oasis   )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges 
     311      !IF( lk_oasis   )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges 
    309312      ! 
    310313#if defined key_iomput 
Note: See TracChangeset for help on using the changeset viewer.