GithubHelp home page GithubHelp logo

thesser1 / cmtb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sbfrf/cmtb

0.0 0.0 0.0 33.23 MB

coastal model test bed

Home Page: http://frf.usace.army.mil/CMTB/Welcome.html

License: MIT License

Python 100.00%

cmtb's Introduction

README

This is the official repository for the FRF's Coastal Model Test Bed in which numerical models are run in (near) real-time for testing and evaluation of the models. The test bed is established at the USACE CHL Field REsearch Facility in Duck, North Carolina. Any contributions are welcome!

What is this repository for?

  • This repository is to help facilitate the incorporation of new models

  • There are various scripts that will

    • Run models in a operational environment
    • prep FRF specific data into model expected conventions
    • read/write data from/to model specific output/input files
    • log model data to netCDF files and create plots for model comparisons
  • Models Running:

    • STWAVE
    • CSHORE
    • CMS wave
    • CMS Flow development
  • analysis scripts available:

    • basic statistics to plot on daily runs
    • developing standard analysis routines for long term analysis (hand url)
    • sea and swell separation could be improved

How do I get set up?

  • Read the API
  • Reach out about including a new model (create an issue)

Python Packages Required

  • submodule dependencies (community Developed)

    • testbedutils - utility package, including wave and geoprocessing
    • prepdata - this holds model io packages and data preparation routines
    • getdatatestbed - operates - built with numpy 1.13 (at least)
  • python packages required

    • netCDF4
    • pyproj
    • utm These can be installed by
    • pip install
    • conda install
  • there's likely more, please add (or let me know) as you find!! :-[]

What is the structure?

  • start with Runwork flow _ stwave or CMS
    • NOTES:
      • STWAVE is the original and is completely functional
      • CMS is a little more elegant on the post processing side (but currently not functional)
      • This framework built with a preprocessing script and a post processing script
    • Pre-Processing
      1. get data (initalized with date time instances)
      2. get data . [wind, waves, water level, bathy]
        • each get data is returned in a dictionary with specific keys
      3. each get data dictionary is preped for model input
        • vector, scalar averaged for winds and water level to time match that of waves
        • wave data are rotated shore normal and flipped coordinate (LH -> RH)
      4. data are input to an instance of prepdata.inputoutput [cms/stwave]
        • each one of writes out the appropriate model input files (specific to each model)
    • Model Is run
    • Post-processing
      • output files are parsed into data dictionaries (similar to get data)
      • model data are massaged
        • any data that was done in i.c. is undone here (wave angles rotated to True north)
      • plots are made from rotated files, statistics are calculated and put in the plots
      • data are logged to netCDF and transfered to local/remote CHL Thredds location

Assumptions

There are general assumptions that are made to make the system work, they are listed below:

  • A sub folder in the project root directory ['cmtb'] is created with the name and has the following structure
    • data/[wave, circultation, morphology]/[model name]/[date of simulation]/[files for simulstions & figures directory]
    • The above is standard, but can be modified with newly developed input file
  • python packages are installed:
    • netCDF4 - conda install
    • pyproj - pip install
    • utm - conda install (maybe pip)
  • netCDF ouput are delievered to the thredds_data folder parallel to the CMTB folder in the users home directory the structure is similar to that of the data folder in the CMTB folder

Contribution guidelines

The code is written and run in 2.7, but code should be written with python3 conventions to facilitate the migration from 2->3 in the next few years. Contributions are reviewed by administrators for the project. Forking and pull requests are the preferred method for project contributions. Please document your code with established doc-string conventions and in the sphinx environment as it is setup moving forward.

Issues that identified and need resolution as improvement proceeds:

  • general Model Tests:

    • examples: test wind generation by blowing wind over flat sloped bathymetry... etc
  • make gauge observation locations selections more generalized

    • currently gauge locations are queried from the ncml, which isn't entirely correct as gauges have moved through the history though have stayed constant since 2015.
    • suggested fix: create look up table from gague locations pulled directly from each netCDF file. then based on dates of sim, use lookup table to determine what gauges to use
    • This could be more robustly quereied given a date range for the sim setup, a thredds crawler could be used to look for all dates/times
  • a more universal wrapper script could be used for all models or setups

  • a working example setup could be created to demonstrate the work flow

  • visualization and anaylsis could be more universalized

  • Code contributions review and incorporation could be better established --- currently me!

cmtb's People

Contributors

chuanli2 avatar sbfrf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.