Skip to content

Conversation

@corviday
Copy link
Contributor

@corviday corviday commented May 6, 2023

Formatting files and procedures for the new MOTI data.

  • yamls for update_metadata (over 50 this time!)
  • a script that adds a time_bnds variable to a climatological annual data set that hasn't got one
  • a script that fixes incorrect time data.

@corviday corviday marked this pull request as draft May 6, 2023 03:15
@corviday corviday changed the title raster formatting for streamflow data formatting streamflow extreme data for PCEX May 6, 2023
@corviday corviday marked this pull request as ready for review May 13, 2023 01:18
@corviday corviday requested a review from eyvorchuk May 16, 2023 16:36
Copy link
Contributor

@eyvorchuk eyvorchuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly straightforward, but I have a few questions.

assert end_date.month == 12 and end_date.day == 31, "This script assumes climatologies that end Dec 31: {}".format(end_date)
start_year = (start_date.year - ref_date.year) * 365
end_year = (end_date.year - ref_date.year) * 365
outfile.variables["time_bnds"][:] = np.array([[start_year + 1, end_year + 365]])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be misunderstanding how climatology bounds work, but if for example, the ref_date is 1950-01-01, the start_date is 1950-01-01, and the end_date is 1950-12-31, would the time_bnds then be [0, 364] instead of [1, 365]?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants