|
◆ 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] | this | object to be sorted |
[in] | lsort_time | if present and .TRUE., sort time dimension if it is not sorted in ascending order |
[in] | lsort_timerange | if present and .TRUE., sort timerange dimension if it is not sorted in ascending order |
[in] | lsort_level | if present and .TRUE., sort vertical level dimension if it is not sorted in ascending order |
Definizione alla linea 2109 del file vol7d_class.F90.
2110 lanavarr=tv, lanavard=acp, lanavari=acp, lanavarb=acp, lanavarc=acp, & 2111 ldativarr=tv, ldativard=fv, ldativari=fv, ldativarb=fv, ldativarc=fv) 2115 lanavarr=fv, lanavard=acn, lanavari=fv, lanavarb=fv, lanavarc=fv, & 2116 lanaattrr=fv, lanaattrd=fv, lanaattri=fv, lanaattrb=fv, lanaattrc=fv, & 2117 lanavarattrr=fv, lanavarattrd=fv, lanavarattri=fv, lanavarattrb=fv, lanavarattrc 2123 IF ( ASSOCIATED(v7d_tmp%anavar%d) .OR. ASSOCIATED(v7d_tmp%dativar%d)) THEN 2125 IF ( ASSOCIATED(v7d_tmp%anavar%d)) THEN 2127 ALLOCATE(v7d_tmp%volanar( SIZE(v7d_tmp%volanad, 1), SIZE(v7d_tmp%volanad 2128 SIZE(v7d_tmp%volanad, 3))) 2129 DO i = 1, SIZE(v7d_tmp%anavar%d) 2130 v7d_tmp%volanar(:,i,:) = & 2131 realdat(v7d_tmp%volanad(:,i,:), v7d_tmp%anavar%d(i)) 2133 DEALLOCATE(v7d_tmp%volanad) 2135 v7d_tmp%anavar%r => v7d_tmp%anavar%d 2136 NULLIFY(v7d_tmp%anavar%d) 2139 IF ( ASSOCIATED(v7d_tmp%dativar%d)) THEN 2141 ALLOCATE(v7d_tmp%voldatir( SIZE(v7d_tmp%voldatid, 1), SIZE(v7d_tmp%voldatid 2142 SIZE(v7d_tmp%voldatid, 3), SIZE(v7d_tmp%voldatid, 4), SIZE(v7d_tmp%voldatid 2143 SIZE(v7d_tmp%voldatid, 6))) 2144 DO i = 1, SIZE(v7d_tmp%dativar%d) 2145 v7d_tmp%voldatir(:,:,:,:,i,:) = & 2146 realdat(v7d_tmp%voldatid(:,:,:,:,i,:), v7d_tmp%dativar%d(i))
|