Dear Sayrabh,Thank you for your script. 😸 Your method worked if I regrid my historical runs to RCPs. 😁 However, I still want to keep my historical time axis as 1950-2005 and RCP time axis as 2006-2099. But if I want to keep the time axis, I still get the same error. The strange thing is that even I do the most simple calculation:contour PRECIPITATION[d=1,L=@AVE]-PRECIPITATION[d=2,L=@AVE]*** NOTE: Ambiguous coordinates on T axis: PRECIPITATION[D=1,L=@AVE]-PRECIPITATION[D=2,L=@AVE]
**ERROR: illegal limits: PRECIPITATION is not in the range T=30-DEC-2005 12:00:30-DEC-2099 00:00@AVE
Axis extremes are T=30-DEC-1949 12:00:30-DEC-2005 00:00I didn't regrid anything, I just simply read my data in and Ferret won't let me compare the average value.By the way, for your jnl,set list/xchunk=120/ychunk=63/zchunk=12/tchunk=66/echunk=5/deflate=2/shuffle/ncformat=4save/i=1/j=1/k=1/l=1/m=1/ilimits=1:360/jlimits=1:126/klimits=1:36/llimits=1:132/mlimits=1:20/file=histrcp-2005-2015.nc/clob heatcalwhy do you use 360 as your limits when your echunk is 5?Thank you very much and stay healthy,XiaoyuOn Tue, Dec 28, 2021 at 5:51 AM saurabh rathore <rohitsrb2020@xxxxxxxxx> wrote:Sorry for getting back late to you, might be the attached script be helpful for you.So basically I was having 20 CMIP models having the same variable name HEATCAL, so read the variable name and assign a new variable based on the model e.g. "rcpbb" which is model number two in my script. Then I regrid all the models according to my model number one on all the axes i.e. gz, gx, gy, and gt. I also apply the mask from my model number one so that every model must look like model number one in x,y,z,t axes.Then I save all the models in x,y,z,t, and e axes. Here the "e" axis is equal to 20 which contains all the models.Suppose if you want to plot a time series from model number 5 then you have to use the command like thisplot/x=85/y=16/k=15 heatcal[m=5]This will plot a time series at lon=85, lat=16, depth level = 15 and for model number 5.I hope this will solve your issue. Let me know if you have any questions.Cheers, SaurabhOn Thu, Dec 2, 2021 at 8:24 AM Ryo Furue <furue@xxxxxxxxxx> wrote:Dear Xiaoyu,use agg_macav2metdata_pr_NorESM1-M_r1i1p1_historical_1950_2005_CONUS_monthly.nc
yes? let/like=precipitation p_tave=precipitation[t=@AVE]
yes? save/file=NorESM_hist_ave.nc p_tave
LISTing to file NorESM_hist_ave.nccancel data 1
yes? use NorESM_hist_ave.nc
yes? use agg_macav2metdata_pr_NorESM1-M_r1i1p1_rcp85_2006_2099_CONUS_monthly.nc
yes? let/d=2/like=precipitation p_tave=precipitation[t=@AVE,gxy=p_tave[d=1]]I got an error saying:**ERROR: variable unknown or not in data set: PRECIPITATION[T=@AVE]In the second LET statement, the variable p_tave is re-defined using its own previous definition. Essentially,let p_tave = precip[gxy=p_tave[d=1]]But you have already canceled the former dataset 1 by "cancel data 1".Although I don't know exactly what's happening in this case, I suspect this is the cause of the problem you encounter. So, I suspect you'll get a result you like if you don't use the same name "p_tave" and don't cancel dataset 1.Hope this helps,RyoWhen I checked the data:sh data
currently SET data sets:
1> ./NorESM_hist_ave.nc
name title I J K L
P_TAVE Monthly Precipitation Amount 1:251 1:144 ... ...
(T=30-DEC-1949 12:00:30-DEC-2005 00:00)
2> ./agg_macav2metdata_pr_NorESM1-M_r1i1p1_rcp85_2006_2099_CONUS_monthly.nc (default)
name title I J K L
PRECIPITATION
Monthly Precipitation Amount 1:251 1:144 ... 1:1128
------------------------------
P_TAVE[D=agg_macav2metdata_pr_NorESM1-M_r1i1p1_rcp85_2006_2099_CONUS_monthly] = PRECIPITATION[T=@AVE,GXY=P_TAVE[D=1]]
So I testedlet test= PRECIPITATION[T=@AVE,d=2]-P_TAVE[d=1]but still got the same error. Interestingly, If I only compare the two variables' T=@AVE, I got an error:contour Precipitation[d=2,T=@AVE]-Precipitation[d=1,T=@AVE]
*** NOTE: Ambiguous coordinates on T axis: PRECIPITATION[D=2,L=@AVE]-PRECIPITATION[D=1,L=@AVE]
**ERROR: illegal limits: PRECIPITATION is not in the range T=30-DEC-1949 12:00:30-DEC-2005 00:00@AVE
Axis extremes are T=30-DEC-2005 12:00:30-DEC-2099 00:00I am using Pyferret v7.6 on Linux 4.15.0-1089-azure. I am wondering how to solve this problem.Stay healthy,XiaoyuOn Wed, Nov 24, 2021 at 6:24 PM Ansley Manke <a.c.manke@xxxxxxxxx> wrote:[Caution: Email from External Sender. Do not click or open links or attachments unless you know this sender.]
Hi,
Your datasets do not share a time range, so this is not a typical ensemble.
Usually, you can define an ensemble when the datasets do not have the same space/time grids, by first defining a regridding operation so that all datasets have the same space/time grid as the first dataset in your list. On the page,
scroll down in that page to find "Ensemble Examples". Example 3 shows how to define an ensemble for data on two different grids, including for this data a modulo regridding operation to define variables with consistent grids. The variable names must also match, so that example also shows how to rename the file variable within the Ferret session, and then define the new regridded variables using the desired names.
I am not sure what commands you tried using @AVE. If you did a time average, then the resulting grid no longer depends on time, so there should not be an error message about time axes. Look at this example:
! Make a file containing the variables in the first dataset, averaged in time.
! An ensemble needs one file with the grid that is going to be used in the
! ensemble; not all of the grids can come from LET definitions.
yes? use dataset_1
yes? let/like=precip p_tave = precip [t=@ave]
yes? save/file=data1.nc p_tave
yes? cancel data 1! Now open this data and define variables in the other dataset(s) so that
! they can be included in an ensemble.
yes? use data1.nc
yes? use dataset_2
yes? let/d=2/like=precip p_tave = precip[t=@ave,gxy=p_tave [d=1]]
yes? ensemble time_ave = 1,2
! The ensemble dataset should contain the variable p_tave with a grid in X-Y-E
yes? show data time_ave
On 11/18/2021 3:22 PM, Xiaoyu Bai wrote:
Dear ferreters,
I am trying to ensemble RCPs (2005-2099) and control runs (1949-2005) together but keep getting T axis differs error.
*** NOTE: Variable "PRECIPITATION" excluded from aggregate: T axis differs among members
**ERROR: error defining aggregate dataset: No valid datasets or datasets share no variables that can be aggregated.
It makes sense for pyferret to think the time axis are different. But comparing the @AVE value from different time series should also make sense to pyferret. I am wondering how to solve this problem.
By the way, I already tried to read data in separately and do @AVE first then compare. It still showed the same error because the data still come from different time series.
If you want to learn more about ensembles: https://ferret.pmel.noaa.gov/tutorials/PyFerret_exploring_ensembles.pdf--
Xiaoyu (she/her)--Xiaoyu (she/her)--REGARDSSaurabh RathoreResearch Scholar (PhD.)Centre For Oceans, Rivers, Atmosphere & Land Science TechnologyIndian Institute Of Technology, Kharagpurcontact :- 91- 8345984434--Xiaoyu (she/her)