Changeset 1795 for LMDZ5/branches/testing/libf/phy1d/lmdz1d.F
- Timestamp:
- Jul 18, 2013, 10:20:28 AM (11 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 1747-1749,1751,1753-1767,1769,1771-1772,1774-1776,1778-1794
- Property svn:mergeinfo changed
-
LMDZ5/branches/testing/libf/phy1d/lmdz1d.F
r1750 r1795 6 6 use dimphy 7 7 use surface_data, only : type_ocean,ok_veget 8 use pbl_surface_mod, only : pbl_surface_init, pbl_surface_final 8 use pbl_surface_mod, only : ftsoil, pbl_surface_init, 9 $ pbl_surface_final 9 10 use fonte_neige_mod, only : fonte_neige_init, fonte_neige_final 10 11 11 12 use infotrac ! new 12 13 use control_mod 14 USE indice_sol_mod 13 15 14 16 implicit none … … 20 22 #include "clesphys.h" 21 23 #include "dimsoil.h" 22 #include "indicesol.h"24 !#include "indicesol.h" 23 25 24 26 #include "comvert.h" 25 27 #include "compar1d.h" 26 28 #include "flux_arp.h" 29 #include "tsoilnudge.h" 27 30 #include "fcg_gcssold.h" 28 31 !!!#include "fbforcing.h" … … 86 89 87 90 integer :: kmax = llm 88 integer nlev_max 89 parameter (nlev_max = 100 )91 integer nlev_max,llm700 92 parameter (nlev_max = 1000) 90 93 real timestep, frac, timeit 91 94 real height(nlev_max),tttprof(nlev_max),qtprof(nlev_max), … … 98 101 c integer :: forcing_type 99 102 logical :: forcing_les = .false. 100 logical :: forcing_armcu = .false.103 logical :: forcing_armcu = .false. 101 104 logical :: forcing_rico = .false. 102 105 logical :: forcing_radconv = .false. 103 106 logical :: forcing_toga = .false. 104 107 logical :: forcing_twpice = .false. 108 logical :: forcing_amma = .false. 105 109 logical :: forcing_GCM2SCM = .false. 106 110 logical :: forcing_GCSSold = .false. 111 logical :: forcing_sandu = .false. 112 logical :: forcing_astex = .false. 113 logical :: forcing_fire = .false. 107 114 integer :: type_ts_forcing ! 0 = SST constant; 1 = SST read from a file 108 115 ! (cf read_tsurf1d.F) 109 116 110 117 !vertical advection computation 111 112 113 114 118 ! real d_t_z(llm), d_q_z(llm) 119 ! real d_t_dyn_z(llm), d_q_dyn_z(llm) 120 ! real zz(llm) 121 ! real zfact 115 122 116 123 !flag forcings … … 129 136 real :: pzero=1.e5 130 137 real :: play (llm),zlay (llm),sig_s(llm),plev(llm+1) 131 real :: playd(llm),zlayd(llm) 138 real :: playd(llm),zlayd(llm),ap_amma(llm+1),bp_amma(llm+1),poub 132 139 133 140 !--------------------------------------------------------------------- … … 137 144 integer :: iq 138 145 real :: phi(llm) 139 real :: teta(llm),temp(llm),u(llm),v(llm) 146 real :: teta(llm),tetal(llm),temp(llm),u(llm),v(llm),w(llm) 147 real :: rlat_rad(1),rlon_rad(1) 140 148 real :: omega(llm+1),omega2(llm),rho(llm+1) 141 149 real :: ug(llm),vg(llm),fcoriolis 150 real :: sfdt, cfdt 142 151 real :: du_phys(llm),dv_phys(llm),dt_phys(llm) 143 152 real :: du_dyn(llm),dv_dyn(llm),dt_dyn(llm) … … 194 203 ! Fichiers et d'autres variables 195 204 !--------------------------------------------------------------------- 196 real ttt 205 real ttt,bow,q1 197 206 integer :: ierr,k,l,i,it=1,mxcalc 198 207 integer jjmp1 … … 250 259 ! initial profiles from RICO files 251 260 ! LS convergence imposed from RICO files 261 !forcing_type = 6 ==> forcing_amma = .true. 262 ! initial profiles from AMMA nc file 263 ! LS convergence, omega and surface fluxes imposed from AMMA file 252 264 !forcing_type = 40 ==> forcing_GCSSold = .true. 253 265 ! initial profile from GCSS file 254 266 ! LS convergence imposed from GCSS file 267 !forcing_type = 59 ==> forcing_sandu = .true. 268 ! initial profiles from sanduref file: see prof.inp.001 269 ! SST varying with time and divergence constante: see ifa_sanduref.txt file 270 ! Radiation has to be computed interactively 271 !forcing_type = 60 ==> forcing_astex = .true. 272 ! initial profiles from file: see prof.inp.001 273 ! SST,divergence,ug,vg,ufa,vfa varying with time : see ifa_astex.txt file 274 ! Radiation has to be computed interactively 255 275 !forcing_type = 61 ==> forcing_armcu = .true. 256 ! initial profile from arm_cu file 257 ! LS convergence imposed from arm_cu file 276 ! initial profiles from file: see prof.inp.001 277 ! sensible and latent heat flux imposed: see ifa_arm_cu_1.txt 278 ! large scale advective forcing & radiative tendencies applied below 1000m: see ifa_arm_cu_2.txt 279 ! use geostrophic wind ug=10m/s vg=0m/s. Duration of the case 53100s 280 ! Radiation to be switched off 258 281 ! 259 282 if (forcing_type .eq.0) THEN … … 269 292 elseif (forcing_type .eq.5) THEN 270 293 forcing_rico = .true. 294 elseif (forcing_type .eq.6) THEN 295 forcing_amma = .true. 271 296 elseif (forcing_type .eq.40) THEN 272 297 forcing_GCSSold = .true. 298 elseif (forcing_type .eq.59) THEN 299 forcing_sandu = .true. 300 elseif (forcing_type .eq.60) THEN 301 forcing_astex = .true. 273 302 elseif (forcing_type .eq.61) THEN 274 303 forcing_armcu = .true. … … 276 305 else 277 306 write (*,*) 'ERROR : unknown forcing_type ', forcing_type 278 stop 'Forcing_type should be 0,1,2,3 or 40'307 stop 'Forcing_type should be 0,1,2,3,4,5,6 or 40,59,60,61' 279 308 ENDIF 280 309 print*,"forcing type=",forcing_type … … 286 315 287 316 type_ts_forcing = 0 288 if (forcing_toga) type_ts_forcing = 1 317 if (forcing_toga .or. forcing_sandu .or. forcing_astex) 318 : type_ts_forcing = 1 289 319 290 320 !--------------------------------------------------------------------- … … 325 355 c Special case for arm_cu which lasts less than one day : 53100s !! (MPL 20111026) 326 356 IF(forcing_type .EQ. 61) fnday=53100./86400. 357 c Special case for amma which lasts less than one day : 64800s !! (MPL 20120216) 358 IF(forcing_type .EQ. 6) fnday=64800./86400. 327 359 annee_ref = anneeref 328 360 mois = 1 … … 334 366 day_ini = day 335 367 day_end = day_ini + nday 368 369 IF (forcing_type .eq.2) THEN 336 370 ! Convert the initial date of Toga-Coare to Julian day 337 371 call ymds2ju 338 372 $ (year_ini_toga,mth_ini_toga,day_ini_toga,heure,day_ju_ini_toga) 339 373 374 ELSEIF (forcing_type .eq.4) THEN 340 375 ! Convert the initial date of TWPICE to Julian day 341 376 call ymds2ju 342 377 $ (year_ini_twpi,mth_ini_twpi,day_ini_twpi,heure_ini_twpi 343 378 $ ,day_ju_ini_twpi) 344 345 ! Convert the initial date of Arm_cu to Julian day 379 ELSEIF (forcing_type .eq.6) THEN 380 ! Convert the initial date of AMMA to Julian day 381 call ymds2ju 382 $ (year_ini_amma,mth_ini_amma,day_ini_amma,heure_ini_amma 383 $ ,day_ju_ini_amma) 384 385 ELSEIF (forcing_type .eq.59) THEN 386 ! Convert the initial date of Sandu case to Julian day 387 call ymds2ju 388 $ (year_ini_sandu,mth_ini_sandu,day_ini_sandu, 389 $ time_ini*3600.,day_ju_ini_sandu) 390 391 ELSEIF (forcing_type .eq.60) THEN 392 ! Convert the initial date of Astex case to Julian day 393 call ymds2ju 394 $ (year_ini_astex,mth_ini_astex,day_ini_astex, 395 $ time_ini*3600.,day_ju_ini_astex) 396 397 ELSEIF (forcing_type .eq.61) THEN 398 399 ! Convert the initial date of Arm_cu case to Julian day 346 400 call ymds2ju 347 401 $ (year_ini_armcu,mth_ini_armcu,day_ini_armcu,heure_ini_armcu 348 402 $ ,day_ju_ini_armcu) 403 ENDIF 349 404 350 405 daytime = day + time_ini/24. ! 1st day and initial time of the simulation … … 418 473 !! preff= 1.01325e5 419 474 preff = psurf 420 call disvert(pa,preff,ap,bp,dpres,presnivs,nivsigs,nivsig) 475 IF (ok_old_disvert) THEN 476 call disvert0(pa,preff,ap,bp,dpres,presnivs,nivsigs,nivsig) 477 print *,'On utilise disvert0' 478 ELSE 479 call disvert(pa,preff,ap,bp,dpres,presnivs,nivsigs,nivsig, 480 : scaleheight) 481 print *,'On utilise disvert' 482 c Nouvelle version disvert permettant d imposer ap,bp (modif L.Guez) MPL 18092012 483 c Dans ce cas, on lit ap,bp dans le fichier hybrid.txt 484 ENDIF 421 485 sig_s=presnivs/preff 422 486 plev =ap+bp*psurf … … 424 488 ccc zlay=-rd*300.*log(play/psurf)/rg ! moved after reading profiles 425 489 490 IF (forcing_type .eq. 59) THEN 491 ! pour forcing_sandu, on cherche l'indice le plus proche de 700hpa#3000m 426 492 write(*,*) '***********************' 427 493 do l = 1, llm 428 494 write(*,*) 'l,play(l),presnivs(l): ',l,play(l),presnivs(l) 495 if (trouve_700 .and. play(l).le.70000) then 496 llm700=l 497 print *,'llm700,play=',llm700,play(l)/100. 498 trouve_700= .false. 499 endif 429 500 enddo 430 501 write(*,*) '***********************' 502 ENDIF 431 503 432 504 c … … 460 532 ! rday: defini dans suphel.F (86400.) 461 533 ! day_ini: lu dans run.def (dayref) 462 ! rlat ,rlon lus dans lmdz1d.def534 ! rlat_rad,rlon-rad: transformes en radian de rlat,rlon lus dans lmdz1d.def (en degres) 463 535 ! airefi,zcufi,zcvfi initialises au debut de ce programme 464 536 ! rday,ra,rg,rd,rcpd declares dans YOMCST.h et calcules dans suphel.F … … 470 542 zcufi=airefi 471 543 zcvfi=airefi 544 ! 545 rlat_rad(:)=rlat(:)*rpi/180. 546 rlon_rad(:)=rlon(:)*rpi/180. 472 547 473 548 call iniphysiq(ngrid,llm,rday,day_ini,timestep, 474 . rlat ,rlon,airefi,zcufi,zcvfi,ra,rg,rd,rcpd,1)549 . rlat_rad,rlon_rad,airefi,zcufi,zcvfi,ra,rg,rd,rcpd,(/1/)) 475 550 print*,'apres iniphysiq' 476 551 … … 501 576 agesno = xagesno 502 577 tsoil(:,:,:)=tsurf 578 !------ AMMA 2e run avec modele sol et rayonnement actif (MPL 23052012) 579 ! tsoil(1,1,1)=299.18 580 ! tsoil(1,2,1)=300.08 581 ! tsoil(1,3,1)=301.88 582 ! tsoil(1,4,1)=305.48 583 ! tsoil(1,5,1)=308.00 584 ! tsoil(1,6,1)=308.00 585 ! tsoil(1,7,1)=308.00 586 ! tsoil(1,8,1)=308.00 587 ! tsoil(1,9,1)=308.00 588 ! tsoil(1,10,1)=308.00 589 ! tsoil(1,11,1)=308.00 590 !----------------------------------------------------------------------- 503 591 call pbl_surface_init(qsol, fder, snsrf, qsurfsrf, 504 592 & evap, frugs, agesno, tsoil) … … 734 822 endif 735 823 736 if (forcing_toga .or. forcing_GCSSold .or. forcing_twpice) then 824 if (forcing_toga .or. forcing_GCSSold .or. forcing_twpice 825 : .or.forcing_amma) then 737 826 fcoriolis=0.0 ; ug=0. ; vg=0. 738 827 endif … … 748 837 : -fcoriolis*(u(1:mxcalc)-ug(1:mxcalc)) 749 838 839 !!!!!!!!!!!!!!!!!!!!!!!! 840 ! Geostrophic wind 841 !!!!!!!!!!!!!!!!!!!!!!!! 842 sfdt = sin(0.5*fcoriolis*timestep) 843 cfdt = cos(0.5*fcoriolis*timestep) 844 ! 845 du_age(1:mxcalc)= -2.*sfdt/timestep* 846 : (sfdt*(u(1:mxcalc)-ug(1:mxcalc)) - 847 : cfdt*(v(1:mxcalc)-vg(1:mxcalc)) ) 848 !! : fcoriolis*(v(1:mxcalc)-vg(1:mxcalc)) 849 ! 850 dv_age(1:mxcalc)= -2.*sfdt/timestep* 851 : (cfdt*(u(1:mxcalc)-ug(1:mxcalc)) + 852 : sfdt*(v(1:mxcalc)-vg(1:mxcalc)) ) 853 !! : -fcoriolis*(u(1:mxcalc)-ug(1:mxcalc)) 854 ! 855 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 856 ! call writefield_phy('dv_age' ,dv_age,llm) 857 ! call writefield_phy('du_age' ,du_age,llm) 858 ! call writefield_phy('du_phys' ,du_phys,llm) 859 ! call writefield_phy('u_tend' ,u,llm) 860 ! call writefield_phy('u_g' ,ug,llm) 861 ! 862 !!!!!!!!!!!!!!!!!!!!!!!!!!!!! 863 !! Increment state variables 864 !!!!!!!!!!!!!!!!!!!!!!!!!!!!! 750 865 u(1:mxcalc)=u(1:mxcalc) + timestep*( 751 866 : du_phys(1:mxcalc) … … 773 888 774 889 teta=temp*(pzero/play)**rkappa 890 ! 891 !--------------------------------------------------------------------- 892 ! Nudge soil temperature if requested 893 !--------------------------------------------------------------------- 894 895 IF (nudge_tsoil) THEN 896 ftsoil(1,isoil_nudge,:) = ftsoil(1,isoil_nudge,:) 897 . -timestep/tau_soil_nudge*(ftsoil(1,isoil_nudge,:)-Tsoil_nudge) 898 ENDIF 775 899 776 900 !---------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.