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 13771 for NEMO/branches – NEMO

Changeset 13771 for NEMO/branches


Ignore:
Timestamp:
2020-11-10T19:04:12+01:00 (3 years ago)
Author:
dancopsey
Message:

Merge in version NEMO_4.0.1 version of this branch.

Location:
NEMO/branches/UKMO/NEMO_4.0.3_GC_couple_pkg
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.3_GC_couple_pkg/cfgs/SHARED/namelist_ref

    r13587 r13771  
    335335   sn_rcv_tauwoc =   'none'                 ,    'no'    ,     ''      ,         ''          ,   '' 
    336336   sn_rcv_tauw   =   'none'                 ,    'no'    ,     ''      ,         ''          ,   '' 
    337    sn_rcv_wdrag  =   'none'                 ,    'no'    ,     ''      ,         ''          ,   '' 
    338337/ 
    339338!----------------------------------------------------------------------- 
  • NEMO/branches/UKMO/NEMO_4.0.3_GC_couple_pkg/src/OCE/LBC/lib_mpp.F90

    r13587 r13771  
    666666 
    667667   SUBROUTINE mppstop( ld_abort )  
     668 
     669      USE mod_oasis      ! coupling routines 
     670 
    668671      !!---------------------------------------------------------------------- 
    669672      !!                  ***  routine mppstop  *** 
     
    679682      IF( PRESENT(ld_abort) ) ll_abort = ld_abort 
    680683      ! 
     684 
     685#if defined key_oasis3 
     686      ! If we're trying to shut down cleanly then we need to consider the fact 
     687      ! that this could be part of an MPMD configuration - we don't want to 
     688      ! leave other components deadlocked. 
     689 
     690      CALL oasis_abort(nproc,"mppstop","NEMO initiated abort") 
     691 
     692 
     693#else 
    681694#if defined key_mpp_mpi 
    682695      IF(ll_abort) THEN 
     
    689702      IF( ll_abort ) STOP 123 
    690703      ! 
     704#endif 
    691705   END SUBROUTINE mppstop 
    692706 
  • NEMO/branches/UKMO/NEMO_4.0.3_GC_couple_pkg/src/OCE/SBC/cpl_oasis3.F90

    r13587 r13771  
    448448                     WRITE(numout,*) '     -     Sum value is ',    SUM(pdata(nldi:nlei,nldj:nlej,jc)) 
    449449                     WRITE(numout,*) '****************' 
     450                     CALL FLUSH(numout) 
    450451                  ENDIF 
    451452                   
  • NEMO/branches/UKMO/NEMO_4.0.3_GC_couple_pkg/src/OCE/SBC/geo2ocean.F90

    r13587 r13771  
    2626   PRIVATE 
    2727 
     28   PUBLIC   repcmo    ! called in sbccpl 
    2829   PUBLIC   rot_rep   ! called in sbccpl, fldread, and cyclone 
    2930   PUBLIC   geo2oce   ! called in sbccpl 
     
    5051   !!---------------------------------------------------------------------- 
    5152CONTAINS 
     53 
     54   SUBROUTINE repcmo ( pxu1, pyu1, pxv1, pyv1,   & 
     55                       px2 , py2 , kchoix  ) 
     56      !!---------------------------------------------------------------------- 
     57      !!                  ***  ROUTINE repcmo  *** 
     58      !! 
     59      !! ** Purpose :   Change vector componantes from a geographic grid to a 
     60      !!      stretched coordinates grid. 
     61      !! 
     62      !! ** Method  :   Initialization of arrays at the first call. 
     63      !! 
     64      !! ** Action  : - px2 : first  componante (defined at u point) 
     65      !!              - py2 : second componante (defined at v point) 
     66      !!---------------------------------------------------------------------- 
     67      REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj) ::   pxu1, pyu1   ! geographic vector componantes at u-point 
     68      REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj) ::   pxv1, pyv1   ! geographic vector componantes at v-point 
     69      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   px2          ! i-componante (defined at u-point) 
     70      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   py2          ! j-componante (defined at v-point) 
     71      !!---------------------------------------------------------------------- 
     72      INTEGER, INTENT( IN ) ::   & 
     73         kchoix   ! type of transformation 
     74                  ! = 1 change from geographic to model grid. 
     75                  ! =-1 change from model to geographic grid 
     76      !!---------------------------------------------------------------------- 
     77  
     78      SELECT CASE (kchoix) 
     79      CASE ( 1) 
     80        ! Change from geographic to stretched coordinate 
     81        ! ---------------------------------------------- 
     82      
     83        CALL rot_rep( pxu1, pyu1, 'U', 'en->i',px2 ) 
     84        CALL rot_rep( pxv1, pyv1, 'V', 'en->j',py2 ) 
     85      CASE (-1) 
     86       ! Change from stretched to geographic coordinate 
     87       ! ---------------------------------------------- 
     88      
     89       CALL rot_rep( pxu1, pyu1, 'U', 'ij->e',px2 ) 
     90       CALL rot_rep( pxv1, pyv1, 'V', 'ij->n',py2 ) 
     91     END SELECT 
     92      
     93   END SUBROUTINE repcmo 
    5294 
    5395   SUBROUTINE rot_rep ( pxin, pyin, cd_type, cdtodo, prot ) 
  • NEMO/branches/UKMO/NEMO_4.0.3_GC_couple_pkg/src/OCE/SBC/sbccpl.F90

    r13587 r13771  
    414414         srcv(jpr_otx2:jpr_otz2)%clgrid  = 'V'        !           and           V-point 
    415415         srcv(jpr_itx1:jpr_itz1)%clgrid  = 'F'        ! ice components given at F-point 
    416          srcv(jpr_otx1:jpr_otz2)%laction = .TRUE.     ! receive oce components on grid 1 & 2 
     416         !srcv(jpr_otx1:jpr_otz2)%laction = .TRUE.     ! receive oce components on grid 1 & 2 
     417! Currently needed for HadGEM3 - but shouldn't affect anyone else for the moment 
     418         srcv(jpr_otx1)%laction = .TRUE.  
     419         srcv(jpr_oty1)%laction = .TRUE. 
     420! 
    417421         srcv(jpr_itx1:jpr_itz1)%laction = .TRUE.     ! receive ice components on grid 1 only 
    418422      CASE( 'T,I' )  
     
    11231127      LOGICAL  ::   llnewtx, llnewtau      ! update wind stress components and module?? 
    11241128      INTEGER  ::   ji, jj, jn             ! dummy loop indices 
    1125       INTEGER  ::   isec                   ! number of seconds since nit000 (assuming rdt did not change since nit000) 
     1129      INTEGER  ::   isec                   ! number of seconds since nit000 (assuming rdttra did not change since nit000) 
     1130      INTEGER  ::   ikchoix 
    11261131      REAL(wp) ::   zcumulneg, zcumulpos   ! temporary scalars      
    11271132      REAL(wp) ::   zcoef                  ! temporary scalar 
    11281133      REAL(wp) ::   zrhoa  = 1.22          ! Air density kg/m3 
    11291134      REAL(wp) ::   zcdrag = 1.5e-3        ! drag coefficient 
     1135      REAL(wp), DIMENSION(jpi,jpj) ::   ztx2, zty2 
    11301136      REAL(wp) ::   zzx, zzy               ! temporary variables 
    11311137      REAL(wp), DIMENSION(jpi,jpj) ::   ztx, zty, zmsk, zemp, zqns, zqsr, zcloud_fra 
     
    11761182            IF( TRIM( sn_rcv_tau%clvor ) == 'eastward-northward' ) THEN   ! 2 components oriented along the local grid 
    11771183               !                                                       ! (geographical to local grid -> rotate the components) 
    1178                CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->i', ztx )    
    1179                IF( srcv(jpr_otx2)%laction ) THEN 
    1180                   CALL rot_rep( frcv(jpr_otx2)%z3(:,:,1), frcv(jpr_oty2)%z3(:,:,1), srcv(jpr_otx2)%clgrid, 'en->j', zty )    
    1181                ELSE 
    1182                   CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->j', zty )   
     1184               IF( srcv(jpr_otx1)%clgrid == 'U' .AND. (.NOT. srcv(jpr_otx2)%laction) ) THEN 
     1185                  ! Temporary code for HadGEM3 - will be removed eventually. 
     1186        ! Only applies when we have only taux on U grid and tauy on V grid 
     1187             DO jj=2,jpjm1 
     1188                DO ji=2,jpim1 
     1189                     ztx(ji,jj)=0.25*vmask(ji,jj,1)                & 
     1190                        *(frcv(jpr_otx1)%z3(ji,jj,1)+frcv(jpr_otx1)%z3(ji-1,jj,1)    & 
     1191                        +frcv(jpr_otx1)%z3(ji,jj+1,1)+frcv(jpr_otx1)%z3(ji-1,jj+1,1)) 
     1192                     zty(ji,jj)=0.25*umask(ji,jj,1)                & 
     1193                        *(frcv(jpr_oty1)%z3(ji,jj,1)+frcv(jpr_oty1)%z3(ji+1,jj,1)    & 
     1194                        +frcv(jpr_oty1)%z3(ji,jj-1,1)+frcv(jpr_oty1)%z3(ji+1,jj-1,1)) 
     1195                ENDDO 
     1196             ENDDO 
     1197                    
     1198             ikchoix = 1 
     1199             CALL repcmo (frcv(jpr_otx1)%z3(:,:,1),zty,ztx,frcv(jpr_oty1)%z3(:,:,1),ztx2,zty2,ikchoix) 
     1200             CALL lbc_lnk ('jpr_otx1', ztx2,'U', -1. ) 
     1201             CALL lbc_lnk ('jpr_oty1', zty2,'V', -1. ) 
     1202             frcv(jpr_otx1)%z3(:,:,1)=ztx2(:,:) 
     1203             frcv(jpr_oty1)%z3(:,:,1)=zty2(:,:) 
     1204          ELSE 
     1205             CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->i', ztx )    
     1206             frcv(jpr_otx1)%z3(:,:,1) = ztx(:,:)      ! overwrite 1st component on the 1st grid 
     1207             IF( srcv(jpr_otx2)%laction ) THEN 
     1208                CALL rot_rep( frcv(jpr_otx2)%z3(:,:,1), frcv(jpr_oty2)%z3(:,:,1), srcv(jpr_otx2)%clgrid, 'en->j', zty )    
     1209             ELSE 
     1210                CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->j', zty )  
     1211             ENDIF 
     1212          frcv(jpr_oty1)%z3(:,:,1) = zty(:,:)      ! overwrite 2nd component on the 2nd grid   
    11831213               ENDIF 
    1184                frcv(jpr_otx1)%z3(:,:,1) = ztx(:,:)      ! overwrite 1st component on the 1st grid 
    1185                frcv(jpr_oty1)%z3(:,:,1) = zty(:,:)      ! overwrite 2nd component on the 2nd grid 
    11861214            ENDIF 
    11871215            !                               
     
    21762204      ! 
    21772205      INTEGER ::   ji, jj, jl   ! dummy loop indices 
     2206      INTEGER ::   ikchoix 
    21782207      INTEGER ::   isec, info   ! local integer 
    21792208      REAL(wp) ::   zumax, zvmax 
     
    24522481         !                                                  j+1   j     -----V---F 
    24532482         ! surface velocity always sent from T point                     !       | 
    2454          !                                                        j      |   T   U 
     2483         ! [except for HadGEM3]                                   j      |   T   U 
    24552484         !                                                               |       | 
    24562485         !                                                   j    j-1   -I-------| 
     
    24642493            SELECT CASE( TRIM( sn_snd_crt%cldes ) ) 
    24652494            CASE( 'oce only'             )      ! C-grid ==> T 
    2466                DO jj = 2, jpjm1 
    2467                   DO ji = fs_2, fs_jpim1   ! vector opt. 
    2468                      zotx1(ji,jj) = 0.5 * ( un(ji,jj,1) + un(ji-1,jj  ,1) ) 
    2469                      zoty1(ji,jj) = 0.5 * ( vn(ji,jj,1) + vn(ji  ,jj-1,1) )  
     2495               IF ( TRIM( sn_snd_crt%clvgrd ) == 'T' ) THEN 
     2496                  DO jj = 2, jpjm1 
     2497                     DO ji = fs_2, fs_jpim1   ! vector opt. 
     2498                        zotx1(ji,jj) = 0.5 * ( un(ji,jj,1) + un(ji-1,jj  ,1) ) 
     2499                        zoty1(ji,jj) = 0.5 * ( vn(ji,jj,1) + vn(ji  ,jj-1,1) )  
     2500                     END DO 
    24702501                  END DO 
    2471                END DO 
     2502               ELSE 
     2503! Temporarily Changed for UKV 
     2504                  DO jj = 2, jpjm1 
     2505                     DO ji = 2, jpim1 
     2506                        zotx1(ji,jj) = un(ji,jj,1) 
     2507                        zoty1(ji,jj) = vn(ji,jj,1) 
     2508                     END DO 
     2509                  END DO 
     2510               ENDIF 
    24722511            CASE( 'weighted oce and ice' )      ! Ocean and Ice on C-grid ==> T   
    24732512               DO jj = 2, jpjm1 
     
    24972536         IF( TRIM( sn_snd_crt%clvor ) == 'eastward-northward' ) THEN             ! Rotation of the components 
    24982537            !                                                                     ! Ocean component 
    2499             CALL rot_rep( zotx1, zoty1, ssnd(jps_ocx1)%clgrid, 'ij->e', ztmp1 )       ! 1st component  
    2500             CALL rot_rep( zotx1, zoty1, ssnd(jps_ocx1)%clgrid, 'ij->n', ztmp2 )       ! 2nd component  
    2501             zotx1(:,:) = ztmp1(:,:)                                                   ! overwrite the components  
    2502             zoty1(:,:) = ztmp2(:,:) 
    2503             IF( ssnd(jps_ivx1)%laction ) THEN                                     ! Ice component 
    2504                CALL rot_rep( zitx1, zity1, ssnd(jps_ivx1)%clgrid, 'ij->e', ztmp1 )    ! 1st component  
    2505                CALL rot_rep( zitx1, zity1, ssnd(jps_ivx1)%clgrid, 'ij->n', ztmp2 )    ! 2nd component  
    2506                zitx1(:,:) = ztmp1(:,:)                                                ! overwrite the components  
    2507                zity1(:,:) = ztmp2(:,:) 
    2508             ENDIF 
     2538            IF ( TRIM( sn_snd_crt%clvgrd ) == 'T' ) THEN 
     2539               CALL rot_rep( zotx1, zoty1, ssnd(jps_ocx1)%clgrid, 'ij->e', ztmp1 )       ! 1st component 
     2540               CALL rot_rep( zotx1, zoty1, ssnd(jps_ocx1)%clgrid, 'ij->n', ztmp2 )       ! 2nd component 
     2541               zotx1(:,:) = ztmp1(:,:)                                                   ! overwrite the components 
     2542               zoty1(:,:) = ztmp2(:,:) 
     2543               IF( ssnd(jps_ivx1)%laction ) THEN                                  ! Ice component 
     2544                  CALL rot_rep( zitx1, zity1, ssnd(jps_ivx1)%clgrid, 'ij->e', ztmp1 )    ! 1st component 
     2545                  CALL rot_rep( zitx1, zity1, ssnd(jps_ivx1)%clgrid, 'ij->n', ztmp2 )    ! 2nd component 
     2546                  zitx1(:,:) = ztmp1(:,:)                                                ! overwrite the components 
     2547                  zity1(:,:) = ztmp2(:,:) 
     2548               ENDIF 
     2549            ELSE 
     2550               ! Temporary code for HadGEM3 - will be removed eventually. 
     2551               ! Only applies when we want uvel on U grid and vvel on V grid 
     2552               ! Rotate U and V onto geographic grid before sending. 
     2553 
     2554               DO jj=2,jpjm1 
     2555                  DO ji=2,jpim1 
     2556                     ztmp1(ji,jj)=0.25*vmask(ji,jj,1)                  & 
     2557                          *(zotx1(ji,jj)+zotx1(ji-1,jj)    & 
     2558                          +zotx1(ji,jj+1)+zotx1(ji-1,jj+1)) 
     2559                     ztmp2(ji,jj)=0.25*umask(ji,jj,1)                  & 
     2560                          *(zoty1(ji,jj)+zoty1(ji+1,jj)    & 
     2561                          +zoty1(ji,jj-1)+zoty1(ji+1,jj-1)) 
     2562                  ENDDO 
     2563               ENDDO 
     2564                
     2565               ! Ensure any N fold and wrap columns are updated 
     2566               CALL lbc_lnk('zotx1', ztmp1, 'V', -1.0) 
     2567               CALL lbc_lnk('zoty1', ztmp2, 'U', -1.0) 
     2568                
     2569               ikchoix = -1 
     2570               CALL repcmo (zotx1,ztmp2,ztmp1,zoty1,zotx1,zoty1,ikchoix) 
     2571           ENDIF 
    25092572         ENDIF 
    25102573         ! 
  • NEMO/branches/UKMO/NEMO_4.0.3_GC_couple_pkg/src/OCE/nemogcm.F90

    r13587 r13771  
    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 
     
    192193            ENDIF 
    193194             
     195            IF (lk_oasis) THEN 
     196               CALL sbc_cpl_snd( istp )  ! Coupling to atmos 
     197            ENDIF 
    194198            CALL stp        ( istp )  
    195199            istp = istp + 1 
     
    280284      IF( Agrif_Root() ) THEN 
    281285         IF( lk_oasis ) THEN 
    282             CALL cpl_init( "oceanx", ilocal_comm )                               ! nemo local communicator given by oasis 
     286            CALL cpl_init( "toyoce", ilocal_comm )                     ! nemo local communicator given by oasis 
    283287            CALL xios_initialize( "not used"       , local_comm =ilocal_comm )   ! send nemo communicator to xios 
    284288         ELSE 
     
    290294      IF( lk_oasis ) THEN 
    291295         IF( Agrif_Root() ) THEN 
    292             CALL cpl_init( "oceanx", ilocal_comm )          ! nemo local communicator given by oasis 
     296            CALL cpl_init( "toyoce", ilocal_comm )                      ! nemo local communicator given by oasis 
    293297         ENDIF 
    294298         CALL mpp_start( ilocal_comm ) 
     
    499503      ! 
    500504      IF(lwp) WRITE(numout,cform_aaa)           ! Flag AAAAAAA 
     505       
     506      IF (nstop > 0) THEN 
     507        CALL CTL_STOP('STOP','Critical errors in NEMO initialisation') 
     508      END IF 
     509       
    501510      ! 
    502511      IF( ln_timing    )   CALL timing_stop( 'nemo_init') 
  • NEMO/branches/UKMO/NEMO_4.0.3_GC_couple_pkg/src/OCE/step.F90

    r13587 r13771  
    311311      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    312312!!gm why lk_oasis and not lk_cpl ???? 
    313       IF( lk_oasis .AND. nstop == 0 )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges 
     313      ! IF( lk_oasis .AND. nstop == 0 )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges 
    314314      ! 
    315315#if defined key_iomput 
Note: See TracChangeset for help on using the changeset viewer.