Skip to content

Commit 4683fc0

Browse files
committed
allow .nc files with only one time variable
1 parent 1290902 commit 4683fc0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rocketpy/environment/environment.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1912,7 +1912,10 @@ def process_forecast_reanalysis(
19121912
# Compute info data
19131913
self.atmospheric_model_init_date = get_initial_date_from_time_array(time_array)
19141914
self.atmospheric_model_end_date = get_final_date_from_time_array(time_array)
1915-
self.atmospheric_model_interval = get_interval_date_from_time_array(time_array)
1915+
if (self.atmospheric_model_init_date != self.atmospheric_model_end_date):
1916+
self.atmospheric_model_interval = get_interval_date_from_time_array(time_array)
1917+
else:
1918+
self.atmospheric_model_interval = 0
19161919
self.atmospheric_model_init_lat = lat_list[0]
19171920
self.atmospheric_model_end_lat = lat_list[-1]
19181921
self.atmospheric_model_init_lon = lon_list[0]

0 commit comments

Comments
 (0)