Ignore:
Timestamp:
Feb 3, 2015, 11:00:57 AM (9 years ago)
Author:
fhourdin
Message:

Ajout du cas 1D CINDY-DYNAMO, utilisant le nouveau format standard, amené à être étendu aux autres cas.
Addition of the CINDY-DYNAMO 1D case, using the new standard format for 1D cases, that will be extended to all 1D cases.
Catherine Rio

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/1D_interp_cases.h

    r2126 r2191  
    597597      enddo
    598598      endif ! forcing_astex
    599 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    600 
     599
     600!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     601!---------------------------------------------------------------------
     602! Interpolation forcing standard case
     603!---------------------------------------------------------------------
     604      if (forcing_case) then
     605
     606        print*,                                                             &
     607     & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/pdt_cas=',     &
     608     &    daytime,day1,(daytime-day1)*86400.,                               &
     609     &    (daytime-day1)*86400/pdt_cas
     610
     611! time interpolation:
     612        CALL interp_case_time(daytime,day1,annee_ref                        &
     613     &       ,year_ini_cas,day_ju_ini_cas,nt_cas,pdt_cas,nlev_cas       &
     614     &       ,ts_cas,plev_cas,t_cas,q_cas,u_cas,v_cas,ug_cas,vg_cas    &
     615     &       ,vitw_cas,du_cas,hu_cas,vu_cas           &
     616     &       ,dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dtrad_cas             &
     617     &       ,dq_cas,hq_cas,vq_cas,lat_cas,sens_cas                 &
     618     &       ,ts_prof_cas,plev_prof_cas,t_prof_cas,q_prof_cas,u_prof_cas,v_prof_cas         &
     619     &       ,ug_prof_cas,vg_prof_cas,vitw_prof_cas,du_prof_cas,hu_prof_cas,vu_prof_cas     &
     620     &       ,dv_prof_cas,hv_prof_cas,vv_prof_cas,dt_prof_cas,ht_prof_cas,vt_prof_cas       &
     621     &       ,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas,lat_prof_cas               &
     622     &       ,sens_prof_cas)
     623
     624             ts_cur = ts_prof_cas
     625             psurf=plev_prof_cas(1)
     626
     627! vertical interpolation:
     628      CALL interp_case_vertical(play,nlev_cas,plev_prof_cas            &
     629     &         ,t_prof_cas,q_prof_cas,u_prof_cas,v_prof_cas,ug_prof_cas,vg_prof_cas,vitw_prof_cas                         &
     630     &         ,du_prof_cas,hu_prof_cas,vu_prof_cas,dv_prof_cas,hv_prof_cas,vv_prof_cas           &
     631     &         ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas           &
     632     &         ,t_mod_cas,q_mod_cas,u_mod_cas,v_mod_cas,ug_mod_cas,vg_mod_cas,w_mod_cas                              &
     633     &         ,du_mod_cas,hu_mod_cas,vu_mod_cas,dv_mod_cas,hv_mod_cas,vv_mod_cas               &
     634     &         ,dt_mod_cas,ht_mod_cas,vt_mod_cas,dtrad_mod_cas,dq_mod_cas,hq_mod_cas,vq_mod_cas,mxcalc)
     635
     636
     637!calcul de l'advection verticale a partir du omega
     638!Calcul des gradients verticaux
     639!initialisation
     640      d_t_z(:)=0.
     641      d_q_z(:)=0.
     642      d_u_z(:)=0.
     643      d_v_z(:)=0.
     644      d_t_dyn_z(:)=0.
     645      d_q_dyn_z(:)=0.
     646      d_u_dyn_z(:)=0.
     647      d_v_dyn_z(:)=0.
     648      DO l=2,llm-1
     649       d_t_z(l)=(temp(l+1)-temp(l-1))/(play(l+1)-play(l-1))
     650       d_q_z(l)=(q(l+1,1)-q(l-1,1))/(play(l+1)-play(l-1))
     651       d_u_z(l)=(u(l+1)-u(l-1))/(play(l+1)-play(l-1))
     652       d_v_z(l)=(v(l+1)-v(l-1))/(play(l+1)-play(l-1))
     653      ENDDO
     654      d_t_z(1)=d_t_z(2)
     655      d_q_z(1)=d_q_z(2)
     656      d_u_z(1)=d_u_z(2)
     657      d_v_z(1)=d_v_z(2)
     658      d_t_z(llm)=d_t_z(llm-1)
     659      d_q_z(llm)=d_q_z(llm-1)
     660      d_u_z(llm)=d_u_z(llm-1)
     661      d_v_z(llm)=d_v_z(llm-1)
     662
     663!Calcul de l advection verticale
     664      d_t_dyn_z(:)=w_mod_cas(:)*d_t_z(:)
     665      d_q_dyn_z(:)=w_mod_cas(:)*d_q_z(:)
     666      d_u_dyn_z(:)=w_mod_cas(:)*d_u_z(:)
     667      d_v_dyn_z(:)=w_mod_cas(:)*d_v_z(:)
     668
     669!wind nudging
     670      if (nudge_u.gt.0.) then
     671        do l=1,llm
     672           u(l)=u(l)+timestep*(u_mod_cas(l)-u(l))/(nudge_u)
     673        enddo
     674      else
     675        do l=1,llm
     676        u(l) = u_mod_cas(l)
     677        enddo
     678      endif
     679
     680      if (nudge_v.gt.0.) then
     681        do l=1,llm
     682           v(l)=v(l)+timestep*(v_mod_cas(l)-v(l))/(nudge_v)
     683        enddo
     684      else
     685        do l=1,llm
     686        v(l) = v_mod_cas(l)
     687        enddo
     688      endif
     689
     690      if (nudge_w.gt.0.) then
     691        do l=1,llm
     692           w(l)=w(l)+timestep*(w_mod_cas(l)-w(l))/(nudge_w)
     693        enddo
     694      else
     695        do l=1,llm
     696        w(l) = w_mod_cas(l)
     697        enddo
     698      endif
     699
     700!nudging of q and temp
     701      if (nudge_t.gt.0.) then
     702        do l=1,llm
     703           temp(l)=temp(l)+timestep*(t_mod_cas(l)-temp(l))/(nudge_t)
     704        enddo
     705      endif
     706      if (nudge_q.gt.0.) then
     707        do l=1,llm
     708           q(l,1)=q(l,1)+timestep*(q_mod_cas(l)-q(l,1))/(nudge_q)
     709        enddo
     710      endif
     711
     712      do l = 1, llm
     713       omega(l) = w_mod_cas(l)
     714       omega2(l)= omega(l)/rg*airefi ! flxmass_w calcule comme ds physiq
     715       alpha = rd*temp(l)*(1.+(rv/rd-1.)*q(l,1))/play(l)
     716
     717!calcul advection
     718        if ((tend_u.eq.1).and.(tend_w.eq.0)) then
     719           d_u_adv(l)=du_mod_cas(l)
     720        else if ((tend_u.eq.1).and.(tend_w.eq.1)) then
     721           d_u_adv(l)=hu_mod_cas(l)-d_u_dyn_z(l)
     722        endif
     723
     724        if ((tend_v.eq.1).and.(tend_w.eq.0)) then
     725           d_v_adv(l)=dv_mod_cas(l)
     726        else if ((tend_v.eq.1).and.(tend_w.eq.1)) then
     727           d_v_adv(l)=hv_mod_cas(l)-d_v_dyn_z(l)
     728        endif
     729
     730        if ((tend_t.eq.1).and.(tend_w.eq.0)) then
     731!           d_th_adv(l)=alpha*omega(l)/rcpd+dt_mod_cas(l)
     732           d_th_adv(l)=alpha*omega(l)/rcpd-dt_mod_cas(l)
     733        else if ((tend_t.eq.1).and.(tend_w.eq.1)) then
     734!           d_th_adv(l)=alpha*omega(l)/rcpd+ht_mod_cas(l)-d_t_dyn_z(l)
     735           d_th_adv(l)=alpha*omega(l)/rcpd-ht_mod_cas(l)-d_t_dyn_z(l)
     736        endif
     737
     738        if ((tend_q.eq.1).and.(tend_w.eq.0)) then
     739!           d_q_adv(l,1)=dq_mod_cas(l)
     740           d_q_adv(l,1)=-1*dq_mod_cas(l)
     741        else if ((tend_q.eq.1).and.(tend_w.eq.1)) then
     742!           d_q_adv(l,1)=hq_mod_cas(l)-d_q_dyn_z(l)
     743           d_q_adv(l,1)=-1*hq_mod_cas(l)-d_q_dyn_z(l)
     744        endif
     745         
     746        if (tend_rayo.eq.1) then
     747           dt_cooling(l) = dtrad_mod_cas(l)
     748        else
     749           dt_cooling(l) = 0.0
     750        endif
     751      enddo
     752
     753      endif ! forcing_case
     754
     755
     756!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     757
Note: See TracChangeset for help on using the changeset viewer.