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