Giter Site home page Giter Site logo

midoss / midoss-mohid-config Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 0.0 17.27 MB

**Archived** Collection of MOHID run data (.dat) files and run description YAML files for the various oil spill scenarios.

Home Page: https://mohid-cmd.readthedocs.io/en/latest/run_description_file/index.html

Shell 100.00%
oceanography ocean-modelling ubc-moad salishsea oil-spills

midoss-mohid-config's Introduction

MIDOSS-MOHID-config

This repository has been archived because the model runs phase of the MIDOSS project has been completed. Please contact @SusanEAllen or @DougLatornell if you see a need for this repository to be re-activated.

This is a collection of MOHID run data (.dat) files and run description YAML files for the various oil spill scenarios.

midoss-mohid-config's People

Contributors

circularpenguin avatar douglatornell avatar susaneallen avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

midoss-mohid-config's Issues

monte carlo: define_oil_type

General Monte Carlo overview plan is here

Function: define_oil_type

  1. for tank traffic
    Input: vessel_type, origin/destination
    Use DOE data for U.S. origin/destinations OR choose simplified approach
    Output: Oil type
  2. for non-tank traffic
    Input: vessel type

Modified Weber Number application

The modified weber number approach that was developed in Johansen et al. (2015) and used in our study was validated by flume experiments with 3 oil types that had viscosities ranging from 56 - 5940 [m Pa s] and oil-water interfacial tensions of 10 - 25 [(m N) / m].

The viscosities of the four oil types that we are using are 2 - 45030 [m Pa s] (specifically: 2, 16, 150, 45030) and the OW interfacial tensions are 16.3 - 40 [(m N) / m] (specifically: 28, 19.9, 16.3, and 40) for Diesel, AKNS, Dilbit and Bunker-C, respectively.

The application of this method to oils with the properties that we are using in this study has not yet been validated or tested. There is no reason to think that this method isn’t applicable to our study but I flag the information here to bookmark this as an area for future refinement.

monte carlo: get_date

Function for random selection of date. First draft here.

Refinements (in progress):

  • Weight selection by net monthly vessel traffic exposure as calculated from geotiffs. This refinement follows our assumption that accidents are a function of VTE and not vessel type. This assumption is consistent with assumptions made in studies based on focus vessel traffic. We need to consider if it’s appropriate to apply it to non-focus vessel traffic or whether we need to separate the traffic. The reason we may choose to separate is if focus vessel traffic is fairy uniform across seasons. If so then we may be under-weighting higher-wind conditions by biasing with summer, non-focus-vessel traffic.
  • The notebook uses a delta_time of 30-minutes, but I’m now seeing that my reasoning for this choice was wonky. Change back to 1-hr interval.

Cold Lake Blend parameters need finalizing

We still need all Cold Lake Blend parameters to be checked and finalized with the citations included.

What we have:

  1. API, Pourpoint, tempviscref, and viscref and owinterfacialtension from EC Cold Lake Blend
  2. Evaporation parameters for Cold Lake Bitumen (NOT blend) from Fingas (2015)

What we need:

See spreadsheet for more information on general parameters

monte carlo: get_length

General Monte Carlo overview plan is here

Function: get_length
Input: month, vessel_type, lat, lon
Select: Use vessel type and month to select shapefile (made by Cam) from set of ~108 shapefiles (12 months x 9 vessel types). Use lat/lon with circle or bounding box to select a set of vessel traffic line segments. Each shapefile will include the following attributes:

  • MMSI (vessel ID)
  • Vessel type (atb, barge, tanker, cargo, cruise, ferry, small passenger, fishing, other)
  • Timestamp
  • Vessel length

For the barge shapefiles: Add oil cargo vs. non-oil cargo
R4: Randomly select ship track from those within a bounding box, weighted by vessel time exposure. Use information from shapefile to define characteristics of that ship track.
Decide whether spill type is fuel or cargo if vessel type is atb, tanker, or oil barge. Use this decision on spill type to select from either tank or non-tank oil capacity and oil type.
Output: vessel length (m), origin/destination for tank traffic only oil type

