|
libsim Versione 8.0.0
|
◆ volgrid6d_import_from_file()
Import the content of a supported file (like grib or gdal-supported format) into an array of volgrid6d objects. This method imports a set of gridded fields from a file object into a suitable number of volgrid6d objects. The data are imported by creating a temporary gridinfo object, importing it into the volgrid6d object cloning the gaid's and then destroying the gridinfo, so it works similarly to volgrid6d_class::import_from_gridinfovv() method. For a detailed explanation of the anavar argument, see the documentation of volgrid6d_class::import_from_gridinfovv() method.
Definizione alla linea 1543 del file volgrid6d_class.F90. 1545 CALL l4f_category_log(volgrid6d_in%category, l4f_error, &
1546 'internal inconsistence, levshift and levused undefined when they should be')
1547 ENDIF
1548 ENDIF
1549ENDIF
1550
1551DO ivar=1,nvar
1552! IF (c_e(var_coord_vol)) THEN
1553! IF (ivar == var_coord_vol) CYCLE ! skip coordinate variable in output
1554! ENDIF
1555 DO itimerange=1,ntimerange
1556 DO itime=1,ntime
1557! skip empty columns where possible, improve
1558 IF (c_e(levshift) .AND. c_e(levused)) THEN
1559 IF (.NOT.any(c_e( &
1560 volgrid6d_in%gaid(levshift+1:levshift+levused,itime,itimerange,ivar) &
1561 ))) cycle
1562 ENDIF
1563 DO ilevel = 1, min(inlevel,onlevel)
1564! if present gaid copy it
1565 IF (c_e(volgrid6d_in%gaid(ilevel,itime,itimerange,ivar)) .AND. .NOT. &
1566 c_e(volgrid6d_out%gaid(ilevel,itime,itimerange,ivar))) THEN
1567
1568 IF (optio_log(clone)) THEN
1569 CALL copy(volgrid6d_in%gaid(ilevel,itime,itimerange,ivar),&
1570 volgrid6d_out%gaid(ilevel,itime,itimerange,ivar))
1571#ifdef DEBUG
1572 CALL l4f_category_log(volgrid6d_in%category,l4f_debug, &
1573 "cloning gaid, level "//t2c(ilevel))
1574#endif
1575 ELSE
1576 volgrid6d_out%gaid(ilevel,itime,itimerange,ivar) = &
1577 volgrid6d_in%gaid(ilevel,itime,itimerange,ivar)
1578 ENDIF
1579 ENDIF
1580 ENDDO
1581! if out level are more, we have to clone anyway
1582 DO ilevel = min(inlevel,onlevel) + 1, onlevel
1583 IF (c_e(volgrid6d_in%gaid(inlevel,itime,itimerange,ivar)) .AND. .NOT. &
1584 c_e(volgrid6d_out%gaid(ilevel,itime,itimerange,ivar))) then
|