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

llcreader: get grid info from portal #197

Merged
merged 33 commits into from
Jun 4, 2020

Conversation

timothyas
Copy link
Member

This PR is designed to give llcreader access to grid information on the ECCO portal (or elsewhere), to hopefully to close #161, close #166, and close #158 (possibly more).

Right now it gets the full grid for LLC 2160 and gets the available grid info on the ECCO portal for LLC 4320, which is some but not all. I was not able access the grid info mentioned by @rabernat in #161, which was here

vertical grid variables and coordinates
this got a little tricky since everything is designed to deal with faceted data. I wrote some functions to read these in differently. I adapted the same infrastructure to the 1D variables, even though they could probably be dealt with eagerly (see _get_1d_chunk and _dask_array_vgrid in llcmodel.py).

k_p1 index
I changed this implementation as follows. Currently, the code grabs k_levels for k_p1 where k_levels is the cell centered index. Even if the user does not select levels, this still results in len(k)==len(k_p1), which is technically not right, unless I'm missing something... It gets tricky though when the user selects individual, nonconsecutive levels. I wrote this PR so that, if the user selects cell centered k_levels=[0,10,11] then the output dataset has k_p1=[0,1,10,11,12] - so that k_p1 has the upper and lower indices for each vertical grid cell. I found this easier to do in order to correctly assign Zu,Zl, and Zp1. This implementation "seems right", but I'm interested if anyone has an idea for how to handle it more elegantly or if it's unnecessary/confusing. It also felt like a somewhat hacky solution, so again, feedback welcome. (see _get_kp1_levels in llcmodel.py). With this new implementation I had to change the expected size of k_p1 to be 51 and 91 for llc90 and llc2160/llc4320.

tests
I just appended checks for this stuff in current tests rather than adding new ones. Tests for the k_p1 levels is in test_llc90_local_faces_load and 2160/4320 grids checked for in test_ecco_portal_faces/latlon. Perhaps could add more, testing the added read_grid and grid_vars_to_coords options added to get_dataset.

Some of the implementation started to feel a little hacky, and I'm open to anyone's suggestion on making it cleaner. Let me know what you think!

@rabernat
Copy link
Member

rabernat commented Apr 4, 2020 via email

@rabernat
Copy link
Member

rabernat commented Apr 7, 2020

I was not able access the grid info mentioned by @rabernat in #161, which was here

FYI this has moved here: https://catalog.pangeo.io/browse/master/ocean/LLC4320/LLC4320_grid/

Copy link
Member

@rabernat rabernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tim this looks great. Very thorough.

The main theme in my comments is that I think we should not ever be using multiple chunks for 1D vertical variables. This gives us the opportunity to remove some code from you PR, which is always a good thing.

This PR sets the stage for us to completely replace the original backend with the llcreader approach. So happy you did this.

grid_vars.update(vertical_grid_variables)
grid_vars.update(volume_grid_variables)
grid_vars.update(mask_variables)
grid_vars.update(extra_grid_variables)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super happy about how repetitive this has to be, but it is consistent with the rest of the code base.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, a slight change to _get_all_grid_variables got rid of most of this

@@ -87,6 +126,8 @@ def _decompress(data, mask, dtype):
_facet_reshape = (False, False, False, True, True)
_nfaces = 13
_nfacets = 5
_vgrid_prefixes = ['DRC','DRF','PHrefC','PHrefF','RC','RF','RhoRef']
_vgrid_p1_prefixes = ['DRC','PHrefF','RF']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way we could infer that these are vgrid variables from the metadata (e.g. dims), rather than hard coding it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, definitely. I added a little _is_vgrid routine for this and it seems much cleaner

data.shape = facet_shape
level_data.append(data)

return np.concatenate(level_data, axis=0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic feels overwrought for 1D vertical variables. And it will be very slow to issue 90 1-byte http read requests. I recommend we always read the entire array for such variables and then subset klevels after.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think my updated implementation should do the trick, and yep some quick tests showed that it's much faster to do it this way. It definitely makes sense... I also appended to test_llcreader.test_ecco_portal_faces/latlon tests to make sure that vertical grid coordinates are a single chunk that is the length of the data

def _dask_array_vgrid(self, varname, klevels, k_chunksize):
# return a dask array for a 1D vertical grid var
chunks = (tuple([len(c)
for c in _chunks(klevels, k_chunksize)]),)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned above, I don't think it ever makes sense to use chunks for 1D variables. We should always be returning a single contiguous chunk.

@timothyas
Copy link
Member Author

Thanks for the review @rabernat! I will get to this in the next couple of nights. I agree, writing out chunking 1D variables felt ... awkward ... but it was a start. I'll change that around and address the comments as well.

Should I point the LLC4320 grid to the link you mentioned? https://catalog.pangeo.io/browse/master/ocean/LLC4320/LLC4320_grid/

I hope you're doing OK - staying safe, sane, & healthy!

@rabernat
Copy link
Member

Thanks for the update Tim!

It looks like we are getting some test failures on python 3.6 only. I'm not sure what's behind this. They appear unrelated to your PR, but it would be good to try to resolve before merging.

@timothyas
Copy link
Member Author

For sure! I'll start cracking into it tonight. I have been lazily ignoring it, but I agree it would be good to get to the bottom of before getting a new version on pip.

@rabernat
Copy link
Member

Now that I've merged #200, could you rebase this? Hopefully the tests will all go green.

@timothyas
Copy link
Member Author

Looks as good as green to me :)

One last thing: should we keep the LLC4320 grid link to the ECCO portal, which has oddly an incomplete set of the coordinate files or switch to the Pangeo link? The ECCO portal is currently missing e.g. Depth, but containing the seemingly necessary ones like dx/dy, xc/yc. Or maybe the ECCO portal could get updated ...

@rabernat
Copy link
Member

rabernat commented Apr 14, 2020

should we keep the LLC4320 grid link to the ECCO portal, which has oddly an incomplete set of the coordinate files or switch to the Pangeo link?

Are you referring to this directory: https://data.nas.nasa.gov/ecco/data.php?dir=/eccodata/llc_4320/grid

Let's ping @menemenlis to see if we can get them to update the grid directory to include the complete set of files.

Do we have a full inventory of the missing files?

@timothyas
Copy link
Member Author

Yep that's what I'm referring to and currently referencing in known_models. Compared to the 2160, that website is missing

AngleCS, AngleSN, Depth, rLowC/W/S, rSurfC/W/S

I think the AngleCS and AngleSN are probably the most critical out of that list.

@rabernat
Copy link
Member

rabernat commented May 6, 2020

I've followed up with Dimitris over email to try to get his input on this.

@hongandyan
Copy link

Are you looking for missing grid at ECCO NAS data portal?
FYI, ECCO Drive has complete grid
https://ecco.jpl.nasa.gov/drive/files/ECCO2/LLC4320/grid

@rabernat
Copy link
Member

When we developed this tool, only ECCO Data Portal existed.

@hongandyan -- could you and / or @menemenlis explain the difference between "ECCO Drive" and "ECCO Data Portal"? Why would we use one vs. the other?

@hongandyan
Copy link

When we developed this tool, only ECCO Data Portal existed.

@hongandyan -- could you and / or @menemenlis explain the difference between "ECCO Drive" and "ECCO Data Portal"? Why would we use one vs. the other?

sorry for the confusion.
To my understanding, ECCO Drive holds ECCO product, including LLC-xxx
while ECCO Data Portal hosts LLC-xxxx model output .
Your tools are great, forget about ECCO Drive.
Here I just want to provide some grid info as LLC4320-grid looks messed on ECCO Data Portal

@rabernat
Copy link
Member

rabernat commented Jun 3, 2020

I just got the following info from @menemenlis:

I have added all the grid files that I could locate to:
/nobackupp2/dmenemen/llc_2160/grid
and
/nobackupp2/dmenemen/llc_4320/grid
Some from Hong’s ECCO drive and some that I recreated manually from the tile* files.

