program trmmpr_sdsdata implicit none ! character*(100) :: hdffile, geo_name ! integer(4) :: sd_id, sds_id, rank, num_type, attributes integer(4) :: geo_index, vars_index, istat integer(4) :: sfstart, sfginfo, sffattr, sfrnatt integer(4) :: sfselect, sfendacc, sfend, sfn2index, sfrdata integer(4) :: start3(3), stride3(3), geo_dim_sizes(3) integer(4) :: start2(2), stride2(2), param_dim_sizes(2) ! real (4), allocatable, dimension (:,:,:) :: geo integer(2), allocatable, dimension (:,:) :: stormH ! integer :: i, iswath, iscan ! call getarg(1, hdffile) if(iargc() /= 1) call exit(1) ! sd_id = sfstart(hdffile, 1) ! geo_index = sfn2index(sd_id, "geolocation") sds_id = sfselect(sd_id, geo_index) istat = sfginfo(sds_id, geo_name, rank, geo_dim_sizes, num_type, attributes) do i = 1,rank start3(i) = 0 stride3(i) = 1 enddo allocate(geo(geo_dim_sizes(1), geo_dim_sizes(2), geo_dim_sizes(3))) istat = sfrdata(sds_id, start3, stride3, geo_dim_sizes, geo) ! istat = sfendacc(sds_id) ! ! "Storm Height" is a parameter in 2A23 product ! geo_index = sfn2index(sd_id, "stormH") sds_id = sfselect(sd_id, geo_index) istat = sfginfo(sds_id, geo_name, rank, param_dim_sizes, num_type, attributes) do i = 1,rank start2(i) = 0 stride2(i) = 1 enddo allocate(stormH(param_dim_sizes(1), param_dim_sizes(2))) istat = sfrdata(sds_id, start2, stride2, param_dim_sizes, stormH) ! istat = sfendacc(sds_id) ! istat = sfend(sd_id) ! ! do iscan = 1, geo_dim_sizes(3) do iswath = 1, geo_dim_sizes(2) write(*,"(2i6,3x,2f10.4,i8)") iscan, iswath, & geo(2,iswath,iscan), geo(1,iswath,iscan), stormH(iswath,iscan) enddo enddo ! deallocate(geo) deallocate(stormH) ! end program trmmpr_sdsdata