monte carlo: get_subsampled_lat_lon

General Monte Carlo overview plan is here

Function: get_subsampled_lat_lon
Input: lat, lon, 1x1 km bounding box (based on edges of raster cell), NEMO mask
Purpose: The purpose of this script is to subsample the 1x1 km grid spacing of the raster image and to ensure that spill location is at a “water point”. The output lat/lon from this script will be used in Lagrangian.dat but doesn’t need to be used in the subsequent steps for identifying vessel type, length, etc.
R2-b: Randomly select refined lat/lon location within cell with 3-4 decimal digit accuracy
Output: spill_lat, spill_lon, spill_lat, spill_lon

Negative evaporation for Bunker-C

We use Bunker-C Anchorage, short term (< 5 days), values for evaporation coefficients
%Ev = (-0.13 + 0.013T) sqrt(t)
These values cause negative evaporation in the code because the water temperatures we experience in the Salish Sea are often < 10 degrees C. Other evaporation constants for Bunker-C led to evaporation values that were too high and inconsistent with the literature on Bunker-C evaporation rates.

monte carlo: get_spill_volume

General Monte Carlo overview plan is here

Function: get_spill_volume

  1. OPTION 1:
    Input: oil carry capacity from “calc_oil_capacity”, spill type
    R5: Randomly choose spill volume based on % of fuel spilled or number of tanks breached. Assign:
    8 cargo tanks to ATBs and tug barges,
    12 cargo tanks to Aframax
    1 (or 2?) fuel tank(s) for all vessels
    Choose spill volume of 1, 2, or 4 (max) cargo tanks, with the volume of each cargo tank equal to “oil capacity”/number-of-tanks.

Note: Oil tankers are not always at capacity. According to the Earth Economic report, the average carrying capacity of oil tankers carrying crude oil or dilbit is 24 million gallons. TMX “worst case” scenario for dilbit transport is equivalent of 2 cargo holds of Aframax tanker, see page 11 of Earth Economics report. This report cites a DOE 2012 report that used spill volumes of 250,000 bbl (10.5 mil. gallons) crude, 65,000 bbl (2.7 mil. gallons) diesel and 25,000 bbl (~1 mil. gallons) heavy fuel oil. Spill volumes used in the Earth Economics report were 4 mil. gallons dilbit and 1 mil. gallon heavy fuel oil.According to the Earth Economics report, the fuel capacity of a large cargo vessel moving through Haro Strait is ~2 million gallons.

Output: spill volume (spill_volume)

  1. OPTION 2:
    Input: vessel type
    R5: If tanker, use Susan’s spill volume probability (based on Ryah’s report) to weight tanker spill volume
    Output: spill volume

Finalize output requirements

Listed below is our current set of outputs.

