program cloudsat_sdsdata implicit none ! character*(64) :: 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) :: start(2), stride(2), geo_dim_sizes(2) ! integer(2), allocatable :: alt(:,:) ! integer :: iz, it, i ! call getarg(1,hdffile) if(iargc() /= 1) call exit(1) ! ! sd_id = sfstart(hdffile,1) ! geo_index = sfn2index(sd_id,"Height") sds_id = sfselect(sd_id,geo_index) istat = sfginfo(sds_id,geo_name,rank,geo_dim_sizes,num_type,attributes) do i = 1,rank start(i) = 0 stride(i) = 1 enddo allocate(alt(geo_dim_sizes(1),geo_dim_sizes(2))) istat = sfrdata(sds_id,start,stride,geo_dim_sizes,alt) ! istat = sfendacc(sds_id) ! istat = sfend(sd_id) ! ! 2B-GEOPROF e.g. "Radar Reflectivity" ! ! geo_index = sfn2index(sd_id,"Radar_Reflectivity") ! ! 2B-TAU e.g. "Layer Optical Depth(Thickness)" ! ! geo_index = sfn2index(sd_id,"layer_optical_depth") ! ! do it = 1, geo_dim_sizes(2) do iz = 1, geo_dim_sizes(1) write(*,*) it, iz, alt(iz,it) enddo enddo ! deallocate(alt) ! end program cloudsat_sdsdata