00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 subroutine psmile_info_coords_irreg2_dble ( &
00012 x_coords, y_coords, z_coords, &
00013 coords_shape, grid_valid_shape, &
00014 sinvec, cosvec, ierror)
00015
00016
00017
00018 use PRISM_constants
00019
00020 use PSMILe, dummy_interface => PSMILe_Info_coords_irreg2_dble
00021
00022 implicit none
00023
00024
00025
00026 Integer, Intent (In) :: coords_shape (2, ndim_3d)
00027
00028
00029
00030 Double Precision, Intent (In) :: x_coords(coords_shape(1,1):
00031 coords_shape(2,1),
00032 coords_shape(1,2):
00033 coords_shape(2,2))
00034 Double Precision, Intent (In) :: y_coords(coords_shape(1,1):
00035 coords_shape(2,1),
00036 coords_shape(1,2):
00037 coords_shape(2,2))
00038 Double Precision, Intent (In) :: z_coords(coords_shape(1,3):
00039 coords_shape(2,3))
00040
00041
00042
00043
00044 Integer, Intent (In) :: grid_valid_shape (2, ndim_3d)
00045
00046
00047
00048
00049
00050
00051 Type (dble_vector) :: sinvec
00052
00053
00054
00055 Type (dble_vector) :: cosvec
00056
00057
00058
00059
00060
00061 Integer, Intent (Out) :: ierror
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072 Integer, Parameter :: lon = 1
00073 Integer, Parameter :: lat = 2
00074
00075
00076
00077
00078
00079 Integer :: len
00080
00081
00082
00083 Integer, parameter :: nerrp = 2
00084 Integer :: ierrp (nerrp)
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105 Character(len=len_cvs_string), save :: mycvs =
00106 '$Id: psmile_info_coords_irreg2_dble.F90 2325 2010-04-21 15:00:07Z valcke $'
00107
00108
00109
00110
00111 #ifdef VERBOSE
00112 print 9990, trim(ch_id)
00113
00114 call psmile_flushstd
00115 #endif /* VERBOSE */
00116
00117 ierror = 0
00118
00119 #ifdef PRISM_ASSERTION
00120 #endif
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133 len = lat &
00134 * (grid_valid_shape(2,1) - grid_valid_shape(1,1) + 1) &
00135 * (grid_valid_shape(2,2) - grid_valid_shape(1,2) + 1)
00136
00137 Allocate (sinvec%vector(len), &
00138 cosvec%vector(len), STAT = ierror)
00139 if ( ierror > 0 ) then
00140 ierrp (1) = ierror
00141 ierrp (2) = len * 2
00142
00143 ierror = PRISM_Error_Alloc
00144 call psmile_error ( ierror, 'sinvec%vector, cosvec%vector', &
00145 ierrp, 2, __FILE__, __LINE__ )
00146 return
00147 endif
00148
00149
00150
00151 call psmile_trf_lonlat_2d_dble (x_coords, y_coords, &
00152 coords_shape (:, 1:ndim_2d), &
00153 grid_valid_shape(:, 1:ndim_2d), &
00154 sinvec%vector, cosvec%vector, ierror)
00155
00156
00157
00158 #ifdef VERBOSE
00159 print 9980, trim(ch_id), ierror
00160
00161 call psmile_flushstd
00162 #endif /* VERBOSE */
00163
00164
00165
00166 9990 format (1x, a, ': psmile_Info_coords_irreg2_dble')
00167 9980 format (1x, a, ': psmile_Info_coords_irreg2_dble: eof, ierror =', i3)
00168
00169 end subroutine PSMILe_Info_coords_irreg2_dble