Skip to content

Commit

Permalink
Fix for limiting zero padding for analysis_assim (#64)
Browse files Browse the repository at this point in the history
* updated version

* modified to limit zero padding for analysis_assim
  • Loading branch information
karnesh authored Oct 23, 2024
1 parent 553cab7 commit 46e16ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion nwmurl/urlgennwm.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ def makename(

datetxt = f"nwm.{date.strftime('%Y%m%d')}"
foldertxt = f"{run_type}{run_typesuffix}"
filetxt = f"nwm.t{fcst_cycle:02d}z.{run_name}{runsuffix}.{var_name}{varsuffix}.{fhprefix}{fcst_hour:03d}.{geography}.nc"

if "analysis_assim" in run_type:
filetxt = f"nwm.t{fcst_cycle:02d}z.{run_name}{runsuffix}.{var_name}{varsuffix}.{fhprefix}{fcst_hour:02d}.{geography}.nc"
else:
filetxt = f"nwm.t{fcst_cycle:02d}z.{run_name}{runsuffix}.{var_name}{varsuffix}.{fhprefix}{fcst_hour:03d}.{geography}.nc"

return f"{urlbase_prefix}{datetxt}/{foldertxt}/{filetxt}"


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"""

# Other information
VERSION = "1.0.0"
VERSION = "1.0.1"
DESCRIPTION = "URL generator tool for National Water Model data"

setup(
Expand Down

0 comments on commit 46e16ee

Please sign in to comment.