From c290dfc68abc97465db580f29a07f71f31379e42 Mon Sep 17 00:00:00 2001 From: "Brian O. Blanton" Date: Tue, 5 Dec 2023 21:03:00 -0500 Subject: [PATCH 1/7] Update connect2fw.rst --- doc/source/connect2fw.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/connect2fw.rst b/doc/source/connect2fw.rst index 0597e4d..720cf63 100644 --- a/doc/source/connect2fw.rst +++ b/doc/source/connect2fw.rst @@ -21,7 +21,7 @@ To turn off the DA, set both enabled and run_non_da_forecast to false. **data_assimilation.yaml** File =================================== -The configuration_file **data_assimilation.yaml** needs to contain the following, adjusted to the local environment (**PATHTO**): +The configuration_file **data_assimilation.yaml** contains the following, with **addahome** and **mapfile** adjusted to the local environment (**PATHTO**): .. code-block:: yaml From 11b1e02ecf6d652658f2d35c217e750116cb61c1 Mon Sep 17 00:00:00 2001 From: "Brian O. Blanton" Date: Tue, 5 Dec 2023 21:06:25 -0500 Subject: [PATCH 2/7] Update README.md --- README.md | 97 +------------------------------------------------------ 1 file changed, 1 insertion(+), 96 deletions(-) diff --git a/README.md b/README.md index 7033521..2e516c4 100644 --- a/README.md +++ b/README.md @@ -9,103 +9,8 @@ ADDA generates smooth surfaces of an error field, computed between NOAA / NOS ob Currently, ADDA requires a specific python environment, but will eventually be embedded in the "thirdparty" section of the Floodwater package as a submodule. -### Installation / Virtual Env: +ADDA documented is here: https://renci.github.io/adda_for_floodwater -- Clone this repo. This locations is referred to as **PATHTO** below. -- Make a python virtual environment (venv) with the requirements.txt file, called **adda**. The actual name of the venv does not matter, as long as the name is speficied correctly in the **data_assimilation.yaml** file (see below). - - conda create --name adda --file requirements.txt -- Several required packages are not available through conda. These need to be pip-installed: - - conda activate adda - - pip install -r pip.reqs.txt -- Add ADDA paths to the virtual environment. Either: - - Make a conda.pth in "envs/adda/lib/python3.8/site-packages/" that contains: - - **PATHTO**/adda_for_floodwater - - **PATHTO**/adda_for_floodwater/adda - - Note that the path to the venv's site-packages location may different than that above. Modify as needed. -- or (probably better): - - Add the PYTHONPATH variable to the conda env. Activate the **adda** environment, add path: -
conda activate adda
-conda env config vars set PYTHONPATH=PATHTO/adda_for_floodwater:PATHTO/adda_for_floodwater/adda
- - -### Connecting to Floodwater - -Floodwater has been instrumented with hooks to include a dynamic water level correction (DWLC) surface based on error analysis over previous analysis cycles. To turn this capability on, include the following in the suite config yaml file: - -
-...
-...
-models:
-
-    #...ADCIRC module configuration
-    adcirc:
-    ...
-    ...
-      #...Set the data assimilation options
-      data_assimilation:
-        enabled: true
-        configuration_file: PATHTO/ecflow_configs/da/data_assimilation.yaml
-        run_non_da_forecast: true
-...
-...
-
- -### The **data_assimilation.yaml** File - -The configuration_file **data_assimilation.yaml** needs to contain the following, suitably adjusted to the local environment (path_to): -
-LOGGING: true
-LOGLEVEL: DEBUG
-rundir: "./adda"
-max_lookback_days: 2
-venv: adda
-dwlc_filename: "da_error_surface.dat.1"
-addahome: "PATHTO/adda_for_floodwater/"
-mapfile: "PATHTO/adda_for_floodwater/gridmap/grid_to_stationfile_maps.yml"
-
- -### The grid_to_stationfile_maps.yml - -This yaml file contains pointers to files ADDA needs in order to retrieve specific NOAA/NOS station observations and corresponding ADCIRC grid nodes at which to compute the errors, and specify "control" points in open water and on land to constraint the resulting surface evaluation. For each ADCIRC grid, it specifies locations of 3 files: - -- **NOAA_STATIONS** - csv file containing NOAA / NOS ids and ADCIRC grid nodes. The file can have lots of info in it, but must have stationid and Node as columns in the first line, and "units" second line. Other columns are ignored. E.g., -
-serial_nr,stationid,stationname,state,vertical_datum,NOAA lon,NOAA lat,navd_to_msl [ft],navd_to_msl [m],Datum Source,lon,lat,bathy,Element,Node
--,-,-,-,-,deg,deg,ft,m,-,deg,deg,m MSL,-,-
-1,8410140,Eastport Passamaquoddy Bay,ME,MSL,-66.982315,44.903300,0.2300,0.0701,NOAA gage,-66.982315,44.903300,36.7010,2034577,1034613
-2,8413320,Bar Harbor,ME,MSL,-68.205000,44.391700,0.2760,0.0841,NOAA gage,-68.203000,44.393000,4.5782,2287004,1162475 
-...
-
-- **LANDCONTROL** - csv file containing "land" lon/lat locations and surface values to force the surface toward: -
lon,lat,val
--60,50,0.
--80,55,0.
--100,50,0.
--110,30,0.
-
-- **WATERCONTROL** - csv file containing open-water lon/lat locations and surface values, same format as the LANDCONTROL file - -The ADDA repo and **grid_to_stationfile_maps.yml** contain files for the HSOFS and ec95d grids. Users can add grids as needed, following the above formatting and information. This is the "default" file content; **PATHTO** will need to be set by the user. -
-GRIDMAP: &gridmap
- HSOFS:
-    NOAA_STATIONS: "PATHTO/adda_for_floodwater/gridmap/HSOFS_stations_V2.csv"
-    LANDCONTROL: "PATHTO/adda_for_floodwater/gridmap/hsofs_land_control_list.dat"
-    WATERCONTROL: "PATHTO/adda_for_floodwater/gridmap/hsofs_water_control_list.dat"
- EC95D:
-    NOAA_STATIONS: "PATHTO/adda_for_floodwater/gridmap/ec95d_stations.V1.csv"
-    LANDCONTROL: "PATHTO/adda_for_floodwater/gridmap/ec95d_land_control_list.dat"
-    WATERCONTROL: "PATHTO/adda_for_floodwater/gridmap/ec95d_water_control_list.dat"
-
-Gridnames in the grid_to_stationfile_maps.yml file must be in **ALL_CAPS**, and must match (modulo the case) the grid name as defined in the grid's config json file, as in (e.g., PATHTO/ecflow_configs/ec95d/config.json) -
-{
-   "name": "ec95d",
-   "dt": 10,
-   ...
-   ...
-
- #### TODO: - Mv gridmap files to main config dir - Send logging data to the main floodwater logging stream From acd6f8255709aced8984047bb728f23e85df8d80 Mon Sep 17 00:00:00 2001 From: BrianOBlanton Date: Tue, 5 Dec 2023 21:21:39 -0500 Subject: [PATCH 3/7] fixed typo in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e516c4..246a199 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ADDA generates smooth surfaces of an error field, computed between NOAA / NOS ob Currently, ADDA requires a specific python environment, but will eventually be embedded in the "thirdparty" section of the Floodwater package as a submodule. -ADDA documented is here: https://renci.github.io/adda_for_floodwater +ADDA documentation is here: https://renci.github.io/adda_for_floodwater #### TODO: - Mv gridmap files to main config dir From 8cb1b036753285ad7c4eefe56f7bc15398069f76 Mon Sep 17 00:00:00 2001 From: BrianOBlanton Date: Tue, 5 Dec 2023 21:34:51 -0500 Subject: [PATCH 4/7] tweaked doc config --- doc/source/conf.py | 8 +++----- doc/source/index.rst | 3 ++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 091dc8e..aa7b1c8 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -9,7 +9,7 @@ project = 'ADCIRC Data Assimilator' copyright = '2023, RENCI' author = 'Brian Blanton' -release = '0.0.1' +release = '0.2' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration @@ -20,20 +20,18 @@ 'sphinx.ext.todo', 'sphinx.ext.imgmath', 'sphinx.ext.mathjax', -# 'sphinx_rtd_theme', + 'sphinx_rtd_theme', ] templates_path = ['_templates'] exclude_patterns = [] - - # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output html_theme = 'sphinx_rtd_theme' #html_theme = 'classic' -html_static_path = ['_static'] +#html_static_path = ['_static'] # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True diff --git a/doc/source/index.rst b/doc/source/index.rst index 58f0bcd..114bd1e 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1,7 +1,8 @@ .. image:: ../img/logo.png + | -| + =================================================================================================================================== The ADCIRC Data Assimilator (ADDA) in the ECFLOW/`Floodwater `_ environment =================================================================================================================================== From ca4ba8c5c8adb1e27b44202dfd8ab01d0ad6685e Mon Sep 17 00:00:00 2001 From: "Brian O. Blanton" Date: Wed, 6 Dec 2023 09:46:10 -0500 Subject: [PATCH 5/7] Update index.rst testing build action --- doc/source/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/source/index.rst b/doc/source/index.rst index 114bd1e..2ce0d0d 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -9,6 +9,8 @@ The ADCIRC Data Assimilator (ADDA) in the ECFLOW/`Floodwater `_ . +Go back to the `repo `_ + .. toctree:: :maxdepth: 2 :caption: Contents: From 087d3e3faabb060cbeeebe6fbb4db4d0aa41ba3a Mon Sep 17 00:00:00 2001 From: "Brian O. Blanton" Date: Wed, 6 Dec 2023 10:59:18 -0500 Subject: [PATCH 6/7] Update conf.py --- doc/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index aa7b1c8..6be8d3b 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -24,14 +24,14 @@ ] templates_path = ['_templates'] -exclude_patterns = [] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output html_theme = 'sphinx_rtd_theme' #html_theme = 'classic' -#html_static_path = ['_static'] +html_static_path = ['_static'] # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True From 00ec68190b81c8e686c067bfa8e68a0f188cc5a5 Mon Sep 17 00:00:00 2001 From: "Brian O. Blanton" Date: Wed, 6 Dec 2023 11:00:42 -0500 Subject: [PATCH 7/7] Created Makefile --- doc/source/Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 doc/source/Makefile diff --git a/doc/source/Makefile b/doc/source/Makefile new file mode 100644 index 0000000..d4bb2cb --- /dev/null +++ b/doc/source/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)