psmile_trs_give_neighbors3d.F90

Go to the documentation of this file.
00001 !------------------------------------------------------------------------
00002 ! Copyright 2006-2010, CERFACS, Toulouse, France.
00003 ! All rights reserved. Use is subject to OASIS4 license terms.
00004 !-----------------------------------------------------------------------
00005 !BOP
00006 !
00007 ! !ROUTINE: PSMILe_Trs_give_neighbors3d
00008 !
00009 ! !INTERFACE:
00010 
00011 subroutine psmile_trs_give_neighbors3d(id_epio_id,           &
00012                                        id_trans_rank,        &
00013                                        id_epio_tgt_size,     &
00014                                        id_nb_neighbors,      &
00015                                        ida_neighbor_indices,        &
00016                                        id_err)
00017 !
00018 ! !USES:
00019 !
00020   use PRISM_constants
00021   USE PSMILe, dummy_interface => PSMILe_Trs_give_neighbors3d
00022 
00023   IMPLICIT NONE
00024 !
00025 ! !INPUT PARAMETERS:
00026 !
00027 ! associated epio id
00028   INTEGER, INTENT (In)                     :: id_epio_id
00029   INTEGER, INTENT (In)                     :: id_trans_rank   
00030 
00031 ! size of the corresponding epiot
00032   INTEGER, INTENT (In)                     :: id_epio_tgt_size
00033 
00034 ! number of neighbors
00035   INTEGER, INTENT (In)                     :: id_nb_neighbors
00036 
00037 ! index of the src grid neighbors for all target points, computed by the PSMILe
00038   INTEGER, DIMENSION(id_nb_neighbors*id_epio_tgt_size), INTENT (In) :: 
00039      ida_neighbor_indices
00040 !
00041 ! !OUTPUT PARAMETERS:
00042 !
00043   INTEGER, INTENT (Out)                    :: id_err   ! error value
00044 
00045 ! !DESCRIPTION:
00046 !
00047 ! Subroutine "PSMILe_Trs_give_neighbors3d" insures the exchange of information,
00048 ! when an interpolation is required.
00049 !
00050 ! !REVISION HISTORY:
00051 !   Date      Programmer   Description
00052 ! ----------  ----------   -----------
00053 ! 24/03/2003  D. Declat    Creation
00054 !
00055 !EOP
00056 !----------------------------------------------------------------------
00057 ! $Id: psmile_trs_give_neighbors3d.F90 2325 2010-04-21 15:00:07Z valcke $
00058 ! $Author: valcke $
00059 !----------------------------------------------------------------------
00060 !
00061 ! 0. Local declarations
00062 !
00063   CHARACTER(LEN=len_cvs_string), SAVE  :: mycvs = 
00064      '$Id: psmile_trs_give_neighbors3d.F90 2325 2010-04-21 15:00:07Z valcke $'
00065 
00066   INTEGER, DIMENSION(PSMILe_trans_Header_length) :: ila_args 
00067 !
00068 !----------------------------------------------------------------------
00069 !
00070 #ifdef VERBOSE
00071       print *, trim(ch_id), ': PSMILe_Trs_give_neighbors3d: start'
00072       call psmile_flushstd
00073 #endif /* VERBOSE */
00074 
00075 #ifdef DEBUG
00076    print *, trim(ch_id), ': - id_epio_id       ', id_epio_id
00077    print *, trim(ch_id), ': - global_rank      ', global_rank
00078    print *, trim(ch_id), ': - id_epio_tgt_size ', id_epio_tgt_size
00079    print *, trim(ch_id), ': - id_nb_neighbors  ', id_nb_neighbors
00080 #endif
00081 
00082 ! 1. Set the header message
00083 !
00084 ! 1.1. Initialize the contents to 999999
00085 
00086   ila_args = 999999
00087 
00088 ! 1.2. Content : action, global rank, number of the transformation, field_id,
00089 !                comp_id, size (of the EPIOT)
00090 
00091   ila_args(1) = PSMILe_trans_Set_neighbors_info
00092   ila_args(2) = global_rank
00093   ila_args(3) = id_epio_id
00094   ila_args(4) = id_epio_tgt_size
00095   ila_args(5) = id_nb_neighbors
00096   ila_args(6) = PSMILe_3D
00097   ila_args(7) = PSMILe_Undef
00098 
00099 !
00100 ! 2. Send the header message to the transformer
00101 !
00102   call psmile_trs_inform(ila_args, id_trans_rank, id_err)
00103 
00104 !
00105 ! 3. Send the neighbors of the target points
00106 !
00107   CALL MPI_Send(ida_neighbor_indices(1), id_nb_neighbors*id_epio_tgt_size, &
00108      MPI_Integer, id_trans_rank, 4, comm_trans, id_err)
00109 
00110 !
00111 #ifdef VERBOSE
00112       print *, trim(ch_id), &
00113          ': PSMILe_Trs_give_neighbors3d: eof ierror =', id_err
00114       call psmile_flushstd
00115 #endif /* VERBOSE */
00116   
00117 END SUBROUTINE PSMILe_Trs_give_neighbors3d
00118 
00119 
00120 

Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1