Changeset 1218 for LMDZ4


Ignore:
Timestamp:
Jul 29, 2009, 4:21:48 PM (15 years ago)
Author:
idelkadi
Message:

Corrections dans la lecture des frequences de sorties dans les fichiers histoirs :
Possibilite de lire les frequences en Nombre :

  • de mois (mth, mounths, mous),
  • de jours(day, days, jours)
  • de minutes (mn, minutes),
  • d'heures (hours, hr, heures),
  • de minutes (mn, minutes),
  • de secondes (s, sec, secondes) et
  • de pas de temps de la physiqe ( TS )
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/phys_output_mod.F90

    r1215 r1218  
    494494  integer                               :: jmin_ins, jmax_ins
    495495  CHARACTER(len=20), dimension(nfiles)  :: type_ecri_files
    496   character(len=20), dimension(nfiles)  :: chtimestep   = (/ '1mth', '1day', '3hor', '30mn', '3hor' /)
     496  character(len=20), dimension(nfiles)  :: chtimestep   = (/ 'DefFreq', 'DefFreq','DefFreq', 'DefFreq', 'DefFreq' /)
    497497
    498498!!!!!!!!!! stockage dans une region limitee pour chaque fichier !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    505505  real, dimension(nfiles), save     :: latmax_reg        = (/ 90., 90., 90., 90., 21. /)
    506506
     507!
     508   print*,'Debut phys_output_mod.F90'
     509! Initialisations (Valeurs par defaut
    507510   levmax = (/ klev, klev, klev, klev, klev /)
    508511
     
    513516   name_files(5) = 'histLES'
    514517
    515    type_ecri_files(1) = 'ave(X)'
    516    type_ecri_files(2) = 'ave(X)'
    517    type_ecri_files(3) = 'ave(X)'
    518    type_ecri_files(4) = 'inst(X)'
    519    type_ecri_files(5) = 'inst(X)'
     518   type_ecri(1) = 'ave(X)'
     519   type_ecri(2) = 'ave(X)'
     520   type_ecri(3) = 'ave(X)'
     521   type_ecri(4) = 'inst(X)'
     522   type_ecri(5) = 'inst(X)'
    520523
    521524   clef_files(1) = ok_mensuel
     
    548551   call getin('phys_out_levmax',levmax)
    549552   call getin('phys_out_filenames',name_files)
    550    call getin('phys_out_filetypes',type_ecri_files)
    551553   call getin('phys_out_filekeys',clef_files)
    552554   call getin('phys_out_filelevels',lev_files)
    553555   call getin('phys_out_filetimesteps',chtimestep)
    554 
    555 
    556    type_ecri(:) = type_ecri_files(:)
     556   call getin('phys_out_filetypes',type_ecri_files)
     557
     558   type_ecri_files(:)=type_ecri(:)
    557559
    558560   print*,'phys_out_lonmin=',lonmin_reg
     
    561563   print*,'phys_out_latmax=',latmax_reg
    562564   print*,'phys_out_filenames=',name_files
    563    print*,'phys_out_filetypes=',type_ecri_files
     565   print*,'phys_out_filetypes=',type_ecri
    564566   print*,'phys_out_filekeys=',clef_files
    565567   print*,'phys_out_filelevels=',lev_files
    566    print*,'phys_out_filetimesteps=',ecrit_files
    567568
    568569!!!!!!!!!!!!!!!!!!!!!!! Boucle sur les fichiers !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    588589    IF (clef_files(iff)) THEN
    589590
    590       call convers_timesteps(chtimestep(iff),ecrit_files(iff))
    591      
     591      if ( chtimestep(iff).eq.'DefFreq' ) then
     592! Par defaut ecrit_files = (ecrit_mensuel ecrit_jour ecrit_hf ...)*86400.
     593        ecrit_files(iff)=ecrit_files(iff)*86400.
     594      else
     595        call convers_timesteps(chtimestep(iff),ecrit_files(iff))
     596      endif
     597       print*,'ecrit_files(',iff,')= ',ecrit_files(iff)
     598
    592599      zoutm(iff) = ecrit_files(iff) ! Frequence ou l on ecrit en seconde
    593600
     
    10291036
    10301037         ENDDO !  iff
     1038     print*,'Fin phys_output_mod.F90'
    10311039      end subroutine phys_output_open
    10321040
     
    11271135      SUBROUTINE convers_timesteps(str,timestep)
    11281136
     1137        use ioipsl
     1138
    11291139        IMPLICIT NONE
    11301140
     
    11341144        real                :: ttt,xxx,timestep,dayseconde
    11351145        parameter (dayseconde=86400.)
     1146        include "temps.h"
     1147        include "comconst.h"
    11361148
    11371149        ipos=scan(str,'0123456789.',.true.)
     
    11481160        endif
    11491161
    1150         if ( type == 'day' ) timestep = ttt * dayseconde
    1151         if ( type == 'mth' ) timestep = ttt * dayseconde * 30.
    1152         if ( type == 'hor' ) timestep = ttt * dayseconde / 24.
    1153         if ( type == 'mn'  ) timestep = ttt * 60.
    1154         if ( type == 's'   ) timestep = ttt
     1162        if ( type == 'day'.or.type == 'days'.or.type == 'jours'.or.type == 'jour' ) timestep = ttt * dayseconde
     1163        if ( type == 'mounths'.or.type == 'mth'.or.type == 'mois' ) then
     1164           print*,'annee_ref,day_ref mon_len',annee_ref,day_ref,ioget_mon_len(annee_ref,day_ref)
     1165           timestep = ttt * dayseconde * ioget_mon_len(annee_ref,day_ref)
     1166        endif
     1167        if ( type == 'hours'.or.type == 'hr'.or.type == 'heurs') timestep = ttt * dayseconde / 24.
     1168        if ( type == 'mn'.or.type == 'minutes'  ) timestep = ttt * 60.
     1169        if ( type == 's'.or.type == 'sec'.or.type == 'secondes'   ) timestep = ttt
     1170        if ( type == 'TS' ) timestep = dtphys
    11551171
    11561172        print*,'type =      ',type
Note: See TracChangeset for help on using the changeset viewer.