Closed JordanLaserGit closed 3 months ago
Good catch. @RohanSunkarapalli Can you address?
Yes @jameshalgren , that's right. I gave that condition because when I observed the bucket we saw that the files from year 2007 doesn't have "00" appended to the date format whereas the files from 90's to 2006 has "00" at the tail of the date format.
I gave this condition -
But if you think it's not needed anymore it could be corrected by modifying the code to this way -
def generate_url_retro(date, file_type, urlbase_prefix, retrospective_var_types=None): year_txt = date.strftime("%Y") date_txt = date.strftime("%Y%m%d%H%M") # Updated to include minutes
if "forcing" in file_type and date.year < 2007:
url = f"{urlbase_prefix}{file_type}{year_txt}/{date_txt}.LDASIN_DOMAIN1"
elif "forcing" in file_type and date.year >= 2007:
url = f"{urlbase_prefix}{file_type}{year_txt}/{date_txt}.LDASIN_DOMAIN1"
elif "model_output" in file_type:
url = [
f"{urlbase_prefix}{file_type}{year_txt}/{date_txt}{type}"
for type in retrospective_var_types
]
if urlbase_prefix == "https://ciroh-nwm-zarr-retrospective-data-copy.s3.amazonaws.com/noaa-nwm-retrospective-2-1-zarr-pds/":
for url in url:
url = url + ".json"
url = url.replace('.comp', '')
return url
Addressed by #57
This conf_nwmurl.json
yields this retro_filenamelist.txt
but I think it should be
so there's just two missing digits for the minutes, not sure why they are required.