I attach below the list of available grid files. Are there additional grid files needed?
In particular, Ryan, did you want me to put the compressed binary mask files there also?
If there are more grid files needed and you have them available somewhere, please let me know.

pfe25 ~.$ cd /nobackupp2/dmenemen/llc_2160/grid
pfe25 grid.$ ls -l
total 77953672
-rw-r--r-- 1 dmenemen g26209   242611200 May 22  2014 AngleCS.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 AngleCS.meta
-rw-r--r-- 1 dmenemen g26209   242611200 May 22  2014 AngleSN.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 AngleSN.meta
-rw-r--r-- 1 dmenemen g26209         364 May 22  2014 DRC.data
-rw-r--r-- 1 dmenemen g26209         144 May 22  2014 DRC.meta
-rw-r--r-- 1 dmenemen g26209         360 May 22  2014 DRF.data
-rw-r--r-- 1 dmenemen g26209         144 May 22  2014 DRF.meta
-rw-r--r-- 1 dmenemen g26209   242611200 Nov  6  2019 DXC.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 DXC.meta
-rw-r--r-- 1 dmenemen g26209   242611200 Nov  6  2019 DXF.data
-rw-r--r-- 1 dmenemen g26209   242611200 Nov  6  2019 DXG.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 DXG.meta
-rw-r--r-- 1 dmenemen g26209   242611200 Nov  6  2019 DXV.data
-rw-r--r-- 1 dmenemen g26209   242611200 Nov  6  2019 DYC.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 DYC.meta
-rw-r--r-- 1 dmenemen g26209   242611200 Nov  6  2019 DYF.data
-rw-r--r-- 1 dmenemen g26209   242611200 Nov  6  2019 DYG.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 DYG.meta
-rw-r--r-- 1 dmenemen g26209   242611200 Nov  6  2019 DYU.data
-rw-r--r-- 1 dmenemen g26209   242611200 May 22  2014 Depth.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 Depth.meta
-rw-r--r-- 1 dataset  n1856           15 May 21  2019 FileSystemUp.txt
-rw-r--r-- 1 dmenemen g26209         360 May 22  2014 PHrefC.data
-rw-r--r-- 1 dmenemen g26209         144 May 22  2014 PHrefC.meta
-rw-r--r-- 1 dmenemen g26209         364 May 22  2014 PHrefF.data
-rw-r--r-- 1 dmenemen g26209         144 May 22  2014 PHrefF.meta
-rw-r--r-- 1 dmenemen g26209   242611200 Nov  6  2019 RAC.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 RAC.meta
-rw-r--r-- 1 dmenemen g26209   242611200 Nov  6  2019 RAS.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 RAS.meta
-rw-r--r-- 1 dmenemen g26209   242611200 Nov  6  2019 RAW.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 RAW.meta
-rw-r--r-- 1 dmenemen g26209   242611200 Nov  6  2019 RAZ.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 RAZ.meta
-rw-r--r-- 1 dmenemen g26209         360 May 22  2014 RC.data
-rw-r--r-- 1 dmenemen g26209         144 May 22  2014 RC.meta
-rw-r--r-- 1 dmenemen g26209         364 May 22  2014 RF.data
-rw-r--r-- 1 dmenemen g26209         144 May 22  2014 RF.meta
-rw-r--r-- 1 dmenemen g26209         360 May 22  2014 RhoRef.data
-rw-r--r-- 1 dmenemen g26209         144 May 22  2014 RhoRef.meta
-rw-r--r-- 1 dmenemen g26209   242611200 May 22  2014 U2zonDir.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 U2zonDir.meta
-rw-r--r-- 1 dmenemen g26209   242611200 May 22  2014 V2zonDir.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 V2zonDir.meta
-rw-r--r-- 1 dmenemen g26209   242611200 Nov  6  2019 XC.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  1 14:05 XC.meta
-rw-r--r-- 1 dmenemen g26209   242611200 Nov  6  2019 XG.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  1 14:05 XG.meta
-rw-r--r-- 1 dmenemen g26209   242611200 Nov  6  2019 YC.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  1 14:56 YC.meta
-rw-r--r-- 1 dmenemen g26209   242611200 Nov  6  2019 YG.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  1 14:07 YG.meta
-rw-r--r-- 1 dmenemen g26209 21835008000 May 22  2014 hFacC.data
-rw-r--r-- 1 dmenemen g26209         223 May 22  2014 hFacC.meta
-rw-r--r-- 1 dmenemen g26209 21835008000 May 22  2014 hFacS.data
-rw-r--r-- 1 dmenemen g26209         223 May 22  2014 hFacS.meta
-rw-r--r-- 1 dmenemen g26209 21835008000 May 22  2014 hFacW.data
-rw-r--r-- 1 dmenemen g26209         223 May 22  2014 hFacW.meta
-rw-r--r-- 1 dmenemen g26209   242611200 May 22  2014 rLowC.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 rLowC.meta
-rw-r--r-- 1 dmenemen g26209   242611200 May 22  2014 rLowS.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 rLowS.meta
-rw-r--r-- 1 dmenemen g26209   242611200 May 22  2014 rLowW.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 rLowW.meta
-rw-r--r-- 1 dmenemen g26209   242611200 May 22  2014 rSurfC.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 rSurfC.meta
-rw-r--r-- 1 dmenemen g26209   242611200 May 22  2014 rSurfS.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 rSurfS.meta
-rw-r--r-- 1 dmenemen g26209   242611200 May 22  2014 rSurfW.data
-rw-r--r-- 1 dmenemen g26209         154 May 22  2014 rSurfW.meta
-rw-r--r-- 1 dmenemen g26209        1167 Nov  6  2019 read_tile_mitgrid.m
-rw-r--r-- 1 dmenemen g26209          43 Sep  9  2019 readme.txt
-rw-r--r-- 1 dmenemen g26209        1143 Jan  6 12:37 thk90.mat
-rw-r--r-- 1 dmenemen g26209  1792696448 Jun  1 14:57 tile001.mitgrid
-rw-r--r-- 1 dmenemen g26209  1792696448 Jun  1 15:16 tile002.mitgrid
-rw-r--r-- 1 dmenemen g26209   597749888 Jun  1 15:13 tile003.mitgrid
-rw-r--r-- 1 dmenemen g26209  1792696448 Jun  1 14:26 tile004.mitgrid
-rw-r--r-- 1 dmenemen g26209  1792696448 Jun  1 14:58 tile005.mitgrid
pfe25 grid.$ cd /nobackupp2/dmenemen/llc_4320/grid
pfe25 grid.$ ls -l
total 275781536
-rw-r--r-- 1 dmenemen g26209   970444800 Jun  2 02:32 AngleCS.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  2 02:31 AngleCS.meta
-rw-r--r-- 1 dmenemen g26209   970444800 Jun  1 21:49 AngleSN.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  1 21:35 AngleSN.meta
-rw-r--r-- 1 dmenemen g26209         364 Jan  6 11:39 DRC.data
-rw-r--r-- 1 dmenemen g26209         144 Jan  6 11:39 DRC.meta
-rw-r--r-- 1 dmenemen g26209         360 Jan  6 11:39 DRF.data
-rw-r--r-- 1 dmenemen g26209         144 Jan  6 11:39 DRF.meta
-rw-r--r-- 1 dmenemen g26209   970444800 Sep 22  2019 DXC.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  1 21:25 DXC.meta
-rw-r--r-- 1 dmenemen g26209   970444800 Sep 22  2019 DXF.data
-rw-r--r-- 1 dmenemen g26209   970444800 Sep 22  2019 DXG.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  1 21:39 DXG.meta
-rw-r--r-- 1 dmenemen g26209   970444800 Sep 22  2019 DXV.data
-rw-r--r-- 1 dmenemen g26209   970444800 Sep 22  2019 DYC.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  1 14:27 DYC.meta
-rw-r--r-- 1 dmenemen g26209   970444800 Sep 22  2019 DYF.data
-rw-r--r-- 1 dmenemen g26209   970444800 Sep 22  2019 DYG.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  1 17:48 DYG.meta
-rw-r--r-- 1 dmenemen g26209   970444800 Sep 22  2019 DYU.data
-rw-r--r-- 1 dmenemen g26209   970444800 Mar  9 16:28 Depth.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  2 02:26 Depth.meta
-rw-r--r-- 1 dataset  n1856           15 May 21  2019 FileSystemUp.txt
-rw-r--r-- 1 dmenemen g26209         360 Jan  6 11:40 PHrefC.data
-rw-r--r-- 1 dmenemen g26209         144 Jan  6 11:40 PHrefC.meta
-rw-r--r-- 1 dmenemen g26209         364 Jan  6 11:40 PHrefF.data
-rw-r--r-- 1 dmenemen g26209         144 Jan  6 11:40 PHrefF.meta
-rw-r--r-- 1 dmenemen g26209   970444800 Sep 22  2019 RAC.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  2 02:34 RAC.meta
-rw-r--r-- 1 dmenemen g26209   970444800 Sep 22  2019 RAS.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  2 02:26 RAS.meta
-rw-r--r-- 1 dmenemen g26209   970444800 Sep 22  2019 RAW.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  2 02:31 RAW.meta
-rw-r--r-- 1 dmenemen g26209   970444800 Sep 22  2019 RAZ.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  2 02:32 RAZ.meta
-rw-r--r-- 1 dmenemen g26209         360 Jan  6 11:40 RC.data
-rw-r--r-- 1 dmenemen g26209         144 Jan  6 11:40 RC.meta
-rw-r--r-- 1 dmenemen g26209         364 Jan  6 11:40 RF.data
-rw-r--r-- 1 dmenemen g26209         144 Jan  6 11:40 RF.meta
-rw-r--r-- 1 dmenemen g26209         360 Jan  6 11:40 RhoRef.data
-rw-r--r-- 1 dmenemen g26209         144 Jan  6 11:40 RhoRef.meta
-rw-r--r-- 1 dmenemen g26209   970444800 Jun  2 02:31 U2zonDir.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  2 02:31 U2zonDir.meta
-rw-r--r-- 1 dmenemen g26209   970444800 Jun  2 02:12 V2zonDir.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  2 02:17 V2zonDir.meta
-rw-r--r-- 1 dmenemen g26209   970444800 Sep 22  2019 XC.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  1 21:25 XC.meta
-rw-r--r-- 1 dmenemen g26209   970444800 Sep 22  2019 XG.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  1 17:43 XG.meta
-rw-r--r-- 1 dmenemen g26209   970444800 Sep 22  2019 YC.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  1 21:44 YC.meta
-rw-r--r-- 1 dmenemen g26209   970444800 Sep 22  2019 YG.data
-rw-r--r-- 1 dmenemen g26209         154 Jun  1 21:30 YG.meta
-r--r--r-- 1 dmenemen g26209 87340032000 Feb 25 16:22 hFacC.data
-rw-r--r-- 1 dmenemen g26209         223 Jun  2 02:03 hFacC.meta
-r--r--r-- 1 dmenemen g26209 87340032000 Feb 25 17:36 hFacS.data
-rw-r--r-- 1 dmenemen g26209         223 Jun  1 21:25 hFacS.meta
-r--r--r-- 1 dmenemen g26209 87340032000 Feb 25 17:45 hFacW.data
-rw-r--r-- 1 dmenemen g26209         223 Jun  1 17:43 hFacW.meta
-rw-r--r-- 1 dmenemen g26209         307 Mar  9 16:16 mk_Depth.data.m
-rw-r--r-- 1 dmenemen g26209        1138 Sep 22  2019 read_tile_mitgrid.m
-rw-r--r-- 1 dmenemen g26209        4254 Jun  1 21:30 readme.txt
-rw-r--r-- 1 dmenemen g26209        1143 Jan  6 11:43 thk90.mat

