|
|
◆ gridinfo_import_from_file()
| subroutine gridinfo_import_from_file |
( |
type(arrayof_gridinfo) |
this, |
|
|
character(len=*), intent(in) |
filename, |
|
|
character(len=*), intent(in), optional |
categoryappend |
|
) |
| |
Import an array of gridinfo from a file.
It receives a (possibly unallocated) array of gridinfo objects which will be extended by a number of elements equal to the number of gridded messages/bands found in the file provided and it will be filled with all the data found. In case of error, the gridinfo object will not be allocated, so the success can be tested by checking thisarraysize.
- Parametri
-
| this | array of gridinfo objects which will be allocated/extended and into which data will be imported |
| [in] | filename | name of file to open and import, in the form [driver:]pathname |
| [in] | categoryappend | append this suffix to log4fortran namespace category |
Definizione alla linea 905 del file gridinfo_class.F90.
908 CALL init(this, statproc, p1, p2) 910 END SUBROUTINE timerange_import_gribapi 913 SUBROUTINE timerange_export_gribapi(this, gaid, reftime) 914 TYPE(vol7d_timerange), INTENT(in) :: this 915 INTEGER, INTENT(in) :: gaid 916 TYPE(datetime) :: reftime 918 INTEGER :: EditionNumber, centre, tri, currentunit, unit, p1_g1, p2_g1, p1, p2, pdtn 919 CHARACTER(len=8) :: env_var 920 LOGICAL :: g2cosmo_behavior 922 CALL grib_get(gaid, 'GRIBEditionNumber',editionnumber) 924 IF (editionnumber == 1 ) THEN 926 CALL grib_get(gaid, 'indicatorOfUnitOfTimeRange',currentunit) 927 CALL timerange_v7d_to_g1(this%timerange, this%p1, this%p2, & 928 tri, p1_g1, p2_g1, unit) 930 CALL grib_set(gaid, 'timeRangeIndicator',tri) 931 CALL grib_set(gaid, 'P1',p1_g1) 932 CALL grib_set(gaid, 'P2',p2_g1) 933 CALL grib_set(gaid, 'indicatorOfUnitOfTimeRange',unit) 935 ELSE IF (editionnumber == 2) THEN 936 CALL grib_get(gaid, 'productDefinitionTemplateNumber', pdtn) 938 IF (this%timerange == 254) THEN 939 IF (pdtn < 0 .OR. pdtn > 7) & 940 CALL grib_set(gaid, 'productDefinitionTemplateNumber', 0) 942 CALL timerange_v7d_to_g2(this%p1,p1,unit) 944 CALL grib_set(gaid, 'indicatorOfUnitOfTimeRange',unit) 945 CALL grib_set(gaid, 'forecastTime',p1) 947 ELSE IF (this%timerange >= 0 .AND. this%timerange < 254) THEN 949 IF (pdtn < 8 .OR. pdtn > 14) & 950 CALL grib_set(gaid, 'productDefinitionTemplateNumber', 8) 952 IF (this%p1 >= this%p2) THEN 954 CALL timerange_v7d_to_g2(this%p1-this%p2,p1,unit) 955 CALL grib_set(gaid, 'indicatorOfUnitOfTimeRange',unit) 956 CALL grib_set(gaid, 'forecastTime',p1) 957 CALL code_endoftimeinterval(reftime+timedelta_new(sec=this%p1)) 960 CALL grib_set(gaid, 'typeOfStatisticalProcessing',this%timerange) 962 CALL grib_set(gaid, 'typeOfTimeIncrement',2) 963 CALL timerange_v7d_to_g2(this%p2,p2,unit) 964 CALL grib_set(gaid, 'indicatorOfUnitForTimeRange',unit) 965 CALL grib_set(gaid, 'lengthOfTimeRange',p2) 967 ELSE IF (this%p1 == 0) THEN
|