psmile_trs_get_dble.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_get_dble
00008 !
00009 ! !INTERFACE:
00010 
00011 subroutine psmile_trs_get_dble(id_transient_in_id, &
00012                                id_epio_id,         &
00013                                id_trans_rank,      &
00014                                id_epio_field_size, &
00015                                dda_field,          &
00016                                nbr_fields,         &
00017                                id_err)
00018 !
00019 ! !USES:
00020 !
00021   use PRISM_constants
00022   USE PSMILe, dummy_interface => PSMILe_Trs_get_dble
00023 
00024   IMPLICIT NONE
00025 !
00026 ! !INPUT PARAMETERS:
00027 !
00028 ! involved field
00029   INTEGER, INTENT (In)                     :: id_transient_in_id
00030 
00031 ! epio for this partition field
00032   INTEGER, INTENT (In)                     :: id_epio_id
00033   INTEGER, INTENT (In)                     :: id_trans_rank
00034 
00035 ! size of the field
00036   INTEGER, INTENT (In)                     :: id_epio_field_size
00037 
00038 ! source field to interpolate
00039   DOUBLE PRECISION, DIMENSION(id_epio_field_size), INTENT (Out) :: dda_field
00040 
00041 ! nbr of bundle components
00042   INTEGER, INTENT (In)                     :: nbr_fields
00043 
00044 !
00045 ! !OUTPUT PARAMETERS:
00046 !
00047   INTEGER, INTENT (Out)                    :: id_err   ! error value
00048 
00049 ! !DESCRIPTION:
00050 ! Subroutine "PSMILe_Trs_get_dble" gets the field from the transformer.
00051 !
00052 ! !REVISION HISTORY:
00053 !   Date      Programmer   Description
00054 ! ----------  ----------   -----------
00055 ! 28/01/2003  D. Declat    Creation
00056 ! 01/12/2003  D. Declat    Adapted to type int, real, dble
00057 !
00058 !EOP
00059 !----------------------------------------------------------------------
00060 ! $Id: psmile_trs_get_dble.F90 2325 2010-04-21 15:00:07Z valcke $
00061 ! $Author: valcke $
00062 !----------------------------------------------------------------------
00063 !
00064 ! 0. Local declarations
00065 !
00066   CHARACTER(LEN=len_cvs_string), SAVE  :: mycvs = '$Id: psmile_trs_get_dble.F90 2325 2010-04-21 15:00:07Z valcke $'
00067 
00068   INTEGER, DIMENSION(PSMILe_trans_Header_length) :: ila_args 
00069   INTEGER                :: il_status(MPI_STATUS_SIZE)
00070 
00071 !
00072 !----------------------------------------------------------------------
00073 !
00074 #ifdef VERBOSE
00075       print *, trim(ch_id), ': PSMILe_Trs_get_dble: start'
00076 
00077       call psmile_flushstd
00078 #endif /* VERBOSE */
00079 
00080 !
00081 ! 1. Set the header message
00082 !
00083 ! 1.1. Initialize the contents to 999999
00084 
00085   ila_args = 999999
00086 
00087 ! 1.2. Content : action, global rank, field_id, comp_id, local rank
00088 
00089   ila_args(1) = PSMILe_trans_Get
00090   ila_args(2) = global_rank
00091   ila_args(3) = id_transient_in_id
00092   ila_args(4) = id_epio_id
00093   ila_args(5) = PRISM_DOUBLE_PRECISION
00094   ila_args(6) = nbr_fields
00095 
00096 !
00097 ! 2. Send the header message to the transformer
00098 !
00099   call psmile_trs_inform(ila_args, id_trans_rank, id_err)
00100 
00101 !
00102 ! 3. Recv the field
00103 !
00104   CALL MPI_Recv(dda_field, id_epio_field_size, MPI_DOUBLE_PRECISION, &
00105      id_trans_rank, 0177, comm_trans, il_status, id_err)
00106 !
00107 #ifdef VERBOSE
00108       print *, trim(ch_id), ': PSMILe_Trs_get_dble: eof ierror =', &
00109                id_err
00110       call psmile_flushstd
00111 
00112 #endif /* VERBOSE */
00113   
00114 END SUBROUTINE PSMILe_Trs_get_dble
00115 
00116 
00117 

Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1