Changeset 3595 for LMDZ6/trunk


Ignore:
Timestamp:
Oct 29, 2019, 9:48:03 AM (5 years ago)
Author:
fhourdin
Message:

Details SCM standard format

Location:
LMDZ6/trunk/libf/phylmd/dyn1d
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/dyn1d/mod_1D_cases_read_std.F90

    r3594 r3595  
    393393! Activation de quelques cles en fonction des variables disponibles
    394394!-----------------------------------------------------------------------
    395 if ( 1 == 0 ) THEN
     395if ( 1 == 1 ) THEN
    396396            if ( name_var(i) == 'temp_nudg' .and. nint(nudging_t)==0) stop 'Nudging inconsistency temp'
    397397            if ( name_var(i) == 'qv_nudg' .and. nint(nudging_qv)==0) stop 'Nudging inconsistency qv'
  • LMDZ6/trunk/libf/phylmd/dyn1d/scm.F90

    r3594 r3595  
    5959! DECLARATIONS
    6060!=====================================================================
     61
     62#undef OUTPUT_PHYS_SCM
    6163
    6264!---------------------------------------------------------------------
     
    142144!                                                            (cf read_tsurf1d.F)
    143145
    144 real wwww
    145 !vertical advection computation
    146 !       real d_t_z(llm), d_q_z(llm)
    147 !       real d_t_dyn_z(llm), dq_dyn_z(llm)
    148 !       real zz(llm)
    149 !       real zfact
    150 
    151146!flag forcings
    152147        logical :: nudge_wind=.true.
     
    191186      real :: sfdt, cfdt
    192187      real :: du_phys(llm),dv_phys(llm),dt_phys(llm)
    193       real :: dt_dyn(llm)
     188      real :: w_adv(llm),z_adv(llm)
     189      real :: d_t_vert_adv(llm),d_u_vert_adv(llm),d_v_vert_adv(llm)
    194190      real :: dt_cooling(llm),d_t_adv(llm),d_t_nudge(llm)
    195191      real :: d_u_nudge(llm),d_v_nudge(llm)
     
    201197      REAL, ALLOCATABLE, DIMENSION(:,:):: q
    202198      REAL, ALLOCATABLE, DIMENSION(:,:):: dq
    203       REAL, ALLOCATABLE, DIMENSION(:,:):: dq_dyn
     199      REAL, ALLOCATABLE, DIMENSION(:,:):: d_q_vert_adv
    204200      REAL, ALLOCATABLE, DIMENSION(:,:):: d_q_adv
    205201      REAL, ALLOCATABLE, DIMENSION(:,:):: d_q_nudge
     
    269265      dv_phys(:)=0.
    270266      dt_phys(:)=0.
    271       dt_dyn(:)=0.
     267      d_t_vert_adv(:)=0.
     268      d_u_vert_adv(:)=0.
     269      d_v_vert_adv(:)=0.
    272270      dt_cooling(:)=0.
    273271      d_t_adv(:)=0.
     
    420418      allocate(q(llm,nqtot)) ; q(:,:)=0.
    421419      allocate(dq(llm,nqtot))
    422       allocate(dq_dyn(llm,nqtot))
     420      allocate(d_q_vert_adv(llm,nqtot))
    423421      allocate(d_q_adv(llm,nqtot))
    424422      allocate(d_q_nudge(llm,nqtot))
     
    427425      q(:,:) = 0.
    428426      dq(:,:) = 0.
    429       dq_dyn(:,:) = 0.
     427      d_q_vert_adv(:,:) = 0.
    430428      d_q_adv(:,:) = 0.
    431429      d_q_nudge(:,:) = 0.
     
    808806! raz for safety
    809807       do l=1,llm
    810          dq_dyn(l,1) = 0.
     808         d_q_vert_adv(l,1) = 0.
    811809       enddo
    812810      endif
     
    819817!
    820818!=====================================================================
     819#ifdef OUTPUT_PHYS_SCM
    821820       CALL iophys_ini
     821#endif
    822822! START OF THE TEMPORAL LOOP :
    823823!=====================================================================
     
    841841#include "1D_interp_cases.h"
    842842   ! Vertical advection
    843 !  call lstendH(llm,nqtot,omega,dt_dyn,dq_dyn,q,temp,u,v,play)
     843!  call lstendH(llm,nqtot,omega,d_t_vert_adv,d_q_vert_adv,q,temp,u,v,play)
    844844!  print*,'B d_t_adv ',d_t_adv(1:20)*86400
    845 !  print*,'B dt_dyn ',dt_dyn(1:20)*86400
     845!  print*,'B d_t_vert_adv ',d_t_vert_adv(1:20)*86400
    846846!  print*,'B dt omega ',omega
    847    teta=temp*(pzero/play)**rkappa
    848    do l=2,llm-1
    849      dt_dyn(l)=-(omega(l)*(teta(l+1)-teta(l-1))/(play(l+1)-play(l-1)))/(pzero/play(l))**rkappa
    850      dq_dyn(l,1)=-omega(l)*(q(l+1,1)-q(l-1,1))/(play(l+1)-play(l-1))
    851    enddo
    852    d_t_adv(:)=d_t_adv(:)+dt_dyn(:)
    853    d_q_adv(:,1)=d_q_adv(:,1)+dq_dyn(:,1)
    854 
    855    print*,'OMEGA ',omega_mod_cas(10),omega(10)
     847
    856848!---------------------------------------------------------------------
    857849!  Geopotential :
     
    863855     &    (play(l)-play(l+1))/(play(l)+play(l+1))
    864856        enddo
     857
     858!---------------------------------------------------------------------
     859!  Vertical advection
     860!---------------------------------------------------------------------
     861
     862   IF ( forc_w+forc_omega > 0 ) THEN
     863
     864      IF ( forc_w == 1 ) THEN
     865         w_adv=w_mod_cas
     866         z_adv=phi/RG
     867      ELSE
     868         w_adv=omega
     869         z_adv=play
     870      ENDIF
     871
     872      teta=temp*(pzero/play)**rkappa
     873      do l=2,llm-1
     874        d_u_vert_adv(l)=-w_adv(l)*(u(l+1)-u(l-1))/(z_adv(l+1)-z_adv(l-1))
     875        d_v_vert_adv(l)=-w_adv(l)*(v(l+1)-v(l-1))/(z_adv(l+1)-z_adv(l-1))
     876        d_t_vert_adv(l)=-(w_adv(l)*(teta(l+1)-teta(l-1))/(z_adv(l+1)-z_adv(l-1)))/(pzero/play(l))**rkappa
     877        d_q_vert_adv(l,1)=-w_adv(l)*(q(l+1,1)-q(l-1,1))/(z_adv(l+1)-z_adv(l-1))
     878      enddo
     879      d_t_adv(:)=d_t_adv(:)+d_t_vert_adv(:)
     880      d_q_adv(:,1)=d_q_adv(:,1)+d_q_vert_adv(:,1)
     881
     882      print*,'OMEGA ',w_adv(10),z_adv(10)
     883
     884   ENDIF
    865885
    866886!---------------------------------------------------------------------
     
    882902     &   presnivs(l),u(l),v(l),temp(l),q(l,1),q(l,2),omega2(l),l=1,llm)
    883903       endif
    884 
    885        CALL iophys_ecrit('dtadv',klev,'dtadv','K/day',86400*d_t_adv)
    886        CALL iophys_ecrit('dtdyn',klev,'dtdyn','K/day',86400*dt_dyn)
    887904
    888905!---------------------------------------------------------------------
     
    10211038             & d_q_nudge(l,1)=(qv_nudg_mod_cas(l)-q(l,1))/nudging_qv
    10221039      ENDDO
     1040
     1041#ifdef OUTPUT_PHYS_SCM
     1042      CALL iophys_ecrit('w_adv',klev,'w_adv','K/day',w_adv)
     1043      CALL iophys_ecrit('z_adv',klev,'z_adv','K/day',z_adv)
     1044      CALL iophys_ecrit('dtadv',klev,'dtadv','K/day',86400*d_t_adv)
     1045      CALL iophys_ecrit('dtdyn',klev,'dtdyn','K/day',86400*d_t_vert_adv)
    10231046      CALL iophys_ecrit('qv',klev,'qv','g/kg',1000*q(:,1))
    10241047      CALL iophys_ecrit('qvnud',klev,'qvnud','g/kg',1000*u_nudg_mod_cas)
     
    10271050      CALL iophys_ecrit('v',klev,'v','m/s',v)
    10281051      CALL iophys_ecrit('vnud',klev,'vnud','m/s',v_nudg_mod_cas)
     1052      CALL iophys_ecrit('temp',klev,'temp','K',temp)
     1053      CALL iophys_ecrit('tempnud',klev,'temp_nudg_mod_cas','K',temp_nudg_mod_cas)
    10291054      CALL iophys_ecrit('dtnud',klev,'dtnud','K/day',86400*d_t_nudge)
    10301055      CALL iophys_ecrit('dqnud',klev,'dqnud','K/day',1000*86400*d_q_nudge(:,1))
     1056#endif
    10311057
    10321058!
Note: See TracChangeset for help on using the changeset viewer.