@timothyas - can you check that things are working on your branch with these new additions?

@codecov-commenter
Copy link

codecov-commenter commented Jun 4, 2020

Codecov Report

Merging #197 into master will decrease coverage by 8.40%.
The diff coverage is 9.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #197      +/-   ##
==========================================
- Coverage   88.09%   79.68%   -8.41%     
==========================================
  Files          12       11       -1     
  Lines        1646     1275     -371     
  Branches      338      255      -83     
==========================================
- Hits         1450     1016     -434     
- Misses        158      226      +68     
+ Partials       38       33       -5     
Impacted Files Coverage Δ
xmitgcm/llcreader/known_models.py 0.00% <0.00%> (-78.38%) ⬇️
xmitgcm/llcreader/stores.py 0.00% <0.00%> (-89.48%) ⬇️
xmitgcm/variables.py 92.85% <ø> (-7.15%) ⬇️
xmitgcm/mds_store.py 90.49% <100.00%> (-2.27%) ⬇️
xmitgcm/llcreader/shrunk_index.py 0.00% <0.00%> (-100.00%) ⬇️
xmitgcm/llcreader/duck_array_ops.py 0.00% <0.00%> (-75.00%) ⬇️
xmitgcm/llcreader/__init__.py 35.71% <0.00%> (-50.01%) ⬇️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3db4d6...24009a7. Read the comment docs.

