[Dart-dev] DART/branches Revision: 11957
dart at ucar.edu
dart at ucar.edu
Wed Sep 27 15:27:48 MDT 2017
thoar at ucar.edu
2017-09-27 15:27:46 -0600 (Wed, 27 Sep 2017)
336
Adding the option to use the newer error functions (circa trunk:r9958 2016-03-11)
and infrastructure for supporting bending angle.
The NCEP/prep_bufr/install.sh script had an option to die on unset variables
that was not needed - and caused a fatal error on OSX (if someone does not
have a 'CC' environment variable set - like me).
Modified: DART/branches/rma_trunk/observations/obs_converters/NCEP/prep_bufr/install.sh
===================================================================
--- DART/branches/rma_trunk/observations/obs_converters/NCEP/prep_bufr/install.sh 2017-09-26 19:47:16 UTC (rev 11956)
+++ DART/branches/rma_trunk/observations/obs_converters/NCEP/prep_bufr/install.sh 2017-09-27 21:27:46 UTC (rev 11957)
@@ -24,7 +24,7 @@
#
# ------------------------------------------------------------------------
-set -eua
+set -ea
# ------------------------------------------------------------------------
# CCOMP, FCOMP - select the compiler combination to use
Modified: DART/branches/rma_trunk/observations/obs_converters/gps/convert_cosmic_gps_cdf.f90
===================================================================
--- DART/branches/rma_trunk/observations/obs_converters/gps/convert_cosmic_gps_cdf.f90 2017-09-26 19:47:16 UTC (rev 11956)
+++ DART/branches/rma_trunk/observations/obs_converters/gps/convert_cosmic_gps_cdf.f90 2017-09-27 21:27:46 UTC (rev 11957)
@@ -35,7 +35,7 @@
set_obs_def_error_variance, set_obs_def_location, &
set_obs_def_key
use obs_def_gps_mod, only : set_gpsro_ref
-use obs_kind_mod, only : GPSRO_REFRACTIVITY
+use obs_kind_mod, only : GPSRO_REFRACTIVITY ! GPSRO_BENDING_ANGLE
use obs_utilities_mod, only : add_obs_to_seq
use netcdf
@@ -60,12 +60,12 @@
io, iunit, nobs, filenum, dummy, numrejected
character (len=1) :: badqc
logical :: file_exist, first_obs, from_list = .false.
-real(r8) :: hght_miss, refr_miss, azim_miss, oerr, &
+real(r8) :: hght_miss, refr_miss, azim_miss, benda_miss, oerr, &
qc, lato, lono, hghto, refro, azimo, wght, nx, ny, &
nz, rfict, obsval, phs, obs_val(1), qc_val(1)
real(r8), allocatable :: lat(:), lon(:), hght(:), refr(:), azim(:), &
- hghtp(:), refrp(:)
+ hghtp(:), refrp(:), benda(:)
type(obs_def_type) :: obs_def
type(obs_sequence_type) :: obs_seq
@@ -79,16 +79,18 @@
integer, parameter :: NMAXLEVELS = 200 ! max number of observation levels
logical :: local_operator = .true. ! see html file for more on non/local
+logical :: use_original_kuo_error = .false. ! alternative is use lidia c's version
real(r8) :: obs_levels(NMAXLEVELS) = -1.0_r8
real(r8) :: ray_ds = 5000.0_r8 ! delta stepsize (m) along ray, nonlocal op
real(r8) :: ray_htop = 15000.0_r8 ! max height (m) for nonlocal op
character(len=256) :: gpsro_netcdf_file = 'cosmic_gps_input.nc'
-character(len=256) :: gpsro_netcdf_filelist = 'cosmic_gps_input_list'
+character(len=256) :: gpsro_netcdf_filelist = ''
character(len=256) :: gpsro_out_file = 'obs_seq.gpsro'
namelist /convert_cosmic_gps_nml/ obs_levels, local_operator, ray_ds, &
ray_htop, gpsro_netcdf_file, &
- gpsro_netcdf_filelist, gpsro_out_file
+ gpsro_netcdf_filelist, gpsro_out_file, &
+ use_original_kuo_error
! initialize some values
obs_num = 1
@@ -108,6 +110,11 @@
if (do_nml_term()) write( * , nml=convert_cosmic_gps_nml)
! namelist checks for sanity
+if (.not. use_original_kuo_error .and. .not. local_operator) then
+ call error_handler(E_ERR, 'convert_cosmic_gps_cdf', &
+ 'New error values only implemented for local operator', &
+ source, revision, revdate)
+endif
! count observation levels, make sure observation levels increase from 0
nlevels = 0
@@ -161,7 +168,7 @@
source, revision, revdate, text2=msgstring2)
call init_obs_sequence(obs_seq, num_copies, num_qc, num_new_obs)
- call set_copy_meta_data(obs_seq, 1, 'COSMIC GPS observation')
+ call set_copy_meta_data(obs_seq, 1, 'COSMIC GPS Observation')
call set_qc_meta_data(obs_seq, 1, 'COSMIC QC')
end if
@@ -224,7 +231,7 @@
allocate(hghtp(nobs)) ; allocate(refrp(nobs))
allocate( lat(nobs)) ; allocate( lon(nobs))
allocate(hght(nobs)) ; allocate(refr(nobs))
- allocate(azim(nobs))
+ allocate(azim(nobs)) ; allocate(benda(nobs))
! read the latitude array
call nc_check( nf90_inq_varid(ncid, "Lat", varid) ,'inq varid Lat', next_infile)
@@ -244,7 +251,12 @@
call nc_check( nf90_get_var(ncid, varid, refr) ,'get var Ref', next_infile)
call nc_check( nf90_get_att(ncid, varid, '_FillValue', refr_miss) ,'get_att _FillValue Ref', next_infile)
- ! read the dew-point temperature array
+ ! read the bending angle
+ call nc_check( nf90_inq_varid(ncid, "Bend_ang", varid) ,'inq varid Bend_ang', next_infile)
+ call nc_check( nf90_get_var(ncid, varid, benda) ,'get var Bend_ang', next_infile)
More information about the Dart-dev
mailing list