Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom target grid to mean climate #973

Merged
merged 5 commits into from
Aug 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
explicit float
  • Loading branch information
acordonez committed Aug 17, 2023
commit 371c3f1dc0e8c3460db7b897a3224dc346857ed2
12 changes: 6 additions & 6 deletions pcmdi_metrics/mean_climate/mean_climate_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@
res=target_grid.split("x")
lat_res=float(res[0])
lon_res=float(res[1])
start_lat=-90+lat_res/2
start_lon=0
end_lat = 90-lat_res/2
end_lon = 360-lon_res
nlat = ((end_lat - start_lat) * 1/lat_res) + 1
nlon = ((end_lon - start_lon) * 1/lon_res) + 1
start_lat=-90.+lat_res/2
start_lon=0.
end_lat = 90.-lat_res/2
end_lon = 360.-lon_res
nlat = ((end_lat - start_lat) * 1./lat_res) + 1
nlon = ((end_lon - start_lon) * 1./lon_res) + 1
t_grid=xc.create_uniform_grid(start_lat,end_lat,lat_res,start_lon,end_lon,lon_res)
if debug:
print('type(t_grid):', type(t_grid)) # Expected type is 'xarray.core.dataset.Dataset'
Expand Down