-
Notifications
You must be signed in to change notification settings - Fork 53
Time series edits #1112
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
Merged
Merged
Time series edits #1112
Changes from 11 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
b2eeccd
removed map inset
irenavankova 4ef8c83
moved inset like in hov
irenavankova 04d638b
landIceFraction instead of landIceFloatingMask
irenavankova 339013d
landIceFraction no time
irenavankova 841e891
shift inset
irenavankova 52e5784
GT to Gt
irenavankova d75e268
less inset buffer
irenavankova 516841b
remove print statements
irenavankova effdc97
inset lower left
irenavankova 0a825de
inset lower left 2
irenavankova 5589934
inset lower left volume integrated
irenavankova 929940a
Update mpas_analysis/ocean/time_series_ocean_regions.py
irenavankova e54dd45
Update mpas_analysis/ocean/time_series_antarctic_melt.py
irenavankova 1cbacf2
Update mpas_analysis/ocean/time_series_antarctic_melt.py
irenavankova e21b5eb
change to openOceanMask
irenavankova 45d447f
Use open ocean mask in _masked_area_sum() method
xylar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -349,6 +349,9 @@ def run_task(self): | |||||
| dsMesh = xr.open_dataset(meshFilename) | ||||||
| dsMesh = dsMesh.isel(Time=0) | ||||||
| areaCell = dsMesh.areaCell | ||||||
| landIceFraction = dsMesh.landIceFraction | ||||||
| landIceFraction = xr.where(landIceFraction > 0, 1, landIceFraction) | ||||||
| landIceFraction = -1*(landIceFraction-1) | ||||||
|
|
||||||
| nVertLevels = dsMesh.sizes['nVertLevels'] | ||||||
|
|
||||||
|
|
@@ -407,7 +410,9 @@ def run_task(self): | |||||
| prefix = field['prefix'] | ||||||
| self.logger.info(' {}'.format(field['titleName'])) | ||||||
|
|
||||||
| var = dsLocal[variableName].where(vertDepthMask) | ||||||
| var_mpas = dsLocal[variableName] | ||||||
| var_mpas_masked = var_mpas*landIceFraction | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| var = var_mpas_masked.where(vertDepthMask) | ||||||
|
|
||||||
| meanName = '{}_mean'.format(prefix) | ||||||
| dsLocal[meanName] = \ | ||||||
|
|
||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
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 think this would be simpler and make more sense (at least to me). (And then openOceanMask gets used below.)
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 think we want to use
landIceMaskrather thanlandIceFraction > 0but that could be a point of discussion.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.
Sure, if the variable is available that is fine - I had tried first with landIceFloatingMask but that variable wasn't available for some reason, so I went with landIceFraction following the melt rate example
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.
MPAS-Analysis/mpas_analysis/ocean/regional_ts_diagrams.py
Line 624 in 63282e6
It seems like either landIceFraction or landIceMask would work so it doesn't matter too much.
landIceFloatingFractionshould also work but I don't think that would be the right thing if it differs from landIceFraction -- if grounded ice is present, we want to exclude it, too.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.
landIceMaskseems like the right choice to me