|
◆ export_to_gridinfo()
subroutine export_to_gridinfo |
( |
type(volgrid6d), intent(in) |
this, |
|
|
type(gridinfo_def), intent(inout) |
gridinfo, |
|
|
integer |
itime, |
|
|
integer |
itimerange, |
|
|
integer |
ilevel, |
|
|
integer |
ivar, |
|
|
type(grid_id), intent(in), optional |
gaid_template, |
|
|
logical, intent(in), optional |
clone |
|
) |
| |
Export a single grid of a volgrid6d object to a gridinfo_def object.
A single 2d slice of a volgrid6d at a specified location is written into a gridinfo_def object, including the grid_id which can be used for the successive export to file. - Parametri
-
[in] | this | volume to be exported |
[in,out] | gridinfo | output gridinfo_def object |
| itime | index within this of the element to be exported for the time dimension |
| itimerange | index within this of the element to be exported for the timerange dimension |
| ilevel | index within this of the element to be exported for the vertical level dimension |
| ivar | index within this of the element to be exported for the variable dimension |
[in] | gaid_template | grid_id template to be used for output data replacing the one contained in this |
[in] | clone | if provided and .TRUE., clone the grid_id included in this rather than making a shallow copy |
Definizione alla linea 1165 del file volgrid6d_class.F90.
1167 this(i)%time = pack_distinct(correctedtime, ntime, &
1168 mask=(this(i)%griddim == gridinfov%array(1:gridinfov%arraysize)%griddim) &
1169 .AND. .NOT.isanavar(:), back=.true.)
1170 CALL sort(this(i)%time)
1172 this(i)%timerange = pack_distinct(gridinfov%array( &
1173 1:gridinfov%arraysize)%timerange, ntimerange, &
1174 mask=(this(i)%griddim == gridinfov%array(1:gridinfov%arraysize)%griddim) &
1175 .AND. .NOT.isanavar(:), back=.true.)
1176 CALL sort(this(i)%timerange)
1178 this(i)%level=pack_distinct(gridinfov%array(1:gridinfov%arraysize)%level, &
1179 nlevel,mask=(this(i)%griddim == gridinfov%array(1:gridinfov%arraysize)%griddim), &
1181 CALL sort(this(i)%level)
1183 this(i)%var=pack_distinct(gridinfov%array(1:gridinfov%arraysize)%var, nvar, &
1184 mask=(this(i)%griddim == gridinfov%array(1:gridinfov%arraysize)%griddim), &
1188 CALL l4f_category_log(this(i)%category,l4f_debug, "alloc_vol volgrid6d index: "//t2c(i))
1190 CALL volgrid6d_alloc_vol(this(i), decode=decode)
1194 DEALLOCATE(correctedtime)
1196 DO i = 1, gridinfov%arraysize
1199 CALL l4f_category_log(category,l4f_debug, import from gridinfov index: "//t2c(i))
1200 CALL l4f_category_log(category,L4F_INFO, &
1201 "to volgrid6d index: "//t2c(index(this%griddim, gridinfov%array(i)%griddim)))
1204 CALL import(this(index(this%griddim, gridinfov%array(i)%griddim)), &
1205 gridinfov%array(i), dup_mode=dup_mode, clone=clone, isanavar=isanavar(i))
1209 !chiudo il logger temporaneo
1210 CALL l4f_category_delete(category)
1212 END SUBROUTINE import_from_gridinfovv
1215 !> Export a \a volgrid6d object to an \a arrayof_gridinfo object.
1216 !! The multidimensional \a volgrid6d structure is serialized into a
1217 !! one-dimensional array of gridinfo_def objects, which is allocated
1218 !! to the proper size if not already allocated, or it is extended
1219 !! keeping the old data if any.
1220 SUBROUTINE export_to_gridinfov(this, gridinfov, gaid_template, clone)
1221 TYPE(volgrid6d),INTENT(inout) :: this !< volume to be exported
1222 TYPE(arrayof_gridinfo),INTENT(inout) :: gridinfov !< output array of gridinfo_def objects
1223 TYPE(grid_id),INTENT(in),OPTIONAL :: gaid_template !< \a grid_id template to be used for output data replacing the one contained in \a this
1224 LOGICAL,INTENT(in),OPTIONAL :: clone !< if provided and \c .TRUE., clone the grid_id included in \a this rather than making a shallow copy
1226 INTEGER :: i ,itime, itimerange, ilevel, ivar
1227 INTEGER :: ntime, ntimerange, nlevel, nvar
1228 TYPE(gridinfo_def) :: gridinfol
1231 CALL l4f_category_log(this%category,L4F_DEBUG,"start export_to_gridinfov ")
|