Closed RussTreadon-NOAA closed 8 months ago
Tagging @ShastriPaturi for awareness. What do you recommend?
As a test the following check was added to bufr2ioda_tesac_mammals_profiles.py
# =======================================
# Separate marine mammals from TESAC tank
# =======================================
logger.debug(f"Creating the mask for marine mammals from TESAC floats based on station ID ...")
alpha_mask = [item.isalpha() for item in stationID]
indices_true = [index for index, value in enumerate(alpha_mask) if value]
if len(indices_true) is 0:
logger.info(f"No marine mammals in {DATA_PATH}")
return
# Apply index
With this check present bufr2ioda_tesac_mammals_profiles.py
prints the above info message and exits.
(gdasapp) Hera(hfe07):/scratch1/NCEPDEV/stmp2/Russ.Treadon/RUNDIRS/prci/prepatmobs.165454$ /scratch1/NCEPDEV/da/Russ.Treadon/git/global-workflow/work/sorc/gdas.cd/ush/ioda/bufr2ioda/bufr2ioda_tesac_mammals_profiles.py -c tesac_mammals_profiles_2021032400.json
2024-02-29 14:01:48,015 - INFO - bufr2ioda_tesac_mammals_profiles.py: No marine mammals in /scratch1/NCEPDEV/global/glopara/dump/gdas.20210324/00/atmos/gdas.t00z.tesac.tm00.bufr_d
Not sure if this is an acceptable solution. What do you think @ShastriPaturi ?
Partially addressed by PR #937
g-w CI testing found that
bufr2ioda_tesac_mammals_profiles.py
aborts while processing/scratch1/NCEPDEV/global/glopara/dump/gdas.20210324/00/atmos/gdas.t00z.tesac.tm00.bufr_d
.Below is the traceback message:
Line 179 is the
temp
line belowprint
statements were added and confirm thattemp
is length 0. Initiallytemp
is size 1433. This changes after applyingindices_true
Prints show that
alpha_mask
containsFalse
for all elements. As a result,indices_true
is[]
andtemp
winds up being[]
.I interpret the above as a case in which there are no marine mammal observations in the given dump file. Is this true? What is the proper way to handle this situation in
bufr2ioda_tesac_mammals_profiles.py