Changeset 545 for XIOS/trunk/src/test/test_client.f90
- Timestamp:
- 12/17/14 11:14:05 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/test/test_client.f90
r537 r545 12 12 INTEGER :: comm 13 13 TYPE(xios_duration) :: dtime 14 TYPE(xios_date) :: date 14 15 TYPE(xios_context) :: ctx_hdl 15 16 INTEGER,PARAMETER :: ni_glo=100 … … 87 88 88 89 89 dtime%second=3600 90 CALL xios_set_context_attr("test", timestep=dtime) 91 92 ni=0 ; lonvalue(:)=0 93 CALL xios_get_domain_attr("domain_A",ni=ni,lonvalue=lonvalue) 94 95 print *,"ni",ni 96 print *,"lonvalue",lonvalue ; 90 dtime%second = 3600 91 CALL xios_set_context_attr("test", timestep=dtime) 97 92 98 CALL xios_is_defined_field_attr("field_A",enabled=ok) 99 PRINT *,"field_A : attribute enabled is defined ? ",ok 100 CALL xios_close_context_definition() 101 102 PRINT*,"field field_A is active ? ",xios_field_is_active("field_A") 103 DO ts=1,24*10 104 CALL xios_update_calendar(ts) 105 CALL xios_send_field("field_A",field_A) 106 CALL wait_us(5000) ; 107 ENDDO 93 ! Create the calendar before closing the context definition 94 ! so that calendar operations can be used 95 CALL xios_set_calendar() 96 CALL xios_get_context_attr("test", time_origin=date) 97 PRINT *, "time_origin = ", date 98 dtime%timestep = 1 99 dtime = 0.5 * dtime 100 PRINT *, "duration = ", dtime 101 date = date + 3 * (dtime + dtime) 102 PRINT *, "date = time_origin + 3 * (duration + duration) = ", date 103 PRINT *, "xios_date_convert_to_seconds(date) = ", xios_date_convert_to_seconds(date) 104 PRINT *, "xios_date_convert_to_seconds(date - 2.5h) = ", xios_date_convert_to_seconds(date - 2.5 * xios_hour) 108 105 109 CALL xios_context_finalize() 110 CALL xios_finalize() 106 ni=0 ; lonvalue(:)=0 107 CALL xios_get_domain_attr("domain_A",ni=ni,lonvalue=lonvalue) 108 109 print *,"ni",ni 110 print *,"lonvalue",lonvalue ; 111 112 CALL xios_is_defined_field_attr("field_A",enabled=ok) 113 PRINT *,"field_A : attribute enabled is defined ? ",ok 114 CALL xios_close_context_definition() 115 116 PRINT*,"field field_A is active ? ",xios_field_is_active("field_A") 117 DO ts=1,24*10 118 CALL xios_update_calendar(ts) 119 CALL xios_send_field("field_A",field_A) 120 CALL wait_us(5000) ; 121 ENDDO 122 123 CALL xios_context_finalize() 124 CALL xios_finalize() 111 125 112 126 CALL MPI_FINALIZE(ierr)
Note: See TracChangeset
for help on using the changeset viewer.