[Dart-dev] DART/branches Revision: 11169
dart at ucar.edu
dart at ucar.edu
Tue Feb 28 12:51:54 MST 2017
thoar at ucar.edu
2017-02-28 12:51:50 -0700 (Tue, 28 Feb 2017)
127
Made the error messages reflect the actual routine that threw the error,
and made the error message reflect the actual error.
Modified: DART/branches/mizzi/models/wrf_chem/model_mod.f90
===================================================================
--- DART/branches/mizzi/models/wrf_chem/model_mod.f90 2017-02-28 17:51:39 UTC (rev 11168)
+++ DART/branches/mizzi/models/wrf_chem/model_mod.f90 2017-02-28 19:51:50 UTC (rev 11169)
@@ -373,7 +373,7 @@
! have a single, module global error string (rather than
! replicate it in each subroutine and use up more stack space)
-character(len=129) :: errstring, msgstring2, msgstring3
+character(len=512) :: msgstring1, msgstring2, msgstring3
!
! APM/AFAJ ++
integer :: kaod, zk_aod
@@ -484,8 +484,8 @@
else
write(msgstring2,*)'vert_localization_coord must be one of ', &
VERTISLEVEL, VERTISPRESSURE, VERTISHEIGHT, VERTISSCALEHEIGHT
- write(errstring,*)'vert_localization_coord is ', vert_localization_coord
- call error_handler(E_ERR,'static_init_model', errstring, source, revision,revdate, &
+ write(msgstring1,*)'vert_localization_coord is ', vert_localization_coord
+ call error_handler(E_ERR,'static_init_model', msgstring1, source, revision,revdate, &
text2=msgstring2)
endif
@@ -697,8 +697,8 @@
wrf%dom(id)%clamp_or_fail(ind)
endif
- write(errstring, '(A,I4,2A)') 'state vector array ', ind, ' is ', trim(wrf_state_variables(1,my_index))
- call error_handler(E_MSG, 'static_init_model: ', errstring)
+ write(msgstring1, '(A,I4,2A)') 'state vector array ', ind, ' is ', trim(wrf_state_variables(1,my_index))
+ call error_handler(E_MSG, 'static_init_model: ', msgstring1)
enddo
! close data file, we have all we need
@@ -752,8 +752,8 @@
wrf%dom(id)%clamp_or_fail(ind)
endif
- write(errstring, '(A,I4,2A)') 'state vector array ', ind, ' is ', trim(wrf_state_variables(1,my_index))
- call error_handler(E_MSG, 'static_init_model: ', errstring)
+ write(msgstring1, '(A,I4,2A)') 'state vector array ', ind, ' is ', trim(wrf_state_variables(1,my_index))
+ call error_handler(E_MSG, 'static_init_model: ', msgstring1)
enddo
call nc_check(nf90_close(ncid_emiss_chemi),'static_init_model','close wrfchemi_d0'//idom)
!
@@ -802,8 +802,8 @@
wrf%dom(id)%clamp_or_fail(ind)
endif
- write(errstring, '(A,I4,2A)') 'state vector array ', ind, ' is ', trim(wrf_state_variables(1,my_index))
- call error_handler(E_MSG, 'static_init_model: ', errstring)
+ write(msgstring1, '(A,I4,2A)') 'state vector array ', ind, ' is ', trim(wrf_state_variables(1,my_index))
+ call error_handler(E_MSG, 'static_init_model: ', msgstring1)
enddo
call nc_check(nf90_close(ncid_emiss_firechemi),'static_init_model','close wrffirechemi_d0'//idom)
! endif
@@ -940,8 +940,8 @@
wrf%model_size = dart_index - 1
allocate (ens_mean(wrf%model_size))
-write(errstring,*) ' wrf model size is ',wrf%model_size
-call error_handler(E_MSG, 'static_init_model', errstring)
+write(msgstring1,*) ' wrf model size is ',wrf%model_size
+call error_handler(E_MSG, 'static_init_model', msgstring1)
end subroutine static_init_model
@@ -1046,8 +1046,8 @@
logical, parameter :: debug = .false.
if(debug) then
- write(errstring,*)' index_in = ',index_in
- call error_handler(E_MSG,'get_state_meta_data',errstring,' ',' ',' ')
+ write(msgstring1,*)' index_in = ',index_in
+ call error_handler(E_MSG,'get_state_meta_data',msgstring1)
endif
! identity obs come in with a negative value - absolute
@@ -1061,8 +1061,8 @@
if(debug) then
do id=1,num_domains
do i=1, wrf%dom(id)%number_of_wrf_variables
- write(errstring,*)' domain, var, var_type(i) = ',id,i,wrf%dom(id)%var_type(i)
- call error_handler(E_MSG,'get_state_meta_data',errstring)
+ write(msgstring1,*)' domain, var, var_type(i) = ',id,i,wrf%dom(id)%var_type(i)
+ call error_handler(E_MSG,'get_state_meta_data',msgstring1)
enddo
enddo
endif
@@ -1087,8 +1087,8 @@
id = id + 1
else
write(string1,*)' size of state vector = ',wrf%model_size
- write(errstring,*)' dart_index ',index_in, ' is out of range'
- call error_handler(E_ERR,'get_state_meta_data', errstring, &
+ write(msgstring1,*)' dart_index ',index_in, ' is out of range'
+ call error_handler(E_ERR,'get_state_meta_data', msgstring1, &
source, revision, revdate, text2=string1)
endif
endif
More information about the Dart-dev
mailing list