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

remap only the necessary dates #450

Closed
Tracked by #358
juliasloan25 opened this issue Oct 2, 2023 · 0 comments · Fixed by #717
Closed
Tracked by #358

remap only the necessary dates #450

juliasloan25 opened this issue Oct 2, 2023 · 0 comments · Fixed by #717
Assignees
Labels
🍃 leaf Issue coupled to a PR

Comments

@juliasloan25
Copy link
Member

juliasloan25 commented Oct 2, 2023

We use a few different files in the coupler for AMIP and slabplanet simulations, including sea ice concentration (SIC), sea surface temperature (SST), and the land/sea mask. These files include global data at multiple different times. Currently, we read in all of the data from these NetCDF files, and remap the data at every date provided in the input file. This is inefficient because we may run our simulation for only a small fraction of the dates included in the input file data. We need to update our remapping so that we only remap data in the necessary date range for our simulation each time we run.

goal: truncate remapping, so only the necessary dates (in our time range) are remapped

Solution

  • Implement a function with inputs date0, time_start, time_end, datafile and output datafile_truncated, the same datafile that was input but containing only the data at our simulation dates
    • To do this, open the file, compare dates to simulation initial date and length, save subset of data as new netcdf, and return the new file
    • This function can be called on each of the datasets (sst_data, sic_data, etc) after they're downloaded in the driver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍃 leaf Issue coupled to a PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants