Ignore:
Timestamp:
Apr 4, 2014, 2:39:54 PM (11 years ago)
Author:
Ehouarn Millour
Message:

Further cleanup concerning XIOS (mainly about axes being defined as axes and not as groups of axes).
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/bibio/wxios.F90

    r2001 r2002  
    292292    ! Pour déclarer un axe vertical !!!!!!!!!!!!!!!
    293293    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    294     SUBROUTINE wxios_add_vaxis(axisgroup_id, axis_file, axis_size, axis_value)
    295         IMPLICIT NONE
    296         INCLUDE 'iniprint.h'
    297 
    298         CHARACTER (len=*), INTENT(IN) :: axisgroup_id, axis_file
     294    SUBROUTINE wxios_add_vaxis(axis_id, axis_size, axis_value)
     295        IMPLICIT NONE
     296        INCLUDE 'iniprint.h'
     297
     298        CHARACTER (len=*), INTENT(IN) :: axis_id
    299299        INTEGER, INTENT(IN) :: axis_size
    300300        REAL, DIMENSION(axis_size), INTENT(IN) :: axis_value
    301301       
    302         TYPE(xios_axisgroup) :: axgroup
    303         TYPE(xios_axis) :: ax
    304         CHARACTER(len=50) :: axis_id
    305        
    306         IF (len_trim(axisgroup_id).gt.len(axis_id)) THEN
    307           WRITE(lunout,*) "wxios_add_vaxis: error, size of axis_id too small!!"
    308           WRITE(lunout,*) "     increase it to at least ",len_trim(axisgroup_id)
    309           CALL abort_gcm("wxios_add_vaxis","len(axis_id) too small",1)
    310         ENDIF
    311         axis_id=trim(axisgroup_id)
     302!        TYPE(xios_axisgroup) :: axgroup
     303!        TYPE(xios_axis) :: ax
     304!        CHARACTER(len=50) :: axis_id
     305       
     306!        IF (len_trim(axisgroup_id).gt.len(axis_id)) THEN
     307!          WRITE(lunout,*) "wxios_add_vaxis: error, size of axis_id too small!!"
     308!          WRITE(lunout,*) "     increase it to at least ",len_trim(axisgroup_id)
     309!          CALL abort_gcm("wxios_add_vaxis","len(axis_id) too small",1)
     310!        ENDIF
     311!        axis_id=trim(axisgroup_id)
    312312       
    313313        !On récupère le groupe d'axes qui va bien:
    314         CALL xios_get_axisgroup_handle(axisgroup_id, axgroup)
     314        !CALL xios_get_axisgroup_handle(axisgroup_id, axgroup)
    315315       
    316316        !On ajoute l'axe correspondant à ce fichier:
    317         CALL xios_add_axis(axgroup, ax, TRIM(ADJUSTL(axis_id)))
     317        !CALL xios_add_axis(axgroup, ax, TRIM(ADJUSTL(axis_id)))
    318318       
    319319        !Et on le parametrise:
    320         CALL xios_set_axis_attr_hdl(ax, size=axis_size, value=axis_value)
     320        !CALL xios_set_axis_attr_hdl(ax, size=axis_size, value=axis_value)
     321       
     322        ! Ehouarn: New way to declare axis, without axis_group:
     323        CALL xios_set_axis_attr(trim(axis_id),size=axis_size,value=axis_value)
    321324       
    322325        !Vérification:
     
    515518            !Sinon on se contente de l'activer:
    516519            CALL xios_set_field_attr(fieldname, enabled=.TRUE.)
     520            !NB: This will override an enable=.false. set by a user in the xml file;
     521            !   then the only way to not output the field is by changing its
     522            !   output level
    517523        ENDIF       
    518524       
    519525    END SUBROUTINE wxios_add_field_to_file
    520526   
    521     SUBROUTINE wxios_update_calendar(ito)
    522         INTEGER, INTENT(IN) :: ito
    523         CALL xios_update_calendar(ito)
    524     END SUBROUTINE wxios_update_calendar
    525    
    526     SUBROUTINE wxios_write_2D(fieldname, fdata)
    527         CHARACTER(len=*), INTENT(IN) :: fieldname
    528         REAL, DIMENSION(:,:), INTENT(IN) :: fdata
    529 
    530         CALL xios_send_field(fieldname, fdata)
    531     END SUBROUTINE wxios_write_2D
    532    
    533     SUBROUTINE wxios_write_3D(fieldname, fdata)
    534         CHARACTER(len=*), INTENT(IN) :: fieldname
    535         REAL, DIMENSION(:,:,:), INTENT(IN) :: fdata
    536        
    537         CALL xios_send_field(fieldname, fdata)
    538     END SUBROUTINE wxios_write_3D
     527!    SUBROUTINE wxios_update_calendar(ito)
     528!        INTEGER, INTENT(IN) :: ito
     529!        CALL xios_update_calendar(ito)
     530!    END SUBROUTINE wxios_update_calendar
     531!   
     532!    SUBROUTINE wxios_write_2D(fieldname, fdata)
     533!        CHARACTER(len=*), INTENT(IN) :: fieldname
     534!        REAL, DIMENSION(:,:), INTENT(IN) :: fdata
     535!
     536!        CALL xios_send_field(fieldname, fdata)
     537!    END SUBROUTINE wxios_write_2D
     538   
     539!    SUBROUTINE wxios_write_3D(fieldname, fdata)
     540!        CHARACTER(len=*), INTENT(IN) :: fieldname
     541!        REAL, DIMENSION(:,:,:), INTENT(IN) :: fdata
     542!       
     543!        CALL xios_send_field(fieldname, fdata)
     544!    END SUBROUTINE wxios_write_3D
    539545   
    540546    SUBROUTINE wxios_closedef()
Note: See TracChangeset for help on using the changeset viewer.