[Dart-dev] [5917] DART/branches/development/obs_sequence/obs_seq_verify.f90: This tool can also be used for forecasts from a single ensemble member.
nancy at ucar.edu
nancy at ucar.edu
Mon Nov 5 09:51:49 MST 2012
Revision: 5917
Author: thoar
Date: 2012-11-05 09:51:48 -0700 (Mon, 05 Nov 2012)
Log Message:
-----------
This tool can also be used for forecasts from a single ensemble member.
In this case, it is customary for the user to just preserve the
prior ensemble mean - so there are no 'prior ensemble member' copies.
Basically extends the program so it can be used with an ensemble size
of 1.
Modified Paths:
--------------
DART/branches/development/obs_sequence/obs_seq_verify.f90
-------------- next part --------------
Modified: DART/branches/development/obs_sequence/obs_seq_verify.f90
===================================================================
--- DART/branches/development/obs_sequence/obs_seq_verify.f90 2012-11-01 21:01:37 UTC (rev 5916)
+++ DART/branches/development/obs_sequence/obs_seq_verify.f90 2012-11-05 16:51:48 UTC (rev 5917)
@@ -1537,7 +1537,20 @@
if (find_ensemble_size < 1) then
write(string1,*)'no ensemble member info in ', trim(obs_seq_in_file_name)
- write(string2,*)'Unable to continue.'
+ write(string2,*)'looking for a prior ensemble mean'
+ call error_handler(E_MSG,'find_ensemble_size', string1, &
+ source, revision, revdate, text2=string2)
+
+ ! could be a 'deterministic' forecast from the ensemble mean
+ do i=1, get_num_copies(seq)
+ if( index(get_copy_meta_data(seq,i), 'prior ensemble mean') > 0) &
+ find_ensemble_size = find_ensemble_size + 1
+ enddo
+endif
+
+if (find_ensemble_size < 1) then
+ write(string1,*)'no ensemble member info in ', trim(obs_seq_in_file_name)
+ write(string2,*)'cannot continue'
call error_handler(E_ERR,'find_ensemble_size', string1, &
source, revision, revdate, text2=string2)
endif
@@ -1678,12 +1691,22 @@
if( index(metadata, 'prior ensemble member') > 0) then
myindex = myindex + 1
+ if ( myindex > size(indices) ) then
+ write(string1,*)'Found too many prior copies in metadata.'
+ call error_handler(E_ERR,'find_our_copies',string1,source,revision,revdate)
+ endif
+ indices(myindex) = i
+ endif
+ ! Check for deterministic forecast, apparently
+ if ( (ensemble_size == 1) .and. (index(metadata, 'prior ensemble mean') > 0) ) then
+ myindex = myindex + 1
if ( myindex > size(indices) ) then
write(string1,*)'Found too many prior copies in metadata.'
call error_handler(E_ERR,'find_our_copies',string1,source,revision,revdate)
endif
indices(myindex) = i
+ exit MetaDataLoop
endif
enddo MetaDataLoop
More information about the Dart-dev
mailing list