|
◆ import_from_gridinfovv()
subroutine 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 |
|
) |
| |
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 1274 del file volgrid6d_class.F90.
1275 SUBROUTINE export_to_gridinfovv(this, gridinfov, gaid_template, clone) 1278 TYPE(volgrid6d), INTENT(inout) :: this(:) 1279 TYPE(arrayof_gridinfo), INTENT(inout) :: gridinfov 1280 TYPE(grid_id), INTENT(in), OPTIONAL :: gaid_template 1281 LOGICAL, INTENT(in), OPTIONAL :: clone 1285 DO i = 1, SIZE(this) 1287 CALL l4f_category_log(this(i)%category,l4f_debug, & 1288 "export_to_gridinfovv grid index: "// t2c(i)) 1290 CALL export(this(i), gridinfov, gaid_template=gaid_template, clone=clone) 1293 END SUBROUTINE export_to_gridinfovv 1305 SUBROUTINE volgrid6d_import_from_file(this, filename, dup_mode, decode, & 1306 time_definition, anavar, categoryappend) 1307 TYPE(volgrid6d), POINTER :: this(:) 1308 CHARACTER(len=*), INTENT(in) :: filename 1309 INTEGER, INTENT(in), OPTIONAL :: dup_mode 1310 LOGICAL, INTENT(in), OPTIONAL :: decode 1311 INTEGER, INTENT(IN), OPTIONAL :: time_definition 1312 CHARACTER(len=*), INTENT(IN), OPTIONAL :: anavar(:) 1313 character(len=*), INTENT(in), OPTIONAL :: categoryappend 1315 TYPE(arrayof_gridinfo) :: gridinfo 1317 CHARACTER(len=512) :: a_name 1321 IF ( PRESENT(categoryappend)) THEN 1322 CALL l4f_launcher(a_name,a_name_append= & 1323 trim(subcategory)// "."//trim(categoryappend)) 1325 CALL l4f_launcher(a_name,a_name_append=trim(subcategory)) 1327 category=l4f_category_get(a_name) 1329 CALL import(gridinfo, filename=filename, categoryappend=categoryappend) 1331 IF (gridinfo%arraysize > 0) THEN 1333 CALL import(this, gridinfo, dup_mode=dup_mode, clone=.true., decode=decode, & 1334 time_definition=time_definition, anavar=anavar, & 1335 categoryappend=categoryappend) 1337 CALL l4f_category_log(category,l4f_info, "deleting gridinfo") 1341 CALL l4f_category_log(category,l4f_info, "file does not contain gridded data") 1345 CALL l4f_category_delete(category) 1347 END SUBROUTINE volgrid6d_import_from_file 1357 SUBROUTINE volgrid6d_export_to_file(this, filename, gaid_template, categoryappend) 1358 TYPE(volgrid6d) :: this(:) 1359 CHARACTER(len=*), INTENT(in) :: filename 1360 TYPE(grid_id), INTENT(in), OPTIONAL :: gaid_template 1361 character(len=*), INTENT(in), OPTIONAL :: categoryappend 1363 TYPE(arrayof_gridinfo) :: gridinfo 1365 CHARACTER(len=512) :: a_name 1367 IF ( PRESENT(categoryappend)) THEN 1368 CALL l4f_launcher(a_name,a_name_append=trim(subcategory)// "."//trim(categoryappend)) 1370 CALL l4f_launcher(a_name,a_name_append=trim(subcategory)) 1372 category=l4f_category_get(a_name) 1375 CALL l4f_category_log(category,l4f_debug, "start export to file") 1378 CALL l4f_category_log(category,l4f_info, "writing volgrid6d to grib file: "//trim(filename)) 1381 CALL export(this, gridinfo, gaid_template=gaid_template, clone=.true.) 1382 IF (gridinfo%arraysize > 0) THEN 1383 CALL export(gridinfo, filename) 1391 CALL l4f_category_delete(category) 1393 END SUBROUTINE volgrid6d_export_to_file 1399 SUBROUTINE volgrid6dv_delete(this) 1400 TYPE(volgrid6d), POINTER :: this(:) 1404 IF ( ASSOCIATED(this)) THEN 1405 DO i = 1, SIZE(this) 1407 CALL l4f_category_log(this(i)%category,l4f_debug, & 1408 "delete volgrid6d vector index: "//trim( to_char(i))) 1415 END SUBROUTINE volgrid6dv_delete 1419 SUBROUTINE volgrid6d_transform_compute(this, volgrid6d_in, volgrid6d_out, & 1420 lev_out, var_coord_vol, clone) 1421 TYPE(grid_transform), INTENT(in) :: this 1422 type(volgrid6d), INTENT(in) :: volgrid6d_in 1423 type(volgrid6d), INTENT(inout) :: volgrid6d_out 1424 TYPE(vol7d_level), INTENT(in), OPTIONAL :: lev_out(:) 1425 INTEGER, INTENT(in), OPTIONAL :: var_coord_vol 1426 LOGICAL, INTENT(in), OPTIONAL :: clone Functions that return a trimmed CHARACTER representation of the input variable.
Distruttori per le 2 classi.
Restituiscono il valore dell'oggetto in forma di stringa stampabile.
|