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 10764 for NEMO/branches/UKMO/r8395_coupling_sequence – NEMO

Ignore:
Timestamp:
2019-03-15T13:13:07+01:00 (5 years ago)
Author:
jcastill
Message:

Minimal set of changes for coupling order

Location:
NEMO/branches/UKMO/r8395_coupling_sequence/NEMOGCM/NEMO/OPA_SRC
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/r8395_coupling_sequence/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90

    r10763 r10764  
    10701070      ENDIF 
    10711071#endif 
     1072 
     1073      IF (cdfile_name == "output.abort") THEN  
     1074         CALL ctl_stop('STOP', 'NEMO abort from dia_wri_state')  
     1075      END IF 
    10721076      !  
    10731077   END SUBROUTINE dia_wri_state 
  • NEMO/branches/UKMO/r8395_coupling_sequence/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90

    r10763 r10764  
    24062406 
    24072407   SUBROUTINE mppstop 
     2408      USE mod_oasis      ! coupling routines 
    24082409      !!---------------------------------------------------------------------- 
    24092410      !!                  ***  routine mppstop  *** 
     
    24152416      !!---------------------------------------------------------------------- 
    24162417      ! 
     2418#if defined key_oasis3  
     2419      ! If we're trying to shut down cleanly then we need to consider the fact  
     2420      ! that this could be part of an MPMD configuration - we don't want to  
     2421      ! leave other components deadlocked.  
     2422      CALL oasis_abort(nproc,"mppstop","NEMO initiated abort")  
     2423#else 
    24172424      CALL mppsync 
    24182425      CALL mpi_finalize( info ) 
     2426#endif 
    24192427      ! 
    24202428   END SUBROUTINE mppstop 
     
    43334341         ENDIF 
    43344342         CALL FLUSH(kout)  
    4335          STOP 'ctl_opn bad opening' 
     4343         CALL ctl_stop ('STOP', 'NEMO abort ctl_opn bad opening') 
    43364344      ENDIF 
    43374345      ! 
  • NEMO/branches/UKMO/r8395_coupling_sequence/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r10763 r10764  
    210210      ALLOCATE( a_i(jpi,jpj,1) , STAT=ierr(2) )  ! used in sbcice_if.F90 (done here as there is no sbc_ice_if_init) 
    211211#endif 
    212       ALLOCATE( xcplmask(jpi,jpj,0:nn_cplmodel) , STAT=ierr(3) ) 
     212      !ALLOCATE( xcplmask(jpi,jpj,nn_cplmodel) , STAT=ierr(3) )    
     213      ! Hardwire three models as nn_cplmodel has not been read in from the namelist yet.    
     214      ALLOCATE( xcplmask(jpi,jpj,0:3) , STAT=ierr(3) ) 
    213215      ! 
    214216      IF( .NOT. ln_apr_dyn ) ALLOCATE( ssh_ib(jpi,jpj), ssh_ibb(jpi,jpj), apr(jpi, jpj), STAT=ierr(4) )  
     
    318320 
    319321      !                                   ! allocate sbccpl arrays 
    320       IF( sbc_cpl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_cpl_alloc : unable to allocate arrays' ) 
     322      !IF( sbc_cpl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_cpl_alloc : unable to allocate arrays' ) 
    321323      
    322324      ! ================================ ! 
  • NEMO/branches/UKMO/r8395_coupling_sequence/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90

    r10763 r10764  
    286286      CALL wrk_dealloc( jpi,jpj, ztmp1, ztmp2 ) 
    287287      ! 
     288      ! In coupled mode get extra fields from CICE for passing back to atmosphere  
     289      IF ( ksbc == jp_purecpl ) CALL cice_sbc_hadgam(nit000)  
     290      ! 
    288291      IF( nn_timing == 1 )  CALL timing_stop('cice_sbc_init') 
    289292      ! 
     
    708711      IF( nn_timing == 1 )  CALL timing_start('cice_sbc_hadgam') 
    709712      ! 
    710       IF( kt == nit000 )  THEN 
    711          IF(lwp) WRITE(numout,*)'cice_sbc_hadgam' 
    712          IF( sbc_cpl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_cpl_alloc : unable to allocate arrays' ) 
    713       ENDIF 
    714  
    715713      !                                         ! =========================== ! 
    716714      !                                         !   Prepare Coupling fields   ! 
  • NEMO/branches/UKMO/r8395_coupling_sequence/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

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

    r10763 r10764  
    9090   USE lbcnfd , ONLY  : isendto, nsndto, nfsloop, nfeloop   ! Setup of north fold exchanges  
    9191   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
     92   USE sbccpl 
    9293#if defined key_iomput 
    9394   USE xios           ! xIOserver 
     
    181182#else 
    182183            IF ( .NOT. ln_diurnal_only ) THEN  
     184               IF (lk_oasis) CALL sbc_cpl_snd( istp )  ! Coupling to atmos 
    183185               CALL stp( istp )                 ! standard time stepping  
     186               ! We don't couple on the final timestep because  
     187               ! our restart file has already been written  
     188               ! and contains all the necessary data for a  
     189               ! restart. sbc_cpl_snd could be called here  
     190               ! but it would require  
     191               ! a) A test to ensure it was not performed  
     192               !    on the very last time-step  
     193               ! b) the presence of another call to  
     194               !    sbc_cpl_snd call prior to the main DO loop  
     195               ! This solution produces identical results  
     196               ! with fewer lines of code. 
    184197            ELSE  
    185198               CALL stp_diurnal( istp )        ! time step only the diurnal SST  
     
    304317      IF( Agrif_Root() ) THEN 
    305318         IF( lk_oasis ) THEN 
    306             CALL cpl_init( "oceanx", ilocal_comm )                               ! nemo local communicator given by oasis 
     319            CALL cpl_init( "toyoce", ilocal_comm )                               ! nemo local communicator given by oasis 
    307320            CALL xios_initialize( "not used"       ,local_comm= ilocal_comm )    ! send nemo communicator to xios 
    308321         ELSE 
     
    315328      IF( lk_oasis ) THEN 
    316329         IF( Agrif_Root() ) THEN 
    317             CALL cpl_init( "oceanx", ilocal_comm )          ! nemo local communicator given by oasis 
     330            CALL cpl_init( "toyoce", ilocal_comm )          ! nemo local communicator given by oasis 
    318331         ENDIF 
    319332         ! Nodes selection (control print return in cltxt) 
     
    516529                            CALL dia_tmb_init  ! TMB outputs 
    517530                            CALL dia_25h_init  ! 25h mean  outputs 
     531      
     532      IF (nstop > 0) THEN  
     533        CALL CTL_STOP('STOP','Critical errors in NEMO initialisation')  
     534      END IF  
    518535      ! 
    519536   END SUBROUTINE nemo_init 
  • NEMO/branches/UKMO/r8395_coupling_sequence/NEMOGCM/NEMO/OPA_SRC/step.F90

    r10763 r10764  
    328328                         CALL ctl_stop( 'step: indic < 0' ) 
    329329                         CALL dia_wri_state( 'output.abort', kstp ) 
     330                         CALL ctl_stop('STOP','NEMO failure in stp') 
    330331      ENDIF 
    331332      IF( kstp == nit000 ) THEN 
     
    339340      ! Coupled mode 
    340341      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    341 !!gm why lk_oasis and not lk_cpl ???? 
    342       IF( lk_oasis   )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges 
     342      !IF( lk_oasis   )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges 
    343343      ! 
    344344#if defined key_iomput 
Note: See TracChangeset for help on using the changeset viewer.