1. Single point (scalar) values to calculate and/or put in model output “stats” file

  • earliest beaching time
  • mode of beaching time histogram based on 1/2 day interval (time value) (actually mode of first beaching time)
  • last value of mass evaporated
  • last value of mass dispersed (change to maximum value of mass dispersed)
  • last value of mass of surface oil (original (volume * density at first time step in .sro) - total mass beached - total mass weathered (dispersed, biodegrade, evaporated), at last time step (why not just use the mass of surface oil directly?)
  • Oil-affected area (birds): Cumulative area with oil thickness greater than zero
  • Oil-affected area (spill cleanup): Cumulative area with oil thickness greater than 20 mm
  • Spill area at last time step
  • Oil spread: max distance between oil particles over course of model run
  • Oil advection: max distance from spill site that oil reaches, over course of model run
  • mode of oil spill distance (from surface oil, not beached)
  • (single value) total mass beached (density(in .sro file) * 500 * 440 * thickness2D(in .nc) * 1e-6) (why not just used the volume beached as output in the sro file?)

2. Mappable values to calculate and add to output netcdf

  • 2D (spatial representation) of mass and concentration of beached oil at last time step
  • 2D map of beaching time scales
  • 2D map of floating-oil-affected area (stakeholder: birds) as represented as a binary flag [0,1] for oil [not present, present] at each time step that is then time integrated and divided by total time steps to represent the fraction of time over model run in which a particular grid cell is affected by oil
  • 2D map of floating-oil-affected area (stakeholder: responders) as represented as a binary flag [0,1] for oil [not present and/or < 20 mm, present at >=20 mm] at each time step that is then time integrated and divided by total time steps to represent the fraction of time over model run in which a particular grid cell is affected by oil

3. Values already present in output netcdf

  • Thickness_2D (time, grid_y, grid_x)
  • OilConcentration_3D (time, grid_z, grid_y, grid_x)
  • Beaching_Time (grid_y, grid_x)

4. Values already present in output netcdf that I don’t yet trust and wouldn’t use w/o vetting

  • OilConcentration_2D (time, grid_y, grid_x) - If I recall correctly, the values in this are garbage
  • Dissolution_3D (time, grid_z, grid_y, grid_x)
  • Beaching_Volume (grid_y, grid_x) - These values are dates not volume.
  • Oil_Arrival_Time (grid_y, grid_x) - Not clear to me yet how these values differ from “Beaching_Time”. I looked into this at one point and need to review/revisit.

monte-cargo: ATBs not included in origin-destination analysis

As @campower has discovered, 5 ATBs are not included in our origin/destination analysis because they did not have a COARSE_TYPE = 31, 32, or 52, which is the COARSE_TYPE attribute to tug barges. Of these 5, 2 were given a COARSE_TYPE of tanker, 2 were given a COARSE_TYPE of “local vessel” and 1 was given a COARSE_TYPE of “other.” These are all US-traffic ATBs. The question is: How do we want to handle them? Because they are not included in Casey’s pre-selection data, they are not included in our origin-destination analysis. As such, they will fall into the category of ship tracks that are not allocated. What I suggested to Cam was to manually adjust the attributions for these particular MMSI vessel tracks to ATBs and then I’ll just use the Generic US-atb fuel allocations for these tracks. Cam, I think this is the best we can do, yes? @SusanEAllen and Cam, please let me know if (for whatever reason) you prefer a different method for how to handle these tracks.

monte carlo: get_vessel_type

General Monte Carlo overview plan is here

get_vessel_type
Input: spill month (mm), lat, lon
Select: Use month to select 9 Geotiffs of vessel types for that month (108 total). These tracks will include all vessels.
1 each of: atb_01, barge_01, tanker_01, cargo_01, cruise_01, ferry_01, small passenger_01, fishing_01, other_01
Extract vessel time exposure corresponding to lat/lon for each vessel time and create a weighting function.
R3: Randomly select vessel type based on vessel time exposure weighting function.
Output: vessel type (cargo, tanker, atb, barge, cruise, ferry, small passenger, fishing, other)

monte carlo: get_lat_lon

General Monte Carlo overview plan is here

Function: get_lat_lon
Input: spill month (mm)
Select: Use spill month designation to select 1 of the 12 Geotiffs representing all vessel traffic by month (Naming convention: all_traffic_01.tif, all_traffic_02,.tif all_traffic_03.tif...). Decide: Project raster in geographic before saving to geotiff so that x/y coordinates are in lat/lon
R2: Apply Vicky’s random selection algorithm to select a lat/lon location
The value determined will be the designated lat/lon of the 1km x 1km raster grid. We need to determine whether this lat/lon is center or corner of grid. We will apply another random selection toward next to refine lat/lon spill location to a 4 decimal place precision that queries the salish sea mask to verify as water point.
Output: geotiff_box_lat [1x1 km resolution], geotiff_box_lon [1x1 km resolution], geotiff_box_lat, geotiff_box_lon

U.S. oil cargo by vessel .yaml file

Create a .yaml file for incoming and outgoing tanker, atb and barge that lists percent traffic (weighting) for 7 oil type (dilbit, crude, bunker-c, diesel, gas, jet, other). Something like:

We may need to change this to narrow down on incoming and out-going locations as fuel types are likely differentiated by origin/destination. For example, the westridge-U.S. oil dilbit transport is unique.

incoming (by terminal location)
1. Tanker
- dilbit: 0%
- crude: 68%
- bunker-c: 7%
- diesel: 6%
- gas: 9%
- jet: 3%
- other: 7%
2. ATB (same format as above)...
3. Tank barge (same format as above)...
outgoing (by terminal location)
1. Tanker(same format as above)...
2. ATB(same format as above)...
3. Tank barge (same format as above)...

Decide values to save to .netcdf in hdf5-to-netcdf4

Below is a list of current netcdf output with values that are currently considered to keep as bold. Deliverable goals include:

  • producing information on response time by location (beaching time scales)
  • Volume of oil beached (Thickness_2D and Beaching_Time)
  • absence/presence of oil on surface (Thickness_2D)
  • amount of oil in water (OilConcentration_3D)

Dimensions: (grid_x: 396, grid_x_latlon: 397, grid_y: 896, grid_y_latlon: 897, grid_z: 40, time: 191)
Coordinates:

  • **time (time) datetime64[ns] 2017-11-21T00:30:00 ... 2017-11-28T22:30:00
  • grid_y (grid_y) int16 0 1 2 3 4 5 ... 890 891 892 893 894 895
  • grid_x (grid_x) int16 0 1 2 3 4 5 ... 390 391 392 393 394 395
  • grid_z (grid_z) int16 0 1 2 3 4 5 6 7 ... 33 34 35 36 37 38 39**
  • grid_y_latlon (grid_y_latlon) float32 0.0 1.0 2.0 ... 895.0 896.0
  • grid_x_latlon (grid_x_latlon) float32 0.0 1.0 2.0 ... 395.0 396.0
    Data variables:
    OilConcentration_2D (time, grid_y, grid_x) float64 ...
    Thickness_2D (time, grid_y, grid_x) float64 ...
    Dissolution_3D (time, grid_z, grid_y, grid_x) float64 ...
    OilConcentration_3D (time, grid_z, grid_y, grid_x) float64 ...
    Latitude (grid_y_latlon, grid_x_latlon) float64 ...
    Longitude (grid_y_latlon, grid_x_latlon) float64 ...
    Beaching_Time (grid_y, grid_x) datetime64[ns] ...

    Beaching_Volume (grid_y, grid_x) datetime64[ns] ...
    Oil_Arrival_Time (grid_y, grid_x) datetime64[ns] ...

Thickness gradient values for Dilbit, AKNS, Diesel, Gas, and Bunker-C

USERCOEFVELMANCHA, value range: 5-30. We are currently using default values for all but the different oil types will have different values.

We need:

  • Values for Dilbit, AKNS, Diesel, Gas, and Bunker-C
  • Publication-ready references for the above

NOTE: I include gas for a contingency plan if I can’t get our diesel case working in time for monte carlo simulation (with the caveat that the problem may not just be a diesel-case problem)

monte carlo: verify_lat_lon

General Monte Carlo overview plan is here

Function: verify_lat_lon

This function will check whether selected lat/lon from GeoTiff file is:

  1. Within Salish Sea Cast model boundary
  2. On a Salish Sea Cast water point (i.e not on land)

Mismatch between monte-carlo origins and DOE fuel transfer data

Some locations are coming up with zero fuel transfers. In particular, Kinder Morgan as no cargo transfers to ATBs. I need to compare the list of ATB/ITB flagged tank barges with the list of married ATB/ITBs in our AIS attribution to make sure there aren’t any discrepancies.

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.