Ignore:
Timestamp:
Mar 6, 2017, 2:56:26 PM (7 years ago)
Author:
jyg
Message:

Addition of a diagnostic mode for add_phys_tend,
with a new argument diag_mode (=0 for normal use;
=1 for diagnostic use).

File:
1 edited

Legend:

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

    r2801 r2812  
    534534    REAL Tconv(klon,klev)
    535535    REAL sij(klon,klev,klev)
     536!!    !
     537!!    ! variables pour tester la conservation de l'energie dans concvl
     538!!    REAL, DIMENSION(klon,klev)     :: d_t_con_sat
     539!!    REAL, DIMENSION(klon,klev)     :: d_q_con_sat
     540!!    REAL, DIMENSION(klon,klev)     :: dql_sat
    536541
    537542    real, save :: alp_bl_prescr=0.
     
    821826    !
    822827    ! tendance nulles
    823     REAL, dimension(klon,klev)  :: du0, dv0, dt0, dq0, dql0, dqi0
    824     REAL, dimension(klon)       :: dsig0, ddens0
    825     INTEGER, dimension(klon)    :: wkoccur1
     828    REAL, dimension(klon,klev):: du0, dv0, dt0, dq0, dql0, dqi0
     829    REAL, dimension(klon)     :: dsig0, ddens0
     830    INTEGER, dimension(klon)  :: wkoccur1
    826831    ! tendance buffer pour appel de add_phys_tend
    827832    REAL, DIMENSION(klon,klev)  :: d_q_ch4_dtime
     
    19992004     CALL add_phys_tend &
    20002005            (du0,dv0,d_t_eva,d_q_eva,d_ql_eva,d_qi_eva,paprs,&
    2001                'eva',abortphy,flag_inhib_tend,itap)
     2006               'eva',abortphy,flag_inhib_tend,itap,0)
    20022007    call prt_enerbil('eva',itap)
    20032008
     
    22262231          CALL add_phys_tend &
    22272232               (d_u_vdf,d_v_vdf,d_t_vdf+d_t_diss,d_q_vdf,dql0,dqi0,paprs,&
    2228                'vdf',abortphy,flag_inhib_tend,itap)
     2233               'vdf',abortphy,flag_inhib_tend,itap,0)
    22292234       ENDIF
    22302235       call prt_enerbil('vdf',itap)
     
    26082613    itapcv = itapcv+1
    26092614
     2615!!!jyg  Appel diagnostique a add_phys_tend pour tester la conservation de
     2616!!!     l'energie dans les courants satures.
     2617!!    d_t_con_sat(:,:) = d_t_con(:,:) - ftd(:,:)*dtime
     2618!!    d_q_con_sat(:,:) = d_q_con(:,:) - fqd(:,:)*dtime
     2619!!    dql_sat(:,:) = (wdtrainA(:,:)+wdtrainM(:,:))*dtime/zmasse(:,:)
     2620!!    CALL add_phys_tend(d_u_con, d_v_con, d_t_con_sat, d_q_con_sat, dql_sat,   &
     2621!!                     dqi0, paprs, 'convection_sat', abortphy, flag_inhib_tend,& 
     2622!!                     itap, 1)
     2623!!    call prt_enerbil('convection_sat',itap)
     2624!!
     2625!!
    26102626    CALL add_phys_tend(d_u_con, d_v_con, d_t_con, d_q_con, dql0, dqi0, paprs, &
    2611          'convection',abortphy,flag_inhib_tend,itap)
     2627         'convection',abortphy,flag_inhib_tend,itap,0)
    26122628    call prt_enerbil('convection',itap)
    26132629
     
    27392755       ! ajout des tendances des poches froides
    27402756       CALL add_phys_tend(du0,dv0,d_t_wake,d_q_wake,dql0,dqi0,paprs,'wake', &
    2741             abortphy,flag_inhib_tend,itap)
     2757            abortphy,flag_inhib_tend,itap,0)
    27422758       call prt_enerbil('wake',itap)
    27432759       !------------------------------------------------------------------------
     
    28752891          !
    28762892          CALL add_phys_tend(d_u_ajs,d_v_ajs,d_t_ajs,d_q_ajs,  &
    2877                              dql0,dqi0,paprs,'thermals', abortphy,flag_inhib_tend,itap)
     2893                             dql0,dqi0,paprs,'thermals', abortphy,flag_inhib_tend,itap,0)
    28782894          call prt_enerbil('thermals',itap)
    28792895          !
     
    29382954          ! ajout des tendances de l'ajustement sec ou des thermiques
    29392955          CALL add_phys_tend(du0,dv0,d_t_ajsb,d_q_ajsb,dql0,dqi0,paprs, &
    2940                'ajsb',abortphy,flag_inhib_tend,itap)
     2956               'ajsb',abortphy,flag_inhib_tend,itap,0)
    29412957          call prt_enerbil('ajsb',itap)
    29422958          d_t_ajs(:,:)=d_t_ajs(:,:)+d_t_ajsb(:,:)
     
    29893005!-JLD
    29903006    CALL add_phys_tend(du0,dv0,d_t_lsc,d_q_lsc,d_ql_lsc,d_qi_lsc,paprs, &
    2991          'lsc',abortphy,flag_inhib_tend,itap)
     3007         'lsc',abortphy,flag_inhib_tend,itap,0)
    29923008    call prt_enerbil('lsc',itap)
    29933009    rain_num(:)=0.
     
    37693785    ENDDO
    37703786
    3771     CALL add_phys_tend(du0,dv0,d_t_swr,dq0,dql0,dqi0,paprs,'SW',abortphy,flag_inhib_tend,itap)
     3787    CALL add_phys_tend(du0,dv0,d_t_swr,dq0,dql0,dqi0,paprs,'SW',abortphy,flag_inhib_tend,itap,0)
    37723788    call prt_enerbil('SW',itap)
    3773     CALL add_phys_tend(du0,dv0,d_t_lwr,dq0,dql0,dqi0,paprs,'LW',abortphy,flag_inhib_tend,itap)
     3789    CALL add_phys_tend(du0,dv0,d_t_lwr,dq0,dql0,dqi0,paprs,'LW',abortphy,flag_inhib_tend,itap,0)
    37743790    call prt_enerbil('LW',itap)
    37753791
     
    38423858       ! ajout des tendances de la trainee de l'orographie
    38433859       CALL add_phys_tend(d_u_oro,d_v_oro,d_t_oro,dq0,dql0,dqi0,paprs,'oro', &
    3844             abortphy,flag_inhib_tend,itap)
     3860            abortphy,flag_inhib_tend,itap,0)
    38453861       call prt_enerbil('oro',itap)
    38463862       !----------------------------------------------------------------------
     
    38893905       ! ajout des tendances de la portance de l'orographie
    38903906       CALL add_phys_tend(d_u_lif, d_v_lif, d_t_lif, dq0, dql0, dqi0, paprs, &
    3891             'lif', abortphy,flag_inhib_tend,itap)
     3907            'lif', abortphy,flag_inhib_tend,itap,0)
    38923908       call prt_enerbil('lif',itap)
    38933909    ENDIF ! fin de test sur ok_orolf
     
    39133929       d_t_hin(:, :)=0.
    39143930       CALL add_phys_tend(du_gwd_hines, dv_gwd_hines, d_t_hin, dq0, dql0, &
    3915             dqi0, paprs, 'hin', abortphy,flag_inhib_tend,itap)
     3931            dqi0, paprs, 'hin', abortphy,flag_inhib_tend,itap,0)
    39163932       call prt_enerbil('hin',itap)
    39173933    ENDIF
     
    39313947
    39323948       CALL add_phys_tend(du_gwd_front, dv_gwd_front, dt0, dq0, dql0, dqi0, &
    3933             paprs, 'front_gwd_rando', abortphy,flag_inhib_tend,itap)
     3949            paprs, 'front_gwd_rando', abortphy,flag_inhib_tend,itap,0)
    39343950       call prt_enerbil('front_gwd_rando',itap)
    39353951    ENDIF
     
    39403956            du_gwd_rando, dv_gwd_rando, east_gwstress, west_gwstress)
    39413957       CALL add_phys_tend(du_gwd_rando, dv_gwd_rando, dt0, dq0, dql0, dqi0, &
    3942             paprs, 'flott_gwd_rando', abortphy,flag_inhib_tend,itap)
     3958            paprs, 'flott_gwd_rando', abortphy,flag_inhib_tend,itap,0)
    39433959       call prt_enerbil('flott_gwd_rando',itap)
    39443960       zustr_gwd_rando=0.
     
    39924008       d_q_ch4_dtime(:,:) = d_q_ch4(:,:)*dtime
    39934009       CALL add_phys_tend(du0, dv0, dt0, d_q_ch4_dtime, dql0, dqi0, paprs, &
    3994             'q_ch4', abortphy,flag_inhib_tend,itap)
     4010            'q_ch4', abortphy,flag_inhib_tend,itap,0)
    39954011       d_q_ch4(:,:) = d_q_ch4_dtime(:,:)/dtime
    39964012    ENDIF
Note: See TracChangeset for help on using the changeset viewer.