28 public file_tiledata_get_data
30 interface file_tiledata_get_data
31 module procedure file_tiledata_get_data_real
33 end interface file_tiledata_get_data
53 TILE_DLAT, TILE_DLON, &
54 DOMAIN_LATS, DOMAIN_LATE, DOMAIN_LONS, DOMAIN_LONE, &
58 TILE_fname, TILE_hit, &
59 TILE_JS, TILE_JE, TILE_IS, TILE_IE, &
60 nLATH, nLONH, jsh, jeh, ish, ieh, zonal, pole, &
61 single_fname, LATS, LATE, LONS, LONE )
66 integer,
intent(in) :: tile_nlim
67 real(
rp),
intent(in) :: tile_dlat, tile_dlon
68 real(
rp),
intent(in) :: domain_lats, domain_late, domain_lons, domain_lone
69 character(len=*),
intent(in) :: catalog_fname
70 integer,
intent(out) :: global_ia
71 integer,
intent(out) :: tile_nmax
72 logical,
intent(out) :: tile_hit(:)
73 character(len=*),
intent(out) :: tile_fname(:)
74 integer,
intent(out) :: tile_js(:), tile_je(:), tile_is(:), tile_ie(:)
75 integer,
intent(out) :: nlath, nlonh
76 integer,
intent(out) :: jsh, jeh, ish, ieh
77 logical,
intent(out) :: zonal, pole
79 character(len=*),
intent(in),
optional :: single_fname
80 real(
rp),
intent(in),
optional :: lats
81 real(
rp),
intent(in),
optional :: late
82 real(
rp),
intent(in),
optional :: lons
83 real(
rp),
intent(in),
optional :: lone
85 real(
rp) :: tile_lats(tile_nlim), tile_late(tile_nlim)
86 real(
rp) :: tile_lons(tile_nlim), tile_lone(tile_nlim)
87 real(
rp) :: lat_min, lat_max
89 integer :: domain_js, domain_je, domain_is, domain_ie
92 domain_lats, domain_late, domain_lons, domain_lone, &
93 domain_js, domain_je, domain_is, domain_ie, &
97 if ( catalog_fname /=
"" )
then
98 log_info(
"FILE_TILEDATA_get_info",*)
'Input catalogue file:', trim(catalog_fname)
102 tile_dlat, tile_dlon, &
103 domain_is, global_ia, &
106 tile_lats(:), tile_late(:), &
107 tile_lons(:), tile_lone(:) )
108 lat_min = minval( tile_lats(1:tile_nmax) )
109 lat_max = maxval( tile_late(1:tile_nmax) )
112 if ( .not.
present(single_fname) )
then
113 log_error(
"FILE_TILEDATA_get_info",*)
"single_fname is required if catalog_fname is empty"
116 if ( .not.
present(lats) )
then
117 log_error(
"FILE_TILEDATA_get_info",*)
"LATS is required if catalog_fname is empty"
120 if ( .not.
present(late) )
then
121 log_error(
"FILE_TILEDATA_get_info",*)
"LATE is required if catalog_fname is empty"
124 if ( .not.
present(lons) )
then
125 log_error(
"FILE_TILEDATA_get_info",*)
"LONS is required if catalog_fname is empty"
128 if ( .not.
present(lone) )
then
129 log_error(
"FILE_TILEDATA_get_info",*)
"LONE is required if catalog_fname is empty"
134 tile_fname(1) = single_fname
144 zonal = ( domain_lone - domain_lons ) / ( 2.0_rp * pi ) > 0.9_rp
146 pole = ( domain_lats < - pi * 0.5_rp + ( domain_late - domain_lats ) * 0.1_rp ) &
147 .or. ( domain_late > pi * 0.5_rp - ( domain_late - domain_lats ) * 0.1_rp )
149 zonal = zonal .or. pole
152 domain_js, domain_je, &
153 domain_is, domain_ie, &
155 tile_dlat, tile_dlon, &
156 tile_lats(:), tile_late(:), &
157 tile_lons(:), tile_lone(:), &
160 tile_js(:), tile_je(:), &
161 tile_is(:), tile_ie(:), &
162 jsh, jeh, ish, ieh, &
173 TILE_DLAT, TILE_DLON, &
176 integer,
intent(in) :: nlat, nlon
177 integer,
intent(in) :: jsh, ish
178 real(
rp),
intent(in) :: tile_dlat, tile_dlon
179 real(
rp),
intent(out) :: lat(nlat)
180 real(
rp),
intent(out) :: lon(nlon)
185 lat(j) = tile_dlat * ( jsh + j - 0.5_rp )
188 lon(i) = tile_dlon * ( ish + i - 0.5_rp )
196 subroutine file_tiledata_get_data_real( &
201 TILE_DLAT, TILE_DLON, &
202 TILE_fname, TILE_hit, &
205 jsh, jeh, ish, ieh, &
217 integer,
intent(in) :: nlat, nlon
218 character(len=*),
intent(in) :: dirname
219 integer,
intent(in) :: global_ia
220 integer,
intent(in) :: tile_nmax
221 real(
rp),
intent(in) :: tile_dlat, tile_dlon
222 character(len=*),
intent(in) :: tile_fname(:)
223 logical,
intent(in) :: tile_hit(:)
224 integer,
intent(in) :: tile_js(:)
225 integer,
intent(in) :: tile_je(:)
226 integer,
intent(in) :: tile_is(:)
227 integer,
intent(in) :: tile_ie(:)
228 integer,
intent(in) :: jsh
229 integer,
intent(in) :: jeh
230 integer,
intent(in) :: ish
231 integer,
intent(in) :: ieh
232 character(len=*),
intent(in) :: data_type
233 real(
rp),
intent(out) :: data(nlon,nlat)
234 real(
rp),
intent(in),
optional :: min_value
235 logical,
intent(in),
optional :: yrevers
236 integer,
intent(in),
optional :: step
246 integer,
intent(in) :: jsize
247 integer,
intent(in) :: isize
248 character(len=*),
intent(in) :: fname
249 real(
rp),
intent(out) :: tile_data(isize,jsize)
250 logical,
intent(in),
optional :: yrevers
251 integer,
intent(in),
optional :: step
255 procedure(rd),
pointer :: read_data
257 real(
rp) :: min_value_
259 character(len=H_LONG) :: fname
260 real(
rp),
allocatable :: tile_data(:,:)
261 integer :: jsize, isize
262 integer :: i, j, ii, jj, t
264 if (
present(min_value) )
then
265 min_value_ = min_value
267 min_value_ = - abs(undef)
270 select case( data_type )
271 case (
"int2",
"INT2" )
273 case (
"int4",
"INT4" )
275 case (
"real4",
"REAL4" )
277 case (
"real8",
"REAL8" )
280 log_error(
"FILE_TILEDATA_get_data_real",*)
'data_type is invalid: ', trim(data_type)
293 if ( .not. tile_hit(t) ) cycle
295 fname = trim(dirname) //
'/' // trim(tile_fname(t))
298 log_info(
"FILE_TILEDATA_get_data_real",*)
'Input data file :', trim(fname)
299 log_info_cont(*)
'Tile (LAT) :', tile_js(t)*tile_dlat/d2r, (tile_je(t)+1)*tile_dlat/d2r
300 log_info_cont(*)
' (LON) :', tile_is(t)*tile_dlon/d2r, (tile_ie(t)+1)*tile_dlon/d2r
302 isize = tile_ie(t) - tile_is(t) + 1
303 jsize = tile_je(t) - tile_js(t) + 1
305 allocate( tile_data(isize,jsize) )
307 call read_data( jsize, isize, &
316 j = tile_js(t) + jj - 1
317 if ( jsh <= j .and. j <= jeh )
then
319 i = tile_is(t) + ii - 1
320 if ( ish <= i .and. i <= ieh )
then
321 if ( tile_data(ii,jj) < min_value_ )
then
322 DATA(i-ish+1,j-jsh+1) = undef
324 DATA(i-ish+1,j-jsh+1) = tile_data(ii,jj)
328 if ( ish <= i .and. i <= ieh )
then
329 if ( tile_data(ii,jj) < min_value_ )
then
330 DATA(i-ish+1,j-jsh+1) = undef
332 DATA(i-ish+1,j-jsh+1) = tile_data(ii,jj)
339 deallocate( tile_data )
344 end subroutine file_tiledata_get_data_real
351 TILE_DLAT, TILE_DLON, &
352 TILE_fname, TILE_hit, &
355 jsh, jeh, ish, ieh, &
368 integer,
intent(in) :: nLAT, nLON
369 character(len=*),
intent(in) :: dirname
370 integer,
intent(in) :: GLOBAL_IA
371 integer,
intent(in) :: TILE_nmax
372 real(RP),
intent(in) :: TILE_DLAT, TILE_DLON
373 character(len=*),
intent(in) :: TILE_fname(:)
374 logical,
intent(in) :: TILE_hit(:)
375 integer,
intent(in) :: TILE_JS(:)
376 integer,
intent(in) :: TILE_JE(:)
377 integer,
intent(in) :: TILE_IS(:)
378 integer,
intent(in) :: TILE_IE(:)
379 integer,
intent(in) :: jsh
380 integer,
intent(in) :: jeh
381 integer,
intent(in) :: ish
382 integer,
intent(in) :: ieh
383 character(len=*),
intent(in) :: data_type
384 integer,
intent(out) :: DATA(nLON,nLAT)
386 integer,
intent(in),
optional :: min_value
387 logical,
intent(in),
optional :: yrevers
388 integer,
intent(in),
optional :: step
398 integer,
intent(in) :: jsize
399 integer,
intent(in) :: isize
400 character(len=*),
intent(in) :: fname
401 integer,
intent(out) :: TILE_DATA(isize,jsize)
402 logical,
intent(in),
optional :: yrevers
403 integer,
intent(in),
optional :: step
407 integer :: min_value_
409 procedure(rd),
pointer :: read_data
411 character(len=H_LONG) :: fname
412 integer,
allocatable :: TILE_DATA(:,:)
413 integer :: jsize, isize
414 integer :: i, j, ii, jj, t
416 if (
present(min_value) )
then
417 min_value_ = min_value
419 min_value_ = - abs(undef2)
422 select case( data_type )
423 case (
"int1",
"INT1" )
425 case (
"int2",
"INT2" )
427 case (
"int4",
"INT4" )
429 case (
"real4",
"REAL4" )
432 log_error(
"FILE_TILEDATA_get_data_int1",*)
'data_type is invalid: ', trim(data_type)
445 if ( .not. tile_hit(t) ) cycle
447 fname = trim(dirname) //
'/' // trim(tile_fname(t))
450 log_info(
"FILE_TILEDATA_get_data_int1",*)
'Input data file :', trim(fname)
451 log_info_cont(*)
'Tile (LAT) :', tile_js(t)*tile_dlat/d2r, (tile_je(t)+1)*tile_dlat/d2r
452 log_info_cont(*)
' (LON) :', tile_is(t)*tile_dlon/d2r, (tile_ie(t)+1)*tile_dlon/d2r
454 isize = tile_ie(t) - tile_is(t) + 1
455 jsize = tile_je(t) - tile_js(t) + 1
457 allocate( tile_data(isize,jsize) )
459 call read_data( jsize, isize, &
468 j = tile_js(t) + jj - 1
469 if ( jsh <= j .and. j <= jeh )
then
471 i = tile_is(t) + ii - 1
472 if ( ish <= i .and. i <= ieh )
then
473 if ( tile_data(ii,jj) < min_value_ )
then
474 DATA(i-ish+1,j-jsh+1) = undef2
476 DATA(i-ish+1,j-jsh+1) = tile_data(ii,jj)
480 if ( ish <= i .and. i <= ieh )
then
481 if ( tile_data(ii,jj) < min_value_ )
then
482 DATA(i-ish+1,j-jsh+1) = undef2
484 DATA(i-ish+1,j-jsh+1) = tile_data(ii,jj)
491 deallocate( tile_data )
507 TILE_DLAT, TILE_DLON, &
508 DOMAIN_IS, GLOBAL_IA, &
511 TILE_LATS, TILE_LATE, &
512 TILE_LONS, TILE_LONE )
517 integer,
intent(in) :: TILE_nlim
518 character(len=*),
intent(in) :: fname
519 real(RP),
intent(in) :: TILE_DLAT
520 real(RP),
intent(in) :: TILE_DLON
521 integer,
intent(in) :: DOMAIN_IS
522 integer,
intent(in) :: GLOBAL_IA
523 integer,
intent(out) :: TILE_nmax
524 character(len=*),
intent(out) :: TILE_fname(:)
525 real(RP),
intent(out) :: TILE_LATS(:)
526 real(RP),
intent(out) :: TILE_LATE(:)
527 real(RP),
intent(out) :: TILE_LONS(:)
528 real(RP),
intent(out) :: TILE_LONE(:)
537 form =
'formatted', &
541 if ( ierr /= 0 )
then
542 log_error(
"FILE_TILEDATA_read_catalog_file",*)
'catalogue file not found! ', trim(fname)
548 do while ( ierr == 0 )
549 read(fid,*,iostat=ierr) index, tile_lats(1), tile_late(1), tile_lons(1), tile_lone(1), &
551 tile_nmax = tile_nmax + 1
554 if ( tile_nmax > tile_nlim )
then
555 log_error(
'FILE_TILEDATA_read_catalog_file',*)
'TILE_nmax must be >= ', tile_nmax
561 read(fid,*,iostat=ierr) index, tile_lats(t), tile_late(t), &
562 tile_lons(t), tile_lone(t), &
565 tile_lats(t) = tile_lats(t) * d2r
566 tile_late(t) = tile_late(t) * d2r
568 if ( tile_lons(t) > tile_lone(t) ) tile_lone(t) = tile_lone(t) + 360.0_rp
569 tile_lons(t) = tile_lons(t) * d2r
570 tile_lone(t) = tile_lone(t) * d2r
579 TILE_DLAT, TILE_DLON, &
580 DOMAIN_LATS, DOMAIN_LATE, DOMAIN_LONS, DOMAIN_LONE, &
581 DOMAIN_JS, DOMAIN_JE, DOMAIN_IS, DOMAIN_IE, &
585 real(RP),
intent(in) :: TILE_DLAT
586 real(RP),
intent(in) :: TILE_DLON
587 real(RP),
intent(in) :: DOMAIN_LATS
588 real(RP),
intent(in) :: DOMAIN_LATE
589 real(RP),
intent(in) :: DOMAIN_LONS
590 real(RP),
intent(in) :: DOMAIN_LONE
591 integer,
intent(out) :: DOMAIN_JS
592 integer,
intent(out) :: DOMAIN_JE
593 integer,
intent(out) :: DOMAIN_IS
594 integer,
intent(out) :: DOMAIN_IE
595 integer,
intent(out) :: GLOBAL_IA
597 domain_js = floor( domain_lats / tile_dlat )
598 domain_je = ceiling( domain_late / tile_dlat )
599 domain_is = floor( domain_lons / tile_dlon )
600 domain_ie = ceiling( domain_lone / tile_dlon )
602 global_ia = nint( 2.0_rp * pi / tile_dlon )
609 DOMAIN_JS, DOMAIN_JE, &
610 DOMAIN_IS, DOMAIN_IE, &
612 TILE_DLAT, TILE_DLON, &
613 TILE_LATS, TILE_LATE, &
614 TILE_LONS, TILE_LONE, &
619 jsh, jeh, ish, ieh, &
623 integer,
intent(in) :: TILE_nmax
624 integer,
intent(in) :: DOMAIN_JS, DOMAIN_JE, DOMAIN_IS, DOMAIN_IE
625 integer,
intent(in) :: GLOBAL_IA
626 real(RP),
intent(in) :: TILE_DLAT, TILE_DLON
627 real(RP),
intent(in) :: TILE_LATS(:), TILE_LATE(:), TILE_LONS(:), TILE_LONE(:)
628 logical,
intent(in) :: zonal
629 logical,
intent(out) :: TILE_hit(:)
630 integer,
intent(out) :: TILE_JS(:), TILE_JE(:), TILE_IS(:), TILE_IE(:)
631 integer,
intent(out) :: jsh, jeh, ish, ieh
632 integer,
intent(out) :: nLAT, nLON
634 logical :: hit_lat, hit_lon
640 jsh = max( domain_js - nhalo, -floor( 0.5_rp * pi / tile_dlat ) )
641 jeh = min( domain_je + nhalo, floor( 0.5_rp * pi / tile_dlat ) )
642 ish = domain_is - nhalo
643 ieh = domain_ie + nhalo
650 tile_js(t) = nint( tile_lats(t) / tile_dlat )
651 tile_je(t) = nint( tile_late(t) / tile_dlat ) - 1
653 tile_is(t) = nint( tile_lons(t) / tile_dlon )
654 tile_ie(t) = nint( tile_lone(t) / tile_dlon ) - 1
656 do while ( tile_ie(t) < ish )
657 tile_is(t) = tile_is(t) + global_ia
658 tile_ie(t) = tile_ie(t) + global_ia
660 do while ( tile_is(t) - ish >= global_ia )
661 tile_is(t) = tile_is(t) - global_ia
662 tile_ie(t) = tile_ie(t) - global_ia
665 if ( ( jsh <= tile_js(t) .AND. tile_js(t) <= jeh ) &
666 .OR. ( jsh <= tile_je(t) .AND. tile_je(t) <= jeh ) &
667 .OR. ( tile_js(t) <= jsh .AND. jsh <= tile_je(t) ) &
668 .OR. ( tile_js(t) <= jeh .AND. jeh <= tile_je(t) ) )
then
676 else if ( ( tile_is(t) <= ieh ) &
677 .OR. ( tile_ie(t) - global_ia >= ish ) )
then
683 tile_hit(t) = ( hit_lat .AND. hit_lon )
688 ish = minval(tile_is(1:tile_nmax))
689 ieh = maxval(tile_ie(1:tile_nmax))
690 jsh = max( jsh, minval(tile_js(1:tile_nmax)) )
691 jeh = min( jeh, maxval(tile_je(1:tile_nmax)) )
708 integer,
intent(in) :: jsize
709 integer,
intent(in) :: isize
710 character(len=*),
intent(in) :: fname
711 real(RP),
intent(out) :: TILE_DATA(isize,jsize)
713 logical,
intent(in),
optional :: yrevers
714 integer,
intent(in),
optional :: step
716 integer(2) :: buf(isize,jsize)
724 if (
present(yrevers) )
then
730 lstep =
present(step)
733 inquire( file = fname, number = fid )
743 form =
'unformatted', &
746 recl = isize*jsize*2, &
748 if ( ierr /= 0 )
then
749 log_error(
"FILE_TILEDATA_read_data_int2_real",*)
'data file not found!: ', trim(fname)
755 read(fid,rec=step_) buf(:,:)
756 if ( .not. lstep )
close(fid)
763 tile_data(i,j) = buf(i,jsize-j+1)
771 tile_data(i,j) = buf(i,j)
787 integer,
intent(in) :: jsize
788 integer,
intent(in) :: isize
789 character(len=*),
intent(in) :: fname
790 real(RP),
intent(out) :: TILE_DATA(isize,jsize)
792 logical,
intent(in),
optional :: yrevers
793 integer,
intent(in),
optional :: step
795 integer(4) :: buf(isize,jsize)
803 if (
present(yrevers) )
then
809 lstep =
present(step)
812 inquire( file = fname, number = fid )
822 form =
'unformatted', &
825 recl = isize*jsize*4, &
827 if ( ierr /= 0 )
then
828 log_error(
"FILE_TILEDATA_read_data_int4_real",*)
'data file not found!: ', trim(fname)
833 read(fid,rec=step_) buf(:,:)
834 if ( .not. lstep )
close(fid)
841 tile_data(i,j) = buf(i,jsize-j+1)
849 tile_data(i,j) = buf(i,j)
865 integer,
intent(in) :: jsize
866 integer,
intent(in) :: isize
867 character(len=*),
intent(in) :: fname
868 real(RP),
intent(out) :: TILE_DATA(isize,jsize)
870 logical,
intent(in),
optional :: yrevers
871 integer,
intent(in),
optional :: step
873 real(4) :: buf(isize,jsize)
881 if (
present(yrevers) )
then
887 lstep =
present(step)
890 inquire( file = fname, number = fid )
900 form =
'unformatted', &
903 recl = isize*jsize*4, &
905 if ( ierr /= 0 )
then
906 log_error(
"FILE_TILEDATA_read_data_real4_real",*)
'data file not found!: ', trim(fname)
911 read(fid,rec=step_) buf(:,:)
912 if ( .not. lstep )
close(fid)
919 tile_data(i,j) = buf(i,jsize-j+1)
927 tile_data(i,j) = buf(i,j)
943 integer,
intent(in) :: jsize
944 integer,
intent(in) :: isize
945 character(len=*),
intent(in) :: fname
946 real(RP),
intent(out) :: TILE_DATA(isize,jsize)
948 logical,
intent(in),
optional :: yrevers
949 integer,
intent(in),
optional :: step
951 real(8) :: buf(isize,jsize)
959 if (
present(yrevers) )
then
965 lstep =
present(step)
968 inquire( file = fname, number = fid )
978 form =
'unformatted', &
981 recl = isize*jsize*8, &
983 if ( ierr /= 0 )
then
984 log_error(
"FILE_TILEDATA_read_data_real8_real",*)
'data file not found!: ', trim(fname)
989 read(fid,rec=step_) buf(:,:)
990 if ( .not. lstep )
close(fid)
997 tile_data(i,j) = buf(i,jsize-j+1)
1005 tile_data(i,j) = buf(i,j)
1021 integer,
intent(in) :: jsize
1022 integer,
intent(in) :: isize
1023 character(len=*),
intent(in) :: fname
1024 integer,
intent(out) :: TILE_DATA(isize,jsize)
1026 logical,
intent(in),
optional :: yrevers
1027 integer,
intent(in),
optional :: step
1029 integer(1) :: buf(isize,jsize)
1031 integer :: fid, ierr
1037 if (
present(yrevers) )
then
1043 lstep =
present(step)
1046 inquire( file = fname, number = fid )
1056 form =
'unformatted', &
1057 access =
'direct', &
1059 recl = isize*jsize*1, &
1061 if ( ierr /= 0 )
then
1062 log_error(
"FILE_TILEDATA_read_data_int1_int",*)
'data file not found!: ', trim(fname)
1067 read(fid,rec=step_) buf(:,:)
1068 if ( .not. lstep )
close(fid)
1070 if ( yrevers_ )
then
1075 tile_data(i,j) = buf(i,jsize-j+1)
1083 tile_data(i,j) = buf(i,j)
1099 integer,
intent(in) :: jsize
1100 integer,
intent(in) :: isize
1101 character(len=*),
intent(in) :: fname
1102 integer,
intent(out) :: TILE_DATA(isize,jsize)
1104 logical,
intent(in),
optional :: yrevers
1105 integer,
intent(in),
optional :: step
1107 integer(2) :: buf(isize,jsize)
1109 integer :: fid, ierr
1115 if (
present(yrevers) )
then
1121 lstep =
present(step)
1124 inquire( file = fname, number = fid )
1134 form =
'unformatted', &
1135 access =
'direct', &
1137 recl = isize*jsize*2, &
1139 if ( ierr /= 0 )
then
1140 log_error(
"FILE_TILEDATA_read_data_int2_int",*)
'data file not found!: ', trim(fname)
1145 read(fid,rec=step_) buf(:,:)
1146 if ( .not. lstep )
close(fid)
1148 if ( yrevers_ )
then
1153 tile_data(i,j) = buf(i,jsize-j+1)
1161 tile_data(i,j) = buf(i,j)
1177 integer,
intent(in) :: jsize
1178 integer,
intent(in) :: isize
1179 character(len=*),
intent(in) :: fname
1180 integer,
intent(out) :: TILE_DATA(isize,jsize)
1182 logical,
intent(in),
optional :: yrevers
1183 integer,
intent(in),
optional :: step
1185 integer(4) :: buf(isize,jsize)
1187 integer :: fid, ierr
1193 if (
present(yrevers) )
then
1199 lstep =
present(step)
1202 inquire( file = fname, number = fid )
1212 form =
'unformatted', &
1213 access =
'direct', &
1215 recl = isize*jsize*4, &
1217 if ( ierr /= 0 )
then
1218 log_error(
"FILE_TILEDATA_read_data_int4_int",*)
'data file not found!: ', trim(fname)
1223 read(fid,rec=step_) buf(:,:)
1224 if ( .not. lstep )
close(fid)
1226 if ( yrevers_ )
then
1231 tile_data(i,j) = buf(i,jsize-j+1)
1239 tile_data(i,j) = buf(i,j)
1255 integer,
intent(in) :: jsize
1256 integer,
intent(in) :: isize
1257 character(len=*),
intent(in) :: fname
1258 integer,
intent(out) :: TILE_DATA(isize,jsize)
1260 logical,
intent(in),
optional :: yrevers
1261 integer,
intent(in),
optional :: step
1263 real(4) :: buf(isize,jsize)
1265 integer :: fid, ierr
1271 if (
present(yrevers) )
then
1277 lstep =
present(step)
1280 inquire( file = fname, number = fid )
1290 form =
'unformatted', &
1291 access =
'direct', &
1293 recl = isize*jsize*4, &
1295 if ( ierr /= 0 )
then
1296 log_error(
"FILE_TILEDATA_read_data_real4_int",*)
'data file not found!: ', trim(fname)
1301 read(fid,rec=step_) buf(:,:)
1302 if ( .not. lstep )
close(fid)
1304 if ( yrevers_ )
then
1309 tile_data(i,j) = buf(i,jsize-j+1)
1317 tile_data(i,j) = buf(i,j)