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

Owi integration #531

Open
wants to merge 108 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
f452624
Added storm type specification
cjeffr Nov 23, 2021
776c79f
Added read_netcdf capability, puts arrays into storm object
cjeffr Nov 27, 2021
d170b67
Added subroutines to interpolate data in time and function to get cur…
cjeffr Nov 28, 2021
4c2eb7c
Added bilinear interpolation for wind velocities and pressure, added …
cjeffr Nov 29, 2021
9a307cf
Finished generalizing interpolation and error cleanup
cjeffr Nov 29, 2021
a574aa1
Fixed data type mismatch in set_owi_fields, added set_owi_fields to s…
cjeffr Nov 29, 2021
e0e2177
Added OWI to storm_spec_dict_mapping in data.py
cjeffr Nov 29, 2021
df7756d
Fixed surge.data read to include negative integers
cjeffr Nov 29, 2021
47ea8c5
Fixed missing comma
cjeffr Nov 29, 2021
8ad3e61
Changed storm_location to only search for location on HWRF data deriv…
cjeffr Nov 29, 2021
9b34e42
fixed typo
cjeffr Nov 29, 2021
4e5606a
Fixed how data_storm_module is called so that its in the correct order
cjeffr Dec 3, 2021
af7865c
Added type -2 to spec dict
cjeffr Dec 3, 2021
d0b268e
got owi wind field working and ready for a test case
cjeffr Dec 10, 2021
c58c466
Fixed a typo in the linear interpolation for time
cjeffr Dec 13, 2021
b892fad
Removed reading speed from netcdf file, geoclaw can calculate itself
cjeffr Dec 13, 2021
e6732d6
Modified makefile to automatically turn on openmp and use netcdf
cjeffr Dec 13, 2021
e1beb66
Added logic for ghost cells to use the boundary values when x and y a…
cjeffr Dec 20, 2021
f18af86
Added RAMP Function to smooth out edges of storm
cjeffr Dec 27, 2021
229a5fa
Added .nc files to gitignore
cjeffr Dec 30, 2021
66c7d80
Added RAMP function and ability to read eye location from storm file,…
cjeffr Dec 30, 2021
017f5dc
Changed data.py to use OWI rather than oceanweather in the storm data…
cjeffr Dec 30, 2021
1e56f5d
Fixed an in out to inout
cjeffr Jan 5, 2022
0906711
Fixed eye_loc (sloc) interpolation
cjeffr Jan 10, 2022
54e2f06
Updated setrun and setplot for running synthetic storm
cjeffr Jan 10, 2022
c7abb4e
Removed synthetic tests
cjeffr Jan 10, 2022
55ef9b4
Removed a modified file from PR
cjeffr Jan 11, 2022
b26816f
Removed whitespace modified files from PR
cjeffr Jan 11, 2022
0193e91
Delete modules.xml
mandli Feb 7, 2022
d11019e
Delete geoclaw.iml
mandli Feb 7, 2022
5cacb96
Delete profiles_settings.xml
mandli Feb 7, 2022
749a37d
Uploaded a data style storm example
cjeffr Feb 22, 2022
10b54cf
Merge branch 'OWI_integration' of github.com:cjeffr/geoclaw into OWI_…
cjeffr Feb 22, 2022
ffc551c
Merge branch 'clawpack:master' into OWI_integration
cjeffr Nov 9, 2023
3958de6
Updated data_storm_module and storm_module to read storm size from ne…
cjeffr Nov 9, 2023
2169ec9
Added data derived storm characterization to storm.py and helper func…
cjeffr Jan 1, 2024
8ac6997
Working on fixing ramp function for smoothing edges
cjeffr Jan 3, 2024
7e37b7a
Fixing minor bugs in data_storms and storm.py changes
cjeffr Jan 3, 2024
0e0e8bd
Commented out post_process_data to verify storm reconstruction
cjeffr Jan 5, 2024
e1d1285
Updated pressure target_value
cjeffr Jan 5, 2024
f807108
Commented out manually calculated values not included in original data
cjeffr Jan 5, 2024
4bd41df
Removed unnecessary routines for calculating storm radius and distanc…
cjeffr Jan 5, 2024
649c90f
Cleaned up unused code and variables, added comments and docstrings t…
cjeffr Jan 5, 2024
b0e7ed7
Cleaned up unused code and variables, added comments and docstrings t…
cjeffr Jan 5, 2024
0b179b3
Updated storm.py to update Dataclass names to pep8 format
cjeffr Jan 5, 2024
cc9f3f8
Added script to handle the storm data parsing
cjeffr Jan 5, 2024
2ff5ea8
Makefile for M1 mac with netcdf FFLAGS installed via homebrew
cjeffr Jan 5, 2024
4f62673
removed .ipynb for testing the storm object
cjeffr Jan 5, 2024
3cc3269
Added setrun to example folder
cjeffr Jan 8, 2024
87043ce
Added write to OWI format example to data_storms.py
cjeffr Jan 8, 2024
a4cf521
clip netcdf including ghost cells
bolliger32 Aug 13, 2022
ff8b140
handle large topo arrays
bolliger32 Aug 15, 2022
9552a08
undo autoformatting in topo_update
Nov 9, 2023
1411aeb
try removing format changes again
Nov 9, 2023
9af8a17
examples testing checkpt 4 option, and implemented in tick
mjberger Nov 8, 2023
b24f72d
implemented STOP feature if file STOP.txt found in working directory
mjberger Nov 10, 2023
4a70325
remove topo_module variables from calling sequence of cellgridintegrate
rjleveque Nov 14, 2023
4ffb2a1
remove xcell,ycell from cellgridintegrate
rjleveque Nov 14, 2023
fb30a51
change line endings from Windows CRLF to Unix LF in setaux.f90
rjleveque Nov 14, 2023
6cbd03e
Compute new_ntogo rather than incrementing by 1
rjleveque Nov 15, 2023
4218ca4
Changes to tick.f with minor fix and debug plot statements
rjleveque Nov 15, 2023
42d8375
Change tick.f to also output frames when it dies with too many dt red…
rjleveque Nov 15, 2023
7c11da4
we no longer do a checkpoint for ntogo error since not at end of coar…
rjleveque Nov 15, 2023
d98f7e7
change filename STOP.txt to STOP for stopping calculation
rjleveque Nov 15, 2023
cadaf20
Add nonuniform_grid_tools to meson.build
carlosmunozmoncayo Nov 29, 2023
a2e4fe5
fix problems in util.bearing
rjleveque Dec 7, 2023
eb133f1
add util.gctransect function to compute transect points on a great ci…
rjleveque Dec 7, 2023
a2f0fd1
fix docstring
rjleveque Dec 7, 2023
235d745
improve gctransect doc string and remove debugging
rjleveque Dec 26, 2023
98b3b6a
Fix ij index into dtopowork in set_eta_init
rjleveque Dec 26, 2023
f5461bb
added netdf flags to makefile to prevent netcdf errors
cjeffr Jan 8, 2024
a86cc0c
Reverted data_storms.py to a previous version
cjeffr Jan 10, 2024
7e47bd3
Fixed a few bugs in storm.py and data_storms.py, added a new example …
cjeffr Jan 10, 2024
ed1bffb
Moved data_derived_storms.ipynb to apps repo
cjeffr Feb 5, 2024
d197de6
Resolved merge conflict between upstream/master and OWI_integration
cjeffr Sep 23, 2024
51d6978
Removed unused storm params: eye_loc, mwr, radius
cjeffr Oct 24, 2024
abfadb3
changed set_storm original to set_netcdf_storm to start integrating f…
cjeffr Oct 24, 2024
300a89c
added fixed width data storm parsing routines
cjeffr Oct 24, 2024
ede6456
added set_storm to choose between which data_routines to access
cjeffr Oct 24, 2024
5bcaa97
fixed some variable names
cjeffr Oct 24, 2024
3e5b5c7
fixed variable names
cjeffr Oct 24, 2024
fb8afa5
bug fixes
cjeffr Oct 25, 2024
4ecf0b0
Added handling of fixed width datafile inputs
cjeffr Oct 25, 2024
c60232a
removed some unnecessary changes
cjeffr Oct 29, 2024
5f85bbf
removed unused variables
cjeffr Oct 29, 2024
ee3ceef
added netcdf conditional checking adn fixed timing issues
cjeffr Nov 11, 2024
e1d2b2c
changed how find_nearest works to get better edge cases
cjeffr Nov 13, 2024
bb02102
find_nearest error fixes
cjeffr Nov 13, 2024
07f705f
updating bilinear interpolation edge case handling
cjeffr Nov 13, 2024
abbaab2
Trying an adaptive weighted bilinear interpolation routine
cjeffr Nov 18, 2024
59032c0
Updated comments, removed extra unused code
cjeffr Nov 19, 2024
b5afb60
Updated storm types to include data_derived ascii vs netcdf
cjeffr Nov 19, 2024
31cfed8
Added ability to read from control file with wind and pressure file n…
cjeffr Nov 20, 2024
7bb5864
added landfall variable to calculate times as seconds from landfall
cjeffr Nov 21, 2024
139a9fb
updated .win and .pre to the newest version of the data and updated p…
cjeffr Nov 21, 2024
a1e57fc
Merge remote-tracking branch 'origin/master' into OWI_integration
cjeffr Nov 25, 2024
0065862
tested both netcdf and ascii input files
cjeffr Nov 25, 2024
e1a05da
made isaac.info generic for other users
cjeffr Nov 25, 2024
46d7343
Added new tests for data_derived storm products and updated data_stor…
cjeffr Dec 3, 2024
d1401eb
Added code to write wind and pressure storm file locations to the sur…
cjeffr Feb 7, 2025
1a060bc
updated setrun to write wind and pressure files to surge.data
cjeffr Feb 7, 2025
c70bca1
fixed syntax error
cjeffr Feb 7, 2025
f928e69
fixed inconsistencies with data files
cjeffr Feb 7, 2025
5682f39
modified storm_module.f90 to read two files nad append to an array fo…
cjeffr Feb 12, 2025
3e17c60
modified data_storm_module to accept array inputs for set_storm
cjeffr Feb 12, 2025
92f0a67
Updated all required files to use surge.data for owi_ascii_data formats
cjeffr Feb 12, 2025
a27045f
modified data.py and storm_module.f90 to read netcdf datafiles after …
cjeffr Feb 12, 2025
32b4732
removed print statements for troubleshooting
cjeffr Feb 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ _plots/
*.xyz
scratch/*
!scratch/README.txt

*.nc
# log files
*.log

Expand Down
23 changes: 16 additions & 7 deletions examples/storm-surge/isaac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,19 @@ SETPLOT_FILE = setplot.py # File containing function to set plots
PLOTDIR = _plots # Directory for plots

# Environment variable FC should be set to fortran compiler, e.g. gfortran
FFLAGS ?=
FFLAGS += -DNETCDF -I/opt/homebrew/include -L/opt/homebrew/lib -lnetcdff -O2 -fopenmp #--g -fbacktrace -fbounds-check#-O0 -W -Wall -fbounds-check -fcheck=all -pedantic-errors -Wunderflow -fbacktrace -ffpe-trap=invalid,zero,overflow -g
LFLAGS += $(FFLAGS)

# ---------------------------------
# package sources for this program:
# ---------------------------------

AMRLIB = $(CLAW)/amrclaw/src/2d
GEOLIB = $(CLAW)/geoclaw/src/2d/shallow
include $(GEOLIB)/Makefile.geoclaw

NEWAMR = ../../new_fortran_amrclaw
NEWGEO = ../../new_fortran_geoclaw
# ---------------------------------------
# package sources specifically to exclude
# (i.e. if a custom replacement source
Expand All @@ -55,14 +59,19 @@ SOURCES = \
#-------------------------------------------------------------------
# Include Makefile containing standard definitions and make options:
include $(CLAWMAKE)


# Construct the topography data
.PHONY: all
.PHONY: input all fgmax_plots

all:
$(MAKE) .plots
$(MAKE) .htmls
input:
python make_input_files.py

fgmax_plots:
python process_fgmax.py

all:
$(MAKE) .exe
$(MAKE) input
$(MAKE) output
$(MAKE) plots
$(MAKE) fgmax_plots
### DO NOT remove this line - make depends on it ###
77 changes: 77 additions & 0 deletions examples/storm-surge/isaac_ascii_data/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@

# Makefile for Clawpack code in this directory.
# This version only sets the local files and frequently changed
# options, and then includes the standard makefile pointed to by CLAWMAKE.
CLAWMAKE = $(CLAW)/clawutil/src/Makefile.common

# See the above file for details and a list of make options, or type
# make .help
# at the unix prompt.


# Adjust these variables if desired:
# ----------------------------------

CLAW_PKG = geoclaw # Clawpack package to use
EXE = xgeoclaw # Executable to create
SETRUN_FILE = setrun.py # File containing function to make data
OUTDIR = _output # Directory for output
SETPLOT_FILE = setplot.py # File containing function to set plots
PLOTDIR = _plots # Directory for plots

# Environment variable FC should be set to fortran compiler, e.g. gfortran
FFLAGS += #-DNETCDF -I/opt/homebrew/include -L/opt/homebrew/lib -lnetcdff -O2 -fopenmp #--g -fbacktrace -fbounds-check#-O0 -W -Wall -fbounds-check -fcheck=all -pedantic-errors -Wunderflow -fbacktrace -ffpe-trap=invalid,zero,overflow -g
LFLAGS += $(FFLAGS)

# ---------------------------------
# package sources for this program:
# ---------------------------------

AMRLIB = $(CLAW)/amrclaw/src/2d
GEOLIB = $(CLAW)/geoclaw/src/2d/shallow
include $(GEOLIB)/Makefile.geoclaw

NEWAMR = ../../new_fortran_amrclaw
NEWGEO = ../../new_fortran_geoclaw
# ---------------------------------------
# package sources specifically to exclude
# (i.e. if a custom replacement source
# under a different name is provided)
# ---------------------------------------

EXCLUDE_MODULES = \

EXCLUDE_SOURCES = \

# ----------------------------------------
# List of custom sources for this program:
# ----------------------------------------

RIEMANN = $(CLAW)/riemann/src

MODULES = \

SOURCES = \
$(RIEMANN)/rpn2_geoclaw.f \
$(RIEMANN)/rpt2_geoclaw.f \
$(RIEMANN)/geoclaw_riemann_utils.f \

#-------------------------------------------------------------------
# Include Makefile containing standard definitions and make options:
include $(CLAWMAKE)
# Construct the topography data
.PHONY: input all fgmax_plots

input:
python make_input_files.py

fgmax_plots:
python process_fgmax.py

all:
$(MAKE) .exe
$(MAKE) input
$(MAKE) output
$(MAKE) plots
$(MAKE) fgmax_plots
### DO NOT remove this line - make depends on it ###
58,507 changes: 58,507 additions & 0 deletions examples/storm-surge/isaac_ascii_data/isaac.PRE

Large diffs are not rendered by default.

116,971 changes: 116,971 additions & 0 deletions examples/storm-surge/isaac_ascii_data/isaac.WIN

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions examples/storm-surge/isaac_ascii_data/isaac.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Control file for OWI ascii wind and pressure data files ##
## Edit Files to include all wind and pressure data per storm ##
## Ensure data remains in the below format ##
## Must include absolute path to the wind and pressure files ##

201208290000 =: landfall_date # Date of landfall for the storm
"clawpack/geoclaw/examples/storm-surge/isaac_ascii_data/isaac.WIN" =: wind_field # path to wind forcing file
'clawpack/geoclaw/examples/storm-surge/isaac_ascii_data/isaac.PRE' =: pressure_field # path to pressure forcing file
0 =: regional_forcing # 0 for only basin forcing, 1 for regional
19 changes: 19 additions & 0 deletions examples/storm-surge/isaac_ascii_data/parse_storm_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from clawpack.geoclaw.surge import storm
import os

"""
This script will convert a wind and pressure field pair of files into a netcdf
for use in geoclaw's data derived storm objects

The ability to run both netcdf files and the original .win and .pre files is now implemented as well
In the setrun.py set the storm_specification_type as -2 for netcdf or -3 for ascii data derived inputs
"""

storm_path = os.environ['CLAW']
storm_file = os.path.join(storm_path, 'isaac_data')
# Instantiate the class
storm = storm.DataDerivedStorms(storm_file, wind_file_ext='WIN', pressure_file_ext='PRE')
storm.parse_data(landfall_time='2012-08-29T00:00:00')

output_name = os.path.join(storm_path,'isaac_data_derived')
storm.write_data_derived(output_name)
Loading