Skip to content

Commit

Permalink
Update tesac_ioda_variables.py
Browse files Browse the repository at this point in the history
  • Loading branch information
givelberg committed Aug 6, 2024
1 parent c8d6c5e commit 68366f7
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions ush/ioda/bufr2ioda/marine/b2i/tesac_ioda_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,17 @@ class TesacIODAVariables(IODAVariables):
def __init__(self):
super().__init__()


def BuildQuery(self):
q = super().BuildQuery()

q.add('stationID', '*/RPID')
q.add('latitude', '*/CLAT')
q.add('longitude', '*/CLON')
q.add('depth', '*/BTOCN/DBSS')

# ObsValue
q.add('temp', '*/BTOCN/STMP')
q.add('saln', '*/BTOCN/SALN')


return q


def filter(self):
mask = self.TemperatureFilter() \
& self.SalinityFilter()
Expand All @@ -41,10 +35,8 @@ def filter(self):

self.seqNum = Compute_sequenceNumber(self.lon)


# Separate TESAC profiles tesac tank
# Creating the mask for TESAC floats based on station ID

digit_mask = [item.isdigit() for item in self.stationID]
indices_true = [index for index, value in enumerate(digit_mask) if value]

Expand All @@ -61,16 +53,13 @@ def filter(self):

self.n_obs = len(indices_true)


def SetAdditionalData(self):
self.PreQC = (np.ma.masked_array(np.full((self.n_obs), 0))).astype(np.int32)
self.ObsError_temp = \
np.float32(np.ma.masked_array(np.full((self.n_obs), self.errorT)))
self.ObsError_saln = \
np.float32(np.ma.masked_array(np.full((self.n_obs), self.errorS)))



def createIODAVars(self, obsspace):
super().createIODAVars(obsspace)

Expand All @@ -86,4 +75,3 @@ def createIODAVars(self, obsspace):

self.WriteObsValueT(obsspace, 'waterTemperature')
self.WriteObsValueS(obsspace, 'salinity')

0 comments on commit 68366f7

Please sign in to comment.