[Dart-dev] DART/branches Revision: 12333
dart at ucar.edu
dart at ucar.edu
Tue Jan 16 12:55:12 MST 2018
thoar at ucar.edu
2018-01-16 12:55:10 -0700 (Tue, 16 Jan 2018)
226
The observation converter and documentation are complete.
The observation error standard deviation specification is a complete wild quess
and needs to be fixed. The soil_moisture_standard_deviation variable is all _FillValue
Modified: DART/branches/cesm_clm/observations/obs_converters/NSIDC/SMAP_L2_to_obs.f90
===================================================================
--- DART/branches/cesm_clm/observations/obs_converters/NSIDC/SMAP_L2_to_obs.f90 2018-01-16 18:15:23 UTC (rev 12332)
+++ DART/branches/cesm_clm/observations/obs_converters/NSIDC/SMAP_L2_to_obs.f90 2018-01-16 19:55:10 UTC (rev 12333)
@@ -121,20 +121,18 @@
real(r8) :: qc, obs_val, err_std
real(r8) :: rlat, rlon, depth_cm, depth_m
+real(r4) :: obs_FillValue(1), obs_valid_min(1), obs_valid_max(1)
+real(r4) :: sme_FillValue(1), sme_valid_min(1), sme_valid_max(1)
+real(r4) :: rqf_FillValue(1)
type(obs_sequence_type) :: obs_seq
type(obs_type) :: obs, prev_obs
type(time_type) :: prev_time
+integer(HSIZE_T), allocatable :: dimlens(:)
integer(HID_T) :: file_id, dset_id, dspace_id
integer :: hdferr
-integer(HSIZE_T), allocatable :: dimlens(:)
-integer(HSIZE_T), allocatable :: maxdims(:)
-real, allocatable :: data_hdf5(:)
-
-character(len=*), parameter :: dset_name = '/Soil_Moisture_Retrieval_Data/longitude'
-
!-----------------------------------------------------------------------
! start of executable code
@@ -154,54 +152,6 @@
num_input_files = Check_Input_Files(input_file_list, filename_seq_list)
-
-!-----------------------------------------------------------------------
-!-----------------------------------------------------------------------
-! Test block ...
-
-filename = filename_seq_list(1)
-
-if ( verbose ) then ! HDF5 exploration block - works.
- call h5open_f(hdferr)
- call h5fopen_f(filename, H5F_ACC_RDONLY_F, file_id, hdferr)
- write(*,*)'classic file_id, hdferr is ',file_id, hdferr
-
- call h5dopen_f(file_id,dset_name,dset_id, hdferr)
- call h5dget_space_f(dset_id, dspace_id, hdferr)
-
- call h5sget_simple_extent_ndims_f(dspace_id, ndims, hdferr)
- allocate(dimlens(ndims), maxdims(ndims))
- call h5sget_simple_extent_dims_f(dspace_id, dimlens, maxdims, hdferr)
- allocate(data_hdf5(dimlens(1)))
- call h5ltread_dataset_float_f(file_id, dset_name, data_hdf5, dimlens, hdferr)
- write(*,*)data_hdf5(1:10)
- deallocate(data_hdf5, dimlens, maxdims)
-endif
-
-file_id = h5_open(filename, H5F_ACC_RDONLY_F)
-write(string1,*) trim(filename),' ',routine
-call h5_get_dset_dspace(file_id, dset_name, dset_id, dspace_id, string1)
-
-write(string1,*) trim(dset_name),' ',trim(filename),' ',routine
-ndims = h5_get_rank(dspace_id, string1)
-
-allocate(dimlens(ndims), maxdims(ndims))
-
-call h5_get_dimensions(dspace_id, dimlens, context=string1)
-
-allocate(data_hdf5(dimlens(1)))
-
-! h5ltread_dataset_float_f fails if hdferr is negative
-call h5ltread_dataset_float_f(file_id, dset_name, data_hdf5, dimlens, hdferr)
-call h5_check(hdferr,'main','h5ltread_dataset_float_f',dset_name,filename)
-
-deallocate(data_hdf5, dimlens, maxdims)
-
-
-!-----------------------------------------------------------------------
-!-----------------------------------------------------------------------
-
-
! each observation in this series will have a single observation value
! and a quality control flag. the max possible number of obs needs to
! be specified but it will only write out the actual number created.
@@ -267,33 +217,75 @@
allocate( obs_time(counts))
allocate( retrieval_flag(counts))
+ call read_observation_times(file_id,filename)
+
varname = '/Soil_Moisture_Retrieval_Data/longitude'
- call h5ltread_dataset_float_f(file_id, varname, longitude, dimlens, hdferr)
+ call h5ltread_dataset_float_f(file_id,varname,longitude,dimlens,hdferr)
call h5_check(hdferr,routine,'h5ltread_dataset_float_f',varname,filename)
varname = '/Soil_Moisture_Retrieval_Data/latitude'
- call h5ltread_dataset_float_f(file_id, varname, latitude, dimlens, hdferr)
+ call h5ltread_dataset_float_f(file_id,varname,latitude,dimlens,hdferr)
call h5_check(hdferr,routine,'h5ltread_dataset_float_f',varname,filename)
varname = '/Soil_Moisture_Retrieval_Data/soil_moisture'
More information about the Dart-dev
mailing list