Changeset 234 for trunk/LMDZ.MARS/libf
- Timestamp:
- Jul 19, 2011, 5:25:58 PM (13 years ago)
- Location:
- trunk/LMDZ.MARS/libf/phymars
- Files:
-
- 1 deleted
- 5 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/callkeys.h
r161 r234 12 12 & ,callg2d,linear,rayleigh,tracer,active,doubleq,submicron & 13 13 & ,lifting,callddevil,scavenging,sedimentation,activice,water & 14 & ,caps,photochem,calltherm,outptherm 14 & ,caps,photochem,calltherm,outptherm,callslope 15 15 16 16 COMMON/callkeys_i/iradia,iaervar,iddist,ilwd,ilwb,ilwn,ncouche & … … 24 24 & ,callnirco2,callnlte,callthermos,callconduct, & 25 25 & calleuv,callmolvis,callmoldiff,thermochem,thermoswater & 26 & ,calltherm,outptherm 26 & ,calltherm,outptherm,callslope 27 27 28 28 -
trunk/LMDZ.MARS/libf/phymars/inifis.F
r233 r234 1 SUBROUTINE meso_inifis(1 SUBROUTINE inifis( 2 2 $ ngrid,nlayer 3 #ifdef MESOSCALE4 $ ,nq,wdt,wday_ini,wdaysec,wappel_phys5 #else6 3 $ ,day_ini,pdaysec,ptimestep 7 #endif8 4 $ ,plat,plon,parea 9 5 $ ,prad,pg,pr,pcpp … … 28 24 ! stored in the q(:,:,:,:) array 29 25 ! E.M. (june 2009) use getin routine to load parameters 30 ! adapted to the WRF use - Aymeric Spiga - Jan 2009 - Jan 200726 ! adapted to the mesoscale use - Aymeric Spiga - 01/2007-07/2011 31 27 ! 32 28 ! … … 64 60 #include "yomaer.h" 65 61 #include "datafile.h" 62 #include "slope.h" 66 63 #ifdef MESOSCALE 67 #include "slope.h"68 64 #include "comsoil.h" !!MESOSCALE -- needed to fill volcapa 69 65 #include "meso_inc/meso_inc_inifisvar.F" 70 66 #endif 71 67 REAL prad,pg,pr,pcpp,pdaysec 72 #ifndef MESOSCALE 68 73 69 REAL ptimestep 74 70 INTEGER day_ini 75 #endif 71 76 72 INTEGER ngrid,nlayer 77 73 REAL plat(ngrid),plon(ngrid),parea(ngridmx) … … 95 91 r=pr 96 92 rcp=r/cpp 97 #ifndef MESOSCALE98 93 daysec=pdaysec 99 94 dtphys=ptimestep 100 # else95 #ifdef MESOSCALE 101 96 #include "meso_inc/meso_inc_inifisini.F" 102 97 #endif … … 210 205 call getin("callrad",callrad) 211 206 write(*,*) " callrad = ",callrad 207 208 write(*,*) "call slope insolation scheme ?", 209 & "(matters only if callrad=T)" 210 #ifdef MESOSCALE 211 callslope=.true. ! default value 212 #else 213 callslope=.false. ! default value (not supported yet) 214 #endif 215 call getin("callslope",callslope) 216 write(*,*) " callslope = ",callslope 212 217 213 218 write(*,*) "call NLTE radiative schemes ?", -
trunk/LMDZ.MARS/libf/phymars/meso_inc/meso_inc_inifisini.F
r227 r234 8 8 c 9 9 ! in 'comcstfi.h' 10 daysec=wdaysec11 10 omeg=womeg 12 11 mugaz=wmugaz … … 89 88 c It must be set now, because it is used afterwards 90 89 c***************************************************** 91 dtphys=wdt*float( wappel_phys)90 dtphys=wdt*float(ptimestep) 92 91 print*,'Physical timestep (s) ',dtphys -
trunk/LMDZ.MARS/libf/phymars/meso_inc/meso_inc_inifisinvar.F
r226 r234 1 $ ,nq,wdt 1 2 $ ,womeg,wmugaz 2 3 $ ,wyear_day,wperiheli,waphelie,wperi_day,wobliquit -
trunk/LMDZ.MARS/libf/phymars/meso_inc/meso_inc_inifisvar.F
r226 r234 1 INTEGER nq,wday_ini 1 INTEGER nq 2 REAL wdt 2 3 3 REAL womeg,wmugaz ,wdaysec4 REAL womeg,wmugaz 4 5 REAL wyear_day,wperiheli,waphelie,wperi_day,wobliquit 5 6 REAL wz0,wemin_turb,wlmixmin … … 12 13 REAL wtheta(ngrid),wpsi(ngrid) 13 14 REAL wvolcapa 14 REAL wdt15 INTEGER wappel_phys -
trunk/LMDZ.MARS/libf/phymars/meso_inc/meso_inc_var.F
r226 r234 10 10 REAL output_tab2d(ngridmx,n2d) 11 11 REAL output_tab3d(ngridmx,nlayer,n3d) 12 REAL sl_ls, sl_lct, sl_lat, sl_tau, sl_alb, sl_the, sl_psi13 REAL sl_fl0, sl_flu14 REAL sl_ra, sl_di015 REAL sky16 12 REAL hfx(ngridmx) !! pour LES avec isfflx!=0 17 13 REAL ust(ngridmx) !! pour LES avec isfflx!=0 -
trunk/LMDZ.MARS/libf/phymars/physiq.F
r233 r234 1 SUBROUTINE meso_physiq(1 SUBROUTINE physiq( 2 2 $ ngrid,nlayer,nq 3 3 $ ,firstcall,lastcall … … 64 64 c Radiatively active tracers: J.-B. Madeleine (10/2008-06/2009) 65 65 c Nb: See callradite.F for more information. 66 c Mesoscale version: Aymeric Spiga (2007 - 2011) -- check MESOSCALE flags66 c Mesoscale lines: Aymeric Spiga (2007 - 2011) -- check MESOSCALE flags 67 67 c 68 68 c arguments: … … 135 135 #include "netcdf.inc" 136 136 137 #include "slope.h" 138 137 139 #ifdef MESOSCALE 138 #include "slope.h"139 140 #include "wrf_output_2d.h" 140 141 #include "wrf_output_3d.h" … … 191 192 REAL qsurf(ngridmx,nqmx) ! tracer on surface (e.g. kg.m-2) 192 193 REAL q2(ngridmx,nlayermx+1) ! Turbulent Kinetic Energy 193 INTEGER ig_vl1 ! Grid Point near VL1 (for diagnostic)194 194 195 195 c Variables used by the water ice microphysical scheme: … … 201 201 REAL, PARAMETER :: alb_surfice = 0.45 !!TESTS_JB 202 202 203 c Variables used by the slope model 204 REAL sl_ls, sl_lct, sl_lat 205 REAL sl_tau, sl_alb, sl_the, sl_psi 206 REAL sl_fl0, sl_flu 207 REAL sl_ra, sl_di0 208 REAL sky 209 203 210 SAVE day_ini, icount 204 211 SAVE aerosol, tsurf,tsoil 205 212 SAVE co2ice,albedo,emis, q2 206 213 SAVE capcal,fluxgrd,dtrad,fluxrad,fluxrad_sky,qsurf 207 SAVE ig_vl1208 214 209 215 REAL stephan … … 316 322 REAL lmax_th_out(ngridmx),zmax_th(ngridmx) 317 323 REAL wmax_th(ngridmx) 318 REAL ,SAVE :: hfmax_th(ngridmx)324 REAL, SAVE :: hfmax_th(ngridmx) 319 325 REAL pdu_th(ngridmx,nlayermx),pdv_th(ngridmx,nlayermx) 320 326 REAL pdt_th(ngridmx,nlayermx),pdq_th(ngridmx,nlayermx,nqmx) … … 390 396 #ifdef MESOSCALE 391 397 #include "meso_inc/meso_inc_caps.F" 392 #endif393 394 #ifndef MESOSCALE395 c Determining gridpoint near Viking Lander 1 (used for diagnostic only)396 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~397 398 if(ngrid.ne.1) then399 latvl1= 22.27400 lonvl1= -47.94401 ig_vl1= 1+ int( (1.5-(latvl1-90.)*jjm/180.) -2 )*iim +402 & int(1.5+(lonvl1+180)*iim/360.)403 write(*,*) 'Viking Lander 1 GCM point: lat,lon',404 & lati(ig_vl1)*180/pi, long(ig_vl1)*180/pi405 end if406 398 #endif 407 399 … … 515 507 IF( MOD(icount-1,iradia).EQ.0) THEN 516 508 517 #ifdef MESOSCALE518 write (*,*) 'call radiative transfer'519 #endif520 509 c Local Solar zenith angle 521 510 c ~~~~~~~~~~~~~~~~~~~~~~~~ … … 558 547 & tauref,tau,aerosol,ccn,rdust,rice,nuice) 559 548 560 #ifdef MESOSCALE 561 #include "meso_inc/meso_inc_slope.F" 562 #endif 549 c Outputs for basic check (middle of domain) 550 c ------------------------------------------ 551 print*, 'check lat lon', lati(igout)*180/pi, 552 . long(igout)*180/pi 553 print*, 'Ls =',zls*180./pi 554 print*, 'tauref(700 Pa) =',tauref(igout) 555 print*, 'tau(700 Pa) =',tau(igout,1)*700./pplev(igout,1) 556 557 c --------------------------------------------------------- 558 c Call slope parameterization for direct and scattered flux 559 c --------------------------------------------------------- 560 IF(callslope) THEN 561 print *, 'Slope scheme is on and computing...' 562 DO ig=1,ngrid 563 sl_the = theta_sl(ig) 564 IF (sl_the .ne. 0.) THEN 565 ztim1=fluxsurf_sw(ig,1)+fluxsurf_sw(ig,2) 566 DO l=1,2 567 sl_lct = ptime*24. + 180.*long(ig)/pi/15. 568 sl_ra = pi*(1.0-sl_lct/12.) 569 sl_lat = 180.*lati(ig)/pi 570 sl_tau = tau(ig,1) 571 sl_alb = albedo(ig,l) 572 sl_psi = psi_sl(ig) 573 sl_fl0 = fluxsurf_sw(ig,l) 574 sl_di0 = 0. 575 if (mu0(ig) .gt. 0.) then 576 sl_di0 = mu0(ig)*(exp(-sl_tau/mu0(ig))) 577 sl_di0 = sl_di0*1370./dist_sol/dist_sol 578 sl_di0 = sl_di0/ztim1 579 sl_di0 = fluxsurf_sw(ig,l)*sl_di0 580 endif 581 ! you never know (roundup concern...) 582 if (sl_fl0 .lt. sl_di0) sl_di0=sl_fl0 583 !!!!!!!!!!!!!!!!!!!!!!!!!! 584 CALL param_slope( mu0(ig), declin, sl_ra, sl_lat, 585 & sl_tau, sl_alb, sl_the, sl_psi, 586 & sl_di0, sl_fl0, sl_flu ) 587 !!!!!!!!!!!!!!!!!!!!!!!!!! 588 fluxsurf_sw(ig,l) = sl_flu 589 ENDDO 590 !!! compute correction on IR flux as well 591 sky= (1.+cos(pi*theta_sl(ig)/180.))/2. 592 fluxsurf_lw(ig)= fluxsurf_lw(ig)*sky 593 ENDIF 594 ENDDO 595 ENDIF 563 596 564 597 c CO2 near infrared absorption … … 606 639 $ stephan*zplanck(ig)*zplanck(ig) 607 640 fluxrad(ig)=fluxrad_sky(ig)-zplanck(ig) 608 #ifdef MESOSCALE 609 !!!! param slope 610 sky= (1.+cos(pi*theta_sl(ig)/180.))/2. 611 fluxrad(ig)=fluxrad(ig)+(1.-sky)*zplanck(ig) 612 #endif 641 IF(callslope) THEN 642 sky= (1.+cos(pi*theta_sl(ig)/180.))/2. 643 fluxrad(ig)=fluxrad(ig)+(1.-sky)*zplanck(ig) 644 ENDIF 613 645 ENDDO 614 646 … … 621 653 ENDIF ! of IF (callrad) 622 654 623 #ifndef MESOSCALE624 655 c----------------------------------------------------------------------- 625 656 c 3. Gravity wave and subgrid scale topography drag : … … 640 671 ENDDO 641 672 ENDIF 642 #endif 673 643 674 c----------------------------------------------------------------------- 644 675 c 4. Vertical diffusion (turbulent mixing): … … 1145 1176 ENDDO 1146 1177 ENDDO 1147 if(min(pt(igmin,lmin),zt(igmin,lmin)).lt.70.) then 1178 if(min(pt(igmin,lmin),zt(igmin,lmin)).lt.70.) then 1148 1179 write(*,*) 'PHYSIQ: stability WARNING :' 1149 1180 write(*,*) 'pt, zt Tmin = ', pt(igmin,lmin), zt(igmin,lmin), … … 1172 1203 1173 1204 IF (ngrid.NE.1) THEN 1174 print*,'Ls =',zls*180./pi1175 & ,' tauref(700 Pa,lat=0) =',tauref(ngrid/2)1176 #ifndef MESOSCALE1177 & ,' tau(Viking1) =',tau(ig_vl1,1)1178 #endif1179 1205 1180 1206 #ifndef MESOSCALE … … 1241 1267 endif ! of if (tracer) 1242 1268 1243 #ifndef MESOSCALE1244 1269 c ----------------------------------------------------------------- 1245 1270 c WSTATS: Saving statistics … … 1354 1379 CALL eofdump(ngrid, nlayer, zu, zv, zt, rho, ps) 1355 1380 ENDIF 1356 #endif 1381 1357 1382 1358 1383 #ifdef MESOSCALE 1384 !!! 1385 !!! OUTPUT FIELDS 1386 !!! 1359 1387 wtsurf(1:ngrid) = tsurf(1:ngrid) !! surface temperature 1360 1388 wco2ice(1:ngrid) = co2ice(1:ngrid) !! co2 ice … … 1579 1607 ELSE ! if(ngrid.eq.1) 1580 1608 1581 #ifndef MESOSCALE1582 1609 print*,'Ls =',zls*180./pi, 1583 1610 & ' tauref(700 Pa) =',tauref … … 1669 1696 & log(pplay(1,nlayer)/pplay(1,nlayer-1))* 1670 1697 & rnew(1,nlayer)*tmean/g 1671 #endif1672 1698 1673 1699 END IF ! if(ngrid.ne.1) 1674 1700 1675 1701 icount=icount+1 1676 #ifdef MESOSCALE1677 write(*,*) 'now, back to the dynamical core...'1678 #endif1679 1702 RETURN 1680 1703 END
Note: See TracChangeset
for help on using the changeset viewer.