You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@climate.apache.org by Rashyd ZAABOUL <za...@gmail.com> on 2014/06/04 08:30:43 UTC

How to deal with 360_day calendar parameter in netcdf file

Hi,
I'm trying to use HadGEM2-ES monthly precipitations outputs in RCMES but
got some troubles like a mismatch between the input time steps and the
regridded output time steps because the calendar time attribute in this
data is 360_day.

Could you please tell me how can I fix this in the RCMET code in order to
include HadGEM2-ES model in my cross-comparison?

Thanks
Rashyd

-- 
Rashyd Zaaboul
*Climate and Water Modeling Scientist*
International Center for Biosaline Agriculture
P.O. Box 14660 Dubai, UAE
Mobile  : +971 50 675 2007
Office : +971 4 336 1100 x 259
r.zaaboul@biosaline.org.ae

*Please consider the environment before printing this e-mail*

Re: How to deal with 360_day calendar parameter in netcdf file

Posted by Rashyd ZAABOUL <za...@gmail.com>.
Hi Kyo

Using your process.py I got a new error :

Running using config file: ../rcmes/resources/cordexMENA_Z500_ERAI.cfg
==============================================================================================
|Dataset - NAME                                              |START
DATE     |END DATE       |
Traceback (most recent call last):
  File "rcmet.py", line 299, in <module>
    runUsingConfig(args.CONFIG)
  File "rcmet.py", line 234, in runUsingConfig
    jobProperties.startDate,jobProperties.endDate =
misc.userDefinedStartEndTimes(obsSource,obsList,obsTimeName,obsDatasetList,models)
  File "/home/mawred/rcmet/src/main/python/rcmes/utils/misc.py", line 1212,
in userDefinedStartEndTimes
    times, timeStep = process.getModelTimes(observation,obsTimeName)
  File "/home/mawred/rcmet/src/main/python/rcmes/toolkit/process.py", line
646, in getModelTimes
    calendar = xtimes.calendar
  File "netCDF4.pyx", line 2784, in netCDF4.Variable.__getattr__
(netCDF4.c:34100)
  File "netCDF4.pyx", line 2604, in netCDF4.Variable.getncattr
(netCDF4.c:32022)
  File "netCDF4.pyx", line 923, in netCDF4._get_att (netCDF4.c:14662)
AttributeError: NetCDF: Attribute not found

It seems that it should test if the attribute calendar exists or not before
trying to retrieve it ...

Thanks
Rashyd


2014-06-09 18:54 GMT-04:00 Lee, Kyo (329C-Affiliate) <
Huikyo.Lee@jpl.nasa.gov>:

>  Dear Rashyd,
>
>  Please see the attached file. I modified two functions, 1) getModelTimes
> and 2) decode model timesK.
> Lines 644-647 and lines 1136-1139 have been added.
> So please make it sure that you back up the original process.py before
> replacing it with the attached revision.
> This is only a temporary solution, but I will soon update OCW repository.
> If you have any problems with ‘process.py', feel free to contact me (
> huikyo.lee@jpl.nasa.gov). Because other members in our developing team
> could not fully support this old version anymore, you might want to send
> email only to me.
> Thank you again for using RCMES.
>
>  Best regards,
> Kyo
>
>   From: Rashyd ZAABOUL <za...@gmail.com>
> Date: Sunday, June 8, 2014 at 5:06 AM
> To: Huikyo Lee <hu...@jpl.nasa.gov>
> Cc: rcmes-dev <rc...@jpl.nasa.gov>, "dev@climate.apache.org" <
> dev@climate.apache.org>
> Subject: Re: How to deal with 360_day calendar parameter in netcdf file
>
>    Dear Kyo
>
>  Thanks for your help. Please find attached the file that you requested.
>
>  Best regards
>  Rashyd
>
>
> 2014-06-06 20:03 GMT-04:00 Lee, Kyo (329C-Affiliate) <
> Huikyo.Lee@jpl.nasa.gov>:
>
>>  Dear Rashyd,
>>
>>  Thank you for the question.
>> I have created an issue to resolve your problem.
>> https://issues.apache.org/jira/browse/CLIMATE-467
>> As a temporary solution, could you send process.py in toolkit folder to
>> me (huikyo.lee@jpl.nasa.gov)?
>>
>>  Best regards,
>> Kyo
>>
>>
>>   From: Rashyd ZAABOUL <za...@gmail.com>
>> Date: Tuesday, June 3, 2014 at 11:30 PM
>> To: rcmes-dev <rc...@jpl.nasa.gov>, "dev@climate.apache.org" <
>> dev@climate.apache.org>
>> Subject: How to deal with 360_day calendar parameter in netcdf file
>>
>>     Hi,
>>  I'm trying to use HadGEM2-ES monthly precipitations outputs in RCMES but
>> got some troubles like a mismatch between the input time steps and the
>> regridded output time steps because the calendar time attribute in this
>> data is 360_day.
>>
>>  Could you please tell me how can I fix this in the RCMET code in order
>> to include HadGEM2-ES model in my cross-comparison?
>>
>>  Thanks
>>  Rashyd
>>
>> --
>>  Rashyd Zaaboul
>>  *Climate and Water Modeling Scientist*
>>  International Center for Biosaline Agriculture
>> P.O. Box 14660 Dubai, UAE
>> Mobile  : +971 50 675 2007
>> Office : +971 4 336 1100 x 259
>>  r.zaaboul@biosaline.org.ae
>>
>> *Please consider the environment before printing this e-mail*
>>
>
>
>
> --
>  Rashyd Zaaboul
>  *Climate and Water Modeling Scientist*
>  International Center for Biosaline Agriculture
> P.O. Box 14660 Dubai, UAE
> Mobile  : +971 50 675 2007
> Office : +971 4 336 1100 x 259
>  r.zaaboul@biosaline.org.ae
>
> *Please consider the environment before printing this e-mail*
>



-- 
Rashyd Zaaboul
*Climate and Water Modeling Scientist*
International Center for Biosaline Agriculture
P.O. Box 14660 Dubai, UAE
Mobile  : +971 50 675 2007
Office : +971 4 336 1100 x 259
r.zaaboul@biosaline.org.ae

*Please consider the environment before printing this e-mail*

Re: How to deal with 360_day calendar parameter in netcdf file

Posted by "Lee, Kyo (329C-Affiliate)" <Hu...@jpl.nasa.gov>.
Dear Rashyd,

Please see the attached file. I modified two functions, 1) getModelTimes and 2) decode model timesK.
Lines 644-647 and lines 1136-1139 have been added.
So please make it sure that you back up the original process.py before replacing it with the attached revision.
This is only a temporary solution, but I will soon update OCW repository.
If you have any problems with ‘process.py', feel free to contact me (huikyo.lee@jpl.nasa.gov). Because other members in our developing team could not fully support this old version anymore, you might want to send email only to me.
Thank you again for using RCMES.

Best regards,
Kyo

From: Rashyd ZAABOUL <za...@gmail.com>>
Date: Sunday, June 8, 2014 at 5:06 AM
To: Huikyo Lee <hu...@jpl.nasa.gov>>
Cc: rcmes-dev <rc...@jpl.nasa.gov>>, "dev@climate.apache.org<ma...@climate.apache.org>" <de...@climate.apache.org>>
Subject: Re: How to deal with 360_day calendar parameter in netcdf file

Dear Kyo

Thanks for your help. Please find attached the file that you requested.

Best regards
Rashyd


2014-06-06 20:03 GMT-04:00 Lee, Kyo (329C-Affiliate) <Hu...@jpl.nasa.gov>>:
Dear Rashyd,

Thank you for the question.
I have created an issue to resolve your problem.
https://issues.apache.org/jira/browse/CLIMATE-467
As a temporary solution, could you send process.py in toolkit folder to me (huikyo.lee@jpl.nasa.gov<ma...@jpl.nasa.gov>)?

Best regards,
Kyo


From: Rashyd ZAABOUL <za...@gmail.com>>
Date: Tuesday, June 3, 2014 at 11:30 PM
To: rcmes-dev <rc...@jpl.nasa.gov>>, "dev@climate.apache.org<ma...@climate.apache.org>" <de...@climate.apache.org>>
Subject: How to deal with 360_day calendar parameter in netcdf file

Hi,
I'm trying to use HadGEM2-ES monthly precipitations outputs in RCMES but got some troubles like a mismatch between the input time steps and the regridded output time steps because the calendar time attribute in this data is 360_day.

Could you please tell me how can I fix this in the RCMET code in order to include HadGEM2-ES model in my cross-comparison?

Thanks
Rashyd

--
Rashyd Zaaboul
Climate and Water Modeling Scientist
International Center for Biosaline Agriculture
P.O. Box 14660 Dubai, UAE
Mobile  : +971 50 675 2007
Office : +971 4 336 1100 x 259
r.zaaboul@biosaline.org.ae<ma...@biosaline.org.ae>

Please consider the environment before printing this e-mail



--
Rashyd Zaaboul
Climate and Water Modeling Scientist
International Center for Biosaline Agriculture
P.O. Box 14660 Dubai, UAE
Mobile  : +971 50 675 2007
Office : +971 4 336 1100 x 259
r.zaaboul@biosaline.org.ae<ma...@biosaline.org.ae>

Please consider the environment before printing this e-mail

Re: How to deal with 360_day calendar parameter in netcdf file

Posted by Rashyd ZAABOUL <za...@gmail.com>.
Dear Kyo

Thanks for your help. Please find attached the file that you requested.

Best regards
Rashyd


2014-06-06 20:03 GMT-04:00 Lee, Kyo (329C-Affiliate) <
Huikyo.Lee@jpl.nasa.gov>:

