Changeset 1213


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

Rajout de la possibilite de lire dans *.def les frequences de sorties pour les different fichiers de sortie, sous format :
phys_out_filetimesteps= Xmth, Yday, Zhor, Ahor, Bmth (X, Y, Z, A et B entiers)
Corrections dans phys_output_mod.F90

Location:
LMDZ4/branches/LMDZ4-dev/libf/phylmd
Files:
3 edited

Legend:

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

    r1211 r1213  
    245245
    246246! Champs interpolles sur des niveaux de pression ??? a faire correctement
    247 ! if=1 on ecrit u v w phi sur 850 700 500 200 au niv 1
    248 ! if=2 on ecrit w et ph 500 seulement au niv 1
    249 !        et u v sur 850 700 500 200
    250 ! if=3 on ecrit ph a 500 seulement au niv 1
    251 !      on ecrit u v t q a 850 700 500 200 au niv 3
    252 !      on ecrit ph  a 500   au niv 3
    253 
    254247                                             
    255   type(ctrl_out),save,dimension(4) :: o_uSTDlevs     = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'u850'), &
     248  type(ctrl_out),save,dimension(6) :: o_uSTDlevs     = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'u850'), &
    256249                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'u700'), &
    257250                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'u500'), &
    258                                                      ctrl_out((/ 1, 1, 3, 10, 10 /),'u200') /)
    259 
    260   type(ctrl_out),save,dimension(4) :: o_vSTDlevs     = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'v850'), &
     251                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'u200'), &
     252                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'u50'), &
     253                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'u10') /)
     254                                                     
     255
     256  type(ctrl_out),save,dimension(6) :: o_vSTDlevs     = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'v850'), &
    261257                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'v700'), &
    262258                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'v500'), &
    263                                                      ctrl_out((/ 1, 1, 3, 10, 10 /),'v200') /)
    264 
    265   type(ctrl_out),save,dimension(4) :: o_wSTDlevs     = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'w850'), &
     259                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'v200'), &
     260                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'v50'), &
     261                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'v10') /)
     262
     263  type(ctrl_out),save,dimension(6) :: o_wSTDlevs     = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'w850'), &
    266264                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'w700'), &
    267265                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'w500'), &
    268                                                      ctrl_out((/ 1, 1, 3, 10, 10 /),'w200') /)
    269 
    270   type(ctrl_out),save,dimension(4) :: o_tSTDlevs     = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'t850'), &
     266                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'w200'), &
     267                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'w50'), &
     268                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'w10') /)
     269
     270  type(ctrl_out),save,dimension(6) :: o_tSTDlevs     = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'t850'), &
    271271                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'t700'), &
    272272                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'t500'), &
    273                                                      ctrl_out((/ 1, 1, 3, 10, 10 /),'t200') /)
    274 
    275   type(ctrl_out),save,dimension(4) :: o_qSTDlevs     = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'q850'), &
     273                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'t200'), &
     274                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'t50'), &
     275                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'t10') /)
     276
     277  type(ctrl_out),save,dimension(6) :: o_qSTDlevs     = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'q850'), &
    276278                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'q700'), &
    277279                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'q500'), &
    278                                                      ctrl_out((/ 1, 1, 3, 10, 10 /),'q200') /)
    279 
    280   type(ctrl_out),save,dimension(4) :: o_phiSTDlevs   = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'phi850'), &
     280                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'q200'), &
     281                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'q50'), &
     282                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'q10') /)
     283
     284  type(ctrl_out),save,dimension(6) :: o_phiSTDlevs   = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'phi850'), &
    281285                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'phi700'), &
    282286                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'phi500'), &
    283                                                      ctrl_out((/ 1, 1, 3, 10, 10 /),'phi200') /)
     287                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'phi200'), &
     288                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'phi50'), &
     289                                                     ctrl_out((/ 1, 1, 3, 10, 10 /),'phi10') /)
    284290
    285291
     
    415421  type(ctrl_out),save :: o_e_th         = ctrl_out((/ 4, 10, 10, 10, 10 /),'e_th')
    416422  type(ctrl_out),save :: o_w_th         = ctrl_out((/ 4, 10, 10, 10, 10 /),'w_th')
    417   type(ctrl_out),save :: o_lambda_th    = ctrl_out((/ 4, 10, 10, 10, 10 /),'lambda_th')
     423  type(ctrl_out),save :: o_lambda_th    = ctrl_out((/ 10, 10, 10, 10, 10 /),'lambda_th')
    418424  type(ctrl_out),save :: o_q_th         = ctrl_out((/ 4, 10, 10, 10, 10 /),'q_th')
    419425  type(ctrl_out),save :: o_a_th         = ctrl_out((/ 4, 10, 10, 10, 10 /),'a_th')
     
    488494  integer                               :: jmin_ins, jmax_ins
    489495  CHARACTER(len=20), dimension(nfiles)  :: type_ecri_files
     496  character(len=20), dimension(nfiles)  :: chtimestep
    490497
    491498!!!!!!!!!! stockage dans une region limitee pour chaque fichier !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    523530   lev_files(4) = 1
    524531   lev_files(5) = 1
     532
    525533
    526534   ecrit_files(1) = ecrit_mth
     
    531539 
    532540!! Lectures des parametres de sorties dans physiq.def
     541
    533542   call getin('phys_out_regfkey',ok_reglim)
    534543   call getin('phys_out_lonmin',lonmin_reg)
     
    542551   call getin('phys_out_filekeys',clef_files)
    543552   call getin('phys_out_filelevels',lev_files)
    544    call getin('phys_out_filetimesteps',ecrit_files)
     553   call getin('phys_out_filetimesteps',chtimestep)
     554
    545555
    546556   type_ecri(:) = type_ecri_files(:)
     
    577587
    578588    IF (clef_files(iff)) THEN
     589
     590      call convers_timesteps(chtimestep(iff),ecrit_files(iff))
    579591     
    580       zoutm(iff) = ecrit_files(iff)*86400. ! Frequence ou l on ecrit
     592      zoutm(iff) = ecrit_files(iff) ! Frequence ou l on ecrit en seconde
    581593
    582594      idayref = day_ref
     
    823835
    824836! Champs interpolles sur des niveaux de pression
    825 ! iif=1 on ecrit u v w phi sur 850 700 500 200 au niv 1
    826 ! iif=2 on ecrit w et ph 500 seulement au niv 1
    827 !        et u v sur 850 700 500 200
    828 ! iif=3 on ecrit ph a 500 seulement au niv 1
    829 !      on ecrit u v t q a 850 700 500 200 au niv 3
    830 
    831    type_ecri(1) = 'ave(X)'
    832    type_ecri(2) = 'ave(X)'
    833    type_ecri(3) = 'ave(X)'
     837
     838   type_ecri(1) = 'inst(X)'
     839   type_ecri(2) = 'inst(X)'
     840   type_ecri(3) = 'inst(X)'
    834841   type_ecri(4) = 'inst(X)'
    835842   type_ecri(5) = 'inst(X)'
     
    839846        ilev=0       
    840847        DO k=1, nlevSTD
    841      IF(k.GE.2.AND.k.LE.12) bb2=clevSTD(k)
    842 !     IF(k.GE.13.AND.k.LE.17) bb3=clevSTD(k)
    843      IF(bb2.EQ."850".OR.bb2.EQ."700".OR.bb2.EQ."500".OR.bb2.EQ."200")THEN
     848!     IF(k.GE.2.AND.k.LE.12) bb2=clevSTD(k)
     849     bb2=clevSTD(k)
     850     IF(bb2.EQ."850".OR.bb2.EQ."700".OR.bb2.EQ."500".OR.bb2.EQ."200".OR.bb2.EQ."50".OR.bb2.EQ."10")THEN
    844851      ilev=ilev+1
    845       print*,'ilev bb2 flag name ',ilev,bb2,o_uSTDlevs(ilev)%flag,o_uSTDlevs(ilev)%name
     852      print*,'ilev k bb2 flag name ',ilev,k, bb2,o_uSTDlevs(ilev)%flag,o_uSTDlevs(ilev)%name
    846853 CALL histdef2d(iff,o_uSTDlevs(ilev)%flag,o_uSTDlevs(ilev)%name,"Zonal wind "//bb2//"mb", "m/s")
    847854 CALL histdef2d(iff,o_vSTDlevs(ilev)%flag,o_vSTDlevs(ilev)%name,"Meridional wind "//bb2//"mb", "m/s")
     
    850857 CALL histdef2d(iff,o_qSTDlevs(ilev)%flag,o_qSTDlevs(ilev)%name,"Specific humidity "//bb2//"mb", "kg/kg" )
    851858 CALL histdef2d(iff,o_tSTDlevs(ilev)%flag,o_tSTDlevs(ilev)%name,"Temperature "//bb2//"mb", "K")
    852      ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR."500".OR.bb2.EQ."200")
     859     ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR."500".OR.bb2.EQ."200".OR.bb2.EQ."50".OR.bb2.EQ."10")
    853860       ENDDO
    854861   type_ecri(:) = type_ecri_files(:)
     
    11181125      END SUBROUTINE conf_physoutputs
    11191126
     1127      SUBROUTINE convers_timesteps(str,timestep)
     1128
     1129        IMPLICIT NONE
     1130
     1131        character(len=20)   :: str
     1132        character(len=10)   :: type
     1133        integer             :: ipos,il
     1134        real                :: ttt,xxx,timestep,dayseconde
     1135        parameter (dayseconde=86400.)
     1136
     1137        ipos=scan(str,'0123456789.',.true.)
     1138
     1139        il=len_trim(str)
     1140        print*,ipos,il
     1141        read(str(1:ipos),*) ttt
     1142        print*,ttt
     1143        type=str(ipos+1:il)
     1144
     1145
     1146        if ( il == ipos ) then
     1147        type='day'
     1148        endif
     1149
     1150        if ( type == 'day' ) timestep = ttt * dayseconde
     1151        if ( type == 'mth' ) timestep = ttt * dayseconde * 30.
     1152        if ( type == 'hor' ) timestep = ttt * dayseconde / 24.
     1153
     1154        print*,'type =      ',type
     1155        print*,'nb j/h/m =  ',ttt
     1156        print*,'timestep(s)=',timestep
     1157
     1158        END SUBROUTINE convers_timesteps
     1159
    11201160END MODULE phys_output_mod
    11211161
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/phys_output_write.h

    r1182 r1213  
    575575
    576576! Champs interpolles sur des niveaux de pression
    577 ! if=1 on ecrit u v w phi sur 850 700 500 200 au niv 1
    578 ! if=2 on ecrit w et ph 500 seulement au niv 1
    579 !        et u v sur 850 700 500 200
    580 ! if=3 on ecrit ph a 500 seulement au niv 1
    581 !      on ecrit u v t q a 850 700 500 200 au niv 3
    582577
    583578        ll=0
    584579        DO k=1, nlevSTD
    585          IF(k.GE.2.AND.k.LE.12) bb2=clevSTD(k)
    586          IF(k.GE.13.AND.k.LE.17) bb3=clevSTD(k)
     580!         IF(k.GE.2.AND.k.LE.12) bb2=clevSTD(k)
     581!         IF(k.GE.13.AND.k.LE.17) bb3=clevSTD(k)
     582         bb2=clevSTD(k)
    587583         IF(bb2.EQ."850".OR.bb2.EQ."700".OR.
    588      $      bb2.EQ."500".OR.bb2.EQ."200") THEN
     584     $      bb2.EQ."500".OR.bb2.EQ."200".OR.
     585     $      bb2.EQ."50".OR.bb2.EQ."10") THEN
    589586
    590587! a refaire correctement !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/physiq.F

    r1201 r1213  
    14341434     .                   lmt_pas
    14351435c
     1436cIM 030306 END
     1437
     1438      capemaxcels = 't_max(X)'
     1439      t2mincels = 't_min(X)'
     1440      t2maxcels = 't_max(X)'
     1441      tinst = 'inst(X)'
     1442      tave = 'ave(X)'
     1443cIM cf. AM 081204 BEG
     1444      write(lunout,*)'AVANT HIST IFLAG_CON=',iflag_con
     1445cIM cf. AM 081204 END
     1446c
     1447c=============================================================
     1448c   Initialisation des sorties
     1449c=============================================================
     1450
     1451#ifdef CPP_IOIPSL
     1452
     1453c$OMP MASTER
     1454       call phys_output_open(jjmp1,nlevSTD,clevSTD,nbteta,
     1455     &                        ctetaSTD,dtime,ok_veget,
     1456     &                        type_ocean,iflag_pbl,ok_mensuel,ok_journe,
     1457     &                        ok_hf,ok_instan,ok_LES,ok_ade,ok_aie)
     1458c$OMP END MASTER
     1459c$OMP BARRIER
     1460
     1461#ifdef histISCCP
     1462#include "ini_histISCCP.h"
     1463#endif
     1464
     1465#ifdef histmthNMC
     1466#include "ini_histmthNMC.h"
     1467#endif
     1468
     1469#include "ini_histday_seri.h"
     1470
     1471#include "ini_paramLMDZ_phy.h"
     1472
     1473#endif
     1474
    14361475cIM 250308bad guide        ecrit_hf2mth = 30*1/ecrit_hf
    1437          ecrit_hf2mth = ecrit_mth/ecrit_hf 
     1476         ecrit_hf2mth = ecrit_mth/ecrit_hf
    14381477
    14391478         ecrit_hf = ecrit_hf * un_jour
     
    14551494cIM 030306 END
    14561495
    1457       capemaxcels = 't_max(X)'
    1458       t2mincels = 't_min(X)'
    1459       t2maxcels = 't_max(X)'
    1460       tinst = 'inst(X)'
    1461       tave = 'ave(X)'
    1462 cIM cf. AM 081204 BEG
    1463       write(lunout,*)'AVANT HIST IFLAG_CON=',iflag_con
    1464 cIM cf. AM 081204 END
    1465 c
    1466 c=============================================================
    1467 c   Initialisation des sorties
    1468 c=============================================================
    1469 
    1470 #ifdef CPP_IOIPSL
    1471 
    1472 c$OMP MASTER
    1473        call phys_output_open(jjmp1,nlevSTD,clevSTD,nbteta,
    1474      &                        ctetaSTD,dtime,ok_veget,
    1475      &                        type_ocean,iflag_pbl,ok_mensuel,ok_journe,
    1476      &                        ok_hf,ok_instan,ok_LES,ok_ade,ok_aie)
    1477 c$OMP END MASTER
    1478 c$OMP BARRIER
    1479 
    1480 #ifdef histISCCP
    1481 #include "ini_histISCCP.h"
    1482 #endif
    1483 
    1484 #ifdef histmthNMC
    1485 #include "ini_histmthNMC.h"
    1486 #endif
    1487 
    1488 #include "ini_histday_seri.h"
    1489 
    1490 #include "ini_paramLMDZ_phy.h"
    1491 
    1492 #endif
    14931496
    14941497cXXXPB Positionner date0 pour initialisation de ORCHIDEE
Note: See TracChangeset for help on using the changeset viewer.