libsim  Versione6.3.0

◆ vol7d_smart_sort()

subroutine vol7d_class::vol7d_smart_sort ( type(vol7d), intent(inout)  this,
logical, intent(in), optional  lsort_time,
logical, intent(in), optional  lsort_timerange,
logical, intent(in), optional  lsort_level 
)

Sorts the sortable dimensions in the volume this only when necessary.

Most of the times, the time, timerange and level dimensions in a vol7d object are correctly sorted; on the other side many methods strictly rely on this fact in order to work correctly. This method performs a quick check and sorts the required dimensions only if they are not sorted in ascending order yet, improving safety without impairing much performance.

Parametri
[in,out]thisobject to be sorted
[in]lsort_timeif present and .TRUE., sort time dimension if it is not sorted in ascending order
[in]lsort_timerangeif present and .TRUE., sort timerange dimension if it is not sorted in ascending order
[in]lsort_levelif present and .TRUE., sort vertical level dimension if it is not sorted in ascending order

Definizione alla linea 2127 del file vol7d_class.F90.

2127 TYPE(vol7d),INTENT(IN) :: this
2128 TYPE(vol7d),INTENT(OUT) :: that
2129 logical , optional, intent(in) :: data_only
2130 logical , optional, intent(in) :: ana
2131 logical :: ldata_only,lana
2132 
2133 IF (PRESENT(data_only)) THEN
2134  ldata_only = data_only
2135 ELSE
2136  ldata_only = .false.
2137 ENDIF
2138 
2139 IF (PRESENT(ana)) THEN
2140  lana = ana
2141 ELSE
2142  lana = .false.
2143 ENDIF
2144 
2145 
2146 #undef VOL7D_POLY_ARRAY
2147 #define VOL7D_POLY_ARRAY voldati
2148 #include "vol7d_class_diff.F90"
2149 #undef VOL7D_POLY_ARRAY
2150 #define VOL7D_POLY_ARRAY voldatiattr
2151 #include "vol7d_class_diff.F90"
2152 #undef VOL7D_POLY_ARRAY
2153 
2154 if ( .not. ldata_only) then
2155 
2156 #define VOL7D_POLY_ARRAY volana
2157 #include "vol7d_class_diff.F90"
2158 #undef VOL7D_POLY_ARRAY
2159 #define VOL7D_POLY_ARRAY volanaattr
2160 #include "vol7d_class_diff.F90"
2161 #undef VOL7D_POLY_ARRAY
2162 
2163  if(lana)then
2164  where ( this%ana == that%ana )
2165  that%ana = vol7d_ana_miss

Generated with Doxygen.