Closed andrewfagerheim closed 11 months ago
Admin:
Functions:
Project:
trying to make the spice anomaly plot, but running into issues, primarily with the line:
Pmean_nonan = Pmean_smooth.where(~np.isnan(so_rho['SPICE']) & ~np.isnan(Pmean_smooth), drop=True)
because Pmean_smooth
only has a rho_grid coordinate but so_rho
has rho_grid and N_PROF_NEW coordinates. It produces the error:
Dimensions {'N_PROF_NEW'} do not exist. Expected one or more of ('rho_grid',)
my first thought was to run the Figure-2-sections_plot notebook to see what the coordinates of each xarray involved was. However, the glidertools module is not installed in gyre and when I tried to install it, I noticed the version of pip installed is waaaaay behind (version 9.0.1 when the current version is 23.1.2). When I tried to upgrade pip, I got an error saying permission was denied.
my next thought is to add N_PROF_NEW dimension to Pmean_smooth
and hope that's enough for the .where() command to run. Nope this won't work because Pmean_smooth
is defined as:
Pmean_smooth = so_rho.PRES_INTERPOLATED.mean('N_PROF_NEW').rolling(rho_grid= 80, center=True).mean()
so there's no N_PROF_NEW dimension to add back. It's an array with shape (1001,)
I wonder if it's possible to specify a dimension the .isnan() should operate on? If that makes sense. Or limit the .where() to only one dimension?
Additionally, I wanted to do replicate the same analysis by looking at individual float numbers instead of regional boxes, to have the same x axis of "distance" as the glider paper. However, the function Dhruv used to do this relies on glidertools.utils.distance()
, so the function didn't run. I could probably write my own that works the same, but it seems preferable to find to install glidertools on gyre instead.
One solution to the glidertools issue is just going into the github repo, finding the necessary function, and copying that directly into the notebook. This is what I'm trying for glidertools.utils.distance()
in argo_density_space
Goal is to make the same plots as the glider paper and compare the results. Does the argo data provide similar results even though the resolution is worse and it's a box of profiles, not a continuous path?
I think it would be interesting to pick a float that goes through the glider region and perform the above analysis with distance on the x axis (like the glider plots) instead of N_PROF.
Still not sure how to install glidertools, I seem unable to install this package or update pip because I don't have the right permissions. (UPDATE 23 May: look at Ocean Transport Guide, there should be a section on this)
Notes:
PRES_INTERPOLATED
coordinate). Project:
Next steps:
Updates:
dim1=distance
Spice_on_Pmean
xarray/Figure 2c calculates spice, not the spice anomaly. Need more clarity on this. Regardless, I made what I think is a spice anomaly function that calculates the mean spice on each isopycnal, then subtracts each point from that mean to create what I'm calling a Spice Anomaly (along Pmean)
plot.argo_box_loader
notebook with expanded functionality. It can now load argo data based on a box of lats/lons or a float_ID, and will save both ds_z and ds_rho (with SPICE already added). I'm in the process of going through box by box to redo the netcdf files with this approachNext steps:
argo_density_space notebook:
float_ID=1901700
looks cool because it starts in a region with layered isopycnals and ends in a region where they are bunched near the surface. In between, there's hints of the kind of structure seen in the glider region, particularly when you look at the spice anomaly plot.Steinberg paper:
Many, many questions:
Next steps:
Long term:
I've spent most of this week catching up on readings, both papers I had skimmed a few months ago (Steinberg, Dove, Roullet) and new ones from the past week (Serazin, Chung). I think this has been helpful to consider how studies break a big topic down into something more specific to analyze, what kinds of methods they use to do so, and how they present this whole story.
In particular, each study had (a) one broad problem it was trying to constrain, (b) at least one proxy it was using, (c) and at least one method to analyze that proxy.
I'm realizing that for our project, I find it difficult to say what the broad problem is, the proxy is some part of temperature/salinity/density/spice profiles, and the methods are some combination of filtering/spectra/etc. I think it would be helpful for my mental organization to more carefully define each of these, and the steps necessary to address each.
Notes:
Next steps:
13 June 2023: Updates
Notes:
Notes:
window='hamming'
this changed the slope (closer to -3) and also aligned the spectra for each method closer to each other.Next steps:
These notes are very stream of consciousness (and written on the bus), retype later)
Notes:
Next steps:
Notes:
.dropna(dim='PRES_INTERPOLATED')
so the mask is based on the deepest MLD present in the region. I guess it just depends if this value is relatively uniform for every profile or notNext steps:
Notes;
Next steps:
Notes:
Next steps:
Notes:
Next steps:
Notes:
Next steps:
Notes:
Next steps:
Plots:
Sample rate:
Problem profiles:
Next steps:
Notes:
get_box()
function on two kinds of updates: (1) add variables at this stage so you don't have to in each notebook (including month, year, MLD, etc) and (2) change the get_ds_interp()
function so that it calculates the sample rate between each level in each profile and returns this in the interpolated dataset instead of picking profiles based on sample rate.argo_box_loader
to see if you've changed anything relevant recently.Next steps:
get_box()
including interpolation fixNotes:
Next steps:
Admin tasks:
Notes:
Next steps (timescale this week!!):
Admin tasks(timescale this week!!):
Longer-term steps (timescale this semester):
Notes:
Next steps:
Notes on Plotting:
Notes on Project:
df.interpolate2density_prof
Next steps (before going to Lamont next Friday):
I'm closing this comment and opening a new issue for the 2023-2024 academic year here: https://github.com/ocean-transport/argo-intern/issues/13
This issue contains meeting notes, action items, and updates starting May 2023. For similar issues from previous semesters see: