Anderson found this when running obs_sequence_tool.
List the steps someone needs to take to reproduce:
take an old obs_seq.out and run it through obs_sequence_tool to get the same data, but with an updated header (TYPES consistent with compiled dart: obs_sequence.processed. The goal of this was to make a obs_seq file for easy comparison when testing read/write obs_sequence.
run your (Anderson's) read & write obs_sequence code.
What was the expected outcome?
input obs_sequence.processed === output obs_sequence.processed
What actually happened?
The gpsroref keys are different, and gpsref keys ininput obs_sequence.processed do not start from 1.
No error, I think using the key means you allocate more memory than you need to in obs_def_gps_mod (and obs_def_rttov_mod which also used module data accessed by key).
Also, tripped up Anderson when trying to compare two obs_sequences which is fair enough.
I believe (not checked with Anderson's code) that a simple read/write you get the gpsro starting at 1.
sanity checked by changing GPSREF value (they are all zero all the time) that the obs keeps the gpsref data
/glade/scratch/hkershaw/DART/Bugs/obs_sequence_tool
Describe the bug
Anderson found this when running obs_sequence_tool.
obs_seq.out
and run it through obs_sequence_tool to get the same data, but with an updated header (TYPES consistent with compiled dart:obs_sequence.processed
. The goal of this was to make a obs_seq file for easy comparison when testing read/write obs_sequence.What was the expected outcome? input
obs_sequence.processed
=== outputobs_sequence.processed
What actually happened?
The gpsroref keys are different, and gpsref keys ininput
obs_sequence.processed
do not start from 1.when you call initialize_module for obs_def_gps_mod the keycount is set to 0. https://github.com/NCAR/DART/blob/1b76f3afa5978469d6a119710bb638c1c077ae20/observations/forward_operators/obs_def_gps_mod.f90#L134-L135
what gets passed in to write_obs_def is the key from the obs_sequence. Which is not the same as the gpsroref key.
obs_sequence_tool -> write_obs -> write_obs_def https://github.com/NCAR/DART/blob/1b76f3afa5978469d6a119710bb638c1c077ae20/assimilation_code/modules/observations/obs_sequence_mod.f90#L2509
Error Message
No error, I think using the key means you allocate more memory than you need to in obs_def_gps_mod (and obs_def_rttov_mod which also used module data accessed by key). Also, tripped up Anderson when trying to compare two obs_sequences which is fair enough. I believe (not checked with Anderson's code) that a simple read/write you get the gpsro starting at 1.
sanity checked by changing GPSREF value (they are all zero all the time) that the obs keeps the gpsref data /glade/scratch/hkershaw/DART/Bugs/obs_sequence_tool
Which model(s) are you working with?
its a obs sequence file from a cam-fv experiment.
Version of DART
Which version of DART are you using? v10.8.0
Have you modified the DART code?
No
Build information
Please describe: