Opened 8 years ago

Closed 8 years ago

#86 closed enhancement (fixed)

Allowing durations expressed as strings with the Fortran API

Reported by: ssenesi Owned by: ymipsl
Priority: minor Component: XIOS
Version: 2.0 Keywords:
Cc: rlacroix

Description

Model developpers would appreciate to be able to :

call xios_set_attr('field',freq_op='6h')

i.e. to benefit from the API of the same features as in xml file for expressing durations (without managing XIOS types)

I didn't find a function for converting from string to duration, which could help in this respect

Change History (5)

comment:1 Changed 8 years ago by rlacroix

  • Cc rlacroix added

The documentation is not up-to-date about this, I added those functions just before I left:

  • xios_duration_convert_to_string
  • xios_duration_convert_from_string

However I think it is easier to just use: call xios_set_attr('field',freq_op=6*xios_hour).

comment:2 Changed 8 years ago by ssenesi

The use case actually is, broadly speaking :

call xios_set_var('duration_string_for_3D_fields_freqop', duration)
call xios_set_attr('a_3D_field',freq_op=duration)
call xios_set_attr('another_3D_field',freq_op=duration)

comment:3 Changed 8 years ago by rlacroix

Ok, so I guess you indeed need to use either xios_duration_convert_to_string(duration) or xios_duration_convert_from_string(duration) at some point.

comment:4 Changed 8 years ago by ymipsl

Rémi,

This ticket can be closed ?

comment:5 Changed 8 years ago by rlacroix

  • Resolution set to fixed
  • Status changed from new to closed

Yes, I guess so.

Note: See TracTickets for help on using tickets.