[Dart-dev] DART/branches Revision: 13182
dart at ucar.edu
dart at ucar.edu
Wed Jun 19 13:49:36 MDT 2019
thoar at ucar.edu
2019-06-19 13:49:35 -0600 (Wed, 19 Jun 2019)
77
Converter for the daily TRMM LPRM gridded soil moisture product
from NUIST.
Added: DART/branches/cesm_clm/observations/obs_converters/NASA_Earthdata/LPRM_L3_to_obs.f90
===================================================================
--- DART/branches/cesm_clm/observations/obs_converters/NASA_Earthdata/LPRM_L3_to_obs.f90 (rev 0)
+++ DART/branches/cesm_clm/observations/obs_converters/NASA_Earthdata/LPRM_L3_to_obs.f90 2019-06-19 19:49:35 UTC (rev 13182)
@@ -0,0 +1,328 @@
+! DART software - Copyright UCAR. This open source software is provided
+! by UCAR, "as is", without charge, subject to all terms of use at
+! http://www.image.ucar.edu/DAReS/DART/DART_download
+!
+! DART $Id$
+
+program LPRM_L3_to_obs
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!
+! LPRM_L3_to_obs - these data files were provided by Daniel Hagan, NUIST
+!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+use types_mod, only : r8, MISSING_R8
+
+use time_manager_mod, only : time_type, set_calendar_type, GREGORIAN, set_time, &
+ increment_time, get_time, set_date, operator(-), &
+ print_date, operator(+)
+
+use utilities_mod, only : initialize_utilities, find_namelist_in_file, &
+ check_namelist_read, nmlfileunit, do_output, &
+ get_next_filename, error_handler, E_ERR, E_MSG, &
+ find_textfile_dims, finalize_utilities, &
+ do_nml_file, do_nml_term
+
+use netcdf_utilities_mod, only : nc_open_file_readonly, nc_close_file, &
+ nc_check, nc_get_dimension_size
+
+use obs_utilities_mod, only : getvar_real, get_2Dshort_as_r8, create_3d_obs
+
+use location_mod, only : VERTISHEIGHT, set_location
+
+use obs_sequence_mod, only : obs_sequence_type, obs_type, read_obs_seq, &
+ static_init_obs_sequence, init_obs, destroy_obs, &
+ write_obs_seq, init_obs_sequence, get_num_obs, &
+ insert_obs_in_seq, destroy_obs_sequence, &
+ set_copy_meta_data, set_qc_meta_data, set_qc, &
+ set_obs_values, set_obs_def, insert_obs_in_seq
+
+use obs_kind_mod, only : LPRM_SOIL_MOISTURE
+
+use netcdf
+
+implicit none
+
+! version controlled file description for error handling, do not edit
+character(len=*), parameter :: source = &
+ '$URL$'
+character(len=*), parameter :: revision = '$Revision$'
+character(len=*), parameter :: revdate = '$Date$'
+
+integer, parameter :: num_copies = 1, & ! number of copies in sequence
+ num_qc = 1 ! number of QC entries
+
+character(len=256) :: next_infile
+character(len=512) :: string1, string2
+
+integer :: ncid, num_files, io, iunit, filenum
+integer :: day, seconds
+integer :: num_new_obs, obs_num, num_obs_in_1_file
+integer :: i, j, k, num_Latitudes, num_Longitudes
+
+logical :: first_obs, from_list = .false.
+
+real(r8) :: oerr, qc, lat, lon, vertvalue
+real(r8) :: smx_fill, smxe_fill
+
+type(obs_sequence_type) :: obs_seq
+type(obs_type) :: obs, prev_obs
+type(time_type) :: obs_time
+
+real(r8), allocatable :: Latitude(:), Longitude(:)
+real(r8), allocatable :: soil_moisture_x(:,:)
+real(r8), allocatable :: sm_x_error(:,:)
+
+!------------------------------------------------------------------------
+! Declare namelist parameters
+!------------------------------------------------------------------------
+
+character(len=256) :: input_file = ''
+character(len=256) :: input_file_list = ''
+character(len=256) :: output_file = 'obs_seq.lprm'
+logical :: debug = .false.
+real(r8) :: lon_bounds(2) = (/ 0.0_r8, 360.0_r8 /)
+real(r8) :: lat_bounds(2) = (/ -90.0_r8, 90.0_r8 /)
+
+! representation error, which depends on model/data grid size,
+real(r8) :: amsre_rep_error = 0.3 ! representativeness error, in percent
+
+namelist /LPRM_L3_to_obs_nml/ input_file, &
+ input_file_list, output_file, &
+ debug, amsre_rep_error, &
+ lon_bounds, lat_bounds
+
+! start of executable code
More information about the Dart-dev
mailing list