forked from jamespatrickmanning/basemap_options
/
vertical_structure (copy).py
30 lines (26 loc) · 1.1 KB
/
vertical_structure (copy).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
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 25 13:20:47 2013
Routine to look at model temperature profiles
ar a particular eMOLT location where we had both surf & bot sensors
@author: jmanning
"""
import datetime as dt
from matplotlib import pyplot as plt
from getdata_yw import getobs_tempsalt
from getdata import getemolt_latlon
from models_yw import getFVCOM_bottom_tempsalt_netcdf
from conversions import dm2dd
site='AG01'
# get data
[lati,loni,on,bd]=getemolt_latlon(site)# extracts lat/lon based on site code
[lati,loni]=dm2dd(lati,loni)#converts decimal-minutes to decimal degrees
dept=[0,5]
(obs_dt,obs_temps,obs_salt)=getobs_tempsalt(site, input_time=[dt.datetime(2006,9,10),dt.datetime(2006,9,11)], dep=dept)
dept=[bd[0]-0.25*bd[0],bd[0]+0.25*bd[0]]
(obs_dt,obs_tempb,obs_salt)=getobs_tempsalt(site, input_time=[dt.datetime(2006,9,10),dt.datetime(2006,9,11)], dep=dept)
# get model
for k in range(44):
modtso=getFVCOM_bottom_tempsalt_netcdf(lati,loni,dt.datetime(2006,9,10),dt.datetime(2006,9,11),layer=k,vname='temp')
plt.plot(modtso[0],-k,'g*')
plt.plt([obs_temps[0],obs_tempb[0]],[0,-bd[0]],'r*')