Ignore:
Timestamp:
Apr 3, 2014, 3:52:45 PM (10 years ago)
Author:
Ehouarn Millour
Message:

Updates for XIOS outputs. NMC outputs now OK, as long as these are in output files number 6 and more (phys_out_filenames ordering in config.def).
Among things that need be worked on further with XIOS:

  • Station outputs form and format.
  • Extra axes can only be included in XIOS files if linked to given variables.
  • Further splitting of the XML files as iodef.xml, context_lmdz.xml, field_def_lmdz.xml and file_def_hist*_lmdz.xml.

EM

File:
1 edited

Legend:

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

    r1907 r2001  
    2626   
    2727    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    28     !   str + i   =>   str_i   !!!!!!!!!!!!!!!!!!!!
    29     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    30    
    31     SUBROUTINE concat(str, str2, str_str2)
    32         CHARACTER(len=*), INTENT(IN) :: str, str2
    33         CHARACTER(len=20), INTENT(OUT) :: str_str2
    34        
    35        
    36         str_str2 = TRIM(ADJUSTL(str//"_"//TRIM(ADJUSTL(str2))))
    37         !IF (prt_level >= 10) WRITE(lunout,*) "Xios. ",str,"+",str2,"=",str_str2
    38     END SUBROUTINE concat
    39    
    40     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    4128    !   36day => 36d etc     !!!!!!!!!!!!!!!!!!!!
    4229    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    158145        g_ctx = xios_ctx
    159146
    160         IF (prt_level >= 10) WRITE(lunout,*) "wxios_context_init: Current context is ",trim(g_ctx_name)
    161 
     147        IF (prt_level >= 10) THEN
     148          WRITE(lunout,*) "wxios_context_init: Current context is ",trim(g_ctx_name)
     149          WRITE(lunout,*) "     now call xios_solve_inheritance()"
     150        ENDIF
    162151        !Une première analyse des héritages:
    163152        CALL xios_solve_inheritance()
     
    313302        TYPE(xios_axisgroup) :: axgroup
    314303        TYPE(xios_axis) :: ax
    315         CHARACTER(len=20) :: axis_id
    316        
    317        
    318         !Préparation du nom de l'axe:
    319         CALL concat(axisgroup_id, axis_file, axis_id)
     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)
    320312       
    321313        !On récupère le groupe d'axes qui va bien:
     
    332324            IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_vaxis: Axis created: ", TRIM(ADJUSTL(axis_id))
    333325        ELSE
    334             WRITE(*,*) "wxios_add_vaxis: Invalid axis: ", TRIM(ADJUSTL(axis_id))
     326            WRITE(lunout,*) "wxios_add_vaxis: Invalid axis: ", TRIM(ADJUSTL(axis_id))
    335327        END IF
    336328
     
    367359       
    368360            IF (xios_is_valid_file("X"//fname)) THEN
    369                 IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_file: New file: ", "X"//fname
    370                 IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_file: output_freq=",TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl
     361                IF (prt_level >= 10) THEN
     362                  WRITE(lunout,*) "wxios_add_file: New file: ", "X"//fname
     363                  WRITE(lunout,*) "wxios_add_file: output_freq=",TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl
     364                ENDIF
    371365            ELSE
    372                 WRITE(*,*) "wxios_add_file: Error, invalid file: ", "X"//trim(fname)
    373                 WRITE(*,*) "wxios_add_file: output_freq=",TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl
     366                WRITE(lunout,*) "wxios_add_file: Error, invalid file: ", "X"//trim(fname)
     367                WRITE(lunout,*) "wxios_add_file: output_freq=",TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl
    374368            END IF
    375369        ELSE
    376             IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_file: File ",trim(fname), " défined using XML."
    377                 CALL xios_set_file_attr(fname, enabled=.TRUE.)
     370            IF (prt_level >= 10) THEN
     371              WRITE(lunout,*) "wxios_add_file: File ",trim(fname), " défined using XML."
     372            ENDIF
     373            ! Ehouarn: add an enable=.true. on top of xml definitions... why???
     374            CALL xios_set_file_attr(fname, enabled=.TRUE.)
    378375        END IF
    379376    END SUBROUTINE wxios_add_file
     
    432429        CHARACTER(len=*), INTENT(IN) :: op
    433430       
    434         CHARACTER(len=20) :: axis_id
     431        CHARACTER(len=20) :: axis_id ! Ehouarn: dangerous...
    435432        CHARACTER(len=100) :: operation
    436433        TYPE(xios_file) :: f
     
    441438       
    442439       
    443         !Préparation du nom de l'axe:
    444         CALL concat("presnivs", fname, axis_id)
     440        ! Ajout Abd pour NMC:
     441        IF (fid.LE.6) THEN
     442          axis_id="presnivs"
     443        ELSE
     444          axis_id="plev"
     445        ENDIF
    445446       
    446447        !on prépare le nom de l'opération:
     
    448449       
    449450       
    450        
    451451        !On selectionne le bon groupe de champs:
    452452        IF (fdim.EQ.2) THEN
    453             CALL xios_get_fieldgroup_handle("fields_2D", fieldgroup)
     453          CALL xios_get_fieldgroup_handle("fields_2D", fieldgroup)
    454454        ELSE
    455455          CALL xios_get_fieldgroup_handle("fields_3D", fieldgroup)
Note: See TracChangeset for help on using the changeset viewer.