|
◆ import_from_gridinfovv()
subroutine volgrid6d_class::import_from_gridinfovv |
( |
type(volgrid6d), dimension(:), pointer |
this, |
|
|
type(arrayof_gridinfo), intent(in) |
gridinfov, |
|
|
integer, intent(in), optional |
dup_mode, |
|
|
logical, intent(in), optional |
clone, |
|
|
logical, intent(in), optional |
decode, |
|
|
integer, intent(in), optional |
time_definition, |
|
|
character(len=*), dimension(:), intent(in), optional |
anavar, |
|
|
character(len=*), intent(in), optional |
categoryappend |
|
) |
| |
|
private |
Import an array of gridinfo objects into an array of volgrid6d objects.
This method imports an array of gridded fields from an arrayof_gridinfo object into a suitable number of volgrid6d objects. The number of volgrid6d allocated is determined by the number of different grids encountered in arrayof_gridinfo. Unlike the import for a single gridinfo, here the volgrid6d object is a non-associated pointer to a 1-d array of uninitialized objects, and all the dimension descriptors in each of the objects are allocated and assigned within the method according to the data contained in gridinfov. If the anavar array argument is provided, all the input messages whose variable maps to one of the B-table variables contained in anavar are treated as time-independent (AKA anagraphic data, station data, etc.), thus their time and timerange are ignored and they are replicated for every time and timerange present in the corresponding data volume. - Parametri
-
| this | object in which to import |
[in] | gridinfov | array of gridinfo objects to be imported |
[in] | dup_mode | determines the behavior in case of duplicate metadata: if dup_mode is not provided or 0, a duplicate field overwrites, if dup_mode is 1, duplicate fields are merged with priority to the last |
[in] | clone | if provided and .TRUE. , clone the gaid's from gridinfo to this |
[in] | decode | if provided and .FALSE. the data volume in the elements of this is not allocated and successive work will be performed on grid_id's |
[in] | time_definition | 0=time is reference time; 1=time is validity time |
[in] | anavar | list of variables (B-table code equivalent) to be treated as time-independent data |
[in] | categoryappend | append this suffix to log4fortran namespace category |
Definizione alla linea 1254 del file volgrid6d_class.F90.
1256 CALL delete(gridinfol)
1264 END SUBROUTINE export_to_gridinfov
1272 SUBROUTINE export_to_gridinfovv(this, gridinfov, gaid_template, clone)
1275 TYPE(volgrid6d), INTENT(inout) :: this(:)
1276 TYPE(arrayof_gridinfo), INTENT(inout) :: gridinfov
1277 TYPE(grid_id), INTENT(in), OPTIONAL :: gaid_template
1278 LOGICAL, INTENT(in), OPTIONAL :: clone
1282 DO i = 1, SIZE(this)
1284 CALL l4f_category_log(this(i)%category,l4f_debug, &
1285 "export_to_gridinfovv grid index: "//t2c(i))
1287 CALL export(this(i), gridinfov, gaid_template=gaid_template, clone=clone)
1290 END SUBROUTINE export_to_gridinfovv
1302 SUBROUTINE volgrid6d_import_from_file(this, filename, dup_mode, decode, &
1303 time_definition, anavar, categoryappend)
1304 TYPE(volgrid6d), POINTER :: this(:)
1305 CHARACTER(len=*), INTENT(in) :: filename
1306 INTEGER, INTENT(in), OPTIONAL :: dup_mode
1307 LOGICAL, INTENT(in), OPTIONAL :: decode
1308 INTEGER, INTENT(IN), OPTIONAL :: time_definition
1309 CHARACTER(len=*), INTENT(IN), OPTIONAL :: anavar(:)
1310 character(len=*), INTENT(in), OPTIONAL :: categoryappend
1312 TYPE(arrayof_gridinfo) :: gridinfo
1314 CHARACTER(len=512) :: a_name
1318 IF ( PRESENT(categoryappend)) THEN
1319 CALL l4f_launcher(a_name,a_name_append= &
1320 trim(subcategory)// "."//trim(categoryappend))
1322 CALL l4f_launcher(a_name,a_name_append=trim(subcategory))
1324 category=l4f_category_get(a_name)
1326 CALL import(gridinfo, filename=filename, categoryappend=categoryappend)
1328 IF (gridinfo%arraysize > 0) THEN
1330 CALL import(this, gridinfo, dup_mode=dup_mode, clone=.true., decode=decode, &
1331 time_definition=time_definition, anavar=anavar, &
1332 categoryappend=categoryappend)
1334 CALL l4f_category_log(category,l4f_info, "deleting gridinfo")
1335 CALL delete(gridinfo)
1338 CALL l4f_category_log(category,l4f_info, "file does not contain gridded data")
1342 CALL l4f_category_delete(category)
1344 END SUBROUTINE volgrid6d_import_from_file
1354 SUBROUTINE volgrid6d_export_to_file(this, filename, gaid_template, categoryappend)
1355 TYPE(volgrid6d) :: this(:)
1356 CHARACTER(len=*), INTENT(in) :: filename
1357 TYPE(grid_id), INTENT(in), OPTIONAL :: gaid_template
1358 character(len=*), INTENT(in), OPTIONAL :: categoryappend
1360 TYPE(arrayof_gridinfo) :: gridinfo
1362 CHARACTER(len=512) :: a_name
1364 IF ( PRESENT(categoryappend)) THEN
1365 CALL l4f_launcher(a_name,a_name_append=trim(subcategory)// "."//trim(categoryappend))
1367 CALL l4f_launcher(a_name,a_name_append=trim(subcategory))
1369 category=l4f_category_get(a_name)
1372 CALL l4f_category_log(category,l4f_debug, "start export to file")
1375 CALL l4f_category_log(category,l4f_info, "writing volgrid6d to grib file: "//trim(filename))
1378 CALL export(this, gridinfo, gaid_template=gaid_template, clone=.true.)
1379 IF (gridinfo%arraysize > 0) THEN
1380 CALL export(gridinfo, filename)
1381 CALL delete(gridinfo)
1388 CALL l4f_category_delete(category)
1390 END SUBROUTINE volgrid6d_export_to_file
1396 SUBROUTINE volgrid6dv_delete(this)
1397 TYPE(volgrid6d), POINTER :: this(:)
1401 IF ( ASSOCIATED(this)) THEN
1402 DO i = 1, SIZE(this)
1404 CALL l4f_category_log(this(i)%category,l4f_debug, &
1405 "delete volgrid6d vector index: "//trim(to_char(i)))
1407 CALL delete(this(i))
|