[Dart-dev] DART/branches Revision: 11152

dart at ucar.edu dart at ucar.edu
Fri Feb 24 09:56:17 MST 2017


thoar at ucar.edu
2017-02-24 09:56:14 -0700 (Fri, 24 Feb 2017)
106
Adding Fred Castruccio's observation sequence converter for 
along-track sea level anomaly observations.




Added: DART/branches/rma_trunk/observations/AVISO/convert_aviso.f90
===================================================================
--- DART/branches/rma_trunk/observations/AVISO/convert_aviso.f90	                        (rev 0)
+++ DART/branches/rma_trunk/observations/AVISO/convert_aviso.f90	2017-02-24 16:56:14 UTC (rev 11152)
@@ -0,0 +1,234 @@
+! 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
+!
+! $Id$
+
+program convert_aviso
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!
+!   convert_aviso - program that reads a MADIS netCDF profiler
+!                          wind observation file and writes a DART
+!                          obs_seq file using the DART library routines.
+!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+use         types_mod, only : r8
+
+use     utilities_mod, only : nc_check, initialize_utilities, finalize_utilities, &
+                              error_handler, E_ERR, E_MSG
+
+use  time_manager_mod, only : time_type, set_calendar_type, set_date, set_time, &
+                              increment_time, get_time, operator(+), GREGORIAN
+
+use      location_mod, only : VERTISSURFACE
+
+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      obs_kind_mod, only : J1_SEA_SURFACE_ANOMALY, EN_SEA_SURFACE_ANOMALY, &
+                              GFO_SEA_SURFACE_ANOMALY
+
+use          sort_mod, only : index_sort
+
+use obs_utilities_mod, only : getvar_real, add_obs_to_seq, &
+                              create_3d_obs, getvar_int, getdimlen, &
+                              getvar_int_2d, query_varname, &
+                              get_short_as_r8, get_int_as_r8
+
+use           netcdf
+
+implicit none
+
+! version controlled file description for error handling, do not edit
+character(len=256), parameter :: source   = &
+   "$URL$"
+character(len=32 ), parameter :: revision = "$Revision$"
+character(len=128), parameter :: revdate  = "$Date$"
+
+logical, parameter :: use_input_qc = .false. 
+
+integer, parameter :: num_copies = 1,   &   ! number of copies in sequence
+                      num_qc     = 1        ! number of QC entries
+
+integer  :: ncid, varid, ios
+integer  :: ntime, n, i, oday, osec, nused, idx
+integer  :: iyear, imonth, iday, ihour, imin, isec
+logical  :: first_obs
+
+real(r8) :: oerr, qc, missing
+
+real(r8), allocatable :: lat(:), lon(:), sla(:), RE(:), time(:)
+
+type(obs_sequence_type) :: obs_seq
+type(obs_type)          :: obs, prev_obs
+type(time_type)         :: comp_day0, time_obs, prev_time
+
+character(len=100) :: platform, attvalue
+
+character(len=256) :: RE_file
+character(len=256) :: profiler_out_file = 'obs_seq.aviso'
+character(len=256) :: input_file = '/glade/p/work/fredc/OBS/SLA_alongtrack/dt_global_j1_sla_vfec_20080101_20140106.nc'
+
+character(len=512) :: string1, string2, string3
+
+!-----------------------------------------------------------------------
+! start of executable code
+!-----------------------------------------------------------------------
+
+call initialize_utilities('convert_aviso')
+
+! command line argument
+call getarg(1, input_file)
+
+if (input_file == '') then
+   write(string1,*)'..  Require a command-line argument specifying the input file.'
+   write(string2,*)'Must be a fully-qualified file name.'
+   write(string3,*)'USAGE: convert_aviso  <input_file_name>'
+   call error_handler(E_ERR, 'convert_aviso', string1, &
+          source, revision, revdate, text2=string2, text3=string3)
+endif
+
+write(string1,*)'Converting input file "'//trim(input_file)//'"'
+call error_handler(E_MSG, 'convert_aviso', string1)


More information about the Dart-dev mailing list