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 888 for trunk/NEMO/OPA_SRC/lib_mpp.F90 – NEMO

Ignore:
Timestamp:
2008-04-11T19:05:03+02:00 (16 years ago)
Author:
ctlod
Message:

merge dev_001_SBC branche with the trunk to include the New Surface Module package, see ticket: #113

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/lib_mpp.F90

    r869 r888  
    4848   !!---------------------------------------------------------------------- 
    4949   !!  OPA 9.0 , LOCEAN-IPSL (2005)  
    50    !! $Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/lib_mpp.F90,v 1.21 2007/06/05 10:28:55 opalod Exp $  
     50   !! $Id$ 
    5151   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
    5252   !!--------------------------------------------------------------------- 
     
    278278   !!---------------------------------------------------------------------- 
    279279   !!  OPA 9.0 , LOCEAN-IPSL (2005)  
    280    !! $Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/lib_mpp.F90,v 1.21 2007/06/05 10:28:55 opalod Exp $  
     280   !! $Id$ 
    281281   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
    282282   !!--------------------------------------------------------------------- 
     
    605605#endif 
    606606 
    607    SUBROUTINE mpp_lnk_3d( ptab, cd_type, psgn, cd_mpp ) 
     607   SUBROUTINE mpp_lnk_3d( ptab, cd_type, psgn, cd_mpp, pval ) 
    608608      !!---------------------------------------------------------------------- 
    609609      !!                  ***  routine mpp_lnk_3d  *** 
     
    640640      CHARACTER(len=3), INTENT( in ), OPTIONAL ::    & 
    641641         cd_mpp        ! fill the overlap area only  
     642      REAL(wp)        , INTENT(in   ), OPTIONAL           ::   pval      ! background value (used at closed boundaries) 
    642643 
    643644      !! * Local variables 
     
    646647      INTEGER ::   ml_req1, ml_req2, ml_err     ! for key_mpi_isend 
    647648      INTEGER ::   ml_stat(MPI_STATUS_SIZE)     ! for key_mpi_isend 
     649      REAL(wp) ::   zland 
    648650      !!---------------------------------------------------------------------- 
    649651 
    650652      ! 1. standard boundary treatment 
    651653      ! ------------------------------ 
     654 
     655      IF( PRESENT( pval ) ) THEN      ! set land value (zero by default) 
     656         zland = pval 
     657      ELSE 
     658         zland = 0.e0 
     659      ENDIF 
    652660 
    653661      IF( PRESENT( cd_mpp ) ) THEN 
     
    670678            SELECT CASE ( cd_type ) 
    671679            CASE ( 'T', 'U', 'V', 'W' ) 
    672                ptab(     1       :jpreci,:,:) = 0.e0 
    673                ptab(nlci-jpreci+1:jpi   ,:,:) = 0.e0 
     680               ptab(     1       :jpreci,:,:) = zland 
     681               ptab(nlci-jpreci+1:jpi   ,:,:) = zland 
    674682            CASE ( 'F' ) 
    675                ptab(nlci-jpreci+1:jpi   ,:,:) = 0.e0 
     683               ptab(nlci-jpreci+1:jpi   ,:,:) = zland 
    676684            END SELECT  
    677685         ENDIF 
     
    681689         SELECT CASE ( cd_type ) 
    682690         CASE ( 'T', 'U', 'V', 'W' ) 
    683             ptab(:,     1       :jprecj,:) = 0.e0 
    684             ptab(:,nlcj-jprecj+1:jpj   ,:) = 0.e0 
     691            ptab(:,     1       :jprecj,:) = zland 
     692            ptab(:,nlcj-jprecj+1:jpj   ,:) = zland 
    685693         CASE ( 'F' ) 
    686             ptab(:,nlcj-jprecj+1:jpj   ,:) = 0.e0 
     694            ptab(:,nlcj-jprecj+1:jpj   ,:) = zland 
    687695         END SELECT 
    688696      
     
    10581066 
    10591067 
    1060    SUBROUTINE mpp_lnk_2d( pt2d, cd_type, psgn, cd_mpp ) 
     1068   SUBROUTINE mpp_lnk_2d( pt2d, cd_type, psgn, cd_mpp, pval ) 
    10611069      !!---------------------------------------------------------------------- 
    10621070      !!                  ***  routine mpp_lnk_2d  *** 
     
    10921100      CHARACTER(len=3), INTENT( in ), OPTIONAL ::    & 
    10931101         cd_mpp        ! fill the overlap area only  
     1102      REAL(wp)        , INTENT(in   ), OPTIONAL           ::   pval      ! background value (used at closed boundaries) 
    10941103 
    10951104      !! * Local variables 
     
    11001109      INTEGER  ::   ml_req1, ml_req2, ml_err     ! for key_mpi_isend 
    11011110      INTEGER  ::   ml_stat(MPI_STATUS_SIZE)     ! for key_mpi_isend 
     1111      REAL(wp) ::   zland 
    11021112      !!---------------------------------------------------------------------- 
     1113 
     1114      IF( PRESENT( pval ) ) THEN      ! set land value (zero by default) 
     1115         zland = pval 
     1116      ELSE 
     1117         zland = 0.e0 
     1118      ENDIF 
    11031119 
    11041120      ! 1. standard boundary treatment 
     
    11231139            SELECT CASE ( cd_type ) 
    11241140            CASE ( 'T', 'U', 'V', 'W' , 'I' ) 
    1125                pt2d(     1       :jpreci,:) = 0.e0 
    1126                pt2d(nlci-jpreci+1:jpi   ,:) = 0.e0 
     1141               pt2d(     1       :jpreci,:) = zland 
     1142               pt2d(nlci-jpreci+1:jpi   ,:) = zland 
    11271143            CASE ( 'F' ) 
    1128                pt2d(nlci-jpreci+1:jpi   ,:) = 0.e0 
     1144               pt2d(nlci-jpreci+1:jpi   ,:) = zland 
    11291145            END SELECT 
    11301146         ENDIF 
     
    11341150         SELECT CASE ( cd_type ) 
    11351151         CASE ( 'T', 'U', 'V', 'W' , 'I' ) 
    1136             pt2d(:,     1       :jprecj) = 0.e0 
    1137             pt2d(:,nlcj-jprecj+1:jpj   ) = 0.e0 
     1152            pt2d(:,     1       :jprecj) = zland 
     1153            pt2d(:,nlcj-jprecj+1:jpj   ) = zland 
    11381154         CASE ( 'F' ) 
    1139             pt2d(:,nlcj-jprecj+1:jpj   ) = 0.e0 
     1155            pt2d(:,nlcj-jprecj+1:jpj   ) = zland 
    11401156         END SELECT 
    11411157 
     
    14021418   
    14031419            CASE ( 'I' )                                  ! ice U-V point 
    1404                pt2d( 2 ,nlcj) = 0.e0 
     1420               pt2d( 2 ,nlcj) = zland 
    14051421               DO ji = 2 , nlci-1 
    14061422                  ijt = iloc - ji + 2 
     
    30873103      INTEGER , INTENT( in  )                  ::   kdim        ! size of array 
    30883104      INTEGER , INTENT(inout), DIMENSION(kdim) ::   ktab        ! input array 
    3089       INTEGER , INTENT(in), OPTIONAL         ::   kcom   
     3105      INTEGER , INTENT(in)   , OPTIONAL        ::   kcom   
    30903106   
    30913107#if defined key_mpp_shmem 
     
    31973213      INTEGER , INTENT( in  )                  ::   kdim        ! size of array 
    31983214      INTEGER , INTENT(inout), DIMENSION(kdim) ::   ktab        ! input array 
    3199       INTEGER , INTENT(in), OPTIONAL        ::   kcom        ! input array 
     3215      INTEGER , INTENT( in  ), OPTIONAL        ::   kcom        ! input array 
    32003216   
    32013217#if defined key_mpp_shmem 
     
    35383554    INTEGER , INTENT( in  )                  ::   kdim 
    35393555    REAL(wp), INTENT(inout), DIMENSION(kdim) ::   ptab 
    3540     INTEGER , INTENT( in  ), OPTIONAL     ::   kcom 
     3556    INTEGER , INTENT( in  ), OPTIONAL        ::   kcom 
    35413557 
    35423558#if defined key_mpp_shmem 
     
    35953611    !! * Arguments 
    35963612    REAL(wp), INTENT(inout) ::   ptab      ! ??? 
    3597     INTEGER, INTENT(in), OPTIONAL ::   kcom      ! ??? 
     3613    INTEGER , INTENT( in  ), OPTIONAL ::   kcom      ! ??? 
    35983614 
    35993615#if defined key_mpp_shmem 
     
    37033719    !! * Arguments 
    37043720    REAL(wp), INTENT( inout ) ::   ptab        !  
    3705     INTEGER,INTENT(in), OPTIONAL :: kcom 
     3721    INTEGER , INTENT(  in   ), OPTIONAL :: kcom 
    37063722 
    37073723#if defined key_mpp_shmem 
     
    37533769    INTEGER , INTENT( in )                     ::   kdim      ! size of ptab 
    37543770    REAL(wp), DIMENSION(kdim), INTENT( inout ) ::   ptab      ! input array 
    3755     INTEGER, INTENT(in), OPTIONAL :: kcom 
     3771    INTEGER , INTENT( in ), OPTIONAL          :: kcom 
    37563772 
    37573773#if defined key_mpp_shmem 
     
    38113827    !!----------------------------------------------------------------------- 
    38123828    REAL(wp), INTENT(inout) ::   ptab        ! input scalar 
    3813     INTEGER, INTENT(in), OPTIONAL :: kcom 
     3829    INTEGER , INTENT( in  ), OPTIONAL :: kcom 
    38143830 
    38153831#if defined key_mpp_shmem 
     
    54545470      INTEGER               :: kdim 
    54555471      INTEGER, OPTIONAL     :: kcom  
    5456       WRITE(*,*) 'mppmax_a_int: You should not have seen this print! error?', kdim, karr(1) 
     5472      WRITE(*,*) 'mppmax_a_int: You should not have seen this print! error?', kdim, karr(1), kcom 
    54575473   END SUBROUTINE mppmax_a_int 
    54585474 
     
    55685584   END SUBROUTINE mppstop 
    55695585 
    5570    SUBROUTINE mpp_ini_lim 
    5571       WRITE(*,*) 'mpp_ini_north: You should not have seen this print! error?' 
    5572    END SUBROUTINE mpp_ini_lim 
     5586   SUBROUTINE mpp_ini_ice(kcom) 
     5587      INTEGER :: kcom 
     5588      WRITE(*,*) 'mpp_ini_ice: You should not have seen this print! error?',kcom 
     5589   END SUBROUTINE mpp_ini_ice 
    55735590 
    55745591   SUBROUTINE mpp_comm_free(kcom) 
    55755592      INTEGER :: kcom 
    5576       WRITE(*,*) 'mpp_comm_free: You should not have seen this print! error?' 
     5593      WRITE(*,*) 'mpp_comm_free: You should not have seen this print! error?',kcom 
    55775594   END SUBROUTINE mpp_comm_free 
    55785595 
Note: See TracChangeset for help on using the changeset viewer.