Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: I need assistance with re-gridding in python
Post: RE: I need assistance with re-gridding in python
I discovered that the above was incorrect, and that the "interpolate_to_model" function can only handle one variable at a time. Thus, I separated both variables (onedaymax and fivedaymax) as in the fo... |
|
Lightning1800 |
General Coding Help |
3 |
3,286 |
May-29-2018, 07:01 PM |
|
|
Thread: I need assistance with re-gridding in python
Post: RE: I need assistance with re-gridding in python
I then tried this, introducing a for loop, but I don't know if that is relevant:
for t in len(onedaymax):
for r in len(fivedaymax):
transformation = fct_g.interpolate_to_model... |
|
Lightning1800 |
General Coding Help |
3 |
3,286 |
May-29-2018, 03:23 PM |
|
|
Thread: I need assistance with re-gridding in python
Post: RE: I need assistance with re-gridding in python
I just tried this:
import functions_grid as fct_g
transformation = fct_g.interpolate_to_model(onedaymax, fivedaymax, :, :, newmodel):
if transformation = 'newmodel':
return 'mode... |
|
Lightning1800 |
General Coding Help |
3 |
3,286 |
May-28-2018, 11:44 PM |
|
|
Thread: I need assistance with re-gridding in python
Post: I need assistance with re-gridding in python
I am working with climate model data from several models and would like to be able to interpolate each model's grid to a common model grid. I would like to do this because each model has a different g... |
|
Lightning1800 |
General Coding Help |
3 |
3,286 |
May-28-2018, 04:34 PM |
|
|
Thread: Interpolating to a common grid - help needed!!!
Post: Interpolating to a common grid - help needed!!!
Hi there,
I am working with model data and would like to be able to interpolate each model to a common model grid. This is because each models' grid resolution (based on lines of latitude and lines o... |
|
Lightning1800 |
General Coding Help |
0 |
2,090 |
May-25-2018, 08:05 PM |
|
|
Thread: Need help for finding cumulative values in a loop
Post: RE: Need help for finding cumulative values in a l...
Hi buran,
My apologies for that.
What I am trying to do is this: I have a 3D matrix, called "Quantity". Quantity is composed of three elements:
[Days, Latitude, Longitude]
The element of Days is a... |
|
Lightning1800 |
General Coding Help |
10 |
6,109 |
May-23-2018, 07:48 PM |
|
|
Thread: Need help for finding cumulative values in a loop
Post: Looping issue - please help!!
Hi there,
I would like to compute all annual cumulative 5-consecutive day maximum values for a 3D matrix using a for loop. To be more specific, the variable "Quantity" is a 3D matrix that is composed... |
|
Lightning1800 |
General Coding Help |
10 |
6,109 |
May-23-2018, 07:03 PM |
|
|
Thread: Need help for finding cumulative values in a loop
Post: RE: Need help for finding cumulative values in a l...
Apologies for the double message.
In addition to post #6, what I am really trying to do in that line is essentially tell Python to only consider Day 2 to Day 50098. Is there a way to specify that ra... |
|
Lightning1800 |
General Coding Help |
10 |
6,109 |
May-23-2018, 02:59 PM |
|
|
Thread: Need help for finding cumulative values in a loop
Post: RE: Need help for finding cumulative values in a l...
Hi Larz60 and buran,
Thank you for your responses, and I apologize for not formatting the error above with tags!
The format of the variable "Quantity" is in the form of a 3D matrix, which contains 3... |
|
Lightning1800 |
General Coding Help |
10 |
6,109 |
May-23-2018, 12:54 PM |
|
|
Thread: Need help for finding cumulative values in a loop
Post: RE: Need help for finding cumulative values in a l...
Thank you so much, Larz60!
I tried running that and received the following error:
Error:TypeError Traceback (most recent call last)
91 Quantity2[time, ...]... |
|
Lightning1800 |
General Coding Help |
10 |
6,109 |
May-23-2018, 02:20 AM |
|
|
Thread: Need help for finding cumulative values in a loop
Post: Need help for finding cumulative values in a loop
Greetings,
I would like to compute all annual cumulative 5-consecutive day maximum values in a 3D matrix using a for loop. To be more specific, the variable "Quantity" is a 3D matrix that is composed... |
|
Lightning1800 |
General Coding Help |
10 |
6,109 |
May-22-2018, 08:15 PM |
|
|
Thread: Looping in a 3D matrix - desperate for assistance!
Post: RE: Looping in a 3D matrix - desperate for assista...
Hi killerrex,
As per post #14, here is what I have so far:
Quantity=Q
Quantity2=np.zeros(Quantity.shape)
Year=np.arange(Quantity.shape[0])//365
n_year = max(Year)+1
onedaymax=np.empty((n_year, )+Qua... |
|
Lightning1800 |
Data Science |
15 |
9,032 |
May-22-2018, 04:53 PM |
|
|
Thread: Looping in a 3D matrix - desperate for assistance!
Post: RE: Looping in a 3D matrix - desperate for assista...
Hi killerrex,
Expanding on the above post (post #14), would an if/else statement be relevant with the specified codes? If so, how could it be implemented?
Thank you, once again, |
|
Lightning1800 |
Data Science |
15 |
9,032 |
May-22-2018, 12:54 PM |
|
|
Thread: Looping in a 3D matrix - desperate for assistance!
Post: RE: Looping in a 3D matrix - desperate for assista...
Hi killerrex,
Thank you so much for this response!
Would this also apply to calculating the "cumulative" values for 5 consecutive day periods? For example, Day 0+Day 1+Day 2+Day 3+Day 4. For my par... |
|
Lightning1800 |
Data Science |
15 |
9,032 |
May-19-2018, 05:16 PM |
|
|
Thread: Looping in a 3D matrix - desperate for assistance!
Post: RE: Looping in a 3D matrix - desperate for assista...
Hi killerrex,
Sounds good, thanks!
One last question that came to mind, suppose that, adhering to what was done previously, I wanted to compute 5-day cumulative values (using np.sum) over groups of ... |
|
Lightning1800 |
Data Science |
15 |
9,032 |
May-18-2018, 07:58 PM |
|
|
Thread: Looping in a 3D matrix - desperate for assistance!
Post: RE: Looping in a 3D matrix - desperate for assista...
Hi killerrex,
Thank you for the clarifications!
For the NetCDF file creation in Python, I came across this but was not sure how relevant it was for my case:
http://www.ceda.ac.uk/static/media/uploa... |
|
Lightning1800 |
Data Science |
15 |
9,032 |
May-17-2018, 05:14 PM |
|
|
Thread: Storing Python data output as a Netcdf file
Post: Storing Python data output as a Netcdf file
Hi there,
I just derived values from a 3D matrix, which contains the dimensions of time (in years), latitude (64 lines), and longitude (128 lines). The values derived are for every grid cell (latitud... |
|
Lightning1800 |
General Coding Help |
1 |
2,635 |
May-16-2018, 08:02 PM |
|
|
Thread: Looping in a 3D matrix - desperate for assistance!
Post: RE: Looping in a 3D matrix - desperate for assista...
Hi killerrex,
I just wanted to inform you that I tried what you had kindly suggested above, and I believe that it worked successfully! Indeed, Python returned the maximum values for each grid cell fo... |
|
Lightning1800 |
Data Science |
15 |
9,032 |
May-16-2018, 07:39 PM |
|
|
Thread: Looping in a 3D matrix - desperate for assistance!
Post: RE: Looping in a 3D matrix - desperate for assista...
Thank you so, so much, killerrex - conceptually, things are becoming much clearer after reading your explanations. I will try as you suggested and let you know how things go! |
|
Lightning1800 |
Data Science |
15 |
9,032 |
May-16-2018, 01:58 AM |
|
|
Thread: Converting days to years in loop while computing values across grid cells
Post: RE: Converting days to years in loop while computi...
Hi ThiefOfTime,
Thank you for your response.
The loops might be necessary, since I need to compute the maximum values over a multitude of grid cells for every year for 140 years. How would you do t... |
|
Lightning1800 |
Data Science |
2 |
2,630 |
May-15-2018, 08:44 PM |