[Dart-dev] DART/branches Revision: 11620

dart at ucar.edu dart at ucar.edu
Wed May 10 16:03:59 MDT 2017


nancy at ucar.edu
2017-05-10 16:03:57 -0600 (Wed, 10 May 2017)
90
added an error message line about where the default file
is located in our distribution.




Modified: DART/branches/rma_trunk/assimilation_code/modules/assimilation/sampling_error_correction_mod.f90
===================================================================
--- DART/branches/rma_trunk/assimilation_code/modules/assimilation/sampling_error_correction_mod.f90	2017-05-10 21:47:36 UTC (rev 11619)
+++ DART/branches/rma_trunk/assimilation_code/modules/assimilation/sampling_error_correction_mod.f90	2017-05-10 22:03:57 UTC (rev 11620)
@@ -34,7 +34,10 @@
 character(len=128), parameter :: revdate  = "$Date$"
 
 ! Using hardcoded filename for ease of scripting.
+! and for now, say where the default location in the dart distribution tree is
+! since it's so obscure.
 character(len=128) :: input_filename = 'sampling_error_correction_table.nc'
+character(len=128) :: default_path = ' "assimilation_code/programs/gen_sampling_err_table/work"'
 
 ! module globals - nentries is the number of values per ensemble size,
 ! nens is how many different ensemble sizes this file contains.
@@ -129,7 +132,12 @@
 integer :: rc, ncid
 
 rc = nf90_open(input_filename, NF90_NOWRITE, ncid)
-call nc_check(rc, 'open_input_file', 'opening "'//trim(input_filename)//'"')
+if (rc /= nf90_noerr) then
+   msgstring  = 'File "'//trim(input_filename)//'" not found in the current directory.'
+   msgstring1 = 'This file can be copied from this location in the DART distribution: '
+   call error_handler(E_ERR, 'read_sampling_error_correction:', msgstring, &
+                      source, revision, revdate, text2=msgstring1, text3=default_path)
+endif
 
 open_input_file = ncid
 


More information about the Dart-dev mailing list