- Timestamp:
- Nov 30, 2016, 1:28:41 PM (8 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 2665-2668,2670-2674,2677-2681,2683-2684,2686,2690-2719
- Property svn:mergeinfo changed
-
LMDZ5/branches/testing/libf/phylmd/dyn1d/1D_read_forc_cases.h
r2408 r2720 367 367 fich_dice='dice_driver.nc' 368 368 call read_dice(fich_dice,nlev_dice,nt_dice & 369 & ,zz_dice,plev_dice,t h_dice,qv_dice,u_dice,v_dice,o3_dice &369 & ,zz_dice,plev_dice,t_dice,qv_dice,u_dice,v_dice,o3_dice & 370 370 & ,shf_dice,lhf_dice,lwup_dice,swup_dice,tg_dice,ustar_dice& 371 371 & ,psurf_dice,ug_dice,vg_dice,ht_dice,hq_dice & … … 376 376 !champs initiaux: 377 377 do k=1,nlev_dice 378 t h_dicei(k)=th_dice(k)378 t_dicei(k)=t_dice(k) 379 379 qv_dicei(k)=qv_dice(k) 380 380 u_dicei(k)=u_dice(k) … … 405 405 406 406 CALL interp_dice_vertical(play,nlev_dice,nt_dice,plev_dice & 407 & ,t h_dicei,qv_dicei,u_dicei,v_dicei,o3_dicei &407 & ,t_dicei,qv_dicei,u_dicei,v_dicei,o3_dicei & 408 408 & ,ht_dicei,hq_dicei,hu_dicei,hv_dicei,w_dicei,omega_dicei& 409 & ,t h_mod,qv_mod,u_mod,v_mod,o3_mod &409 & ,t_mod,qv_mod,u_mod,v_mod,o3_mod & 410 410 & ,ht_mod,hq_mod,hu_mod,hv_mod,w_mod,omega_mod,mxcalc) 411 411 … … 425 425 do l = 1, llm 426 426 ! Ligne du dessous ?? decommenter si on lit theta au lieu de temp 427 428 !temp(l) = t_mod(l)427 ! temp(l) = th_mod(l)*(play(l)/pzero)**rkappa 428 temp(l) = t_mod(l) 429 429 q(l,1) = qv_mod(l) 430 430 q(l,2) = 0.0 … … 473 473 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 474 474 !--------------------------------------------------------------------- 475 ! Forcing from GABLS4 experiment 476 !--------------------------------------------------------------------- 477 478 !!!! Si la temperature de surface n'est pas impos??e: 479 480 if (forcing_gabls4) then 481 !read GABLS4 forcings 482 483 fich_gabls4='gabls4_driver.nc' 484 485 486 call read_gabls4(fich_gabls4,nlev_gabls4,nt_gabls4,nsol_gabls4,zz_gabls4,depth_sn_gabls4,ug_gabls4,vg_gabls4 & 487 & ,plev_gabls4,th_gabls4,t_gabls4,qv_gabls4,u_gabls4,v_gabls4,ht_gabls4,hq_gabls4,tg_gabls4,tsnow_gabls4,snow_dens_gabls4) 488 489 write(*,*) 'Forcing GABLS4 lu' 490 491 !champs initiaux: 492 do k=1,nlev_gabls4 493 t_gabi(k)=t_gabls4(k) 494 qv_gabi(k)=qv_gabls4(k) 495 u_gabi(k)=u_gabls4(k) 496 v_gabi(k)=v_gabls4(k) 497 poub(k)=0. 498 ht_gabi(k)=ht_gabls4(k,1) 499 hq_gabi(k)=hq_gabls4(k,1) 500 ug_gabi(k)=ug_gabls4(k,1) 501 vg_gabi(k)=vg_gabls4(k,1) 502 enddo 503 504 omega(:)=0. 505 omega2(:)=0. 506 rho(:)=0. 507 ! vertical interpolation using TOGA interpolation routine: 508 ! write(*,*)'avant interp vert', t_proftwp 509 ! 510 ! CALL interp_dice_time(daytime,day1,annee_ref 511 ! i ,year_ini_dice,day_ju_ini_dice,nt_dice,dt_dice 512 ! i ,nlev_dice,shf_dice,lhf_dice,lwup_dice,swup_dice 513 ! i ,tg_dice,ustar_dice,psurf_dice,ug_dice,vg_dice 514 ! i ,ht_dice,hq_dice,hu_dice,hv_dice,w_dice,omega_dice 515 ! o ,shf_prof,lhf_prof,lwup_prof,swup_prof,tg_prof 516 ! o ,ustar_prof,psurf_prof,ug_profd,vg_profd 517 ! o ,ht_profd,hq_profd,hu_profd,hv_profd,w_profd 518 ! o ,omega_profd) 519 520 CALL interp_dice_vertical(play,nlev_gabls4,nt_gabls4,plev_gabls4 & 521 & ,t_gabi,qv_gabi,u_gabi,v_gabi,poub & 522 & ,ht_gabi,hq_gabi,ug_gabi,vg_gabi,poub,poub & 523 & ,t_mod,qv_mod,u_mod,v_mod,o3_mod & 524 & ,ht_mod,hq_mod,ug_mod,vg_mod,w_mod,omega_mod,mxcalc) 525 526 ! Les forcages GABLS4 ont l air d etre en K/S quoiqu en dise le fichier gabls4_driver.nc !? MPL 20141024 527 ! ht_mod(:)=ht_mod(:)/86400. 528 ! hq_mod(:)=hq_mod(:)/86400. 529 530 ! initial and boundary conditions : 531 write(*,*) 'SST initiale mxcalc: ',tsurf,mxcalc 532 do l = 1, llm 533 ! Ligne du dessous ?? decommenter si on lit theta au lieu de temp 534 ! temp(l) = th_mod(l)*(play(l)/pzero)**rkappa 535 temp(l) = t_mod(l) 536 q(l,1) = qv_mod(l) 537 q(l,2) = 0.0 538 ! print *,'read_forc: l,temp,q=',l,temp(l),q(l,1) 539 u(l) = u_mod(l) 540 v(l) = v_mod(l) 541 ug(l)=ug_mod(l) 542 vg(l)=vg_mod(l) 543 544 ! 545 ! tg=tsurf 546 ! 547 548 print *,'***** tsurf=',tsurf 549 rho(l) = play(l)/(rd*temp(l)*(1.+(rv/rd-1.)*q(l,1))) 550 ! omega(l) = w_mod(l)*(-rg*rho(l)) 551 omega(l) = omega_mod(l) 552 omega2(l)=omega(l)/rg*airefi ! flxmass_w calcule comme ds physiq 553 554 555 556 alpha = rd*temp(l)*(1.+(rv/rd-1.)*q(l,1))/play(l) 557 !on applique le forcage total au premier pas de temps 558 !attention: signe different de toga 559 ! d_th_adv(l) = alpha*omega(l)/rcpd+ht_mod(l) 560 !forcage en th 561 d_th_adv(l) = ht_mod(l) 562 d_q_adv(l,1) = hq_mod(l) 563 d_q_adv(l,2) = 0.0 564 dt_cooling(l)=0. 565 enddo 566 567 !--------------- Residus forcages du cas Dice (a supprimer) MPL 20141024--------------- 568 ! Le cas Dice doit etre force avec ustar mais on peut simplifier en forcant par 569 ! le coefficient de trainee en surface cd**2=ustar*vent(k=1) 570 ! On commence ici a stocker ustar dans cdrag puis on terminera le calcul dans pbl_surface 571 ! MPL 05082013 572 ! ust=ustar_dice(1) 573 ! tg=tg_dice(1) 574 ! print *,'ust= ',ust 575 ! IF (tsurf .LE. 0.) THEN 576 ! tsurf= tg_dice(1) 577 ! ENDIF 578 ! psurf= psurf_dice(1) 579 ! solsw_in = (1.-albedo)/albedo*swup_dice(1) 580 ! sollw_in = (0.7*RSIGMA*temp(1)**4)-lwup_dice(1) 581 ! PRINT *,'1D_READ_FORC : solsw, sollw',solsw_in,sollw_in 582 !-------------------------------------------------------------------------------------- 583 endif !forcing_gabls4 584 585 586 475 587 ! Forcing from Arm_Cu case 476 588 ! For this case, ifa_armcu.txt contains sensible, latent heat fluxes … … 797 909 endif !forcing_case 798 910 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 911 !--------------------------------------------------------------------- 912 ! Forcing from standard case : 913 !--------------------------------------------------------------------- 914 915 if (forcing_case2) then 916 917 write(*,*),'avant call read2_1D_cas' 918 call read2_1D_cas 919 write(*,*) 'Forcing read' 920 921 !Time interpolation for initial conditions using interpolation routine 922 write(*,*) 'AVT 1ere INTERPOLATION: day,day1 = ',daytime,day1 923 CALL interp2_case_time(daytime,day1,annee_ref & 924 ! & ,year_ini_cas,day_ju_ini_cas,nt_cas,pdt_cas,nlev_cas & 925 & ,nt_cas,nlev_cas & 926 & ,ts_cas,ps_cas,plev_cas,t_cas,th_cas,thv_cas,thl_cas,qv_cas,ql_cas,qi_cas & 927 & ,u_cas,v_cas,ug_cas,vg_cas,vitw_cas,omega_cas,du_cas,hu_cas,vu_cas & 928 & ,dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dtrad_cas & 929 & ,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas,lat_cas,sens_cas,ustar_cas & 930 & ,uw_cas,vw_cas,q1_cas,q2_cas,tke_cas & 931 ! 932 & ,ts_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas,thv_prof_cas & 933 & ,thl_prof_cas,qv_prof_cas,ql_prof_cas,qi_prof_cas & 934 & ,u_prof_cas,v_prof_cas,ug_prof_cas,vg_prof_cas,vitw_prof_cas,omega_prof_cas & 935 & ,du_prof_cas,hu_prof_cas,vu_prof_cas & 936 & ,dv_prof_cas,hv_prof_cas,vv_prof_cas,dt_prof_cas,ht_prof_cas,vt_prof_cas & 937 & ,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & 938 & ,dth_prof_cas,hth_prof_cas,vth_prof_cas,lat_prof_cas & 939 & ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tke_prof_cas) 940 941 do l = 1, nlev_cas 942 print *,'apres 1ere interp: plev_cas, plev_prof_cas=',l,plev_cas(l,1),plev_prof_cas(l) 943 enddo 944 945 ! vertical interpolation using interpolation routine: 946 ! write(*,*)'avant interp vert', t_prof 947 CALL interp2_case_vertical(play,nlev_cas,plev_prof_cas & 948 & ,t_prof_cas,theta_prof_cas,thv_prof_cas,thl_prof_cas & 949 & ,qv_prof_cas,ql_prof_cas,qi_prof_cas,u_prof_cas,v_prof_cas & 950 & ,ug_prof_cas,vg_prof_cas,vitw_prof_cas,omega_prof_cas & 951 & ,du_prof_cas,hu_prof_cas,vu_prof_cas,dv_prof_cas,hv_prof_cas,vv_prof_cas & 952 & ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & 953 & ,dth_prof_cas,hth_prof_cas,vth_prof_cas & 954 ! 955 & ,t_mod_cas,theta_mod_cas,thv_mod_cas,thl_mod_cas,qv_mod_cas,ql_mod_cas,qi_mod_cas & 956 & ,u_mod_cas,v_mod_cas,ug_mod_cas,vg_mod_cas,w_mod_cas,omega_mod_cas & 957 & ,du_mod_cas,hu_mod_cas,vu_mod_cas,dv_mod_cas,hv_mod_cas,vv_mod_cas & 958 & ,dt_mod_cas,ht_mod_cas,vt_mod_cas,dtrad_mod_cas,dq_mod_cas,hq_mod_cas,vq_mod_cas & 959 & ,dth_mod_cas,hth_mod_cas,vth_mod_cas,mxcalc) 960 961 ! write(*,*) 'Profil initial forcing case interpole',t_mod 962 963 ! initial and boundary conditions : 964 ! tsurf = ts_prof_cas 965 ts_cur = ts_prof_cas 966 psurf=plev_prof_cas(1) 967 write(*,*) 'SST initiale: ',tsurf 968 do l = 1, llm 969 temp(l) = t_mod_cas(l) 970 q(l,1) = qv_mod_cas(l) 971 q(l,2) = ql_mod_cas(l) 972 u(l) = u_mod_cas(l) 973 ug(l)= u_mod_cas(l) 974 v(l) = v_mod_cas(l) 975 vg(l)= v_mod_cas(l) 976 omega(l) = w_mod_cas(l) 977 omega2(l)=omega(l)/rg*airefi ! flxmass_w calcule comme ds physiq 978 979 alpha = rd*temp(l)*(1.+(rv/rd-1.)*q(l,1))/play(l) 980 !on applique le forcage total au premier pas de temps 981 !attention: signe different de toga 982 d_th_adv(l) = alpha*omega(l)/rcpd+(ht_mod_cas(l)+vt_mod_cas(l)) 983 d_t_adv(l) = alpha*omega(l)/rcpd+(ht_mod_cas(l)+vt_mod_cas(l)) 984 ! d_q_adv(l,1) = (hq_mod_cas(l)+vq_mod_cas(l)) 985 d_q_adv(l,1) = dq_mod_cas(l) 986 d_q_adv(l,2) = 0.0 987 ! d_u_adv(l) = (hu_mod_cas(l)+vu_mod_cas(l)) 988 d_u_adv(l) = du_mod_cas(l) 989 ! d_u_adv(l) = (hv_mod_cas(l)+vv_mod_cas(l)) 990 d_u_adv(l) = dv_mod_cas(l) 991 enddo 992 993 ! Faut-il multiplier par -1 ? (MPL 20160713) 994 IF (ok_flux_surf) THEN 995 fsens=-1.*sens_prof_cas 996 flat=-1.*lat_prof_cas 997 ENDIF 998 ! 999 IF (ok_prescr_ust) THEN 1000 ust=ustar_prof_cas 1001 print *,'ust=',ust 1002 ENDIF 1003 1004 endif !forcing_case2 1005 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1006
Note: See TracChangeset
for help on using the changeset viewer.