From 0440319837b7334fed35b5e8619a9203792f4816 Mon Sep 17 00:00:00 2001 From: Sam Lamont Date: Thu, 7 Mar 2024 12:48:48 -0500 Subject: [PATCH 1/7] Fixing zonal mean and test updates --- src/teehr/loading/grid_loading_example.ipynb | 233 ------------------ src/teehr/loading/nwm/grid_utils.py | 12 +- tests/data/nwm22/grid_benchmark.parquet | Bin 5787 -> 5783 bytes tests/data/nwm22/onehuc10_weights.parquet | Bin 8463 -> 6122 bytes .../data/nwm22/onehuc10_weights_retro.parquet | Bin 0 -> 8463 bytes ...late_grid.nc => test_template_grid_nwm.nc} | Bin 28608 -> 33423 bytes .../nwm22/test_zonal_mean_results.parquet | Bin 0 -> 2432 bytes tests/data/nwm30/grid_benchmark.parquet | Bin 5839 -> 5839 bytes .../nwm30/one_huc10_alaska_weights.parquet | Bin 6640 -> 7011 bytes tests/test_nwm_fetch_and_format.py | 4 +- tests/test_retrospective_grid_loading.py | 4 +- tests/test_weight_generation.py | 2 +- tests/test_zonal_mean_results.py | 38 +++ 13 files changed, 51 insertions(+), 242 deletions(-) delete mode 100644 src/teehr/loading/grid_loading_example.ipynb create mode 100755 tests/data/nwm22/onehuc10_weights_retro.parquet rename tests/data/nwm22/{test_template_grid.nc => test_template_grid_nwm.nc} (72%) create mode 100755 tests/data/nwm22/test_zonal_mean_results.parquet create mode 100644 tests/test_zonal_mean_results.py diff --git a/src/teehr/loading/grid_loading_example.ipynb b/src/teehr/loading/grid_loading_example.ipynb deleted file mode 100644 index 16bad48e..00000000 --- a/src/teehr/loading/grid_loading_example.ipynb +++ /dev/null @@ -1,233 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 2, - "id": "38f2f9f4-5294-4f9b-971a-931b91da8f85", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "# Import the required packages.\n", - "\n", - "# Run this if TEEHR is not installed\n", - "# import sys\n", - "# sys.path.insert(0, \"../../src\")\n", - "\n", - "import os\n", - "\n", - "from dask.distributed import Client\n", - "from pathlib import Path\n", - "\n", - "import teehr.loading.nwm.nwm_grids as tlg\n", - "\n", - "import teehr.utilities.generate_weights as gw\n", - "from teehr.loading.nwm.const import CONUS_NWM_WKT" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Specify input variables" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "76e363e7-a3e0-427f-811f-a6298b93536f", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "# Set some notebook variables to point to the relevant study files.\n", - "TEMP_GEO_DIR = Path(Path.home(), \"temp/geo\")\n", - "TEMP_GEO_DIR.mkdir(exist_ok=True, parents=True)\n", - "\n", - "# Generate weights\n", - "# fetch \"https://storage.googleapis.com/national-water-model/nwm.20220101/forcing_short_range/nwm.t00z.short_range.forcing.f001.conus.nc\"\n", - "GRID_TEMPLATE_FILE = Path(TEMP_GEO_DIR, \"nwm.t00z.short_range.forcing.f001.conus.nc\")\n", - "\n", - "# fetch \"https://nextgen-hydrofabric.s3.amazonaws.com/v1.2/nextgen_03S.gpkg\"\n", - "ZONE_GEO_FILE = Path(TEMP_GEO_DIR, \"nextgen_03S.gpkg\")\n", - "ZONAL_WEIGHTS_FILEPATH = Path(TEMP_GEO_DIR, \"nextgen_03S_weights.parquet\")\n", - "UNIQUE_ZONE_ID = \"id\"\n", - "\n", - "# NWM\n", - "CONFIGURATION = \"forcing_short_range\" # forcing_short_range, forcing_analysis_assim, forcing_medium_range\n", - "OUTPUT_TYPE = \"forcing\"\n", - "VARIABLE_NAME = \"RAINRATE\"\n", - "\n", - "START_DATE = \"2020-12-18\"\n", - "INGEST_DAYS = 1\n", - "\n", - "JSON_DIR = Path(Path.home(), \"temp/parquet/jsons/\")\n", - "OUTPUT_DIR = Path(Path.home(), \"temp/parquet\")\n", - "\n", - "NWM_VERSION = \"nwm22\" # Currently accepts \"nwm22\" or \"nwm30\"\n", - " # Use \"nwm22\" for dates prior to 09-19-2023\n", - "\n", - "DATA_SOURCE = \"GCS\" # Specifies the remote location from which to fetch the data\n", - " # (\"GCS\", \"NOMADS\", \"DSTOR\")\n", - "\n", - "KERCHUNK_METHOD = \"auto\" # When data_source = \"GCS\", specifies the preference in creating Kerchunk reference json files.\n", - " # \"local\" - always create new json files from netcdf files in GCS and save locally, if they do not already exist\n", - " # \"remote\" - read the CIROH pre-generated jsons from s3, ignoring any that are unavailable\n", - " # \"auto\" - read the CIROH pre-generated jsons from s3, and create any that are unavailable, storing locally\n", - "\n", - "CONCAT_DIMS = [\"time\"] # \"reference_time\"\n", - "T_MINUS = [0, 1, 2] # Only used if an assimilation run is selected\n", - "IGNORE_MISSING_FILE = True # If True, the missing file(s) will be skipped and the process will resume\n", - " # If False, TEEHR will fail if a missing NWM file is encountered\n", - "OVERWRITE_OUTPUT = True # If True, existing output files will be overwritten\n", - " # If False (default), existing files are retained" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Fetch a template forcing netCDF file" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "53724249-5fbe-4fa4-8fd9-96a3238d16b3", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "!wget -O /home/jovyan/temp/geo/nwm.t00z.short_range.forcing.f001.conus.nc \\\n", - "https://storage.googleapis.com/national-water-model/nwm.20220101/forcing_short_range/nwm.t00z.short_range.forcing.f001.conus.nc" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Fetch some example polygons (nextgen divides)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4a717b43", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "!wget -O /home/jovyan/temp/geo/nextgen_03S.gpkg https://lynker-spatial.s3.amazonaws.com/v20/gpkg/nextgen_03S.gpkg" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Start a local dask cluster" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "30f8283c", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "n_workers = max(os.cpu_count() - 1, 1)\n", - "client = Client(n_workers=n_workers)\n", - "client" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Generate the weights file" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "0ac3c383-9aaf-4fd7-8c33-461ff5e87bb7", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "%%time\n", - "gw.generate_weights_file(\n", - " zone_polygon_filepath=ZONE_GEO_FILE,\n", - " template_dataset=GRID_TEMPLATE_FILE,\n", - " variable_name=VARIABLE_NAME,\n", - " output_weights_filepath=ZONAL_WEIGHTS_FILEPATH,\n", - " crs_wkt=CONUS_NWM_WKT,\n", - " unique_zone_id=UNIQUE_ZONE_ID,\n", - " layer=\"divides\"\n", - ")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Fetch the gridded data summarized to the polygons" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "7b77bd47", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "%%time\n", - "tlg.nwm_grids_to_parquet(\n", - " configuration=CONFIGURATION,\n", - " output_type=OUTPUT_TYPE,\n", - " variable_name=VARIABLE_NAME,\n", - " start_date=START_DATE,\n", - " ingest_days=INGEST_DAYS,\n", - " zonal_weights_filepath=ZONAL_WEIGHTS_FILEPATH,\n", - " json_dir=JSON_DIR,\n", - " output_parquet_dir=OUTPUT_DIR,\n", - " nwm_version=NWM_VERSION,\n", - " data_source=DATA_SOURCE,\n", - " kerchunk_method=KERCHUNK_METHOD,\n", - " t_minus_hours=T_MINUS,\n", - " ignore_missing_file=IGNORE_MISSING_FILE,\n", - " overwrite_output=OVERWRITE_OUTPUT\n", - ")" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.12" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/src/teehr/loading/nwm/grid_utils.py b/src/teehr/loading/nwm/grid_utils.py index 76c8b03b..1464adcb 100644 --- a/src/teehr/loading/nwm/grid_utils.py +++ b/src/teehr/loading/nwm/grid_utils.py @@ -14,7 +14,7 @@ def compute_zonal_mean( da: xr.DataArray, weights_filepath: str ) -> pd.DataFrame: - """Compute zonal mean of area-weighted pixels for given + """Compute zonal mean (weighted average) of area-weighted pixels for given zones and weights.""" # Read weights file weights_df = pd.read_parquet( @@ -29,11 +29,13 @@ def compute_zonal_mean( # Get the values and apply weights var_values = arr_2d[rows, cols] weights_df["value"] = var_values * weights_df.weight.values - # Compute mean - df = weights_df.groupby(by="location_id")["value"].mean().to_frame() - df.reset_index(inplace=True) - return df + # Compute weighted average + df = weights_df.groupby( + by="location_id", as_index=False)[["value", "weight"]].sum() + df["value"] = df.value/df.weight + + return df[["location_id", "value"]] @dask.delayed diff --git a/tests/data/nwm22/grid_benchmark.parquet b/tests/data/nwm22/grid_benchmark.parquet index bb9243cbd87e93d4dac2521c936387c846d762e9..1de2ebb0ba5c8d59b0703998f32f14dcfd680be5 100644 GIT binary patch delta 927 zcmbQOJ6(5zq>rJ2nSp_UiGisogQ$?Gn2sousDLP&D4UEKg9eu&Tvh^!&A`CGslWsz znHU+F7}T~f%82qvnli8nOlD+L62+=zax9~=)4JCtdl&0C*rVGd!2y#&u*4WNu!v4( zWE5itStP|MtwFS=SVom72CcT*Wr1RtRx?0lBsgF!kkv3YLKMx@3)p2uSs`!V7-zxG7Jouh#^ssfg!*#$PfUysnB!) delta 973 zcmbQPJ6m^xq>q82nSp_UnSq%ogQ$?Gn2sousDLP&D4UEKg9eu&Tvh^!&A`CGslWsz znHU+F7}T~f%82qvnhG$mP5#TOB#Kqbk2cQlhK(|MN10v4A0B1FbF=${Boy^E6 z#tgDXicwmFXic$u1-2SP6lfc=mlv?hh_XPue49~G9YZ;G zLx6!meW$G9f;(j)lPb|pdCQav4$4sG(_s2Kd)nkqmIyH0gTrgG9;>Ums)$dIkcd&dkqKvQkh2$r*1>;N8K-?we^+?vv#@Szbhm h+1aFOvx|rxlPXBwK(a=LfdLaSqzW=H1ULp60s!_au7Usn diff --git a/tests/data/nwm22/onehuc10_weights.parquet b/tests/data/nwm22/onehuc10_weights.parquet index 37cda75c23b4391ca24cd743cede373f6e230aea..b66736bb7488146309a97e2cc0ff280a96d356ac 100755 GIT binary patch literal 6122 zcmcgw30PBC(@ubd3q%1;ARu6j5UC9q!Y+Ot!yW`g6hd&pY(O9h6v8fUU~B90xudvN zZQZDfOY2gXVpZC&xZv_tEr_Bhf<&vWT3h|+Ceh;3K2M+j?|&ZOd(W9UXU=0ujh=B+WVi1Ch7>w{lcp-Rwh!I2R6l3!?zgZMk z8~Zi|)oIUMSfld1G^;c)vx8s{F~8_-wGH((Uj)(!ol^A!c%j1_9$3 z)sn!WjpaQtlSAXty{-AgP@AE)L+$tsejk3{q4q-^_>R8)1pPypA*>*$0OufffQ!)8 zdjQvs>(24;80gAj4`Om@?IH8qV;6ZEdGH!(ZY(R8KnmT#g>6}oSHiMzYOr-WW9@X5 z#=B#|BmNG17e0oI!m^;?!vS9u3Xa<>Ss!EgMi|3)k4k(>km36b-M0m?6|oJm39%Wm z4)FGH5x8=PwbC77$II~3~9jc}$&1K(MXBF-zUr@Ek;uE%C zqrB-*Rlji@=3u&XVPI#g$Y!X+$BtEX;=#GiFBDrAM_=4nVePefq<1u9*PV@~dEQp% z#gn`#A<0AL)rlYVjZ2z=wv`urQ6w#DZmiWC)>*NLBb3G z{0dEH9ABl>TzPF4)k=-di#3RQZEeBUf4oWhJ$R zvXrW~s#r`7_dI~+!^kr=JEm&%XmK~MC5*^A6pFINKX>51dn&9+|MOPa_sTRyp2n1E z9d=I32;NQ`-Urs0YH#}cPonVFR6FX-`p!9?_1MCgYi)K9uhK5Gq@F!ia};c{caPtx z{T9lz->YuQ_zI3XLq~gh3vk<7QfeE%0Alc|u0FYSh!`sbZB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sv2T6)wO2+q zS6y2&>W7wVua34E+PE~>N#D3ET)w$+d6fT+#ud?_Lz_xtG`df2shPA9OcFJhk zut2`0rEIbP&6bTzLxKNEd# z1EFt9iat}TD@-xy@^yw3MM{e0IrbNgQ(b_3UZA}AVIIWW3jeP+a#zo_E(Slr*(O($ zt~08nw(MScbTe;?wSHm;Ly+2%*18cONbUI2@yXglh!S@p%mq8QS72++#nolfAH3-% z|AV(({sVg=@;_+n;y)WuPDf`k<8p~pL!_f1xOh3+WUDf@s$A#YHZx?FSSFCb&7A&z$4kY%cjI*MfG84R3}s@EB`Dfg#YE|g*_$`((QA>sY_!^^B`YHp{l%YyxnldQOoE8{(Uw(m@NSW6B@U&pd zcizplnDZl)$^s?jIGQWrXfDKi5&{d768xqnC5|OAg7Se+Mi>ow$zk!ni9X}<)#33b zb>>+8czvKc!Vr+E;@srK^i*|NyiamMVd~h>fYbQeURlpi0nYX)SFxsuJRJlS2c3Ex)VzG^)b_(toQ>$;QI` zq{QDhKGd1PoM)?j#2B=Ud#5-Hip*8}jH7>se6=AUJK55QuG;v2iaF*xR~=4lg?EUh zdokX5%zo|O665`knA6s{*BIj&i-4lm`y^MD5LuLz80lw@o6JBzKDWoe))-%;@nPKb z;yn~mI9Bgl5S0<47vrNt8-0=!Bd4np0`kmtWJKhR4f35Hk*Q#w2?T%X8_Wf2_7hmat1Vvug_9$pYQlIPt^1`ZSg=<}~rm zT%X1mFhX4K`9gV(GN?V98rxq_KP@=BWvg^e1YqGN+H~&I&YyE}gX8u*CaGAto QLB}7#$iLr4^IswU2TXw2vH$=8 diff --git a/tests/data/nwm22/onehuc10_weights_retro.parquet b/tests/data/nwm22/onehuc10_weights_retro.parquet new file mode 100755 index 0000000000000000000000000000000000000000..37cda75c23b4391ca24cd743cede373f6e230aea GIT binary patch literal 8463 zcmeI&d0dp${=o4EMH~?ll_4-P9AQK+*?>UOwQ|@&R7CbPoDCS90fb?5$t5r~GZ!>7 zEk!`I-L%!p1##aHal;)Dt$VL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8-0=!Bd4np0`kmtWJKhR4f35Hk*Q#w2?T%X8_Wf2_7hmat1Vvug_9$pYQlIPt^1`ZSg=<}~rm zT%X1mFhX4K`9gV(GN?V98rxq_KP@=BWvg^e1YqGN+H~&I&YyE}gX8u*CaGAto QLB}7#$iLr4^IswU2TXw2vH$=8 literal 0 HcmV?d00001 diff --git a/tests/data/nwm22/test_template_grid.nc b/tests/data/nwm22/test_template_grid_nwm.nc similarity index 72% rename from tests/data/nwm22/test_template_grid.nc rename to tests/data/nwm22/test_template_grid_nwm.nc index 6c76f727066064da5f68e2cba07ff523d84ca263..ddce4a51a9368f9df00bd58e66c7d5148df0240d 100755 GIT binary patch delta 4087 zcmds4dr(x@89#ULf*>Lw3M&#G7f_JpDQZ9$SzO+aMHVWr^>W?4!0PV3o83i(v@Q`J z)0QdXsZOQ_HAx>a^_8ro#}pyJA;t^3YZwJ=sKn*EG93_2s&H#jFzwM$*wi!$tLBz4CZ? zIDR=h{O0oL^JE;P$wNrodgDOP@FNSg-P26{nNlvvU04pOq&T>i?wGwj#A~;GTYIwS z5H%={+aD%x$l z;8J&)JCbIEpZ+Q~AdL`eUs@q*S;gP{aGlrd8~DbR~o0C&?%-Y6~C6@z@* z=MV_MvF^Hco}rLRh2mtQXPDYg!QQZJY8ak1MSJd>?$3aSqE}KQ@bl==n3?m5<4&JH zetGu&2kCHBl|+rgF;$}S=2+8@;d9j^cU#~7pF9_D|FWxj$C=BkFZDcA7q)*~x2fl| zBc2t%Sn|x2>iE|u-RE}v?A1T)d^&X5wK#9Hdhg1l@yx&-tF9lr3CH&y9csV%;==yx zW5u@j;|317|GDqOCynVDs%?9+P8GgeZC__xWIh`G(+Tb8I;!M@BgRqdmVxv~1zQ50 zhDhV>;uTMCMdf_y>KWB-_|Cq658S=`Fl$_hZ+rdYv81;J^U;)Zz3-Ono%5S9ZU2#s z0ZkC-t&7?fY@e)@4FJe)X84Z=buJ~9-v zRg$p$LzZ))ozW?u?-twON#>=HlZj+_`SCIs5u6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Fnqwm1&D6D7DNE)#uRUHY{YO|BM4zLLW zZ637uVSv4sxhJl90-W;hYn|VKE{K9rxc(MO&U_)-YGg~$L3&uOJzeAfdrwM4RxCuH zm7Tt%5GK>QkuhL4gV2ict(B%3YWj)v^rQ0yY{*3uFn=$~$7lU6E21(Y(N~S)irH*7 z0>NZ(@0@$zt=w@%K*SYTd*2-A-gj#*8(c>1GLy6V0!nP48EFmAz!B77kl<^RF6JPc zp%W?A$yZ6}^VR@Hc_u{M24cDh$Hp}A{q5NcyVcZ>C5BSVY7y$m?G$oov#u+I3Y0+7 jX7up&Tk1BQKij+CPE9h7yt45+4_=~=3FpWOlT-K~qS|}X diff --git a/tests/data/nwm22/test_zonal_mean_results.parquet b/tests/data/nwm22/test_zonal_mean_results.parquet new file mode 100755 index 0000000000000000000000000000000000000000..920d4a47cf8779b6c83f5caa45806c6c2899eeba GIT binary patch literal 2432 zcmcIm&2Jk;6rZ?GNJ~;hC~MisNM=Pt4^CLGzpF}N?8MHxPTIJQ*Xyc^_AB-#yX(bX zf3=E)P%r!eNCj~~6<3ge3!n;dgC4lS9aUV41QJJXyqR?zI}{{@y3)?Pd2il(zxSJY zYu~_?7~^N|`)|W!e)H&y_tzm31;G{V}lrGvumnkK9|uH1HE$x*rGfEe>+ zoyx~|z~BYkr_uFM-03g}hHh&6(>f2=zB_bCKDKKcYD@DVbS-B%HnfyOU3CdGOLt{W zc4gRpkJWA1ZrBatyLYRwnqiM8z)YiHCz^)@nu2rI_`h%w+K!_DZ&WKwZ}i`Dj@4(f z9hfcIO(p0-OtCOwn4p2CqesxzWw+I)%$SDKmfJ%@j5Czm?N**?(dd_IUamRRG~ zcouN7qx2I-evMz_*kcr2z?I5%@ru_s!H?$OAkP4AV2pR+CC@dC6FAqv1&kXw-=Ml& zZpz*#%FVI8xSRLZFw!X0E@0fp;0H4e0yA}jQGz$um&D|eRNKZl&w+m~Em&r^UaTf+ z{7z5Vs=A83ZCp2Uiasp0W!Nhmwi<$6YATjy3P!&nSjna$?vXuRO&oN}d2FchN>jCW zL5KUJbx+L;DPd#tWNmuuLbi63#2Do=vyNg_OubmWOY(^Ej-gluw|*0Ri^-T$?01BG z$&$rtr(Vc*B{61_eTrS}D0zru=KvSvj%7K$mZLVou6AW{r&llT83YULb=58NK-)6= zG;Y4slPt%S;=7(*ta6fAX==qyQWNk|?Mi(12x_-!?PhhaVsHt;j!k1fncDqsgL4NXis z1PkCMJOJOZzFwWE)yf*ORXx=5)b7@6l_tdCq%nVkY&lPAI?b(Fg^mX2N4Tk5rl}Mw z2V>6jC0-H-u~EL!UD=uB&I0UBZA0QlcOj+@|b;3bym*4ppOrtw6tcwLsi3=m% z2aW{yOtp__?QmuwmwMWe*2dRsrMrYzdM1aPT=@`pw~Z3i2lsExUENge9pE)VV{99V zA?z~_Xn&Aa$kBd){=j%=1DY@c!sZ4v6=@AJQjrK4@4=h%_}Ilo(ofKzFw-Ybnhcs1 z;z`668j3of^m8s(q5EhP(tLD@%Vaup{v;ISJ#obt1tX5!eygjytE%Iy(hpB$^kIp3 VpPWz>erU;W?RzgEbOZi-{RQ%QvXlS- literal 0 HcmV?d00001 diff --git a/tests/data/nwm30/grid_benchmark.parquet b/tests/data/nwm30/grid_benchmark.parquet index ba7c810bfee2d0b78e4861c8db7aa262584643f5..7cdd17c0c906355cbe667d61c7b6cd28830e7e09 100644 GIT binary patch delta 312 zcmX@FdtP^ftiF+fp^>R5gQ$?Gn2sousDLP&D4UEKg9ewOrGXI;0%awT*b{y11u+CC zPhb|CY{|sy#D6#IjKl*cdvx<8IAAgemKcKu7SYL!j3ydHD~8z1x4Dt=6blw-#jsft uZPwrE4i`~k&NM0CTq9z{1e9GbrT_qAUsovr delta 310 zcmX@FdtP^ftiGv%iJ^%ogQ$?Gn2sousDLP&D4UEKg9ewOrGb$FSXKgwJ<-Qr5JPbC z1ZJ_xmQ4H(3}Aq6ngj<#oPhz(Y7k@4z#=-Ck$(Yc!6Bk$>AbO%)usAn`=ajn1HhD#S{PzaVt*% diff --git a/tests/data/nwm30/one_huc10_alaska_weights.parquet b/tests/data/nwm30/one_huc10_alaska_weights.parquet index 4782d3f1984a6791517dae275d3c6de37d4bfe36..91a0c62fe32b5f1ec563b4e4f0f0a59f7416a425 100755 GIT binary patch literal 7011 zcmchc30M=!wt%}Ef`NbpBoGt@qau!oA#CEpA?zTaAhN_YfdGLd>;f($xD7gr3yO-n zZl_sE{G^7yFgrLyyECP9nitix!-rc_wH-?yQ}I{ojP^u^r0HZ3WIGq znw(`?oE;ke90`XoB#0ah%|Jq%B*tiW(q*~&L@Z9tf4p?DQixyK8MZG;%J$1nV*DQW?*MGW5Vhittebf z$~Ewjt50fa(|y^RLbhhM1#^xC^BiCIJgME^<8(RS2vWI5^z^z6F} z^!aRofxV%9k6}i`IKz#Hn+)f=n7a0K?KRxYzPEiJzPYspuWx@|pMGZjdk!$RG#+SZ z#U8{e#OuVqXD9YqUp-`9c~pU=_R}iXc|JWmVcDW(#?dr&Ahg(~T#e*}bPi>lt8aW+ z+qhQC@;41j=6|v}Q)>(WfEUC3^v5ZQzLjO@j5*hi|}M(po=;!4l3IP0~(2!~HXE^~HgH#!`?Zbenq z44+ToFx%Ba*MrnN=W0~S&|+#O_a_aj#a67_!}RBw`Jzbdaci5k|I?A|*eKRSEY&99!=`aW@-d+m)j3wF&xdb$48jt%X;0@8$vuX1*1vfI}{VU zkqJz%{+Xekgl?^~{yaA~!Yn=H?tJNk(lo|;GmjO2WN#U^Lh2Yu7@2by^@}JFWDrK( z7CiCEuXl4Mbhl?p)^d)R)y|q~l^Z47n2T?CZ0}Rr3Cw{7(Zlm;`PM-;?+NXB%!NC? zbK?-~wEBfRn*BBq%&ohpj|wr^%#1CZY%`KHm`xP=y&!Z^_-p78LUV8>gG-nU*k>xT z*e8D`LaQrX`{r{*+`*M6&^VE8f<3Cu|=LQ)=$dd8?sLkk$IG zBjBBNQQ$e)JIv~Jdr=GE+wuBJx95m$E9WCTZbmt@KFA)cbfxfUj60gg!#!p zdII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Mf=+|fj{Te5sR*b+e5~l`E7N;ffcw>VjP=7?M zMqMC@5e1}i6ANVmkzS@vP$jAOGG$3zz7&m(&B@J*)y8GZGzxXBswgW~6PPVaO(Dh< zC{l}c@ew?g++Ub2*CrzwugKIdlt;t{#YRRICq>5UVk6?FDq=)Mgsp@$KLs&H%ni{g zQvC|jxIODj(q6AyAWrpD6JupskxmvttSQNpq!v$3V zy~&=xBvq}I3VM8(Xw+(1j4<;EX;|die#@yvf(&DBPdoVtyIZ>SW99}`fxVRAGbND)z617~Li1rX*w2`0+ zD2~rbP-P|)^@PXM5siRoP!U2GsvoEyiHcM(x`~Q54noy}=onjLL(Jl%xF@1KR2RzB zA$by`KDlT9nAh_o-#_12k6z`5(ITpUs9uSQI@oh%MWzs?l30kBZ4{*tt Date: Thu, 7 Mar 2024 12:55:52 -0500 Subject: [PATCH 2/7] bumped the version --- README.md | 4 ++-- docs/sphinx/changelog/index.rst | 12 ++++++++++++ pyproject.toml | 2 +- version.txt | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5014e315..9255038f 100644 --- a/README.md +++ b/README.md @@ -42,8 +42,8 @@ $ poetry add git+https://github.com/RTIInternational/teehr.git#[BRANCH TAG] Use Docker ```bash -$ docker build -t teehr:v0.3.9 . -$ docker run -it --rm --volume $HOME:$HOME -p 8888:8888 teehr:v0.3.9 jupyter lab --ip 0.0.0.0 $HOME +$ docker build -t teehr:v0.3.10 . +$ docker run -it --rm --volume $HOME:$HOME -p 8888:8888 teehr:v0.3.10 jupyter lab --ip 0.0.0.0 $HOME ``` ## Examples diff --git a/docs/sphinx/changelog/index.rst b/docs/sphinx/changelog/index.rst index 62a0a39c..8c9a3ae2 100644 --- a/docs/sphinx/changelog/index.rst +++ b/docs/sphinx/changelog/index.rst @@ -1,6 +1,18 @@ Release Notes ============= +0.3.10 - 2024-03-07 +-------------------- + +Added +^^^^^ +* Added `test_zonal_mean_results.py` + +Changed +^^^^^^^ +* Fixed the calculation of the zonal mean of pixel values in `compute_zonal_mean()` so it caculates +the weighted average (divides by the sum of weight values). +* Updated grid loading tests and data to reflect the fixed method. 0.3.9 - 2024-02-15 -------------------- diff --git a/pyproject.toml b/pyproject.toml index 16dca84e..8225c4ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "teehr" -version = "0.3.9" +version = "0.3.10" description = "Tools for Exploratory Evaluation in Hydrologic Research" authors = [ "RTI International", diff --git a/version.txt b/version.txt index 940ac09a..5503126d 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.3.9 +0.3.10 From fbd1c9d1a30ea8b372d272bd5cee0f15e554b62d Mon Sep 17 00:00:00 2001 From: Sam Lamont Date: Thu, 7 Mar 2024 13:52:30 -0500 Subject: [PATCH 3/7] changelog entry format --- docs/sphinx/changelog/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/changelog/index.rst b/docs/sphinx/changelog/index.rst index 8c9a3ae2..0050bbfc 100644 --- a/docs/sphinx/changelog/index.rst +++ b/docs/sphinx/changelog/index.rst @@ -11,7 +11,7 @@ Added Changed ^^^^^^^ * Fixed the calculation of the zonal mean of pixel values in `compute_zonal_mean()` so it caculates -the weighted average (divides by the sum of weight values). + the weighted average (divides by the sum of weight values). * Updated grid loading tests and data to reflect the fixed method. 0.3.9 - 2024-02-15 From beea2ab1c29403716573f1daae9356a1bf496ed1 Mon Sep 17 00:00:00 2001 From: Matt Denno Date: Mon, 11 Mar 2024 15:29:12 -0400 Subject: [PATCH 4/7] add bnstrip out to venv --- poetry.lock | 26 +++++++++++++++++++++++++- pyproject.toml | 1 + 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index b5059165..8a3aa706 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2476,6 +2476,20 @@ nbformat = "*" sphinx = ">=1.8" traitlets = ">=5" +[[package]] +name = "nbstripout" +version = "0.7.1" +description = "Strips outputs from Jupyter and IPython notebooks" +optional = false +python-versions = ">=3.8" +files = [ + {file = "nbstripout-0.7.1-py2.py3-none-any.whl", hash = "sha256:dfb0688b42b02ff13925e583313fc009c87342ad13b79ae0329357749aa6ed0c"}, + {file = "nbstripout-0.7.1.tar.gz", hash = "sha256:2aad3454dc13e356f2fc94917856bc44f2bed3add77e8ba9f3a78003074bcd84"}, +] + +[package.dependencies] +nbformat = "*" + [[package]] name = "nest-asyncio" version = "1.6.0" @@ -3434,6 +3448,7 @@ files = [ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, @@ -3441,8 +3456,15 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, + {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, + {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, + {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, @@ -3459,6 +3481,7 @@ files = [ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, @@ -3466,6 +3489,7 @@ files = [ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, @@ -5129,4 +5153,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "d3f239fdda375313104125017910690ca6c4b97aa8ca7d8c6e83e4421c137164" +content-hash = "000a755d7e6ae8c1681d4faa644dc2a843648cc9652fca04f16f493c64224b6f" diff --git a/pyproject.toml b/pyproject.toml index 8225c4ef..2d54e626 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,6 +52,7 @@ flake8-docstrings = "^1.7.0" nbsphinx = "^0.9.3" pandoc = "^2.3" myst-nb = "^1.0.0" +nbstripout = "^0.7.1" [tool.numpydoc_validation] checks = [ From 2a4112d172fe25934d7d65757b0de937fdbda2a7 Mon Sep 17 00:00:00 2001 From: Matt Denno Date: Tue, 12 Mar 2024 08:58:32 -0400 Subject: [PATCH 5/7] update teehrhub version --- teehr-hub/helm-chart/config.yaml | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/teehr-hub/helm-chart/config.yaml b/teehr-hub/helm-chart/config.yaml index 401a840b..474641c6 100644 --- a/teehr-hub/helm-chart/config.yaml +++ b/teehr-hub/helm-chart/config.yaml @@ -26,7 +26,7 @@ jupyterhub: singleuser: image: name: 935462133478.dkr.ecr.us-east-2.amazonaws.com/teehr # Image to use for singleuser environment. Must include dask-gateway. - tag: v0.2.6 + tag: v0.3.10 defaultUrl: "/lab" # Use jupyterlab by defualt. profileList: - display_name: "TEEHR Evaluation System (4 vCPU/32GB memory)" @@ -48,23 +48,6 @@ jupyterhub: mem_limit: null node_selector: node.kubernetes.io/instance-type: r5.4xlarge - - display_name: "TEEHR Evaluation System (4 vCPU/32GB memory) v0.3.6" - default: True - description: "A r5.xlarge EC2 instance $0.252/hour" - kubespawner_override: - image: 935462133478.dkr.ecr.us-east-2.amazonaws.com/teehr:v0.3.6 - cpu_limit: null - mem_limit: null - node_selector: - node.kubernetes.io/instance-type: r5.xlarge - - display_name: "TEEHR Evaluation System (16 vCPU/128GB memory) v0.3.6" - description: "A r5.4xlarge EC2 instance @ $1.008/hour" - kubespawner_override: - image: 935462133478.dkr.ecr.us-east-2.amazonaws.com/teehr:v0.3.6 - cpu_limit: null - mem_limit: null - node_selector: - node.kubernetes.io/instance-type: r5.4xlarge storage: extraVolumes: - name: teehr-hub-data-nfs @@ -96,7 +79,7 @@ dask-gateway: backend: image: name: 935462133478.dkr.ecr.us-east-2.amazonaws.com/teehr # Image to use for singleuser environment. Must include dask-gateway. - tag: v0.3.6 + tag: v0.3.10 scheduler: extraPodConfig: # serviceAccountName: user-sa From 1717a0ee17d97af305d88a43229c44d15a3013bf Mon Sep 17 00:00:00 2001 From: Sam Lamont Date: Tue, 12 Mar 2024 09:59:05 -0400 Subject: [PATCH 6/7] adding documentation to test_zonal_mean() --- tests/test_zonal_mean_results.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/tests/test_zonal_mean_results.py b/tests/test_zonal_mean_results.py index 466e98b7..3f9a4bf0 100644 --- a/tests/test_zonal_mean_results.py +++ b/tests/test_zonal_mean_results.py @@ -16,7 +16,26 @@ def test_zonal_mean(): - """Test zonal mean results.""" + """Test zonal mean results. + + Notes + ----- + + The truth data set ``test_zonal_mean_results.parquet`` was validated + against ``exactextract`` results and checked for a single catchment + (cat-77566) by calculating the weighted average manually + (sum of weights * values divided by the sum of the weights). + + The command used to run ``exactextract``: + + exactextract -r temp:NETCDF:test_template_grid_nwm.nc:RAINRATE + -p test_ngen_divides_nwm.shp -o ee_results.csv -s "mean" + --include-col "id" + + Since ``exactextract`` cannot read parquet files the + test_ngen_divides.parquet file was converted to a shapefile and + reprojected to the crs specified in NWM_CONUS_WKT. + """ grid_ds = xr.open_dataset(TEMPLATE_FILEPATH) df = compute_zonal_mean( From 714256ca2baa5afc205e73a94a88c15a6cb15351 Mon Sep 17 00:00:00 2001 From: Sam Lamont Date: Tue, 12 Mar 2024 10:13:02 -0400 Subject: [PATCH 7/7] Removed column re-assignment in compute_zonal_mean() --- src/teehr/loading/nwm/grid_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/teehr/loading/nwm/grid_utils.py b/src/teehr/loading/nwm/grid_utils.py index 1464adcb..9ed350fd 100644 --- a/src/teehr/loading/nwm/grid_utils.py +++ b/src/teehr/loading/nwm/grid_utils.py @@ -28,12 +28,12 @@ def compute_zonal_mean( cols = weights_df.col.values # Get the values and apply weights var_values = arr_2d[rows, cols] - weights_df["value"] = var_values * weights_df.weight.values + weights_df["weighted_value"] = var_values * weights_df.weight.values # Compute weighted average df = weights_df.groupby( - by="location_id", as_index=False)[["value", "weight"]].sum() - df["value"] = df.value/df.weight + by="location_id", as_index=False)[["weighted_value", "weight"]].sum() + df["value"] = df.weighted_value/df.weight return df[["location_id", "value"]]