|
|
◆ 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 2110 del file vol7d_class.F90.
2111 lanavarr=tv, lanavard=acp, lanavari=acp, lanavarb=acp, lanavarc=acp, & 2112 ldativarr=tv, ldativard=fv, ldativari=fv, ldativarb=fv, ldativarc=fv) 2116 lanavarr=fv, lanavard=acn, lanavari=fv, lanavarb=fv, lanavarc=fv, & 2117 lanaattrr=fv, lanaattrd=fv, lanaattri=fv, lanaattrb=fv, lanaattrc=fv, & 2118 lanavarattrr=fv, lanavarattrd=fv, lanavarattri=fv, lanavarattrb=fv, lanavarattrc 2124 IF ( ASSOCIATED(v7d_tmp%anavar%d) .OR. ASSOCIATED(v7d_tmp%dativar%d)) THEN 2126 IF ( ASSOCIATED(v7d_tmp%anavar%d)) THEN 2128 ALLOCATE(v7d_tmp%volanar( SIZE(v7d_tmp%volanad, 1), SIZE(v7d_tmp%volanad 2129 SIZE(v7d_tmp%volanad, 3))) 2130 DO i = 1, SIZE(v7d_tmp%anavar%d) 2131 v7d_tmp%volanar(:,i,:) = & 2132 realdat(v7d_tmp%volanad(:,i,:), v7d_tmp%anavar%d(i)) 2134 DEALLOCATE(v7d_tmp%volanad) 2136 v7d_tmp%anavar%r => v7d_tmp%anavar%d 2137 NULLIFY(v7d_tmp%anavar%d) 2140 IF ( ASSOCIATED(v7d_tmp%dativar%d)) THEN 2142 ALLOCATE(v7d_tmp%voldatir( SIZE(v7d_tmp%voldatid, 1), SIZE(v7d_tmp%voldatid 2143 SIZE(v7d_tmp%voldatid, 3), SIZE(v7d_tmp%voldatid, 4), SIZE(v7d_tmp%voldatid 2144 SIZE(v7d_tmp%voldatid, 6))) 2145 DO i = 1, SIZE(v7d_tmp%dativar%d) 2146 v7d_tmp%voldatir(:,:,:,:,i,:) = & 2147 realdat(v7d_tmp%voldatid(:,:,:,:,i,:), v7d_tmp%dativar%d(i))
|