Ignore:
Timestamp:
Nov 28, 2014, 4:36:29 PM (10 years ago)
Author:
Laurent Fairhead
Message:

Merged trunk changes -r2070:2158 into testing branch. Compilation problems introduced by revision r2155 have been corrected by hand

Location:
LMDZ5/branches/testing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/testing

  • LMDZ5/branches/testing/libf/phylmd/1D_read_forc_cases.h

    r2056 r2160  
    290290
    291291      if (forcing_amma) then
    292 !read AMMA forcings
    293       fich_amma='amma.nc'
    294       call read_amma(fich_amma,nlev_amma,nt_amma                            &
    295      &     ,z_amma,plev_amma,th_amma,q_amma,u_amma,v_amma,vitw_amma         &
    296      &     ,ht_amma,hq_amma,sens_amma,lat_amma)
     292
     293      call read_1D_cases
    297294
    298295      write(*,*) 'Forcing AMMA lu'
     
    357354      endif !forcing_amma
    358355
     356
     357!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     358!---------------------------------------------------------------------
     359! Forcing from DICE experiment (see file DICE_protocol_vn2-3.pdf)
     360!---------------------------------------------------------------------
     361
     362      if (forcing_dice) then
     363!read DICE forcings
     364      fich_dice='dice_driver.nc'
     365      call read_dice(fich_dice,nlev_dice,nt_dice                    &
     366     &     ,zz_dice,plev_dice,th_dice,qv_dice,u_dice,v_dice,o3_dice &
     367     &     ,shf_dice,lhf_dice,lwup_dice,swup_dice,tg_dice,ustar_dice&
     368     &     ,psurf_dice,ug_dice,vg_dice,ht_dice,hq_dice              &
     369     &     ,hu_dice,hv_dice,w_dice,omega_dice)
     370
     371      write(*,*) 'Forcing DICE lu'
     372
     373!champs initiaux:
     374      do k=1,nlev_dice
     375         th_dicei(k)=th_dice(k)
     376         qv_dicei(k)=qv_dice(k)
     377         u_dicei(k)=u_dice(k)
     378         v_dicei(k)=v_dice(k)
     379         o3_dicei(k)=o3_dice(k)
     380         ht_dicei(k)=ht_dice(k,1)
     381         hq_dicei(k)=hq_dice(k,1)
     382         hu_dicei(k)=hu_dice(k,1)
     383         hv_dicei(k)=hv_dice(k,1)
     384         w_dicei(k)=w_dice(k,1)
     385         omega_dicei(k)=omega_dice(k,1)
     386      enddo   
     387      omega(:)=0.     
     388      omega2(:)=0.
     389      rho(:)=0.
     390! vertical interpolation using TOGA interpolation routine:
     391!      write(*,*)'avant interp vert', t_proftwp
     392!
     393!     CALL interp_dice_time(daytime,day1,annee_ref
     394!    i             ,year_ini_dice,day_ju_ini_dice,nt_dice,dt_dice
     395!    i             ,nlev_dice,shf_dice,lhf_dice,lwup_dice,swup_dice
     396!    i             ,tg_dice,ustar_dice,psurf_dice,ug_dice,vg_dice
     397!    i             ,ht_dice,hq_dice,hu_dice,hv_dice,w_dice,omega_dice
     398!    o             ,shf_prof,lhf_prof,lwup_prof,swup_prof,tg_prof
     399!    o             ,ustar_prof,psurf_prof,ug_profd,vg_profd
     400!    o             ,ht_profd,hq_profd,hu_profd,hv_profd,w_profd
     401!    o             ,omega_profd)
     402
     403      CALL interp_dice_vertical(play,nlev_dice,nt_dice,plev_dice       &
     404     &         ,th_dicei,qv_dicei,u_dicei,v_dicei,o3_dicei             &
     405     &         ,ht_dicei,hq_dicei,hu_dicei,hv_dicei,w_dicei,omega_dicei&
     406     &         ,th_mod,qv_mod,u_mod,v_mod,o3_mod                       &
     407     &         ,ht_mod,hq_mod,hu_mod,hv_mod,w_mod,omega_mod,mxcalc)
     408
     409! Pour tester les advections horizontales de T et Q, on met w_mod et omega_mod à zero (MPL 20131108)
     410!     w_mod(:,:)=0.
     411!     omega_mod(:,:)=0.
     412
     413!       write(*,*) 'Profil initial forcing DICE interpole',t_mod
     414! Les forcages DICE sont donnes /jour et non /seconde !
     415      ht_mod(:)=ht_mod(:)/86400.
     416      hq_mod(:)=hq_mod(:)/86400.
     417      hu_mod(:)=hu_mod(:)/86400.
     418      hv_mod(:)=hv_mod(:)/86400.
     419
     420! initial and boundary conditions :
     421      write(*,*) 'SST initiale mxcalc: ',tsurf,mxcalc
     422      do l = 1, llm
     423! Ligne du dessous à decommenter si on lit theta au lieu de temp
     424       temp(l) = th_mod(l)*(play(l)/pzero)**rkappa
     425!      temp(l) = t_mod(l)
     426       q(l,1) = qv_mod(l)
     427       q(l,2) = 0.0
     428!      print *,'read_forc: l,temp,q=',l,temp(l),q(l,1)
     429       u(l) = u_mod(l)
     430       v(l) = v_mod(l)
     431       ug(l)=ug_dice(1)
     432       vg(l)=vg_dice(1)
     433       rho(l)  = play(l)/(rd*temp(l)*(1.+(rv/rd-1.)*q(l,1)))
     434!      omega(l) = w_mod(l)*(-rg*rho(l))
     435       omega(l) = omega_mod(l)
     436       omega2(l)=omega(l)/rg*airefi ! flxmass_w calcule comme ds physiq
     437
     438       alpha = rd*temp(l)*(1.+(rv/rd-1.)*q(l,1))/play(l)
     439!on applique le forcage total au premier pas de temps
     440!attention: signe different de toga
     441       d_th_adv(l) = alpha*omega(l)/rcpd+ht_mod(l)
     442!forcage en th
     443!       d_th_adv(l) = ht_mod(l)
     444       d_q_adv(l,1) = hq_mod(l)
     445       d_q_adv(l,2) = 0.0
     446       dt_cooling(l)=0.
     447      enddo     
     448       write(*,*) 'Profil initial forcing DICE interpole temp39',temp(39)
     449     
     450
     451!     ok_flux_surf=.false.
     452      fsens=-1.*shf_dice(1)
     453      flat=-1.*lhf_dice(1)
     454! Le cas Dice doit etre force avec ustar mais on peut simplifier en forcant par
     455! le coefficient de trainee en surface cd**2=ustar*vent(k=1)
     456! On commence ici a stocker ustar dans cdrag puis on terminera le calcul dans pbl_surface
     457! MPL 05082013
     458      ust=ustar_dice(1)
     459      tg=tg_dice(1)
     460      print *,'ust= ',ust
     461      IF (tsurf .LE. 0.) THEN
     462       tsurf= tg_dice(1)
     463      ENDIF
     464      psurf= psurf_dice(1)
     465      solsw_in = (1.-albedo)/albedo*swup_dice(1)
     466      sollw_in = (0.7*RSIGMA*temp(1)**4)-lwup_dice(1)
     467      PRINT *,'1D_READ_FORC : solsw, sollw',solsw_in,sollw_in
     468      endif !forcing_dice
    359469
    360470!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Note: See TracChangeset for help on using the changeset viewer.