[Thread Prev][Thread Next][Index]

Re: [ferret_users] Problem with ef_get_axis_dates in Pyferret



Hi Serena,

I now see that the arguments for ef_get_axis_dates changed to support timestep precision and return the actual length of the returned time string(s).  This change did not get updated in any of the example external functions, including dates.F in either Ferret or PyFerret.

The new signature for ef_get_axis_dates is:

    SUBROUTINE EF_GET_AXIS_DATES(id, iarg, tax, dim, numtimes, precision, slen, datebuf)

so it has two more arguments just before the 'datebuf' argument:

   precision - (INTEGER; input) the desired 'precision' for the date string(s) returned
   slen - (INTEGER; output) the actual length of the date string(s) returned

Also increase the size of datebuf (CHARACTER*32 is plenty) if you plan on reporting fractional seconds (precision 7).

The 'precision' for dates is:
  1: year  (not currently working correctly so don't use)
  2: month-year  (not currently working correctly so don't use)
  3: day-month-year
  4: day-month-year hour
  5: day-month-year hour:minute
  6: day-month-year hour:minute:second
  7: day-month-year hour:minute:second.frac

Apologies for the missed update.

King regards,
Karl


On Mon, Mar 23, 2020 at 1:35 PM Serena Illig <serena.illig@xxxxxxxxx> wrote:
Dear Ferret community,

I hope this email finds you well.
I am developing an external function that needs to access the day/month of the time axis of my input variable. I am using Pyferret v7.5.
The compilation is fine. Unfortunately, in Pyferret, my external function crashes with a segmentation fault error when calling the ef_get_axis_dates(id, arg, tax, T_AXIS, nt, datebuf) subroutine. I have exactly the same error trying to run the dates.F external function (provided in the examples) in Pyferret.
The same compiled functions, date.so or my_function.so, work fine when called by ferret_7.1...
Has anyone already seen this error?
Attached is my ef_utility compiling options.

I thank you in advance for your help,

Take care!

Serena Illig

.¸. , . .·´¯`·
 ><(((º>     `·.¸.·´¯`·...¸><(((º>¸.¸. , . .·´¯`· ><(((º> .
`·.¸.·´¯`·...¸><(((º>                                                  .
                                                                              .
  Serena ILLIG-THEVENIN       LEGOS/IRD       .
                                                                           .
             University of Cape Town - UCT          .
             Department of Oceanography           .
             Private Bag X3, Rondebosch  7701   .
            
SOUTH AFRICA                                  .
                                                                            .
   E-mail     : serena.illig@xxxxxx                            .
   Web-site : http://sillig.free.fr                             .
   Fax         : +27 21 650 3979                          .
                                                                    .
                                                 <º)))><..·´



--
Karl M. Smith, Ph.D.
JISAO Univ. Wash. and PMEL NOAA
"The contents of this message are mine personally and do
not necessarily reflect any position of the Government
or the National Oceanic and Atmospheric Administration."

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement