File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 21
21
from pathlib import Path
22
22
23
23
import numpy as np
24
- import pandas as pd
25
24
import netCDF4
26
25
27
26
from pysteps .cascade import get_method as cascade_get_method
@@ -303,9 +302,7 @@ def decompose_NWP(
303
302
"""
304
303
305
304
# Make a NetCDF file
306
- output_date = datetime .datetime .strftime (
307
- pd .to_datetime (analysis_time ), "%Y%m%d%H%M%S"
308
- )
305
+ output_date = f"{ analysis_time .astype (datetime .datetime ):%Y%m%d%H%M%S} "
309
306
outfn = Path (output_path ) / f"cascade_{ NWP_model } _{ output_date } .nc"
310
307
ncf = netCDF4 .Dataset (outfn , "w" , format = "NETCDF4" )
311
308
@@ -401,9 +398,7 @@ def compute_store_nwp_motion(
401
398
"""
402
399
403
400
# Set the output file
404
- output_date = datetime .datetime .strftime (
405
- pd .to_datetime (analysis_time ), "%Y%m%d%H%M%S"
406
- )
401
+ output_date = f"{ analysis_time .astype (datetime .datetime ):%Y%m%d%H%M%S} "
407
402
outfn = Path (output_path ) / f"motion_{ nwp_model } _{ output_date } .npy"
408
403
409
404
# Get the velocity field per time step
You can’t perform that action at this time.
0 commit comments