Documentos de Académico
Documentos de Profesional
Documentos de Cultura
temperatura en la atmosfera
Introduccin
METEOROLOGA Pgina 2
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
TEMPERATURA
= (1)
METEOROLOGA Pgina 5
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
Es aditiva: = ()
METEOROLOGA Pgina 6
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
(, , 1 , , ) = (, , 1 , , )
Es montonamente creciente con :
siempre.
1
) = >0
,1 ,,
METEOROLOGA Pgina 7
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
METEOROLOGA Pgina 8
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
METEOROLOGA Pgina 9
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
METEOROLOGA Pgina 10
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
= (2)
METEOROLOGA Pgina 11
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
METEOROLOGA Pgina 12
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
+ = (5)
b. Conveccin
Fundamentos.
c. Radiacin
Fundamentos.
METEOROLOGA Pgina 13
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
1 http://www.miliarium.com/Prontuario/Tablas/Quimica/PropiedadesTermicas.asp
METEOROLOGA Pgina 14
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
METEOROLOGA Pgina 15
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
2 https://es.wikipedia.org/wiki/NumPy
3 https://es.wikipedia.org/wiki/Matplotlib
4 http://matplotlib.org/basemap/users/intro.html
METEOROLOGA Pgina 16
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
PIL
El Python Image Library (PIL) aade capacidades de
procesamiento de imgenes para el intrprete de
5 http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#whatisit
METEOROLOGA Pgina 17
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
3.4 Instalacin
Tras descargar Python en archivo .EXE, procedemos a
hacer la tpica instalacin en Windows.
Igualmente para Numpy, Matplotlib, Basemap, PIP
que se encuentran en formato .EXE.
Para los archivos en formato .whl (Anexo 1) se
procede con los siguientes pasos:
1. Abrir la ventana de comandos de Windows
(CMD), puede ser mediante la combinacin de
teclas WINDOWS+R, escribimos cmd y damos en
aceptar.
2. Cambiar el directorio actual usando los comando
cd(change directory) y dir para ver los archivos
en tal directorio de tal manera que nos situemos
en el directorio donde tenemos el PIP.EXE que la
ruta por defecto es
C:\Python27\Scripts.(consultar Anexo 1)
3. Luego escribimos pip install
nombre_exacto_del_archivo.whl, en mi caso fue
pip install d:/netCDF4-1.1.7+numpy16-cp27-
6 http://www.pythonware.com/products/pil/
METEOROLOGA Pgina 18
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
#leer la data
from netCDF4 import Dataset
nc_fid = Dataset("D:/air.sig995.2012.nc",
'r')
METEOROLOGA Pgina 19
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
2 2
( 2 + ) + = (6)
2
Que es una adaptacin en 2D de la ecuacin (5),
vamos a usa el mtodo de diferencias finitas que
dejaremos referenciada la teora. (Zill, 2015)
4.1 Diferencias Finitas
Se desea obtener la solucin (, , ), aproximamos
las derivadas de segundo orden:
2 1
[( + , , ) 2(, , ) + ( , , )] (7)
2 2
2 1
[(, + , ) 2(, , ) + (, , )] (8)
2 2
METEOROLOGA Pgina 20
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
nc_fid.variables
METEOROLOGA Pgina 21
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
# mascara
offset = dt.timedelta(hours=48)
# da formato de fecha a los datos en time
dt_time = [dt.date(1, 1, 1) + dt.timedelta(hours=t)
- offset\
for t in time]
aux = air[time_idx, :, :]
X, Y = np.meshgrid(lons, lats)
plt.pcolor(X,Y,aux,cmap=plt.cm.Spectral_r)
plt.colorbar() #shrink =0.5 escala del colorbar
plt.title("%s on %s" %
(nc_fid.variables['air'].var_desc, cur_time))
#plt.savefig('fig'+str(time_idx)+'.png')
#plt.clf()
plt.show()
METEOROLOGA Pgina 22
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
Ilustracin 4
METEOROLOGA Pgina 23
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
7 https://es.wikipedia.org/wiki/Proyecci%C3%B3n_de_Mollweide
METEOROLOGA Pgina 24
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
m = Basemap(projection='moll', llcrnrlat=-90,
urcrnrlat=90,\
llcrnrlon=0, urcrnrlon=360,
resolution='c', lon_0=0)
m.drawcoastlines()
m.drawmapboundary()
# Make the plot continuous
air_cyclic, lons_cyclic = addcyclic(air[time_idx,
:, :], lons)
air_cyclic, lons_cyclic = shiftgrid(180.,
air_cyclic, lons_cyclic, start=False)
# Create 2D lat/lon arrays for Basemap
lon2d, lat2d = np.meshgrid(lons_cyclic, lats)
# Transforms lat/lon en coordenadas moll
x, y = m(lon2d, lat2d)
# Plot of air temperature with 11 contour intervals
cs = m.contourf(x, y, air_cyclic, 11,
cmap=plt.cm.Spectral_r) #contourf rellena el
contorno
cbar = plt.colorbar(cs, orientation='horizontal',
shrink=0.5)
cbar.set_label("%s (%s)" %
(nc_fid.variables['air'].var_desc,\
nc_fid.variables['air'].units))
plt.title("%s on %s" %
(nc_fid.variables['air'].var_desc, cur_time))
plt.show()
METEOROLOGA Pgina 25
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
Ilustracin 6
METEOROLOGA Pgina 26
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
m = Basemap(projection='moll', llcrnrlat=-90,
urcrnrlat=90,\
llcrnrlon=0, urcrnrlon=360,
resolution='c', lon_0=0)
m.drawcoastlines()
m.drawmapboundary()
# Make the plot continuous
Resultado.
air_cyclic, lons_cyclic = addcyclic(air[time_idx,
:, :], lons)
air_cyclic, lons_cyclic = shiftgrid(180.,
air_cyclic, lons_cyclic, start=False)
# Create 2D lat/lon arrays for Basemap
lon2d, lat2d = np.meshgrid(lons_cyclic, lats)
# Transforms CAPITULO 5. Conclusin
lat/lon en coordenadas moll
x, y = m(lon2d, lat2d)
# Plot of air temperature with 11 contour intervals
cs = m.contourf(x, y, air_cyclic, 11,
cmap=plt.cm.Spectral_r) #contourf rellena el
contorno
cbar = plt.colorbar(cs, orientation='horizontal',
shrink=0.5)
cbar.set_label("%s (%s)" %
CAPITULO 6. Anexo I: Paginas de descarga
(nc_fid.variables['air'].var_desc,\
nc_fid.variables['air'].units))
plt.title("%s on %s" %
(nc_fid.variables['air'].var_desc, cur_time))
6.1 plt.show()
Enlaces a los paquetes de software
Python:
hjhhhttps://www.python.org/downloads/windows/
METEOROLOGA Pgina 27
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS
METEOROLOGA Pgina 28