libsim  Versione7.2.3

◆ 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]thisvolume to be exported
[in,out]gridinfooutput gridinfo_def object
itimeindex within this of the element to be exported for the time dimension
itimerangeindex within this of the element to be exported for the timerange dimension
ilevelindex within this of the element to be exported for the vertical level dimension
ivarindex within this of the element to be exported for the variable dimension
[in]gaid_templategrid_id template to be used for output data replacing the one contained in this
[in]cloneif provided and .TRUE., clone the grid_id included in this rather than making a shallow copy

Definizione alla linea 1167 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)
1171 
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)
1177 
1178  this(i)%level=pack_distinct(gridinfov%array(1:gridinfov%arraysize)%level, &
1179  nlevel,mask=(this(i)%griddim == gridinfov%array(1:gridinfov%arraysize)%griddim), &
1180  back=.true.)
1181  CALL sort(this(i)%level)
1182 
1183  this(i)%var=pack_distinct(gridinfov%array(1:gridinfov%arraysize)%var, nvar, &
1184  mask=(this(i)%griddim == gridinfov%array(1:gridinfov%arraysize)%griddim), &
1185  back=.true.)
1186 
1187 #ifdef DEBUG
1188  CALL l4f_category_log(this(i)%category,l4f_debug,"alloc_vol volgrid6d index: "//t2c(i))
1189 #endif
1190  CALL volgrid6d_alloc_vol(this(i), decode=decode)
1191 
1192 ENDDO
1193 
1194 DEALLOCATE(correctedtime)
1195 
1196 DO i = 1, gridinfov%arraysize
1197 
1198 #ifdef DEBUG
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)))
1202 #endif
1203 
1204  CALL import(this(index(this%griddim, gridinfov%array(i)%griddim)), &
1205  gridinfov%array(i), dup_mode=dup_mode, clone=clone, isanavar=isanavar(i))
1206 
1207 ENDDO
1208 
1209 !chiudo il logger temporaneo
1210 CALL l4f_category_delete(category)
1211 
1212 END SUBROUTINE import_from_gridinfovv
1213 
1214 
1220 SUBROUTINE export_to_gridinfov(this, gridinfov, gaid_template, clone)
1221 TYPE(volgrid6d),INTENT(inout) :: this
1222 TYPE(arrayof_gridinfo),INTENT(inout) :: gridinfov
1223 TYPE(grid_id),INTENT(in),OPTIONAL :: gaid_template
1224 LOGICAL,INTENT(in),OPTIONAL :: clone
1225 
1226 INTEGER :: i ,itime, itimerange, ilevel, ivar
1227 INTEGER :: ntime, ntimerange, nlevel, nvar
1228 TYPE(gridinfo_def) :: gridinfol
1229 
1230 #ifdef DEBUG
1231 CALL l4f_category_log(this%category,l4f_debug,"start export_to_gridinfov")
1232 #endif
1233 
Index method.

Generated with Doxygen.