Skip to content

Commit

Permalink
Renamed some methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
dwfncar committed Jul 14, 2024
1 parent 3a4ea5b commit 03cf3f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
11 changes: 2 additions & 9 deletions examples/process_swath_data/process_modis_l2.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@
for time_interval in an.time_intervals:

print(time_interval)
an.open_obs(time_interval=time_interval)

print(time_interval)
an.update_obs_grid()
an.open_obs(time_interval=time_interval)
an.update_obs_gridded_data()

"""
for obs in an.obs:
for obs_time in an.obs[obs].obj:
print('obs_time:', obs_time)
print(an.obs[obs].obj[obs_time])
"""
6 changes: 3 additions & 3 deletions melodies_monet/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ def setup_obs_grid(self):
self.obs_gridded_data[obs + '_' + var] = np.zeros([ntime, nlon, nlat], dtype=np.float32)
self.obs_gridded_count[obs + '_' + var] = np.zeros([ntime, nlon, nlat], dtype=np.int32)

def update_obs_grid(self):
def update_obs_gridded_data(self):
from .util import grid_util
"""
"""
Expand All @@ -999,12 +999,12 @@ def update_obs_grid(self):
for var in self.obs[obs].obj[obs_time]:
key = obs + '_' + var
print(key)
nobs = self.obs[obs].obj[obs_time][var].size
n_obs = self.obs[obs].obj[obs_time][var].size
grid_util.update_data_grid(
self.obs_edges['time_edges'],
self.obs_edges['lon_edges'],
self.obs_edges['lat_edges'],
obs_timestamp * np.ones(nobs, dtype=np.float32),
np.full(n_obs, obs_timestamp, dtype=np.float32),
self.obs[obs].obj[obs_time].coords['lon'].values.flatten(),
self.obs[obs].obj[obs_time].coords['lat'].values.flatten(),
self.obs[obs].obj[obs_time][var].values.flatten(),
Expand Down

0 comments on commit 03cf3f8

Please sign in to comment.