>  Dear Rashyd,
>
>  Thank you for the question.
> I have created an issue to resolve your problem.
> https://issues.apache.org/jira/browse/CLIMATE-467
> As a temporary solution, could you send process.py in toolkit folder to me
> (huikyo.lee@jpl.nasa.gov)?
>
>  Best regards,
> Kyo
>
>
>   From: Rashyd ZAABOUL <za...@gmail.com>
> Date: Tuesday, June 3, 2014 at 11:30 PM
> To: rcmes-dev <rc...@jpl.nasa.gov>, "dev@climate.apache.org" <
> dev@climate.apache.org>
> Subject: How to deal with 360_day calendar parameter in netcdf file
>
>     Hi,
>  I'm trying to use HadGEM2-ES monthly precipitations outputs in RCMES but
> got some troubles like a mismatch between the input time steps and the
> regridded output time steps because the calendar time attribute in this
> data is 360_day.
>
>  Could you please tell me how can I fix this in the RCMET code in order to
> include HadGEM2-ES model in my cross-comparison?
>
>  Thanks
>  Rashyd
>
> --
>  Rashyd Zaaboul
>  *Climate and Water Modeling Scientist*
>  International Center for Biosaline Agriculture
> P.O. Box 14660 Dubai, UAE
> Mobile  : +971 50 675 2007
> Office : +971 4 336 1100 x 259
>  r.zaaboul@biosaline.org.ae
>
> *Please consider the environment before printing this e-mail*
>



-- 
Rashyd Zaaboul
*Climate and Water Modeling Scientist*
International Center for Biosaline Agriculture
P.O. Box 14660 Dubai, UAE
Mobile  : +971 50 675 2007
Office : +971 4 336 1100 x 259
r.zaaboul@biosaline.org.ae

*Please consider the environment before printing this e-mail*

Re: How to deal with 360_day calendar parameter in netcdf file

Posted by "Lee, Kyo (329C-Affiliate)" <Hu...@jpl.nasa.gov>.
Dear Rashyd,

Thank you for the question.
I have created an issue to resolve your problem.
https://issues.apache.org/jira/browse/CLIMATE-467
As a temporary solution, could you send process.py in toolkit folder to me (huikyo.lee@jpl.nasa.gov)?

Best regards,
Kyo


From: Rashyd ZAABOUL <za...@gmail.com>>
Date: Tuesday, June 3, 2014 at 11:30 PM
To: rcmes-dev <rc...@jpl.nasa.gov>>, "dev@climate.apache.org<ma...@climate.apache.org>" <de...@climate.apache.org>>
Subject: How to deal with 360_day calendar parameter in netcdf file

Hi,
I'm trying to use HadGEM2-ES monthly precipitations outputs in RCMES but got some troubles like a mismatch between the input time steps and the regridded output time steps because the calendar time attribute in this data is 360_day.

Could you please tell me how can I fix this in the RCMET code in order to include HadGEM2-ES model in my cross-comparison?

Thanks
Rashyd

--
Rashyd Zaaboul
Climate and Water Modeling Scientist
International Center for Biosaline Agriculture
P.O. Box 14660 Dubai, UAE
Mobile  : +971 50 675 2007
Office : +971 4 336 1100 x 259
r.zaaboul@biosaline.org.ae<ma...@biosaline.org.ae>

Please consider the environment before printing this e-mail

Re: How to deal with 360_day calendar parameter in netcdf file

Posted by "Loikith, Paul C (329C-Affiliate)" <Pa...@jpl.nasa.gov>.
Hey folks,

One of us should reply to Rashyd.  I don't think we have these capabilities, but I wanted to double check before I shoot Rashyd an email.  Something to think about adding as HadGEM is a common driving GCM for RCMs.

Confirmation of this would be great so we can make sure we don't leave Rashyd hanging.

Thanks,

Paul

From: Rashyd ZAABOUL <za...@gmail.com>>
Date: Tuesday, June 3, 2014 11:30 PM
To: rcmes-dev <rc...@jpl.nasa.gov>>, "dev@climate.apache.org<ma...@climate.apache.org>" <de...@climate.apache.org>>
Subject: How to deal with 360_day calendar parameter in netcdf file

Hi,
I'm trying to use HadGEM2-ES monthly precipitations outputs in RCMES but got some troubles like a mismatch between the input time steps and the regridded output time steps because the calendar time attribute in this data is 360_day.

Could you please tell me how can I fix this in the RCMET code in order to include HadGEM2-ES model in my cross-comparison?

Thanks
Rashyd

--
Rashyd Zaaboul
Climate and Water Modeling Scientist
International Center for Biosaline Agriculture
P.O. Box 14660 Dubai, UAE
Mobile  : +971 50 675 2007
Office : +971 4 336 1100 x 259
r.zaaboul@biosaline.org.ae<ma...@biosaline.org.ae>

Please consider the environment before printing this e-mail