psmile_trans_loc2glob_3d.F90
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 subroutine psmile_trans_loc2glob_3d (grid_id, &
00012 ibuf, len_item, nloc, ierror)
00013
00014
00015
00016 use PRISM_constants
00017
00018 use PSMILe, dummy_interface => PSMILe_trans_loc2glob_3d
00019
00020 Implicit none
00021
00022
00023
00024 Integer, Intent (In) :: grid_id
00025
00026
00027
00028 Integer, Intent (In) :: nloc
00029
00030
00031
00032 Integer, Intent (In) :: len_item
00033
00034
00035
00036
00037
00038 Integer, Intent (InOut) :: ibuf (len_item, nloc)
00039
00040
00041
00042
00043
00044
00045
00046
00047 Integer, Intent (Out) :: ierror
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 Integer :: nbr_blocks
00058
00059 Type(Grid), Pointer :: grid_info
00060
00061
00062
00063 Integer :: shift (ndim_3d)
00064
00065
00066
00067 Integer :: i
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095 Character(len=len_cvs_string), save :: mycvs =
00096 '$Id: psmile_trans_loc2glob_3d.F90,v 1.1.2.1 2007/04/30 15:00:27 ritzdorf Exp $'
00097
00098
00099
00100
00101
00102
00103 #ifdef VERBOSE
00104 print 9990, trim(ch_id)
00105
00106 call psmile_flushstd
00107 #endif /* VERBOSE */
00108
00109 ierror = 0
00110
00111 grid_info => Grids(grid_id)
00112 nbr_blocks = size (grid_info%extent(:,1))
00113
00114 #ifdef PRISM_ASSERTION
00115 #endif
00116
00117 if ( nbr_blocks > 1) then
00118 print *, '### Warning: Only a single partition is currently supported in global search'
00119 endif
00120
00121 shift (1:ndim_3d) = grid_info%partition (1, 1:ndim_3d) - &
00122 grid_info%grid_shape(1, 1:ndim_3d) + 1
00123
00124
00125 do i = 1, nloc
00126 ibuf (1,i) = ibuf (1,i) + shift (1)
00127 ibuf (2,i) = ibuf (2,i) + shift (2)
00128 ibuf (3,i) = ibuf (3,i) + shift (3)
00129 end do
00130
00131
00132
00133 #ifdef VERBOSE
00134 print 9980, trim(ch_id)
00135
00136 call psmile_flushstd
00137 #endif /* VERBOSE */
00138
00139
00140
00141 9990 format (1x, a, ': psmile_trans_loc2glob_3d')
00142 9980 format (1x, a, ': psmile_trans_loc2glob_3d: eof')
00143
00144 end subroutine psmile_trans_loc2glob_3d