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 2121from pathlib import Path
2222
2323import numpy as np
24- import pandas as pd
2524import netCDF4
2625
2726from pysteps .cascade import get_method as cascade_get_method
@@ -303,9 +302,7 @@ def decompose_NWP(
303302 """
304303
305304 # 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} "
309306 outfn = Path (output_path ) / f"cascade_{ NWP_model } _{ output_date } .nc"
310307 ncf = netCDF4 .Dataset (outfn , "w" , format = "NETCDF4" )
311308
@@ -401,9 +398,7 @@ def compute_store_nwp_motion(
401398 """
402399
403400 # 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} "
407402 outfn = Path (output_path ) / f"motion_{ nwp_model } _{ output_date } .npy"
408403
409404 # Get the velocity field per time step
You can’t perform that action at this time.
0 commit comments