prismtrs_set_triple_links.F90
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 subroutine prismtrs_set_triple_links(id_transient_out_id, &
00012 id_transient_in_id, &
00013 id_epio_id, &
00014 id_err)
00015
00016
00017
00018
00019 USE PRISMDrv, dummy_interface => PRISMTrs_Set_triple_links
00020
00021 IMPLICIT NONE
00022
00023
00024
00025
00026
00027 INTEGER, INTENT (In) :: id_transient_out_id
00028
00029
00030 INTEGER, INTENT (In) :: id_transient_in_id
00031
00032
00033 INTEGER, INTENT (IN) :: id_epio_id
00034
00035
00036
00037
00038 INTEGER, INTENT (Out) :: id_err
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 CHARACTER(LEN=len_cvs_string), SAVE :: mycvs =
00058 '$Id: prismtrs_set_triple_links.F90 2325 2010-04-21 15:00:07Z valcke $'
00059
00060 INTEGER :: ib
00061
00062
00063 LOGICAL :: ll_found
00064 INTEGER :: il_found
00065 INTEGER, PARAMETER :: nerrp = 2
00066 INTEGER :: ierrp (nerrp)
00067 TYPE (Drv_Exchange),Dimension(:), POINTER :: temp_Drv_Exchanges
00068
00069
00070
00071 #ifdef VERBOSE
00072 PRINT *, '| | | Enter PRISMTrs_Set_triple_links'
00073 call psmile_flushstd
00074 #endif
00075
00076 id_err = 0
00077
00078
00079
00080 il_found = -1
00081 ll_found = .false.
00082 DO ib = 1, Number_of_Exchanges
00083 IF (Drv_Exchanges(ib)%trans_out_id .eq. id_transient_out_id) THEN
00084 IF (Drv_Exchanges(ib)%trans_in_id .eq. id_transient_in_id) THEN
00085 il_found = ib
00086 IF (Drv_Exchanges(ib)%epio_id .eq. PSMILe_trans_unset) THEN
00087 ll_found = .true.
00088 EXIT
00089 END IF
00090 END IF
00091 END IF
00092 END DO
00093
00094 IF ((.NOT. ll_found) .AND. (il_found .eq. -1)) THEN
00095 ierrp(1) = Number_of_Exchanges
00096 ierrp(2) = ib
00097 call psmile_error_common ( id_err, 'PRISMTrs_Set_triple_links', &
00098 ierrp, 2, __FILE__, __LINE__ )
00099 END IF
00100
00101
00102
00103 IF (.NOT. ll_found) THEN
00104
00105 ALLOCATE(temp_Drv_Exchanges(Number_of_Exchanges+1), stat = id_err)
00106 IF (id_err > 0) THEN
00107 ierrp (1) = id_err
00108 ierrp (2) = Number_of_Exchanges
00109 id_err = 13
00110 call psmile_error_common ( id_err, 'Drv_Exchanges', &
00111 ierrp, 2, __FILE__, __LINE__ )
00112 RETURN
00113 ENDIF
00114
00115 temp_Drv_Exchanges(1:Number_of_Exchanges) = Drv_Exchanges
00116 temp_Drv_Exchanges(Number_of_Exchanges+1) = Drv_Exchanges(il_found)
00117 DEALLOCATE(Drv_Exchanges)
00118 Drv_Exchanges => temp_Drv_Exchanges
00119 CALL prismdrv_init_Drv_Exchange(Number_of_Exchanges+1)
00120 il_found = Number_of_Exchanges + 1
00121 Number_of_Exchanges = Number_of_Exchanges + 1
00122 END IF
00123
00124
00125
00126 Drv_Exchanges(il_found)%epio_id = id_epio_id
00127 Drv_Exchanges(il_found)%trans_in_field_size = Drv_Epios(id_epio_id)%tgt_size
00128
00129 #ifdef VERBOSE
00130 PRINT *, '| | | Quit PRISMTrs_Set_triple_links'
00131 call psmile_flushstd
00132 #endif
00133
00134 END SUBROUTINE PRISMTrs_Set_triple_links
00135
00136
00137
00138
00139
00140
00141