Ignore:
Timestamp:
12/11/14 14:32:37 (10 years ago)
Author:
rlacroix
Message:

Add a new attribute type for durations and use it for the context's timestep.

Note that the "xios_time" type and the "xios_set_timestep" procedure have been removed from the Fortran interface. Instead, the "xios_duration" type and the "xios_get_context_attr"/"xios_set_context_attr" procedures should now be used to get/set the timestep.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/interface/c/icdate.cpp

    r509 r537  
    2323// /////////////////////////////// Définitions ////////////////////////////// // 
    2424 
    25    void cxios_set_timestep(double ts_year, double ts_month,  double ts_day, 
    26                           double ts_hour, double ts_minute, double ts_second) 
    27    { 
    28       try 
    29       { 
    30          CTimer::get("XIOS").resume() ; 
    31          CDuration dur = {ts_year, ts_month, ts_day, ts_hour, ts_minute, ts_second, 0}; 
    32          xios::CContext* context = CContext::getCurrent() ; 
    33          context->timestep.setValue(dur.toString()); 
    34          CTimer::get("XIOS").suspend() ; 
    35       } 
    36       catch (xios::CException & exc) 
    37       { 
    38          std::cerr << exc.getMessage() << std::endl; 
    39          exit (EXIT_FAILURE); 
    40       } 
    41    } 
    42  
    4325   void cxios_update_calendar(int step) 
    4426   { 
Note: See TracChangeset for help on using the changeset viewer.