-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error using precip variability parameter file for TRMM day #961
Comments
Ana is running precip metrics for downscaled dataset. @msahn Any chance if this error is looking familiar to you? |
@msahn I've also gotten this error for a model dataset. Is it a calendar issue? |
It seems that the number of days for 2019 is "364" in the output log. The number of days for each year should be "365" or "366". If the data for 2019 is incomplete, the analysis period should be 2001-2018. |
Thanks @msahn. As far as I know it should be complete, but I'll try running it without the last year and let you know if that works. |
Yes, I also think it is a calendar issue. Could you provide an entire output log message, like the TRMM case? |
@msahn Here's the whole log:
|
Thank you. I think this issue is coming from the defined calendar name. "ACCESS-CM2.r1i1p1f1" data uses "standard" as a calendar name, but it is not defined in the metric code. Could you help modify the code as below? pcmdi_metrics/pcmdi_metrics/precip_variability/lib/lib_variability_across_timescales.py Line 133 in 01474be
to if "gregorian" or "standard" in cal:
|
pcmdi_metrics/pcmdi_metrics/precip_variability/lib/lib_variability_across_timescales.py Line 174 in 01474be
This line also should be modified. |
@msahn Those code changes fixed this issue for me. Thanks for your help |
@msahn Thank you for your help! |
@acordonez @lee1043 You're welcome. I am happy to be able to help with this issue. |
I attempted to use this parameter file to generate metrics for the daily TRMM data. I only changed the pmpdir variable. The precip variability driver threw the following error:
(pcmdi_metrics_3.1) -bash-4.2$ variability_across_timescales_PS_driver.py -p variability_across_timescales_PS_day_params_TRMM.py /p/user_pub/PCMDIobs/obs4MIPs/NASA-GSFC/TRMM-3B42v-7/day/pr/1x1/latest *.nc [2001, 2019] 3650 1825 ~/pmp_results/graphics/precip/obs/v20230718/variability_across_timescales ~/pmp_results/diagnostic_results/precip/obs/v20230718/variability_across_timescales ~/pmp_results/metrics_results/precip/obs/v20230718/variability_across_timescales TRMM-3B42v-7 ['/p/user_pub/PCMDIobs/obs4MIPs/NASA-GSFC/TRMM-3B42v-7/day/pr/1x1/latest/pr_day_TRMM-3B42v-7_PCMDIFROGS_1x1_19980101-20191230.nc'] TRMM-3B42v-7 gregorian syr, eyr: 2001 2019 2001 Complete regridding from (365, 180, 360) to (365, 90, 180) 2001 (365, 90, 180) 2002 Complete regridding from (365, 180, 360) to (365, 90, 180) 2002 (730, 90, 180) 2003 Complete regridding from (365, 180, 360) to (365, 90, 180) 2003 (1095, 90, 180) 2004 Complete regridding from (366, 180, 360) to (366, 90, 180) 2004 (1461, 90, 180) 2005 Complete regridding from (365, 180, 360) to (365, 90, 180) 2005 (1826, 90, 180) 2006 Complete regridding from (365, 180, 360) to (365, 90, 180) 2006 (2191, 90, 180) 2007 Complete regridding from (365, 180, 360) to (365, 90, 180) 2007 (2556, 90, 180) 2008 Complete regridding from (366, 180, 360) to (366, 90, 180) 2008 (2922, 90, 180) 2009 Complete regridding from (365, 180, 360) to (365, 90, 180) 2009 (3287, 90, 180) 2010 Complete regridding from (365, 180, 360) to (365, 90, 180) 2010 (3652, 90, 180) 2011 Complete regridding from (365, 180, 360) to (365, 90, 180) 2011 (4017, 90, 180) 2012 Complete regridding from (366, 180, 360) to (366, 90, 180) 2012 (4383, 90, 180) 2013 Complete regridding from (365, 180, 360) to (365, 90, 180) 2013 (4748, 90, 180) 2014 Complete regridding from (365, 180, 360) to (365, 90, 180) 2014 (5113, 90, 180) 2015 Complete regridding from (365, 180, 360) to (365, 90, 180) 2015 (5478, 90, 180) 2016 Complete regridding from (366, 180, 360) to (366, 90, 180) 2016 (5844, 90, 180) 2017 Complete regridding from (365, 180, 360) to (365, 90, 180) 2017 (6209, 90, 180) 2018 Complete regridding from (365, 180, 360) to (365, 90, 180) 2018 (6574, 90, 180) 2019 Complete regridding from (364, 180, 360) to (364, 90, 180) 2019 (6938, 90, 180) Traceback (most recent call last): File "/home/ordonez4/miniconda3/envs/pcmdi_metrics_3.1/bin/variability_across_timescales_PS_driver.py", line 59, in <module> precip_variability_across_timescale( File "/home/ordonez4/miniconda3/envs/pcmdi_metrics_3.1/lib/python3.10/site-packages/pcmdi_metrics/precip_variability/lib/lib_variability_across_timescales.py", line 57, in precip_variability_across_timescale clim, anom = ClimAnom(drg, ntd, syr, eyr, cal) File "/home/ordonez4/miniconda3/envs/pcmdi_metrics_3.1/lib/python3.10/site-packages/pcmdi_metrics/precip_variability/lib/lib_variability_across_timescales.py", line 150, in ClimAnom dseg[iyr] = yrtmpseg ValueError: could not broadcast input array from shape (364,1,90,180) into shape (366,1,90,180)
The text was updated successfully, but these errors were encountered: