-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconstants.py
153 lines (147 loc) · 6.68 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
import numpy as np
# Acceleration due to gravity (m/s^2)
gravity = 9.81
# Density of freshwater (kg/m^3)
rho_fw = 1e3
# Density of ice
rho_ice = 917.
# Seconds per hour
sec_per_hour = 60*60.
# Seconds per day
sec_per_day = 24*sec_per_hour
# Seconds per year
sec_per_year = 365.25*sec_per_day
# Months per year
months_per_year = 12
# Celsius to Kelvins intercept
temp_C2K = 273.15
# Constants for vapor pressure calculation over water (Buck, 1981):
vap_pres_c1 = 611.21; vap_pres_c3 = 17.502; vap_pres_c4=32.19;
# Gas constant for dry air
Rdry = 287.0597
# Gas constant for water vapor
Rvap = 461.5250
# Degrees to radians conversion factor
deg2rad = np.pi/180.0
rad2deg = 1./deg2rad
# Radius of Earth (m)
rEarth = 6.371e6
# Rotation rate of Earth
omegaEarth = 7.2921e-5 #rad/s
# Conversion from ice VAF change to global mean sea level contribution (m^-2)
vaf_to_gmslr = -0.918e-12/361.8
# Degrees formatted nicely in a string
deg_string = r'$^{\circ}$'
# 10^-3 formatted nicely in a string (for absolute salinity)
gkg_string = r'10$^{-3}$'
# Dictionary of bounds on different regions
# lon_min, lon_max, lat_min, lat_max
region_bounds = {
'bear_ridge_S': [-110.35, -110.35, -74.35, -73.8791],
'bear_ridge_N': [-112.05, -109.05, -73.8791, -72.7314],
'pine_island_bay': [-104, -100.5, -75.2, -74.2],
'dotson_bay': [-114, -110.5, -74.3, -73.5],
'amundsen_west_shelf_break': [-115, -112, -72, -71],
'weddell_gyre': [-60., 30., -90., -50.],
}
# Isobaths restricting some regions
region_bathy_bounds = {
'bear_ridge_N': [350, None],
}
# Latitude to bound continental shelf
shelf_lat = -58
# Depth of continental shelf
shelf_depth = 2000
# Lon and lat of a point which is definitely on the given continental shelf (so we can isolate seamounts disconnected from this)
shelf_point0 = [-51.5, -74.5]
# Drake Passage transect
drake_passage_lon0 = -68 # Corresponds to i=219 in eORCA1
drake_passage_lat_bounds = [-67.3, -52.6] # Corresponds to j=79:109 in eORCA1
# Lon and lat of a point which is definitely in the Ross Gyre
ross_gyre_point0 = [-160, -70]
# Dictionary of x,y, coordinates in AntArc configuration delineating roughly the Weddell Sea and Ross sea convection regions
# (should generalize to lat lons at some point)
weddell_convect = {'x':slice(930,1150), 'y':slice(295,360)}
ross_convect = {'x':slice(450,580), 'y':slice(220,300)}
# Dictionary of lons and lats describing key waypoints for transect paths.
transect_amundsen = {
'shelf_west':[[-115.5, -115, -116, -120.6], [-74.6, -73.5, -72.5, -70.78]],
'shelf_mid' :[[-112.6,-114.6], [-75.2,-70.48]],
'shelf_east':[[-100.6,-104,-106,-106,-104,-102.6,-101.8], [-75.16,-74.68,-74.2,-73.3,-72.4,-71.2,-69.1]],
'shelf_edge':[[-137,-135,-132,-131,-127.6,-127,-120.6,-118.6,-114,-102,-97,-93], [-73.7,-73.6,-73.3,-73,-72.7,-72.3,-72.5,-71.7,-71.2,-70.9,-70,-70.3]],
'Getz_left':[[-129, -131], [-75, -72.5]],
'Getz_right':[[-122, -123.5], [-75.2, -71.8]],
'Dotson':[[-112, -115], [-75.4, -70.8]],
'PI_trough':[[-106, -109], [-75.4, -70.5]],
} # transect locations chosen to cross most-sampled regions
# Dictionary of lon-lat points bounding given region. Will be used to "cut" the continental shelf mask (build_shelf_mask in utils.py) either north-south or east-west depending on the value of region_edges_flag. The first point and its connected N/S (or E/W) neighbours will be included in the mask, but not the second. The direction of travel is west to east around the coastline.
region_edges = {
'abbot' : [[-103.2, -71.8] , [-83, -72]],
'amery' : [[66.5, -67.5] , [79.5, -68]],
'amundsen_sea' : [[-157.5, -76.5] , [-102.75, -72.5]],
'bellingshausen_sea': [[-102.75, -72.5], [-57.25, -62]],
'cosgrove' : [[-104.24, -73.846], [-102.91, -73.2]],
'dotson_crosson' : [[-114.7, -73.8] , [-107.5, -75.3]],
'dotson_front' : [[-112.5, -74.4] , [-110.5, -73.85]], # just shelf
'pine_island' : [[-102.6, -75.1] , [-101.5, -74.2]],
'pine_island_bay' : [[-104.0, -74.8] , [-103, -74.2]], # just shelf
'east_antarctica' : [[-26, -75.5] , [169.5 , -71]], # includes Amery
'filchner_ronne' : [[-57, -71.5] , [-26.0 , -75.5]],
'getz' : [[-135, -74.5] , [-114.7, -73.8]],
'larsen' : [[-57.25, -62] , [-57, -71.5]],
'ross' : [[169.5, -71] , [-157.5, -76.5]],
'thwaites' : [[-107.5, -75.3] , [-103.6, -74.5]],
'west_antarctica' : [[-157.5, -76.5] , [-57.25, -62]], # Amundsen and Bellingshausen
}
region_edges_flag = {
'abbot' : ['NS', 'NS'],
'amery' : ['NS', 'NS'],
'amundsen_sea' : ['NS', 'NS'],
'bellingshausen_sea': ['NS', 'NS'],
'cosgrove' : ['EW', 'EW'],
'dotson_crosson' : ['NS', 'NS'],
'dotson_front' : ['EW', 'EW'],
'east_antarctica' : ['NS', 'NS'],
'filchner_ronne' : ['EW', 'NS'],
'getz' : ['NS', 'NS'],
'larsen' : ['NS', 'EW'],
'pine_island' : ['NS', 'EW'],
'pine_island_bay' : ['NS', 'EW'],
'ross' : ['NS', 'NS'],
'thwaites' : ['NS', 'EW'],
'west_antarctica' : ['NS', 'NS'],
}
# Dictionary of lon-lat points which are definitely in the given region. The region is then defined by connectivity to that point (eg selecting specific ice shelf cavities in single_cavity_mask in utils.py).
region_points = {
'abbot': [-95, -73],
'brunt': [-20, -75],
'pine_island': [-101, -75],
}
# Names of each region
region_names = {
'all' : 'Antarctic',
'abbot' : 'Abbot Ice Shelf',
'amery' : 'Amery',
'amundsen_sea' : 'Amundsen Sea',
'amundsen_west_shelf_break': 'Western Amundsen Sea shelf break',
'bellingshausen_sea': 'Bellingshausen Sea',
'brunt' : 'Brunt and Riiser-Larsen Ice Shelves',
'cosgrove' : 'Cosgrove Ice Shelf',
'dotson_crosson' : 'Dotson-Crosson Ice Shelf',
'dotson_front' : 'front of Dotson',
'east_antarctica' : 'East Antarctica',
'filchner_ronne' : 'Filchner-Ronne',
'getz' : 'Getz Ice Shelf',
'larsen' : 'Larsen',
'pine_island' : 'Pine Island Ice Shelf',
'pine_island_bay' : 'Pine Island Bay',
'ross' : 'Ross',
'thwaites' : 'Thwaites Ice Shelf',
'west_antarctica' : 'West Antarctica',
}
# Default colours to use for plotting lines
line_colours = ['black', 'Crimson', 'blue', 'DarkMagenta', 'DimGrey', 'DarkGreen', 'DeepPink', 'DeepSkyBlue']
land_colour = '#9999a3'
iceshelf_colour = '#d4d5da'
# Keep track of ensemble members downloaded for all variables:
cesm2_ensemble_members = ['1011.001','1031.002','1051.003','1071.004','1091.005']