Changeset 1641


Ignore:
Timestamp:
Jul 24, 2012, 4:16:30 PM (12 years ago)
Author:
jghattas
Message:
  • Corrected bug while using parameter phys_out_filetimestep instead of ecrit_mth : cosp did not write at correct timestep. This correction also corrects timestep in histday_seri.nc file.
  • Replaced use of lev_histmth by logical swaero_diag in sw_aeroAR4.f90. swaero_diag is true if at least one of following variables are defined in output file : topswad, topswai, solswad, solswai
Location:
LMDZ5/trunk/libf/phylmd
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/phys_output_mod.F90

    r1638 r1641  
    3333  CHARACTER(len=20), dimension(nfiles), private, save   :: type_ecri
    3434  !$OMP THREADPRIVATE(nhorim, nvertm, zoutm,zdtime,type_ecri)
     35 ! swaero_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics
     36  logical, save                                :: swaero_diag=.FALSE.
     37
    3538
    3639  !   integer, save                     :: nid_hf3d
     
    826829    DO iff=1,nfiles
    827830
     831       ! Calculate ecrit_files for all files
     832       if ( chtimestep(iff).eq.'DefFreq' ) then
     833          ! Par defaut ecrit_files = (ecrit_mensuel ecrit_jour ecrit_hf ...)*86400.
     834          ecrit_files(iff)=ecrit_files(iff)*86400.
     835       else
     836          call convers_timesteps(chtimestep(iff),dtime,ecrit_files(iff))
     837       endif
     838       write(lunout,*)'ecrit_files(',iff,')= ',ecrit_files(iff)
     839
     840       zoutm(iff) = ecrit_files(iff) ! Frequence ou l on ecrit en seconde
     841
    828842       IF (clef_files(iff)) THEN
    829 
    830           if ( chtimestep(iff).eq.'DefFreq' ) then
    831              ! Par defaut ecrit_files = (ecrit_mensuel ecrit_jour ecrit_hf ...)*86400.
    832              ecrit_files(iff)=ecrit_files(iff)*86400.
    833           else
    834              call convers_timesteps(chtimestep(iff),dtime,ecrit_files(iff))
    835           endif
    836           write(lunout,*)'ecrit_files(',iff,')= ',ecrit_files(iff)
    837 
    838           zoutm(iff) = ecrit_files(iff) ! Frequence ou l on ecrit en seconde
    839843
    840844          idayref = day_ref
     
    17751779
    17761780    ENDDO !  iff
     1781
     1782    ! Updated write frequencies due to phys_out_filetimesteps.
     1783    ! Write frequencies are now in seconds. 
     1784    ecrit_mth = ecrit_files(1)
     1785    ecrit_day = ecrit_files(2)
     1786    ecrit_hf  = ecrit_files(3)
     1787    ecrit_ins = ecrit_files(4)
     1788    ecrit_LES = ecrit_files(5)
     1789    ecrit_ins = ecrit_files(6)
     1790
     1791    write(lunout,*)'swaero_diag=',swaero_diag
    17771792    write(lunout,*)'Fin phys_output_mod.F90'
    17781793  end subroutine phys_output_open
     
    18231838       endif
    18241839    endif
     1840
     1841    ! Set swaero_diag=true if at least one of the concerned variables are defined
     1842    if (nomvar=='topswad' .OR. nomvar=='topswai' .OR. nomvar=='solswad' .OR. nomvar=='solswai' ) THEN
     1843       if  ( flag_var(iff)<=lev_files(iff) ) then
     1844          swaero_diag=.TRUE.
     1845       end if
     1846    end if
    18251847  end subroutine histdef2d
    18261848
  • LMDZ5/trunk/libf/phylmd/physiq.F

    r1639 r1641  
    16611661
    16621662#endif
    1663 
    1664 
    1665          ecrit_hf = ecrit_hf * un_jour
    1666 cIM
    1667          IF(ecrit_day.LE.1.) THEN
    1668           ecrit_day = ecrit_day * un_jour !en secondes
    1669          ENDIF
    1670 cIM
    1671          ecrit_mth = ecrit_mth * un_jour
    1672          ecrit_ins = ecrit_ins * un_jour
    16731663         ecrit_reg = ecrit_reg * un_jour
    16741664         ecrit_tra = ecrit_tra * un_jour
    1675          ecrit_LES = ecrit_LES * un_jour
    1676 c
    1677 
     1665       
    16781666cXXXPB Positionner date0 pour initialisation de ORCHIDEE
    16791667      date0 = jD_ref
  • LMDZ5/trunk/libf/phylmd/sw_aeroAR4.F90

    r1575 r1641  
    2121
    2222  USE dimphy
    23 
     23  USE phys_output_mod, ONLY : swaero_diag
    2424  IMPLICIT NONE
    2525
     
    242242
    243243! clear sky is either computed IF no direct effect is asked for, or for extended diag)
    244      IF (( lev_histmth .ge. 4 ) .or. ( .not. ok_ade )) THEN   
     244     IF (swaero_diag .or. .not. ok_ade ) THEN   
    245245
    246246     ! clear-sky: zero aerosol effect
     
    271271
    272272! cloudy sky is either computed IF no indirect effect is asked for, or for extended diag)
    273      IF (( lev_histmth .ge. 4 ) .or. ( .not. ok_aie )) THEN   
     273     IF (swaero_diag .or. .not. ok_aie ) THEN   
    274274     ! cloudy-sky: zero aerosol effect
    275275     flag_aer=0.0
     
    330330
    331331! cloudy sky is either computed IF no indirect effect is asked for, or for extended diag)
    332         IF (( lev_histmth .ge. 2 ) .or. (.not. ok_aie)) THEN 
     332        IF (swaero_diag .or. .not. ok_aie) THEN 
    333333        ! cloudy-sky aerosol direct effect of total aerosol
    334334        flag_aer=1.0
     
    359359
    360360! natural aeroosl clear sky is  computed  for extended diag)
    361         IF ( lev_histmth .ge. 4 ) THEN           
     361        IF ( swaero_diag ) THEN           
    362362        ! clear sky direct effect natural aerosol
    363363        flag_aer=1.0
     
    388388
    389389! cloud sky natural is for extended diagnostics
    390         IF ( lev_histmth .ge. 2 ) THEN
     390        IF ( swaero_diag ) THEN
    391391        ! cloudy-sky direct effect natural aerosol
    392392        flag_aer=1.0
Note: See TracChangeset for help on using the changeset viewer.