[Dart-dev] DART/branches Revision: 12104
dart at ucar.edu
dart at ucar.edu
Mon Nov 13 21:13:34 MST 2017
thoar at ucar.edu
2017-11-13 21:13:31 -0700 (Mon, 13 Nov 2017)
195
Finished the ease-grid hdf5 to DART observation converter only to find that the specific hdf5 files are not netCDF-compatible. Must switch to using native hdf5 routines to query the file. Ugh.
Modified: DART/branches/rma_trunk/observations/obs_converters/EASE-Grid/README
===================================================================
--- DART/branches/rma_trunk/observations/obs_converters/EASE-Grid/README 2017-11-13 20:00:52 UTC (rev 12103)
+++ DART/branches/rma_trunk/observations/obs_converters/EASE-Grid/README 2017-11-14 04:13:31 UTC (rev 12104)
@@ -4,6 +4,16 @@
#
# DART $Id$
+ ease_grid_to_dart .. Converting file 1 of 14
+ ease_grid_to_dart ... /glade2/scratch2/shimj/SMAP_DATA_L2SM/SAN/SMAP/SPL2SMP.002/2015.07.23/SMAP_L2_SM_P_02522_D_20150723T002821_R12170_001.h5
+ ERROR FROM:
+ routine: ease_grid_to_dart
+ message: inq_varid longitude: NetCDF: Variable not found
+ message: ... /glade2/scratch2/shimj/SMAP_DATA_L2SM/SAN/SMAP/SPL2SMP.002/2015.07.23/SMAP_L2_SM_P_02522_D_20150723T002821_R12170_001.h5
+
+ source file: $URL$
+ file revision: $Revision$
+ revision date: $Date$
# <next few lines under version control, do not edit>
Added: DART/branches/rma_trunk/observations/obs_converters/EASE-Grid/ease_grid_to_obs.f90
===================================================================
--- DART/branches/rma_trunk/observations/obs_converters/EASE-Grid/ease_grid_to_obs.f90 (rev 0)
+++ DART/branches/rma_trunk/observations/obs_converters/EASE-Grid/ease_grid_to_obs.f90 2017-11-14 04:13:31 UTC (rev 12104)
@@ -0,0 +1,367 @@
+! DART software - Copyright 2004 - 2013 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
+!
+! $Id$
+
+program ease_grid_to_obs
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!
+! program to convert a series of HDF5 files
+!
+! created 13 Nov 2017 Tim Hoar NCAR/IMAGe
+!
+! https://nsidc.org/data/ease/tools
+!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+! /glade/u/home/shimj/DART/observations/obs_converters/EASE-Grid/SMAP_retrival.log
+
+use types_mod, only : r4, r8, digits12
+
+use utilities_mod, only : initialize_utilities, finalize_utilities, &
+ open_file, close_file, find_namelist_in_file, &
+ check_namelist_read, nmlfileunit, get_unit, &
+ do_nml_file, do_nml_term, get_next_filename, &
+ error_handler, E_ERR, E_MSG, file_exist, &
+ find_textfile_dims
+
+use time_manager_mod, only : time_type, set_calendar_type, set_date, get_date, &
+ operator(>=), increment_time, set_time, get_time, &
+ operator(-), operator(+), GREGORIAN, &
+ print_time, print_date
+
+use obs_sequence_mod, only : obs_sequence_type, obs_type, read_obs_seq, &
+ static_init_obs_sequence, init_obs, write_obs_seq, &
+ init_obs_sequence, get_num_obs, &
+ set_copy_meta_data, set_qc_meta_data
+
+use location_mod, only : VERTISHEIGHT, set_location
+
+use obs_utilities_mod, only : add_obs_to_seq, create_3d_obs
+
+use netcdf_utilities_mod, only : nc_get_variable, nc_check
+
+use obs_kind_mod, only : 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$"
+
+!----------------------------------------------------------------
+! Namelist input with default values
+
+character(len=256) :: input_file_list = 'file_list.txt'
+character(len=256) :: obs_out_file = 'obs_seq.out'
+logical :: verbose = .false.
+
+namelist /ease_grid_to_obs_nml/ &
+ input_file_list, obs_out_file, verbose
+
+!----------------------------------------------------------------
+
+! MAX_NUM_INPUT_FILES : max number of input files to be processed
+integer, parameter :: MAX_NUM_INPUT_FILES = 500
+integer :: num_input_files = 0 ! actual number of files
+integer :: ifile, istatus
+character(len=256), dimension(MAX_NUM_INPUT_FILES) :: filename_seq_list
More information about the Dart-dev
mailing list