[Dart-dev] DART/branches Revision: 12421
dart at ucar.edu
dart at ucar.edu
Fri Mar 2 08:10:03 MST 2018
nancy at ucar.edu
2018-03-02 08:10:03 -0700 (Fri, 02 Mar 2018)
29
keep in sync with rma_trunk
Modified: DART/branches/recam/assimilation_code/programs/obs_loop/obs_loop.f90
===================================================================
--- DART/branches/recam/assimilation_code/programs/obs_loop/obs_loop.f90 2018-03-01 23:36:44 UTC (rev 12420)
+++ DART/branches/recam/assimilation_code/programs/obs_loop/obs_loop.f90 2018-03-02 15:10:03 UTC (rev 12421)
@@ -111,7 +111,7 @@
! and last timestamps in the obs_seq files.
call set_calendar_type(calendar)
-! set a logial to see if we have a calendar or not
+! set a logical to see if we have a calendar or not
cal = (get_calendar_type() /= NO_CALENDAR)
! if you add anything to the namelist, you can process it here.
@@ -203,29 +203,38 @@
! and you have to set it back if you change it
!call set_obs_def(obs_out, this_obs_def)
+ ! if you do NOT want to insert this observation in the output
+ ! file, set a condition that skips the next block. you *must*
+ ! still call get_next_obs() before looping.
+
! ----------- MODIFY HERE ----------------
+ if (.true.) then
- ! Since the stride through the observation sequence file is always
- ! guaranteed to be in temporally-ascending order, we can use the
- ! 'previous' observation as the starting point to search for the
- ! correct insertion point. This speeds up the insert code a lot.
+ ! Since the stride through the observation sequence file is always
+ ! guaranteed to be in temporally-ascending order, we can use the
+ ! 'previous' observation as the starting point to search for the
+ ! correct insertion point. This speeds up the insert code a lot.
+
+ if (num_inserted > 0) then
+ call insert_obs_in_seq(seq_out, obs_out, prev_obs_out)
+ else
+ call insert_obs_in_seq(seq_out, obs_out)
+ endif
+
+ prev_obs_out = obs_out ! update position in seq for next insert
+ num_inserted = num_inserted + 1
+
+ if (print_every > 0) then
+ if (mod(num_inserted,print_every) == 0) then
+ print*, 'inserted number ',num_inserted,' of ',size_seq_out
+ endif
+ endif
- if (num_inserted > 0) then
- call insert_obs_in_seq(seq_out, obs_out, prev_obs_out)
- else
- call insert_obs_in_seq(seq_out, obs_out)
endif
- prev_obs_out = obs_out ! update position in seq for next insert
- num_inserted = num_inserted + 1
+ ! ---- THIS MUST BE EXECUTED BEFORE THE NEXT LOOP ----
- if (print_every > 0) then
- if (mod(num_inserted,print_every) == 0) then
- print*, 'inserted number ',num_inserted,' of ',size_seq_out
- endif
- endif
-
call get_next_obs(seq_in, obs_in, next_obs_in, is_this_last)
enddo ObsLoop
More information about the Dart-dev
mailing list