[Dart-dev] [5748] DART/branches/development/obs_def/obs_def_gps_mod.f90: Added a comment about what to do if max_gpsro_obs is too small.

nancy at ucar.edu nancy at ucar.edu
Wed Jun 6 15:08:54 MDT 2012


Revision: 5748
Author:   thoar
Date:     2012-06-06 15:08:53 -0600 (Wed, 06 Jun 2012)
Log Message:
-----------
Added a comment about what to do if max_gpsro_obs is too small.
changed a variable name from 'msgstring' to string1, added a string2.

Modified Paths:
--------------
    DART/branches/development/obs_def/obs_def_gps_mod.f90

-------------- next part --------------
Modified: DART/branches/development/obs_def/obs_def_gps_mod.f90
===================================================================
--- DART/branches/development/obs_def/obs_def_gps_mod.f90	2012-06-06 16:50:51 UTC (rev 5747)
+++ DART/branches/development/obs_def/obs_def_gps_mod.f90	2012-06-06 21:08:53 UTC (rev 5748)
@@ -114,7 +114,7 @@
 
 namelist /obs_def_gps_nml/ max_gpsro_obs
 
-character(len=129) :: msgstring
+character(len=129) :: string1, string2
 integer  :: ii
 integer  :: keycount 
 
@@ -148,9 +148,9 @@
 ! find max number of gps obs which can be stored, and initialize type
 allocate(gps_data(max_gpsro_obs), stat = rc)
 if (rc /= 0) then
-   write(msgstring, *) 'initial allocation failed for gps observation data,', &
+   write(string1, *) 'initial allocation failed for gps observation data,', &
                        'itemcount = ', max_gpsro_obs
-   call error_handler(E_ERR,'initialize_module', msgstring, &
+   call error_handler(E_ERR,'initialize_module', string1, &
                       source, revision, revdate)
 endif
 
@@ -173,9 +173,10 @@
 gpskey = keycount
 
 if(gpskey > max_gpsro_obs) then
-   write(msgstring, *) 'key (',gpskey,') exceeds max_gpsro_obs (',max_gpsro_obs,')'
-   call error_handler(E_ERR,'read_gpsro_ref', msgstring, &
-                      source, revision, revdate)
+   write(string1, *) 'key (',gpskey,') exceeds max_gpsro_obs (',max_gpsro_obs,')'
+   string2 = 'Increase max_gpsro_obs in obs_def_gps_mod.f90 and rerun preprocess, recompile executables.'
+   call error_handler(E_ERR,'read_gpsro_ref', string1, &
+                      source, revision, revdate, text2=string2)
 endif
 
 gps_data(gpskey)%ray_direction(1) = nx
@@ -202,8 +203,8 @@
 if ( .not. module_initialized ) call initialize_module
 
 if (gpskey < 1 .or. gpskey > keycount) then
-   write(msgstring, *) 'key (',gpskey,') out of valid range (1<=key<=',keycount,')'
-   call error_handler(E_ERR,'get_gpsro_ref', msgstring, &
+   write(string1, *) 'key (',gpskey,') out of valid range (1<=key<=',keycount,')'
+   call error_handler(E_ERR,'get_gpsro_ref', string1, &
                       source, revision, revdate)
 endif
 
@@ -417,8 +418,8 @@
 if ( .not. module_initialized ) call initialize_module
 
 if ( .not. vert_is_height(location)) then
-   write(msgstring, *) 'vertical location must be height; gps obs key ', gpskey
-   call error_handler(E_ERR,'get_expected_gpsro_ref', msgstring, &
+   write(string1, *) 'vertical location must be height; gps obs key ', gpskey
+   call error_handler(E_ERR,'get_expected_gpsro_ref', string1, &
                       source, revision, revdate)
 endif
 


More information about the Dart-dev mailing list