-
Notifications
You must be signed in to change notification settings - Fork 53
Add global moc postprocess #93
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
Conversation
Previously numpy commands were not valid to specify config file settings. Now, numpy commands can be used as the values in config key-value pairs. This is beneficial because long arrays are now easily specified, e.g., np.arange(0,1,100).
Takes existing moc.py workflow and integrates it into MPAS-Analysis.
|
This follows directly from @mark-petersen's |
|
Note, per @xylar's earlier request the hard-coded file names will likely need to be fixed during the review unless @mark-petersen would prefer this script be handled differently. |
|
@pwolfram, this seems like a nice start. But currently it seems too much like a direct translation of @mark-petersen's script and doesn't take enough advantage of the analysis infrastructure. I'm only part way through looking over the code so I'll try to give some more comments over the next few days as I have time. |
|
@xylar, I attempted to make this as faithful to the |
|
@pwolfram, I think when we bring scripts into MPAS-Analysis, it's more important to be "faithful" to the design concept of this repo than that of the original script. I appreciate what you did as kind of a teaching tool but an important part of translating scripts to this repo is showing how files can be found without having to use paths in the config file, how times can be selected without the need for time indices, etc. |
|
@xylar, agreed. I need to update this when I get a chance. |
|
@pwolfram: thanks for doing this. I agree with @xylar that we should integrate this fully within MPAS-Analysis.
So, for this PR, we would just need to address 1). How does this sound? |
xylar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, same issue here that my comments didn't get posted. Sorry about that.
| [moc_postprocess] | ||
| filename = ../mpaso.hist.am.timeSeriesStats.yr100-119.avg.nc | ||
| filenamemesh = ../mpaso.rst.0002-01-01_00000.nc | ||
| filenamemask = ../EC60to30v3_SingleRegionAtlanticWTransportTransects_masks.nc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first two of these filenames need to be read in from the streams file like normal. In place of the third file name, I would strongly prefer that an automated process be devised for generating the mask file. Presumably this would be achieved by running scripts from the GeometricFeatures repository, and maybe also adding some geometry to that repo. I'm definitely opposed to adding any new steps where the user has to generate a resolution-specific file before calling analysis. This is precisely the kind of thing that is already a big hindrance, especially in seaice_modelvsobs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would comment out the Atlantic mask file for now, because we want to be plotting only the global MOC for this PR (see my initial comment and point 1)).
| filenamemask = ../EC60to30v3_SingleRegionAtlanticWTransportTransects_masks.nc | ||
| timeIndex = 0 | ||
| horVelName = time_avg_normalVelocity | ||
| vertVelName = time_avg_vertVelocityTop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't these two be handled through the variableMap instead of being config options?
| filename = ../mpaso.hist.am.timeSeriesStats.yr100-119.avg.nc | ||
| filenamemesh = ../mpaso.rst.0002-01-01_00000.nc | ||
| filenamemask = ../EC60to30v3_SingleRegionAtlanticWTransportTransects_masks.nc | ||
| timeIndex = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a time rather than a time index?
| [seaice_modelvsobs] | ||
| generate = 1 | ||
|
|
||
| [moc_postprocess] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably do not need a specific section for mocPostprocess (it could just be 'MOC'), but I am OK with leaving this section name for now until we'll have the moc AM stuff in.
| compare_with_obs = True | ||
| # Number of points over which to compute moving average (e.g., for monthly | ||
| # output, N_movavg=12 corresponds to a 12-month moving average window) | ||
| N_movavg = 12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the moc_timeseries section, and add everything that is in there under moc_postprocess. This is because we will want to add the MOC time series to the current script that does the MOC vertical section.
|
Also, @pwolfram, I think it is appropriate to add the timeseries plot to this script before merging, if you are OK with the idea. |
|
@xylar and @milenaveneziani, I think it is best to wait on this until #86 and add the timeseries plot too. I don't think there is a rush on this PR. |
|
This PR has been superseded by #139 (where the comments added here have been addressed). |
This merge migrates postprocess-computed meridional overturning circulation calculations.