psmile_trs_give_neighbors_gauss.F90

Go to the documentation of this file.
00001 !------------------------------------------------------------------------
00002 ! Copyright 2006-2010, CERFACS, Toulouse, France.
00003 ! Copyright 2006-2010, NEC Europe Ltd., London, UK.
00004 ! All rights reserved. Use is subject to OASIS4 license terms.
00005 !-----------------------------------------------------------------------
00006 !BOP
00007 !
00008 ! !ROUTINE: PSMILe_Trs_give_neighbors_gauss
00009 !
00010 ! !INTERFACE:
00011 
00012 subroutine psmile_trs_give_neighbors_gauss(id_epio_id,       &
00013                                        id_trans_rank,        &
00014                                        id_epio_tgt_size,     &
00015                                        id_nb_neighbors,      &
00016                                        ida_neighbor_indices, &
00017                                        ida_neigh_bascule,    &
00018                                        id_err)
00019 !
00020 ! !USES:
00021 !
00022   use PRISM_constants
00023   USE PSMILe, dummy_interface => PSMILe_Trs_give_neighbors_gauss
00024 
00025   IMPLICIT NONE
00026 !
00027 ! !INPUT PARAMETERS:
00028 !
00029 ! associated epio id
00030   INTEGER, INTENT (In)                     :: id_epio_id
00031   INTEGER, INTENT (In)                     :: id_trans_rank   
00032 
00033 ! size of the corresponding epiot
00034   INTEGER, INTENT (In)                     :: id_epio_tgt_size
00035 
00036 ! number of neighbors
00037   INTEGER, INTENT (In)                     :: id_nb_neighbors
00038 
00039 ! index of the src grid neighbors for all target points, computed by the PSMILe
00040   INTEGER, DIMENSION(id_nb_neighbors*id_epio_tgt_size), INTENT (In) :: 
00041                                               ida_neighbor_indices
00042 
00043 ! indicator whether the transformer has to operate on pole cells
00044   INTEGER, DIMENSION(id_epio_tgt_size), INTENT (In) :: 
00045                                               ida_neigh_bascule
00046 !
00047 ! !OUTPUT PARAMETERS:
00048 !
00049   INTEGER, INTENT (Out)                    :: id_err   ! error value
00050 
00051 ! !DESCRIPTION:
00052 !
00053 ! Subroutine "PSMILe_Trs_give_neighbors_gauss" insures the exchange of information,
00054 ! when an interpolation is required, for Gauss-reduced source grids
00055 !
00056 ! !REVISION HISTORY:
00057 !   Date      Programmer   Description
00058 ! ----------  ----------   -----------
00059 ! 19/02/2009  R. Redler    Creation
00060 !
00061 !EOP
00062 !----------------------------------------------------------------------
00063 ! $Id: psmile_trs_give_neighbors_gauss.F90,v 1.19.2.4 2008/10/31 12:32:35 redler Exp $
00064 ! $Author: redler $
00065 !----------------------------------------------------------------------
00066 !
00067 ! 0. Local declarations
00068 !
00069   CHARACTER(LEN=len_cvs_string), SAVE  :: mycvs = 
00070      '$Id: psmile_trs_give_neighbors_gauss.F90,v 1.19.2.4 2008/10/31 12:32:35 redler Exp $'
00071 
00072   INTEGER, DIMENSION(PSMILe_trans_Header_length) :: ila_args 
00073 !
00074 !----------------------------------------------------------------------
00075 !
00076 #ifdef VERBOSE
00077       print *, trim(ch_id), ': PSMILe_Trs_give_neighbors_gauss: start'
00078       call psmile_flushstd
00079 #endif /* VERBOSE */
00080 
00081 #ifdef DEBUG
00082    print *, trim(ch_id), ': - id_epio_id       ', id_epio_id
00083    print *, trim(ch_id), ': - global_rank      ', global_rank
00084    print *, trim(ch_id), ': - id_epio_tgt_size ', id_epio_tgt_size
00085    print *, trim(ch_id), ': - id_nb_neighbors  ', id_nb_neighbors
00086 #endif
00087 
00088 ! 1. Set the header message
00089 !
00090 ! 1.1. Initialize the contents to 999999
00091 
00092   ila_args = 999999
00093 
00094 ! 1.2. Content : action, global rank, number of the transformation, field_id,
00095 !                comp_id, size (of the EPIOT)
00096 
00097   ila_args(1) = PSMILe_trans_Set_neighbors_info
00098   ila_args(2) = global_rank
00099   ila_args(3) = id_epio_id
00100   ila_args(4) = id_epio_tgt_size
00101   ila_args(5) = id_nb_neighbors
00102   ila_args(6) = PSMILe_3D
00103   ila_args(7) = PSMILe_Undef
00104   ila_args(11) = PRISM_Gaussreduced_regvrt
00105 !
00106 ! 2. Send the header message to the transformer
00107 !
00108   call psmile_trs_inform(ila_args, id_trans_rank, id_err)
00109 
00110 !
00111 ! 3. Send the neighbors of the target points
00112 !
00113   CALL MPI_Send(ida_neighbor_indices(1), id_nb_neighbors*id_epio_tgt_size, &
00114      MPI_Integer, id_trans_rank, 4, comm_trans, id_err)
00115 !
00116 ! 4. Send the information about special of the target points
00117 !    Point-based interpolations from a Gauss-reduced source grid
00118 !    require additional information:
00119 !
00120   CALL MPI_Send(ida_neigh_bascule, id_epio_tgt_size, &
00121      MPI_Integer, id_trans_rank, 5, comm_trans, id_err)
00122 !
00123 #ifdef VERBOSE
00124       print *, trim(ch_id), &
00125          ': PSMILe_Trs_give_neighbors_gauss: eof ierror =', id_err
00126       call psmile_flushstd
00127 #endif /* VERBOSE */
00128   
00129 END SUBROUTINE PSMILe_Trs_give_neighbors_gauss
00130 
00131 
00132 

Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1