Questions tagged [python]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
12
votes
1answer
5k views

Plotting wind barbs in python

I'm trying to plot wind barbs in basemap and I have two separate netCDF files. Here is what I am trying to produce, or something like it: How do I read a uwnd variable in a netCDF file in python? <...
11
votes
3answers
28k views

How to interpolate scattered data to a regular grid in Python?

I have three txt files for longitude, latitude and temperature (or let's say three lists lon, lat, temp) from scattered weather station in the UK. I would like firstly to interpolate these data in ...
9
votes
2answers
663 views

Terrain correction for gravity data using Nagy, 1973

I am working with an algorithm for terrain correction of gravity data. I am using Nagy, 1973. However, I could not get the results I need. So, this is the problem. I have this function where x,y,z ...
8
votes
1answer
104 views

Plotting ERA5 U/V Wind Data Using Python

Hello Earth Science Community, I am a beginner Python programmer trying to plot a single time step of 10m surface wind data I grabbed from the ECMWF ERA5 reanalysis single level dataset in Python 3.8....
5
votes
2answers
303 views

How to map emission inventory from lat&lon corrdinate to WRF model grid

Here, I have a regional emission inventory, which mainly contains the varibales of lat,lon,...
4
votes
1answer
159 views

How to handle negative cosine of Solar Zenith Angle while calculating clear-sky UV Index?

I'm using this source to calculate the UVI value for every hour in a day (From 7am to 7pm). And using pysolar module to get the Solar Zenith Angle. The equation is ...
3
votes
2answers
1k views

Plotting wind barbs in python (no U,V component)

I've got 4 different .txt files for longitude, latitude, wind speed and wind direction (so no U and V components of the wind). Is there any way to plot wind barbs from such a dataset?
3
votes
1answer
59 views

How to solve libnetcdf.so.12: cannot open shared object file in pyferret?

My pyferret was working perfectly until I had installed netCDF4 and now it is throwing up this error ...
3
votes
1answer
134 views

Locating shearlines or deformation zones in a map

I am looking for a way to detect shearlines or confluence regions such as that shown in the figure below (red dashed line). I was able to derive the stretching, shear, and total deformations. The ...
2
votes
1answer
141 views

Interpolating world data to a local grid in Python

I have an NC file that has global data with a high resolution (about 25 minutes) so a lot of coordinates. I have some measured values of some region with irregularly spaced coordinates. In order to ...
2
votes
1answer
38 views

Insert points into a 2d grid [closed]

I have a list of single point values that I want to insert into a grid. point_values = [1, 4, 5, ...] point_lats = [-12.101, -12.1023, -12.1031, ...] point_lons = [155.511, 155.520, 155.533, ...] ...
2
votes
0answers
516 views

Interpolation and extrapolation of unstructured data in python: memory error

I have 3 arrays, for longitude, latitude and temperature (so the observations are scattered in space). I want to apply interpolation on these data, but also extrapolation. I 've written the code beow, ...
1
vote
1answer
114 views

Hydrology- flow accumulation

I'm not specialist in hydrology, and I would be very grateful if you answer my question: What is flow accumulation in hydrology? Why algorithms used to calculate it over a raster DEM don't take ...
1
vote
2answers
99 views

Anyone sucessfully installed pywafo for Python 3 under windows OS?

I've tried: pip install wafo pip install wafo==0.3.1 The instructions of readme provide a 2 step installation process but it fails on the first one. I am using windows 10 and python 3.6.1. Right ...
1
vote
1answer
807 views

Error trying to download ERA5 data: Exception: Missing/incomplete configuration file: C:\Users\username/.cdsapirc

I am new with Python so please be kind. I want to download data from ERA5 and so far I have installed the CDS API package and followed all the instructions from https://cds.climate.copernicus.eu/api-...
1
vote
0answers
136 views

Issues with projection and fig using python and mpl_toolkits.basemap

I currently have depth data that I am plotting with the code below. The problem that I am having has to do with the figure python is spitting out. The figure is really tiny. I have tried a few things ...
0
votes
2answers
70 views

How to read and plot seismic waveform data in Ascii format using Obspy?

I wish to plot seismic waveform data using Obspy, bu they are in Ascii format. Is it possible to read and plot Ascii file using Obspy?
0
votes
0answers
65 views

How to calculate Lifted Index from ERA5 pressure level data?

I have taken a thunderstorm case where I need to calculate indices but I am not getting any code related stability indices in Python language, the code is available in GRADS, NCL for me it's difficult ...