psmile_range_subgrid_1d_real.F90
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 subroutine psmile_range_subgrid_1d_real ( &
00012 array, idlow, idhigh, nbr_corners, &
00013 ibeg, iend, &
00014 rinter, inter, ierror)
00015
00016
00017
00018 use PRISM_constants
00019
00020 use PSMILe, dummy_interface => PSMILe_Range_Subgrid_1d_real
00021
00022 implicit none
00023
00024
00025
00026 integer, Intent (In) :: idlow, idhigh, nbr_corners
00027
00028
00029
00030 real, Intent (In) :: array (idlow:idhigh, nbr_corners)
00031
00032
00033
00034
00035 integer, Intent (In) :: ibeg, iend
00036
00037
00038
00039 Real, Intent (In) :: rinter (2)
00040
00041
00042
00043
00044
00045 Integer, Intent (Out) :: inter (2)
00046
00047
00048
00049 integer, Intent (Out) :: ierror
00050
00051
00052
00053
00054
00055
00056
00057 integer :: i
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078 Character(len=len_cvs_string), save :: mycvs =
00079 '$Id: psmile_range_subgrid_1d_real.F90 2687 2010-10-28 15:15:52Z coquart $'
00080
00081
00082
00083 #ifdef VERBOSE
00084 print *, trim(ch_id), ': PSMILe_Range_Subgrid_1d_real'
00085
00086 call psmile_flushstd
00087 #endif /* VERBOSE */
00088
00089
00090
00091 ierror = 0
00092
00093 inter (1) = iend + 1
00094 inter (2) = ibeg - 1
00095
00096
00097
00098
00099 do i = ibeg, iend
00100 if (max(array (i,1), array(i,2)) >= rinter (1) .and. &
00101 min(array (i,1), array(i,2)) <= rinter (2)) then
00102 inter (1) = min (inter (1), i)
00103 inter (2) = max (inter (2), i)
00104 endif
00105 enddo
00106
00107
00108
00109 #ifdef VERBOSE
00110 print *, trim(ch_id), ': PSMILe_Range_Subgrid_1d_real eof', &
00111 ': ierror =', ierror, &
00112 '; inter =', inter
00113
00114 call psmile_flushstd
00115 #endif /* VERBOSE */
00116
00117 end subroutine PSMILe_Range_Subgrid_1d_real