@timothyas
Copy link
Member Author

Thanks @menemenlis! The files listed look good to me, and once they are on the portal everything should be working smoothly.

Right now though I'm running into a strange 404 Error whenever the data are actually called/loaded. This is happening on travis with my latest commit, see here at test_ecco_portal_load. And I'm seeing the same thing on a jupyter notebook I'm running for testing. It seems like either the portal is down or the files are missing (?) because if I go to the web portal and manually try to download a file, the download fails reporting "no file".

@hongandyan
Copy link

@timothyas It's ECCO-Data portal temporary issue.
A simple test shows
https://data.nas.nasa.gov/ecco/download_data.php?file=/eccodata/llc_90/ECCOv4/Release4/nctiles_daily/ADVr_SLT/1992/001/ADVr_SLT_1992_01_01.nc
also not found

@timothyas
Copy link
Member Author

Thanks @hongandyan! I'll check back in a bit then.

@ryanspaulding
Copy link

FYI.. The missing grid data was just exported and is available for download:
https://data.nas.nasa.gov/ecco/data.php?dir=/eccodata/llc_2160/grid
and
https://data.nas.nasa.gov/ecco/data.php?dir=/eccodata/llc_4320/grid

@timothyas
Copy link
Member Author

Woohoo! Thanks @menemenlis and @ryanspaulding! This seems good to go now, I'm getting a passing build and my personal test notebook is lookin' good.

