Changeset 2114


Ignore:
Timestamp:
Sep 5, 2014, 5:42:24 PM (10 years ago)
Author:
Laurent Fairhead
Message:

Suite (et fin?) des modifications pour permettre un controle 'tout xml'
des fichiers de sorties XIOS.
Un nouveau paramètre logique est introduit, ok_all_xml, false par défaut, et lu
dans le run.def qui permet de faire du 'tout xml'


Follow-up modifications to ensure total xlm control over the output files
from XIOS.
A new logical parameter, ok_all_wml, is introduced. False by default, it is
read from the run.def file and, if true, will give over control to the
XIOS xml files

Location:
LMDZ5/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/DefLists/field_def_lmdz.xml

    r2015 r2114  
    1 <field_definition level="1" prec="4" operation="average" freq_op="1ts" enabled=".FALSE.">
     1<field_definition level="1" prec="4" operation="average" freq_op="1ts" enabled=".true.">
    22   
    33    <field_group id="fields_1D" grid_ref="vertical">
     
    5050        <field id="v10m_sic"    long_name="Vent meredien 10m sic"    unit="m/s" />
    5151        <field id="qsol"        long_name="Soil watter content"         unit="mm" />
     52        <field id="JrNt"        long_name="1 if Day 0 if Night"         unit="-" />
     53        <field id="cldhjn"      long_name="High-level cloudiness Day"         unit="-" />
     54        <field id="cldmjn"      long_name="Mid-level cloudiness Day"         unit="-" />
     55        <field id="cldljn"      long_name="Low-level cloudiness Day"         unit="-" />
     56        <field id="cldtjn"      long_name="Total cloudiness Day"         unit="-" />
     57        <field id="rnebjn"      long_name="Cloud fraction in day"         unit="-" />
    5258        <field id="ndayrain"    long_name="Number of dayrain(liq+sol)"  unit="-" />
    5359        <field id="precip"      long_name="Precip Totale liq+sol"       unit="kg/(s*m2)" />
     
    446452        <field id="ratqs"    long_name="RATQS"    unit="-" />
    447453        <field id="dtthe"    long_name="Thermal dT"    unit="K/s" />
     454        <field id="duthe"    long_name="Thermal du"    unit="m/s2" />
     455        <field id="dvthe"    long_name="Thermal dv"    unit="m/s2" />
    448456        <field id="f_th"    long_name="Thermal plume mass flux"    unit="kg/(m2*s)" />
    449457        <field id="e_th"    long_name="Thermal plume entrainment"    unit="K/s" />
     
    522530      <field id="vphi" long_name="vphi" unit="m2/s" />
    523531      <field id="wT" long_name="wT" unit="K*Pa/s" />
    524       <field id="uxu" long_name="u2" unit="m2/s2" />
    525       <field id="vxv" long_name="v2" unit="m2/s2" />
    526       <field id="TxT" long_name="T2" unit="K2" />
     532      <field id="u2" long_name="u2" unit="m2/s2" />
     533      <field id="v2" long_name="v2" unit="m2/s2" />
     534      <field id="T2" long_name="T2" unit="K2" />
    527535    </field_group>
    528    
     536
     537    <field_group id="fields_trac" domain_ref="dom_glo" axis_ref="presnivs">
     538      <field id="RN"    long_name="Tracer RNVL1"    unit="-" />
     539      <field id="dRN_vdf"    long_name="Tendance tracer RNVL1"    unit="-" />
     540      <field id="dRN_the"    long_name="Tendance tracer  RNVL1"    unit="-" />
     541      <field id="dRN_con"    long_name="Tendance tracer  RNVL1"    unit="-" />
     542      <field id="dRN_lessi_impa"    long_name="Tendance tracer  RNVL1"    unit="-" />
     543      <field id="dRN_lessi_nucl"    long_name="Tendance tracer  RNVL1"    unit="-" />
     544      <field id="dRN_insc"    long_name="Tendance tracer  RNVL1"    unit="-" />
     545      <field id="dRN_bcscav"    long_name="Tendance tracer  RNVL1"    unit="-" />
     546      <field id="dRN_evapls"    long_name="Tendance tracer  RNVL1"    unit="-" />
     547      <field id="dRN_ls"    long_name="Tendance tracer  RNVL1"    unit="-" />
     548      <field id="dRN_trsp"    long_name="Tendance tracer  RNVL1"    unit="-" />
     549      <field id="dRN_sscav"    long_name="Tendance tracer  RNVL1"    unit="-" />
     550      <field id="dRN_sat"    long_name="Tendance tracer  RNVL1"    unit="-" />
     551      <field id="dRN_uscav"    long_name="Tendance tracer  RNVL1"    unit="-" />
     552      <field id="cumRN"    long_name="Cumulated tracer  RNVL1"    unit="-" />
     553      <field id="PB"    long_name="Tracer PBVL1"    unit="-" />
     554      <field id="dPB_vdf"    long_name="Tendance tracer PBVL1"    unit="-" />
     555      <field id="dPB_the"    long_name="Tendance tracer  PBVL1"    unit="-" />
     556      <field id="dPB_con"    long_name="Tendance tracer  PBVL1"    unit="-" />
     557      <field id="dPB_lessi_impa"    long_name="Tendance tracer  PBVL1"    unit="-" />
     558      <field id="dPB_lessi_nucl"    long_name="Tendance tracer  PBVL1"    unit="-" />
     559      <field id="dPB_insc"    long_name="Tendance tracer  PBVL1"    unit="-" />
     560      <field id="dPB_bcscav"    long_name="Tendance tracer  PBVL1"    unit="-" />
     561      <field id="dPB_evapls"    long_name="Tendance tracer  PBVL1"    unit="-" />
     562      <field id="dPB_ls"    long_name="Tendance tracer  PBVL1"    unit="-" />
     563      <field id="dPB_trsp"    long_name="Tendance tracer  PBVL1"    unit="-" />
     564      <field id="dPB_sscav"    long_name="Tendance tracer  PBVL1"    unit="-" />
     565      <field id="dPB_sat"    long_name="Tendance tracer  PBVL1"    unit="-" />
     566      <field id="dPB_uscav"    long_name="Tendance tracer  PBVL1"    unit="-" />
     567      <field id="cumPB"    long_name="Cumulated tracer  PBVL1"    unit="-" />
     568    </field_group>
     569
    529570</field_definition>
  • LMDZ5/trunk/libf/phylmd/clesphys.h

    r2110 r2114  
    1212       LOGICAL cycle_diurne,soil_model,new_oliq,ok_orodr,ok_orolf
    1313       LOGICAL ok_limitvrai
     14       LOGICAL ok_all_xml
    1415       INTEGER nbapp_rad, iflag_con,iflag_ener_conserv
    1516       REAL co2_ppm, co2_ppm0, solaire
     
    115116     &     , iflag_rrtm, ok_strato,ok_hines                             &
    116117     &     , iflag_ice_thermo, ok_gwd_rando, NSW                        &
    117      &     , ok_conserv_q
     118     &     , ok_conserv_q, ok_all_xml
    118119     
    119120       save /clesphys/
  • LMDZ5/trunk/libf/phylmd/conf_phys_m.F90

    r2110 r2114  
    8686    logical,SAVE              :: ok_snow_omp
    8787    logical,SAVE              :: ok_newmicro_omp
     88    logical,SAVE              :: ok_all_xml_omp
    8889    logical,SAVE        :: ok_journe_omp, ok_mensuel_omp, ok_instan_omp, ok_hf_omp       
    8990    logical,SAVE        :: ok_LES_omp   
     
    243244       CALL abort_gcm('conf_phys','t_coupl = 0.',1)
    244245    END IF
     246
     247    !
     248    !Config Key  = ok_all_xml
     249    !Config Desc = utiliser les xml pourles définitions des champs pour xios
     250    !Config Def  = .false.
     251    !Config Help =
     252    !
     253    ok_all_xml_omp = .false.
     254    call getin('ok_all_xml', ok_all_xml_omp)
     255    !
    245256
    246257    !
     
    18491860    ! Martin
    18501861
     1862    ok_all_xml = ok_all_xml_omp
    18511863    ok_newmicro = ok_newmicro_omp
    18521864    ok_journe = ok_journe_omp
     
    19781990    write(lunout,*)' Config veget = ', ok_veget,type_veget
    19791991    write(lunout,*)' Snow model SISVAT : ok_snow = ', ok_snow
     1992    write(lunout,*)' Config xml pour XIOS : ok_all_xml = ', ok_all_xml
    19801993    write(lunout,*)' Sortie journaliere = ', ok_journe
    19811994    write(lunout,*)' Sortie haute frequence = ', ok_hf
  • LMDZ5/trunk/libf/phylmd/iophy.F90

    r2097 r2114  
    204204  IMPLICIT NONE
    205205  include 'dimensions.h'
     206  include 'clesphys.h'
    206207   
    207208    character*(*), INTENT(IN) :: name
     
    227228    IF((.NOT. is_using_mpi) .OR. is_mpi_root) THEN
    228229        ! ug Création du fichier
     230      IF (.not. ok_all_xml) THEN
    229231        CALL wxios_add_file(name, ffreq, lev)
     232      ENDIF
    230233    END IF
    231234#endif
     
    603606
    604607#ifdef CPP_XIOS
    605       IF ( var%flag(iff)<=lev_files(iff) ) THEN
    606         CALL wxios_add_field_to_file(var%name, 2, iff, phys_out_filenames(iff), &
    607         var%description, var%unit, var%flag(iff), typeecrit)
    608         IF (prt_level >= 10) THEN
    609           WRITE(lunout,*) 'histdef2d: call wxios_add_field_to_file var%name iff: ', &
    610                           trim(var%name),iff
     608      IF (.not. ok_all_xml) THEN
     609        IF ( var%flag(iff)<=lev_files(iff) ) THEN
     610          CALL wxios_add_field_to_file(var%name, 2, iff, phys_out_filenames(iff), &
     611          var%description, var%unit, var%flag(iff), typeecrit)
     612          IF (prt_level >= 10) THEN
     613            WRITE(lunout,*) 'histdef2d: call wxios_add_field_to_file var%name iff: ', &
     614                            trim(var%name),iff
     615          ENDIF
    611616        ENDIF
    612617      ENDIF
     
    688693
    689694#ifdef CPP_XIOS
    690       IF ( var%flag(iff)<=lev_files(iff) ) THEN
    691         CALL wxios_add_field_to_file(var%name, 3, iff, phys_out_filenames(iff), &
    692         var%description, var%unit, var%flag(iff), typeecrit)
    693         IF (prt_level >= 10) THEN
    694           WRITE(lunout,*) 'histdef3d: call wxios_add_field_to_file var%name iff: ', &
    695                           trim(var%name),iff
    696         ENDIF
    697       ENDIF
     695       IF (.not. ok_all_xml) THEN
     696         IF ( var%flag(iff)<=lev_files(iff) ) THEN
     697         CALL wxios_add_field_to_file(var%name, 3, iff, phys_out_filenames(iff), &
     698         var%description, var%unit, var%flag(iff), typeecrit)
     699           IF (prt_level >= 10) THEN
     700             WRITE(lunout,*) 'histdef3d: call wxios_add_field_to_file var%name iff: ', &
     701                             trim(var%name),iff
     702           ENDIF
     703         ENDIF
     704       ENDIF
    698705#endif
    699706#ifndef CPP_IOIPSL_NO_OUTPUT
     
    890897  INCLUDE 'dimensions.h'
    891898  INCLUDE 'iniprint.h'
     899  include 'clesphys.h'
    892900
    893901    TYPE(ctrl_out), INTENT(IN) :: var
     
    922930!$OMP MASTER
    923931      !Si phase de définition.... on définit
     932      IF (.not. ok_all_xml) THEN
     933      if (prt_level >= 10) then
     934      write(lunout,*)"histwrite2d_phy: .not.vars_defined ; time to define ", &
     935                     trim(var%name)
     936      endif
    924937      DO iff=iff_beg, iff_end
    925938         IF (clef_files(iff)) THEN
     
    927940         ENDIF
    928941      ENDDO
     942      ENDIF
    929943!$OMP END MASTER
    930944  ELSE
     
    944958! La boucle sur les fichiers:
    945959      firstx=.true.
    946       DO iff=iff_beg, iff_end
     960
     961      IF (ok_all_xml) THEN
     962#ifdef CPP_XIOS
     963          if (prt_level >= 10) then
     964             write(lunout,*)'Dans iophy histwrite2D,var%name ',&
     965                             trim(var%name)                       
     966          endif
     967          CALL xios_send_field(var%name, Field2d)
     968          if (prt_level >= 10) then
     969             write(lunout,*)'Dans iophy histwrite2D,var%name apres xios_send ',&
     970                             trim(var%name)                       
     971          endif
     972#else
     973        CALL abort_gcm ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1)
     974#endif
     975      ELSE 
     976        DO iff=iff_beg, iff_end
    947977            IF (var%flag(iff) <= lev_files(iff) .AND. clef_files(iff)) THEN
    948978
     
    10011031                deallocate(fieldok)
    10021032            ENDIF !levfiles
    1003       ENDDO ! of DO iff=iff_beg, iff_end
     1033        ENDDO ! of DO iff=iff_beg, iff_end
     1034      ENDIF
    10041035!$OMP END MASTER   
    10051036  ENDIF ! vars_defined
     
    10261057  INCLUDE 'dimensions.h'
    10271058  INCLUDE 'iniprint.h'
     1059  include 'clesphys.h'
    10281060
    10291061    TYPE(ctrl_out), INTENT(IN) :: var
     
    10781110! BOUCLE SUR LES FICHIERS
    10791111     firstx=.true.
     1112
     1113      IF (ok_all_xml) THEN
     1114#ifdef CPP_XIOS
     1115          if (prt_level >= 10) then
     1116             write(lunout,*)'Dans iophy histwrite3D,var%name ',&
     1117                             trim(var%name)                       
     1118          endif
     1119          CALL xios_send_field(var%name, Field3d)
     1120#else
     1121        CALL abort_gcm ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1)
     1122#endif
     1123      ELSE 
     1124
     1125
    10801126     DO iff=iff_beg, iff_end
    10811127            IF (var%flag(iff) <= lev_files(iff) .AND. clef_files(iff)) THEN
     
    11361182            ENDIF
    11371183      ENDDO
     1184      ENDIF
    11381185!$OMP END MASTER   
    11391186  ENDIF ! vars_defined
  • LMDZ5/trunk/libf/phylmd/phys_output_mod.F90

    r2110 r2114  
    236236    type_ecri_files(:)=type_ecri(:)
    237237
     238!    if (ok_all_xml) phys_out_filelevels = 999
     239
    238240    WRITE(lunout,*)'phys_out_lonmin=',phys_out_lonmin
    239241    WRITE(lunout,*)'phys_out_lonmax=',phys_out_lonmax
     
    305307       zoutm(iff) = ecrit_files(iff) ! Frequence ou l on ecrit en seconde
    306308
    307     IF (clef_files(iff)) THEN
    308309
    309310#ifdef CPP_XIOS
    310311!!! Ouverture de chaque fichier XIOS !!!!!!!!!!!
    311     if (prt_level >= 10) then
    312       print*,'phys_output_open: call wxios_add_file with phys_out_filenames(iff)=',trim(phys_out_filenames(iff))                                                                       
    313     endif
    314     CALL wxios_add_file(phys_out_filenames(iff),chtimestep(iff),lev_files(iff)) 
     312    IF (.not. ok_all_xml) then
     313      if (prt_level >= 10) then
     314        print*,'phys_output_open: call wxios_add_file with phys_out_filenames(iff)=',trim(phys_out_filenames(iff))   
     315      endif
     316      CALL wxios_add_file(phys_out_filenames(iff),chtimestep(iff),lev_files(iff)) 
     317    ENDIF
    315318
    316319!!! Declaration des axes verticaux de chaque fichier:
     
    334337#endif
    335338
     339        IF (clef_files(iff)) THEN
    336340!!!!!!!!!!!!!!!!! Traitement dans le cas ou l'on veut stocker sur un domaine limite !!
    337341!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    404408#endif
    405409
     410     ENDIF ! clef_files
     411
    406412!CR: ajout d'une variable eau
    407413!      IF (nqtot>=3) THEN
     414
    408415       IF (nqtot>=nqo+1) THEN
    409416!            DO iq=3,nqtot 
     
    413420                           tname(iiq),'Tracer '//ttext(iiq), "-",  &
    414421                           (/ '', '', '', '', '', '', '', '', '' /))
    415 
    416             o_dtr_vdf(iq-nqo) = ctrl_out((/ 5, 7, 7, 7, 10, 10, 11, 11, 11 /), &
     422            o_dtr_vdf(iq-nqo) = ctrl_out((/ 4, 7, 7, 7, 10, 10, 11, 11, 11 /), &
    417423                              'd'//trim(tname(iq))//'_vdf',  &
    418424                              'Tendance tracer '//ttext(iiq), "-" , &
     
    491497      ENDIF
    492498
    493      ENDIF ! clef_files
    494499
    495500   ENDDO !  iff
  • LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90

    r2103 r2114  
    240240    USE phys_cal_mod, only : mth_len
    241241
     242
    242243    IMPLICIT NONE
     244
    243245
    244246    INCLUDE "temps.h"
     
    12931295       ENDDO !nfiles
    12941296!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1295 !       IF (nqtot.GE.3) THEN
    1296 !          DO iq=3,nqtot
    1297           IF (nqtot.GE.nqo+1) THEN
     1297        IF (nqtot.GE.nqo+1) THEN
    12981298            DO iq=nqo+1,nqtot
     1299
    12991300             CALL histwrite_phy(o_trac(iq-nqo), qx(:,:,iq))
    13001301             CALL histwrite_phy(o_dtr_vdf(iq-nqo),d_tr_cl(:,:,iq-nqo))
Note: See TracChangeset for help on using the changeset viewer.