psmile_neigh_extra_search_dble.F90
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 subroutine psmile_neigh_extra_search_dble (search, extra_search, &
00012 nb_extra, ierror)
00013
00014
00015
00016 use PRISM_constants
00017
00018 use PSMILe, dummy_interface => PSMILe_Neigh_extra_search_dble
00019
00020 Implicit none
00021
00022
00023
00024 Type (Enddef_search), Intent (In) :: search
00025
00026
00027
00028 Integer, Intent (In) :: nb_extra
00029
00030
00031
00032
00033
00034 Type (Extra_search_info), Intent (InOut) :: extra_search
00035
00036
00037
00038
00039
00040
00041
00042
00043 Integer, Intent (Out) :: ierror
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 Integer, Parameter :: lat = 2
00054
00055
00056
00057 Integer :: n_extra
00058
00059
00060
00061 Integer, Parameter :: nerrp = 2
00062 Integer :: ierrp (nerrp)
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082 Character(len=len_cvs_string), save :: mycvs =
00083 '$Id: psmile_neigh_extra_search_dble.F90 2082 2009-10-21 13:31:19Z hanke $'
00084
00085
00086
00087
00088
00089 #ifdef VERBOSE
00090 print 9990, trim(ch_id)
00091
00092 call psmile_flushstd
00093 #endif /* VERBOSE */
00094
00095
00096
00097 ierror = 0
00098
00099 n_extra = extra_search%n_extra
00100
00101 #ifdef PRISM_ASSERTION
00102 if ( Associated (extra_search%dist_dble) .or. &
00103 Associated (extra_search%cos_search_dble) .or. &
00104 Associated (extra_search%sin_search_dble) .or. &
00105 Associated (extra_search%z_search_dble) ) then
00106
00107 call psmile_assert (__FILE__, __LINE__, &
00108 "arrays should be not allocated")
00109 endif
00110 #endif
00111
00112
00113
00114
00115 Allocate (extra_search%dist_dble(n_extra, nb_extra), &
00116 STAT = ierror)
00117
00118 if ( ierror > 0 ) then
00119 ierrp (1) = ierror
00120 ierrp (2) = n_extra * nb_extra
00121
00122 ierror = PRISM_Error_Alloc
00123 call psmile_error ( ierror, 'extra_search%dist_dble', &
00124 ierrp, 2, __FILE__, __LINE__ )
00125 return
00126 endif
00127
00128
00129
00130 Allocate (extra_search%sin_search_dble(n_extra, lat), &
00131 extra_search%cos_search_dble(n_extra, lat), &
00132 extra_search%z_search_dble(n_extra), &
00133 STAT = ierror)
00134
00135 if ( ierror > 0 ) then
00136 ierrp (1) = ierror
00137 ierrp (2) = n_extra*lat*2 + n_extra
00138
00139 ierror = PRISM_Error_Alloc
00140 call psmile_error ( ierror, 'extra_search%cos_search, ...', &
00141 ierrp, 2, __FILE__, __LINE__ )
00142 return
00143 endif
00144
00145
00146
00147
00148 #ifdef VERBOSE
00149 print 9980, trim(ch_id)
00150
00151 call psmile_flushstd
00152 #endif /* VERBOSE */
00153
00154
00155
00156 9990 format (1x, a, ': psmile_neigh_extra_search_dble:')
00157 9980 format (1x, a, ': psmile_neigh_extra_search_dble: eof')
00158
00159 end subroutine psmile_neigh_extra_search_dble