@@ -736,6 +736,12 @@ def _hycom_espc():
736736def _ecco4 ():
737737 """ECCO V4r4 model dataset (from https://podaac.jpl.nasa.gov/dataset/ECCO_L4_OCEAN_VEL_LLC0090GRID_DAILY_V4R4#capability-modal-download)"""
738738 tiles = 13
739+ lon_grid = np .tile (
740+ np .tile (np .linspace (- 179 , 179 , X , endpoint = False ), (Y , 1 )), (tiles , 1 , 1 )
741+ ) # NOTE this grid is not correct, as duplicates for each tile
742+ lat_grid = np .tile (
743+ np .tile (np .linspace (- 89 , 89 , Y ), (X , 1 )).T , (tiles , 1 , 1 )
744+ ) # NOTE this grid is not correct, as duplicates for each tile
739745 return xr .Dataset (
740746 {
741747 "UVEL" : (
@@ -899,9 +905,7 @@ def _ecco4():
899905 ),
900906 "YC" : (
901907 ["tile" , "j" , "i" ],
902- np .tile (
903- np .tile (np .linspace (- 89 , 89 , Y ), (X , 1 )).T , (tiles , 1 , 1 )
904- ), # NOTE this grid is not correct, as duplicates for each tile
908+ lat_grid ,
905909 {
906910 "long_name" : "latitude of tracer grid cell center" ,
907911 "standard_name" : "latitude" ,
@@ -914,9 +918,7 @@ def _ecco4():
914918 ),
915919 "YG" : (
916920 ["tile" , "j_g" , "i_g" ],
917- np .tile (
918- np .tile (np .linspace (- 89 , 89 , Y ), (X , 1 )).T , (tiles , 1 , 1 )
919- ), # NOTE this grid is not correct, as duplicates for each tile
921+ lat_grid ,
920922 {
921923 "long_name" : "latitude of 'southwest' corner of tracer grid cell" ,
922924 "standard_name" : "latitude" ,
@@ -928,9 +930,7 @@ def _ecco4():
928930 ),
929931 "XC" : (
930932 ["tile" , "j" , "i" ],
931- np .tile (np .linspace (- 179 , 179 , X , endpoint = False ), (Y , 1 )).reshape (
932- tiles , Y , X
933- ), # NOTE this grid is not correct, as duplicates for each tile
933+ lon_grid ,
934934 {
935935 "long_name" : "longitude of tracer grid cell center" ,
936936 "standard_name" : "longitude" ,
@@ -943,9 +943,7 @@ def _ecco4():
943943 ),
944944 "XG" : (
945945 ["tile" , "j_g" , "i_g" ],
946- np .tile (np .linspace (- 179 , 179 , X , endpoint = False ), (Y , 1 )).reshape (
947- tiles , Y , X
948- ), # NOTE this grid is not correct, as duplicates for each tile
946+ lon_grid ,
949947 {
950948 "long_name" : "longitude of 'southwest' corner of tracer grid cell" ,
951949 "standard_name" : "longitude" ,
0 commit comments