@rabernat rabernat merged commit 3ab1fdb into MITgcm:master Jun 4, 2020
@rabernat
Copy link
Member

rabernat commented Jun 4, 2020

Fantastic!

We should do a new release of xmitgcm asap.

@timothyas timothyas deleted the llcreader_grid branch June 4, 2020 21:43
fraserwg pushed a commit to fraserwg/xmitgcm that referenced this pull request Nov 23, 2021
* access to llc2160 grid is a go, with a couple caveats for now

* use grid var names not filenames, get vertical grid vars working

* lil typo

* fixes loading grid dir issues

* it works for llc2160

* add directory to some LLC4320 grid vars

* separate grid metadata function, add shrunk_grid flag

* add grid_varnames to paramter list

* test that grid variables show up in portal datasets

* prefixes->variables

* try Zl...

* extra logic to create Zl, Zu, and Zp1

* make reading grid optional

* wow, not copying dicts really messes things up

* only build Zu, Zl if RF is there

* shouldn't kp1 have nz+1 levels

* only read grid if grid_varnames has entries

* also test selected k_p1 levels

* typo...

* ... more typos...

* rhoref, extra dx/dy metrics

* add new metrics to test

* typos, and add rhoRef to vgrid prefixes

* load vgrid as one big chunk, all at once. test it too!

* oops, fixed test

* fix for global vgrid vars... what about layers.. tbd

* cleanup vgrid check

* cleanup grid var dict situation

* also test latlon vgrid coord chunking

* faces->ll

* update docs

* tiny typo

* added more 4320 grid files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants