Changeset 1724 for trunk/MESOSCALE/LMD_MM_MARS/SRC
- Timestamp:
- Jul 21, 2017, 4:07:38 PM (7 years ago)
- Location:
- trunk/MESOSCALE/LMD_MM_MARS/SRC
- Files:
-
- 18 added
- 2 deleted
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/Registry.EM
r1236 r1724 99 99 state real RICE ikj misc 1 - rd "RICE" "ICE RADIUS" "m" #SAVEMARS3 rice 100 100 state real PDTZ ikj misc 1 - rd "PDT" "TEMP TENDENCY" "K s-1" #SAVEMARS3 pdt 101 state real HR_SW ikj misc 1 - - "HR_SW" "HEATING RATE SW" "K/s" 102 state real HR_LW ikj misc 1 - - "HR_LW" "HEATING RATE LW" "K/s" 103 state real HR_DYN ikj misc 1 - - "HR_DYN" "HEATING RATE DYN" "K/s" 104 state real DDT ikj misc 1 - - "DDT" "TEMPERATURE TENDENCY" "K/s" 105 state real DT_RAD ikj misc 1 - - "DT_RAD" "RADIATIVE TEMPERATURE TENDENCY" "K/s" 106 state real DT_VDF ikj misc 1 - - "DT_VDF" "PBL CLMAIN TEMPERATURE TENDENCY" "K/s" 107 state real DT_AJS ikj misc 1 - - "DT_AJS" "AJUSTEMENT SEC TEMPERATURE TENDENCY" "K/s" 101 108 #### 102 109 #### -
trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/Registry.EM.newphys
r1586 r1724 82 82 state real HR_SW ikj misc 1 - - "HR_SW" "HEATING RATE SW" "K/s" 83 83 state real HR_LW ikj misc 1 - - "HR_LW" "HEATING RATE LW" "K/s" 84 state real HR_DYN ikj misc 1 - - "HR_DYN" "HEATING RATE DYN" "K/s" 85 state real DDT ikj misc 1 - - "DDT" "TEMPERATURE TENDENCY" "K/s" 86 state real DT_RAD ikj misc 1 - - "DT_RAD" "RADIATIVE TEMPERATURE TENDENCY" "K/s" 87 state real DT_VDF ikj misc 1 - - "DT_VDF" "PBL CLMAIN TEMPERATURE TENDENCY" "K/s" 88 state real DT_AJS ikj misc 1 - - "DT_AJS" "AJUSTEMENT SEC TEMPERATURE TENDENCY" "K/s" 89 84 90 state real SWDOWNZ ij misc 1 - - "SWDOWNZ" "DOWNWARD SW FLUX AT SURFACE" "W m-2" 85 91 #### DUST CYCLE … … 96 102 state real ZMAX ij misc 1 - - "ZMAX" "MAXIMUM LEVEL THERMALS" "m" 97 103 state real HFMAX ij misc 1 - - "HFMAX" "MAXIMUM PBL HEAT FLUX" "m.K/s" 104 98 105 #### 99 106 #### … … 303 310 state real t_save ikj dyn_em 1 - "t_save" 304 311 # 305 312 state real tz_init ikj dyn_em 1 - ir "tz_init" "initial potential temperature" "K" 306 313 307 314 # Mass -
trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/module_big_step_utilities_em.F
r34 r1724 14 14 15 15 USE module_domain, ONLY : domain 16 USE module_configure 16 17 USE module_model_constants 17 18 USE module_state_description … … 4475 4476 p_phy(i,k,j) = p(i,k,j) + pb(i,k,j) 4476 4477 pi_phy(i,k,j) = (p_phy(i,k,j)/p1000mb)**rcp 4477 t_phy(i,k,j) = th_phy(i,k,j)*pi_phy(i,k,j) 4478 IF (planet.eq. "venus" ) THEN 4479 !call tpot2t(1,th_phy(i,k,j), t_phy(i,k,j), pi_phy(i,k,j)) 4480 t_phy(i,k,j)= (th_phy(i,k,j)**nu - nu*(TT00**nu)*log((p1000mb/p_phy(i,k,j))**rcp))**(1/nu) 4481 ELSE 4482 t_phy(i,k,j) = th_phy(i,k,j)*pi_phy(i,k,j) 4483 ENDIF 4478 4484 rho(i,k,j) = 1./alt(i,k,j)*(1.+moist(i,k,j,P_QV)) 4479 4485 mu_3d(i,k,j) = mu(i,j) -
trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/module_first_rk_step_part1.F
r1590 r1724 650 650 & ,HR_SW=grid%HR_SW & 651 651 & ,HR_LW=grid%HR_LW & 652 & ,HR_DYN=grid%HR_DYN & 653 & ,DDT=grid%DDT & 654 & ,DT_RAD=grid%DT_RAD & 655 & ,DT_VDF=grid%DT_VDF & 656 & ,DT_AJS=grid%DT_AJS & 652 657 & ,SWDOWNZ=grid%SWDOWNZ & 653 658 & ,TAU_DUST=grid%TAU_DUST & -
trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/module_initialize_les.F
r1608 r1724 86 86 87 87 INTEGER, PARAMETER :: nl_max = 1000 88 REAL, DIMENSION(nl_max) :: zk, p_in, theta, rho, u, v, qv, pd_in88 REAL, DIMENSION(nl_max) :: zk, p_in, theta, Tz, rho, u, v, qv, pd_in 89 89 INTEGER :: nl_in 90 90 … … 116 116 ! for mode 3 117 117 REAL, DIMENSION(nl_max) :: profdustq,profdustn 118 REAL, DIMENSION(nl_max) :: prescribed_sw,prescribed_lw 118 REAL, DIMENSION(nl_max) :: hrsw,hrlw,hrdyn 119 REAL, DIMENSION(nl_max) :: trac 120 REAL, DIMENSION(nl_max) :: prescribed_sw,prescribed_lw,prescribed_dyn 121 REAL, DIMENSION(nl_max) :: venus_hrdyn 122 REAL, DIMENSION(nl_max) :: altitude 119 123 !!MARS 120 124 … … 123 127 !INTEGER :: hypsometric_opt = 2 ! Wee et al. 2012 correction 124 128 125 character(len=10) :: planet126 129 127 130 #ifdef DM_PARALLEL 128 131 # include <data_calls.inc> 129 132 #endif 130 131 call init_planet_constants132 133 133 134 SELECT CASE ( model_data_order ) … … 172 173 173 174 174 !stretch_grid = .false.175 stretch_grid = .false. 175 176 ! FOR LES, set stretch to false 176 stretch_grid = .true.177 !stretch_grid = .true. 177 178 delt = 3. 178 179 ! z_scale = .50 179 180 ! z_scale = .10 180 181 ! z_scale = .25 181 ! z_scale = .1 5182 ! z_scale = .1 182 183 pi = 2.*asin(1.0) 183 184 write(6,*) ' pi is ',pi … … 302 303 grid%rdx = 1./config_flags%dx 303 304 grid%rdy = 1./config_flags%dy 304 305 305 ! get the sounding from the ascii sounding file, first get dry sounding and 306 306 ! calculate base state … … 310 310 write(6,*) ' getting dry sounding for base state ' 311 311 312 CALL get_sounding( zk, p_in, pd_in, theta, rho, u, v, qv, dry_sounding, nl_max, nl_in )312 CALL get_sounding( zk, p_in, pd_in, theta, Tz, rho, u, v, qv, dry_sounding, nl_max, nl_in ) 313 313 ENDIF 314 314 CALL wrf_dm_bcast_real( zk , nl_max ) … … 316 316 CALL wrf_dm_bcast_real( pd_in , nl_max ) 317 317 CALL wrf_dm_bcast_real( theta , nl_max ) 318 CALL wrf_dm_bcast_real( Tz , nl_max ) 318 319 CALL wrf_dm_bcast_real( rho , nl_max ) 319 320 CALL wrf_dm_bcast_real( u , nl_max ) … … 384 385 ENDDO 385 386 386 xs=ide/2 -3 387 xs=ids -3 388 xe=xs + 6 389 ys=jde/2 -3 390 ye=ys + 6 391 mtn_ht = 500 387 xs=ide/2 -25 388 !xs=ids -3 389 !xe=xs + 6 390 xe=xs + 25 391 !ys=jde/2 -3 392 ys=jde/2 -25 393 !ye=ys + 6 394 ye=ys + 25 395 mtn_ht = 1000 392 396 #ifdef MTN 393 397 DO j=max(ys,jds),min(ye,jde-1) 394 398 DO i=max(xs,ids),min(xe,ide-1) 395 grid%ht(i,j) = mtn_ht * 0.25 * &399 grid%ht(i,j) = alt_input + mtn_ht * 0.25 * & 396 400 ( 1. + COS ( 2*pi/(xe-xs) * ( i-xs ) + pi ) ) * & 397 401 ( 1. + COS ( 2*pi/(ye-ys) * ( j-ys ) + pi ) ) … … 434 438 p_level = grid%znu(k)*(p_surf - grid%p_top) + grid%p_top 435 439 grid%pb(i,k,j) = p_level 436 grid%t_init(i,k,j) = interp_0( theta, p_in, p_level, nl_in ) - t0 440 grid%t_init(i,k,j) = interp_0_log( theta, p_in, p_level, nl_in ) - t0 441 grid%tz_init(i,k,j) = interp_0_log( Tz, p_in, p_level, nl_in ) 437 442 grid%alb(i,k,j) = (r_d/p1000mb)*(grid%t_init(i,k,j)+t0)*(grid%pb(i,k,j)/p1000mb)**cvpm 438 443 ENDDO … … 458 463 ENDDO 459 464 ENDDO 460 461 465 IF ( wrf_dm_on_monitor() ) THEN 462 466 write(6,*) ' ptop is ',grid%p_top … … 468 472 write(6,*) ' getting moist sounding for full state ' 469 473 dry_sounding = .false. 470 CALL get_sounding( zk, p_in, pd_in, theta, rho, u, v, qv, dry_sounding, nl_max, nl_in )474 CALL get_sounding( zk, p_in, pd_in, theta, Tz, rho, u, v, qv, dry_sounding, nl_max, nl_in ) 471 475 472 476 DO J = jts, min(jde-1,jte) … … 491 495 p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top 492 496 493 moist(i,k,j,P_QV) = interp_0 ( qv, pd_in, p_level, nl_in )494 grid%t_1(i,k,j) = interp_0 ( theta, pd_in, p_level, nl_in ) - t0497 moist(i,k,j,P_QV) = interp_0_log( qv, pd_in, p_level, nl_in ) 498 grid%t_1(i,k,j) = interp_0_log( theta, pd_in, p_level, nl_in ) - t0 495 499 grid%t_2(i,k,j) = grid%t_1(i,k,j) 496 500 … … 694 698 DO K = 1, kte-1 695 699 p_level = grid%znu(k)*(p_surf - grid%p_top) + grid%p_top 696 grid%v_1(i,k,j) = interp_0 ( v, p_in, p_level, nl_in )700 grid%v_1(i,k,j) = interp_0_log( v, p_in, p_level, nl_in ) 697 701 grid%v_2(i,k,j) = grid%v_1(i,k,j) 698 702 ENDDO … … 718 722 DO K = 1, kte-1 719 723 p_level = grid%znu(k)*(p_surf - grid%p_top) + grid%p_top 720 grid%u_1(i,k,j) = interp_0 ( u, p_in, p_level, nl_in )724 grid%u_1(i,k,j) = interp_0_log( u, p_in, p_level, nl_in ) 721 725 grid%u_2(i,k,j) = grid%u_1(i,k,j) 722 726 ENDDO … … 847 851 DO k=1,kte-1 848 852 p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top 849 scalar(its:ite,k,jts:jte,2) = interp_0 ( qv, pd_in, p_level, nl_in )853 scalar(its:ite,k,jts:jte,2) = interp_0_log( qv, pd_in, p_level, nl_in ) 850 854 scalar(its:ite,k,jts:jte,3) = 0. 851 855 !! water ice is set to 0 (was put into water vapor when building prof from MCD) … … 862 866 DO k=1,kte-1 863 867 p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top 864 scalar(its:ite,k,jts:jte,4) = interp_0 ( profdustq, pd_in, p_level, nl_in )865 scalar(its:ite,k,jts:jte,5) = interp_0 ( profdustn, pd_in, p_level, nl_in )868 scalar(its:ite,k,jts:jte,4) = interp_0_log( profdustq, pd_in, p_level, nl_in ) 869 scalar(its:ite,k,jts:jte,5) = interp_0_log( profdustn, pd_in, p_level, nl_in ) 866 870 ENDDO 867 871 print *, "DUST Q", scalar(its,:,jts,4) … … 882 886 DO i = its, ite 883 887 !!! we use Q2 as a vehicle for heating rates! sick! 884 grid%m_q2(i,k,j) = interp_0 ( profdustq, pd_in, p_level, nl_in ) &885 + interp_0 ( profdustn, pd_in, p_level, nl_in )888 grid%m_q2(i,k,j) = interp_0_log( profdustq, pd_in, p_level, nl_in ) & 889 + interp_0_log( profdustn, pd_in, p_level, nl_in ) 886 890 ENDDO 887 891 ENDDO … … 889 893 !print*,k,grid%m_q2(1,k,1) 890 894 ENDDO 891 print*,'planet',planet 895 892 896 IF (planet.eq."prescribed") Then 893 call read_hr( profdustq,profdustn,nl_in)897 call read_hr(hrsw,hrlw,hrdyn,nl_in) 894 898 open(unit=17,file="prescribed_sw.txt",action="write") 895 899 open(unit=18,file="prescribed_lw.txt",action="write") 900 open(unit=19,file="prescribed_dyn.txt",action="write") 896 901 DO k=1,kte!-1 897 902 p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top 898 prescribed_sw(k) = interp_0( profdustq, pd_in, p_level, nl_in ) 899 prescribed_lw(k) = interp_0( profdustn, pd_in, p_level, nl_in ) 903 prescribed_sw(k) = interp_0_log( hrsw, pd_in, p_level, nl_in ) 904 prescribed_lw(k) = interp_0_log( hrlw, pd_in, p_level, nl_in ) 905 prescribed_dyn(k) = interp_0_log( hrdyn, pd_in, p_level, nl_in ) 900 906 write (17,*) prescribed_sw(k) 901 907 write (18,*) prescribed_lw(k) 908 write (19,*) prescribed_dyn(k) 902 909 ENDDO 910 close(unit=19) 911 close(unit=18) 903 912 close(unit=17) 904 close(unit=18)905 913 ENDIF 914 915 IF (planet.eq."venus") Then 916 call read_hr(hrsw,hrlw,hrdyn,nl_in) 917 open(unit=20,file="venus_hrdyn.txt",action="write") 918 DO k=1,kte!-1 919 p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top 920 venus_hrdyn(k) = interp_0_log( hrdyn, pd_in, p_level, nl_in ) 921 write (20,*) venus_hrdyn(k) 922 ENDDO 923 close(unit=20) 924 ENDIF 925 926 open(unit=21,file="altitude.txt",action="write") 927 DO k=1,kte!-1 928 p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top 929 altitude(k) = interp_0_log( zk, pd_in, p_level, nl_in ) 930 write (21,*) altitude(k) 931 ENDDO 932 close(unit=21) 906 933 907 934 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 941 968 !--------------------------------------------------------------------------- 942 969 943 subroutine get_sounding( zk, p, p_dry, theta, rho, &970 subroutine get_sounding( zk, p, p_dry, theta, Tz, rho, & 944 971 u, v, qv, dry, nl_max, nl_in ) 945 972 implicit none … … 947 974 integer nl_max, nl_in 948 975 real zk(nl_max), p(nl_max), theta(nl_max), rho(nl_max), & 949 u(nl_max), v(nl_max), qv(nl_max), p_dry(nl_max) 976 u(nl_max), v(nl_max), qv(nl_max), p_dry(nl_max),Tz(nl_max) 950 977 logical dry 951 978 … … 1112 1139 v(k) = v_input(k) 1113 1140 qv(k) = qv_input(k) 1141 Tz(k) = t_therm(k) 1114 1142 1115 1143 enddo … … 1198 1226 implicit none 1199 1227 integer n 1200 real pdustq(n ),pdustn(n)1228 real pdustq(n+1),pdustn(n+1) 1201 1229 logical end_of_file 1202 1230 … … 1223 1251 end subroutine read_dust 1224 1252 !!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 1225 subroutine read_hr(hr_sw,hr_lw, n)1253 subroutine read_hr(hr_sw,hr_lw,hr_dyn,n) 1226 1254 implicit none 1227 1255 integer n 1228 real hr_sw(n ),hr_lw(n)1256 real hr_sw(n+1),hr_lw(n+1),hr_dyn(n+1) 1229 1257 logical end_of_file 1230 1258 … … 1239 1267 do while (.not. end_of_file) 1240 1268 1241 read(11,*,end=103) hr_sw(k+1),hr_lw(k+1) 1242 write(*,*) k,hr_sw(k+1),hr_lw(k+1) 1269 read(11,*,end=103) hr_sw(k+1),hr_lw(k+1),hr_dyn(k+1) 1270 write(*,*) k,hr_sw(k+1),hr_lw(k+1),hr_dyn(k+1) 1243 1271 k = k+1 1244 go to 11 31272 go to 114 1245 1273 103 end_of_file = .true. 1246 1274 114 continue -
trunk/MESOSCALE/LMD_MM_MARS/SRC/LESnophys_/modif/Registry.EM
r156 r1724 72 72 73 73 74 #####MARS MARS MARS MARS MARS 75 #####MARS MARS MARS MARS MARS 76 ##### 77 ##### variables physiques ecrites dans les fichiers WRF 78 ##### - h indique l'ecriture 79 ##### - en commentaire, les variables physiques dans physiq.F 80 ##### - utiliser le script automatique Registry.bash 81 ##### 82 ##### YOU CAN OUTPUT ANY 2D OR 3D VARIABLE THAT IS AVAILABLE IN MESO_PHYSIQ.F 83 ##### --- please indicate #SAVEMARS2 for 2D fields and #SAVEMARS3 for 3D fields 84 ##### 85 ##### !!!! WARNING !!!! WARNING !!!! WARNING !!!! WARNING !!!! WARNING !!!! 86 ##### THIS HAS TO BE CONSISTENT WITH $MMM/SRC/WRFV2/Registry/Registry.EM 87 ##### !!!! WARNING !!!! WARNING !!!! WARNING !!!! WARNING !!!! WARNING !!!! 88 ##### 89 ############# name in WRF !!!!! ############# name in NETCDF !!!! ############################################## name in meso_physiq !!!!! 90 #state real TSURF ij misc 1 - rhd "TSURF" "SURF TEMPERATURE" "K" #SAVEMARS2 tsurf 91 #state real CO2ICE ij misc 1 - rd "CO2ICE" "CO2 GROUND ICE" "kg" #SAVEMARS2 co2ice 92 #state real EMISSIV ij misc 1 - rd "EMISSIV" "EMISSIVITY" "" #SAVEMARS2 emis 93 #state real THETA ij misc 1 - rd "THETA" "SLOPE INCLINATION" "deg" #SAVEMARS2 theta_sl 94 #state real PSI ij misc 1 - rd "PSI" "SLOPE ORIENTATION" "deg" #SAVEMARS2 psi_sl 95 #state real TAU_DUST ij misc 1 - rd "TAU_DUST" "REFERENCE VISIBLE DUST OPACITY" "" #SAVEMARS2 tauref 96 #state real SWDOWNZ ij misc 1 - rhd "SWDOWNZ" "DOWNWARD SW FLUX AT SURFACE" "W m-2" #SAVEMARS2 fluxsurf_sw_tot 97 #state real LWDOWNZ ij misc 1 - rhd "LWDOWNZ" "DOWNWARD LW FLUX AT SURFACE" "W m-2" #SAVEMARS2 fluxsurf_lw 98 #state real SWUP ij misc 1 - rd "SWUP" "UPWARD SW FLUX AT TOP" "W m-2" #SAVEMARS2 fluxtop_sw_tot 99 #state real LWUP ij misc 1 - rd "LWUP" "UPWARD LW FLUX AT TOP" "W m-2" #SAVEMARS2 fluxtop_lw 100 #state real MTOT ij misc 1 - rd "MTOT" "TOTAL MASS WATER VAPOR" "kg m-2" #SAVEMARS2 mtot 101 #state real ICETOT ij misc 1 - rd "ICETOT" "TOTAL MASS WATER ICE" "kg m-2" #SAVEMARS2 icetot 102 #state real RAVE ij misc 1 - rd "RAVE" "MEAN ICE RADIUS" "m" #SAVEMARS2 rave 103 #state real RICE ikj misc 1 - rd "RICE" "ICE RADIUS" "m" #SAVEMARS3 rice 104 ##### 105 ##### 106 #####MARS MARS MARS MARS MARS 107 #####MARS MARS MARS MARS MARS 74 ####MARS MARS MARS MARS MARS 75 ####MARS MARS MARS MARS MARS 76 #### 77 #### variables physiques ecrites dans les fichiers WRF 78 #### - h indique l'ecriture 79 #### - en commentaire, les variables physiques dans physiq.F 80 #### - utiliser le script automatique Registry.bash 81 #### 82 #### YOU CAN OUTPUT ANY 2D OR 3D VARIABLE THAT IS AVAILABLE IN MESO_PHYSIQ.F 83 #### --- please indicate #SAVEMARS2 for 2D fields and #SAVEMARS3 for 3D fields 84 #### 85 ############ name in WRF !!!!! ############# name in NETCDF !!!! ############################################## name in meso_physiq !!!!! 86 state real TSURF ij misc 1 - rhd "TSURF" "SURF TEMPERATURE" "K" #SAVEMARS2 tsurf 87 state real CO2ICE ij misc 1 - rd "CO2ICE" "CO2 GROUND ICE" "kg" #SAVEMARS2 co2ice 88 state real EMISSIV ij misc 1 - rd "EMISSIV" "EMISSIVITY" "" #SAVEMARS2 emis 89 state real THETA ij misc 1 - rd "THETA" "SLOPE INCLINATION" "deg" #SAVEMARS2 theta_sl 90 state real PSI ij misc 1 - rd "PSI" "SLOPE ORIENTATION" "deg" #SAVEMARS2 psi_sl 91 state real TAU_DUST ij misc 1 - rd "TAU_DUST" "REFERENCE VISIBLE DUST OPACITY" "" #SAVEMARS2 tauref 92 state real SWDOWNZ ij misc 1 - rhd "SWDOWNZ" "DOWNWARD SW FLUX AT SURFACE" "W m-2" #SAVEMARS2 fluxsurf_sw_tot 93 state real LWDOWNZ ij misc 1 - rhd "LWDOWNZ" "DOWNWARD LW FLUX AT SURFACE" "W m-2" #SAVEMARS2 fluxsurf_lw 94 state real SWUP ij misc 1 - rd "SWUP" "UPWARD SW FLUX AT TOP" "W m-2" #SAVEMARS2 fluxtop_sw_tot 95 state real LWUP ij misc 1 - rd "LWUP" "UPWARD LW FLUX AT TOP" "W m-2" #SAVEMARS2 fluxtop_lw 96 state real MTOT ij misc 1 - rd "MTOT" "TOTAL MASS WATER VAPOR" "kg m-2" #SAVEMARS2 mtot 97 state real ICETOT ij misc 1 - rd "ICETOT" "TOTAL MASS WATER ICE" "kg m-2" #SAVEMARS2 icetot 98 state real RAVE ij misc 1 - rd "RAVE" "MEAN ICE RADIUS" "m" #SAVEMARS2 rave 99 state real RICE ikj misc 1 - rd "RICE" "ICE RADIUS" "m" #SAVEMARS3 rice 100 state real PDTZ ikj misc 1 - rd "PDT" "TEMP TENDENCY" "K s-1" #SAVEMARS3 pdt 101 #### 102 #### 103 ####MARS MARS MARS MARS MARS 104 ####MARS MARS MARS MARS MARS 108 105 109 106 ####MARS MARS MARS MARS MARS … … 117 114 state real QH2O ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QH2O" "Water vapor mixing ratio" "kg kg-1" 118 115 state real QH2O_ICE ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QH2O_ICE" "Water ice mixing ratio" "kg kg-1" 119 state real QDUST ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QDUST" "Dust mixing ratio" "kg kg-1" 116 state real qdust ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QDUST" "Dust mixing ratio" "kg kg-1" 117 state real qdustn ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QDUSTN" "Dust number density" " m-3 " 120 118 state real qtrac1 ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "qtrac1" "Decaying tracer 1" "kg kg-1" 119 state real upward ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "upward" "Decaying tracer surf" "kg kg-1" 120 state real downward ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "downward" "Decaying tracer zi" "kg kg-1" 121 121 #### 122 122 #### … … 203 203 #### variables dans real 204 204 #### 205 205 206 state real albedo_gcm_gc ij dyn_em 1 - i1 "ALBEDO_GCM" "albedo of naked ground" "0 - 1 fraction" 206 207 state real therm_inert_gc ij dyn_em 1 - i1 "THERMAL_INERTIA" "thermal inertia" "J/m2/K/s0.5" 208 state real z0_gc ij dyn_em 1 - i1 "SURF_ROUGHNESS" "surface roughness" "cm" 207 209 state real slpx_gc ij dyn_em 1 - i1 "SLPX" "slope x direction" "rad" 208 210 state real slpy_gc ij dyn_em 1 - i1 "SLPY" "slope y direction" "rad" … … 215 217 #### variables dans wrf 216 218 #### 217 state real albedo_gcm ij misc 1 - i012rd "MARS_ALB" "albedo of naked ground" "0 - 1 fraction" 218 state real therm_inert ij misc 1 - i012rd "MARS_TI" "thermal inertia" "J/m2/K/s0.5" 219 state real slpx ij misc 1 - i012rd "SLOPEX" "slope x direction" "rad" 220 state real slpy ij misc 1 - i012rd "SLOPEY" "slope y direction" "rad" 221 state real mars_emiss ij misc 1 - i012rd "MARS_EMISS" "emissivity" "0 - 1 fraction" 222 state real mars_cice ij misc 1 - i012rd "MARS_CICE" "co2 ice" "kg" 223 state real mars_wice ij misc 1 - i012rd "MARS_WICE" "h2o ice" "kg/m2" 224 state real mars_tsoil ilj misc 1 - i012rd "MARS_TSOIL" "soil temperatures" "K" 225 state real mars_isoil ilj misc 1 - i012rd "MARS_ISOIL" "soil thermal inertia" "tiu" 226 state real mars_dsoil ilj misc 1 - i012rd "MARS_DSOIL" "soil depths" "m" 227 state real mars_gw ilj misc 1 - i012rd "MARS_GW" "gwparam" " " 219 #### 'm_' prefix is to avoid redundancies with possible existing terrestrial variables 220 #### 221 #### vvvv nom pour module_initialize, solve_em, lmd_driver (interne fortran) 222 #### vvvv nom fichier netCDF (important initialisation 223 ################################################################################################################ 224 state real m_albedo ij misc 1 - i012rd "MARS_ALB" "albedo of naked ground" "0 - 1 fraction" 225 state real m_ti ij misc 1 - i012rd "MARS_TI" "thermal inertia" "J/m2/K/s0.5" 226 state real m_z0 ij misc 1 - i012rd "MARS_Z0" "surface roughness" "m" 227 state real slpx ij misc 1 - i012rd "SLOPEX" "slope x direction" "rad" 228 state real slpy ij misc 1 - i012rd "SLOPEY" "slope y direction" "rad" 229 state real m_emiss ij misc 1 - i012rd "MARS_EMISS" "emissivity" "0 - 1 fraction" 230 state real m_co2ice ij misc 1 - i012rd "MARS_CICE" "co2 ground ice" "kg/m2" 231 state real m_h2oice ij misc 1 - i012rd "MARS_WICE" "h2o ground ice" "kg/m2" 232 state real m_fluxrad ij misc 1 - i012rd "MARS_FLUXRAD" "net rad flux at surf" "W.m-2" 233 state real m_wstar ij misc 1 - i012rd "MARS_WSTAR" "free convection velocity" "m.s-1" 234 state real m_tsurf ij misc 1 - i012rd "MARS_TSURF" "surface temperature" "K" 235 state real m_tsoil ilj misc 1 - i012rd "MARS_TSOIL" "soil temperatures" "K" 236 state real m_q2 ikj misc 1 Z i012rd "MARS_Q2" "parameterized TKE" "kg.m-3" 237 state real m_isoil ilj misc 1 - i012rd "MARS_ISOIL" "soil thermal inertia" "tiu" 238 state real m_dsoil ilj misc 1 - i012rd "MARS_DSOIL" "soil depths" "m" 239 state real m_gw ilj misc 1 - i012rd "MARS_GW" "gwparam" " " 228 240 #### 229 241 #### 230 242 ####MARS MARS MARS MARS MARS 231 243 ####MARS MARS MARS MARS MARS 232 233 234 244 235 245 #----------------------------------------------------------------------------------------------------------------------------------------------------------------- … … 341 351 ## 342 352 state real ptot ikj dyn_em 1 - irh "PTOT" "total pressure" "Pa" 343 ####### if you choose h here, you will probably want not to output u,v,w,t,etc...344 state real uave ikj dyn_em 1 - ir "UAVE" "average zonal wind" "m/s"345 state real ustd ikj dyn_em 1 - ir "USTD" "std dev zonal wind" "m/s"346 state real vave ikj dyn_em 1 - ir "VAVE" "average meridional wind" "m/s"347 state real vstd ikj dyn_em 1 - ir "VSTD" "std dev meridional wind" "m/s"348 state real wave ikj dyn_em 1 - ir "WAVE" "average vertical wind" "m/s"349 state real wstd ikj dyn_em 1 - ir "WSTD" "std dev vertical wind" "m/s"350 state real tave ikj dyn_em 1 - ir "TAVE" "average pert. potential temperature" "K"351 state real tstd ikj dyn_em 1 - ir "TSTD" "std dev pert. potential temperature" "K"352 #######353 ## ajouter tk, ptot, phtot ??? les deux derniers sont assez smooth...354 353 355 354 # … … 992 991 state real CDA ij misc 1 - r "CDA" "DRAG COEFF AT LOWEST MODEL LVL" "" 993 992 state real UST ij misc 1 - r "UST" "U* IN SIMILARITY THEORY" "m s-1" 994 state real USTM ij misc 1 - r "USTM" "U* IN SIMILARITY THEORY WITHOUT VCONV" "m s-1"993 state real USTM ij misc 1 - rh "USTM" "U* IN SIMILARITY THEORY WITHOUT VCONV" "m s-1" #SAVEMARS2 ustar 995 994 i1 real HOL ij misc 1 - - "HOL" "PBL HEIGHT OVER MONIN-OBUKHOV LENGTH" "" 996 995 state real RMOL ij misc 1 - r "RMOL" "1./Monin Ob. Length" "" … … 999 998 state real CAPG ij misc 1 - r "CAPG" "HEAT CAPACITY FOR SOIL" "J K-1 m-3" 1000 999 state real THC ij misc 1 - r "THC" "THERMAL INERTIA" "Cal cm-1 K-1 s-0.5" 1001 state real HFX ij misc 1 - r "HFX" "UPWARD HEAT FLUX AT THE SURFACE" "W m-2"1000 state real HFX ij misc 1 - rh "HFX" "UPWARD HEAT FLUX AT THE SURFACE" "W m-2" #SAVEMARS2 sensheat 1002 1001 state real QFX ij misc 1 - r "QFX" "UPWARD MOISTURE FLUX AT THE SURFACE" "kg m-2 s-1" 1003 1002 state real LH ij misc 1 - r "LH" "LATENT HEAT FLUX AT THE SURFACE" "W m-2" … … 1247 1246 ###### 1248 1247 rconfig integer mars namelist,physics max_domains 0 rh "mars" "model mode" "" 1248 #rconfig real planet_type namelist,physics 1 1 rh "planet_type" "" "" 1249 1249 rconfig real init_TI namelist,physics max_domains 0 irh "init_TI" "thermal inertia" "" 1250 1250 rconfig real init_AL namelist,physics max_domains 0 irh "init_AL" "albedo" "" 1251 rconfig real init_Z0 namelist,physics max_domains 0 irh "init_Z0" "surface roughness" "" 1251 1252 rconfig real init_U namelist,physics max_domains 0 irh "init_U" "zonal wind" "" 1252 1253 rconfig real init_V namelist,physics max_domains 0 irh "init_V" "meridional wind" "" … … 1260 1261 ####### MARS SPECIFIC NAMELIST ENTRIES 1261 1262 ####### 1263 rconfig character planet_type namelist,physics 1 "planet" - "planet_type" "Selection of the planet type (mars ou venus)" "" 1262 1264 rconfig integer mp_physics namelist,physics max_domains 0 rh "mp_physics" "" "" 1263 1265 rconfig integer gsfcgce_hail namelist,physics 1 0 rh "gsfcgce select hail/graupel" "" "" … … 1393 1395 rconfig logical pd_moist_dfi namelist,dynamics max_domains .false. rh "pd_moist_dfi" "positive-definite RK3 transport switch" "" 1394 1396 rconfig logical pd_chem namelist,dynamics max_domains .false. rh "pd_chem" "positive-definite RK3 transport switch" "" 1395 rconfig logical pd_scalar namelist,dynamics max_domains . false. rh "pd_scalar" "positive-definite RK3 transport switch" ""1397 rconfig logical pd_scalar namelist,dynamics max_domains .true. rh "pd_scalar" "positive-definite RK3 transport switch" "" 1396 1398 rconfig logical pd_tke namelist,dynamics max_domains .false. rh "pd_tke" "positive-definite RK3 transport switch" "" 1397 1399 rconfig logical top_radiation namelist,dynamics max_domains .false. rh "top_radiation" "" "" … … 1489 1491 package water mars==1 - moist:qv;scalar:qh2o,qh2o_ice 1490 1492 package dust mars==2 - moist:qv;scalar:qdust 1493 package dust2eq mars==3 - scalar:qdust,qdustn 1491 1494 package radioac mars==20 - scalar:qtrac1 1495 package radioac2 mars==21 - scalar:upward,downward 1492 1496 ##### MARS OPTIONS 1493 1497 ##### MARS OPTIONS -
trunk/MESOSCALE/LMD_MM_MARS/SRC/SCRIPTS/NETCDF/gfortran_netcdf4_fpic2
r1198 r1724 7 7 #cd netcdf-3.6.1 8 8 9 #cp /donnees/emlmd/Downloads/Software/netcdf-4.0.1.tar.gz .10 #gunzip netcdf-4.0.1.tar.gz9 cp /donnees/emlmd/Downloads/Software/netcdf-4.0.1.tar.gz . 10 gunzip netcdf-4.0.1.tar.gz 11 11 tar xvf netcdf-4.0.1.tar 12 12 cd netcdf-4.0.1 … … 35 35 export CXXFLAGS="-O2 -fPIC" 36 36 37 mkdir / home/marshttp/NETCDF/netcdf64-4.0.1_gfortran_fPIC38 ./configure --prefix=/ home/marshttp/NETCDF/netcdf64-4.0.1_gfortran_fPIC #> configure.log 2>&137 mkdir /u/mlefevre/NETCDF/netcdf64-4.0.1_gfortran_fPIC 38 ./configure --prefix=/u/mlefevre/NETCDF/netcdf64-4.0.1_gfortran_fPIC #> configure.log 2>&1 39 39 make #> make.log 2>&1 40 40 make test #> make_test.log 2>&1 -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WPS/geogrid/GEOGRID.TBL.ARW
r12 r1724 19 19 interp_option = custom:four_pt 20 20 interp_option = omega:four_pt 21 interp_option = venus_gcm:average_gcell(4.0)+four_pt+average_4p 21 22 rel_path= default:mola_topo32/ 22 23 rel_path= 32ppd:mola_topo32/ … … 27 28 rel_path= custom:crater2/ 28 29 rel_path= omega:mola_topo64/ 30 rel_path= venus_gcm:Venus_topo/ 29 31 =============================== 30 32 name = HGT_U … … 43 45 interp_option = omega:four_pt 44 46 interp_option = gcm:four_pt 47 interp_option = venus_gcm:average_gcell(4.0)+four_pt+average_4pt 45 48 rel_path= default:mola_topo32/ 46 49 rel_path= 32ppd:mola_topo32/ … … 51 54 rel_path= custom:crater2/ 52 55 rel_path= omega:mola_topo64/ 56 rel_path= venus_gcm:Venus_topo/ 53 57 =============================== 54 58 name = HGT_V … … 75 79 rel_path= custom:crater2/ 76 80 rel_path= omega:mola_topo64/ 81 rel_path= venus_gcm:Venus_topo/ 77 82 =============================== 78 83 name = THERMAL_INERTIA … … 97 102 # fill_missing=400. #north polar TI (needed with thermal_TES) 98 103 # fill_missing=180. #polar projection artefacts 104 interp_option = venus_gcm:average_gcell(4.0)+four_pt+average_4pt 105 rel_path= venus_gcm:Venus_topo/ 99 106 =============================== 100 107 name = ALBEDO_GCM … … 119 126 interp_option = gcm:four_pt 120 127 rel_path = gcm:albedo_GCM/ 128 interp_option = venus_gcm:average_gcell(4.0)+four_pt+average_4pt 129 rel_path= venus_gcm:Venus_topo/ 121 130 #=============================== 122 131 #name=LANDUSEF -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/Registry/Registry.EM
r1611 r1724 112 112 state real WSTAR ij misc 1 - rd "WSTAR" "FREE CONVECTION VELOCITY FROM TH" "m/s" #SAVEMARS2 wstar 113 113 state real Z0SET ij misc 1 - rd "Z0SET" "SET SURFACE ROUGHNESS" "m" #SAVEMARS2 z0 114 state real HR_DYN ikj misc 1 - - "HR_DYN" "HEATING RATE DYN" "K/s" 115 state real DDT ikj misc 1 - - "DDT" "TEMPERATURE TENDENCY" "K/s" 116 state real DT_RAD ikj misc 1 - - "DT_RAD" "RADIATIVE TEMPERATURE TENDENCY" "K/s" 117 state real DT_VDF ikj misc 1 - - "DT_VDF" "PBL CLMAIN TEMPERATURE TENDENCY" "K/s" 118 state real DT_AJS ikj misc 1 - - "DT_AJS" "AJUSTEMENT SEC TEMPERATURE TENDENCY" "K/s" 114 119 115 120 #### -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/Registry/Registry.EM.newphys
r1635 r1724 80 80 state real HR_SW ikj misc 1 - h "HR_SW" "HEATING RATE SW" "K/s" 81 81 state real HR_LW ikj misc 1 - h "HR_LW" "HEATING RATE LW" "K/s" 82 state real HR_DYN ikj misc 1 - - "HR_DYN" "HEATING RATE DYN" "K/s" 83 state real DDT ikj misc 1 - - "DDT" "TEMPERATURE TENDENCY" "K/s" 84 state real DT_RAD ikj misc 1 - - "DT_RAD" "RADIATIVE TEMPERATURE TENDENCY" "K/s" 85 state real DT_VDF ikj misc 1 - - "DT_VDF" "PBL CLMAIN TEMPERATURE TENDENCY" "K/s" 86 state real DT_AJS ikj misc 1 - - "DT_AJS" "AJUSTEMENT SEC TEMPERATURE TENDENCY" "K/s" 82 87 state real SWDOWNZ ij misc 1 - h "SWDOWNZ" "DOWNWARD SW FLUX AT SURFACE" "W m-2" 83 88 #### DUST CYCLE … … 106 111 #### - effacer le h si l'on veut eviter les sorties 107 112 #### 108 state real - ikjftb scalar 1 - - - 109 state real qh2o ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QH2O" "Water vapor mixing ratio" "kg kg-1" 110 state real qh2o_ice ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QH2O_ICE" "Water ice mixing ratio" "kg kg-1" 111 state real qdust ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QDUST" "Dust mixing ratio" "kg kg-1" 112 state real qdustn ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QDUSTN" "Dust_number mixing ratio" "kg kg-1" 113 state real qccn ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QCCN" "CCN mixing ratio" "kg kg-1" 114 state real qccnn ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QCCNN" "CCN number mixing ratio" "kg kg-1" 115 state real qco2 ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QCO2" "CO2 mixing ratio" "kg kg-1" 116 state real qco2_ice ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QCO2_ICE" "CO2 ice mixing ratio" "kg kg-1" 117 state real qccn_co2 ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QCCN_CO2" "CO2 CCN mixing ratio" "kg kg-1" 118 state real qccnn_co2 ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QCCNN_CO2" "CO2 CCN number mixing ratio" "kg kg-1" 113 state real - ikjftb scalar 1 - - - 114 state real qh2o ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QH2O" "Water vapor mixing ratio" "kg kg-1" 115 state real qh2o_ice ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QH2O_ICE" "Water ice mixing ratio" "kg kg-1" 116 state real qdust ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QDUST" "Dust mixing ratio" "kg kg-1" 117 state real qdustn ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QDUSTN" "Dust_number mixing ratio" "kg kg-1" 118 state real qccn ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QCCN" "CCN mixing ratio" "kg kg-1" 119 state real qccnn ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QCCNN" "CCN number mixing ratio" "kg kg-1" 120 state real qco2 ikjftb scalar 1 - i01rhusdf=(bdy_interp:dt) "QCO2" "CO2 mixing ratio" "kg kg-1" 119 121 state real chem_co ikjftb scalar 1 - i01rusdf=(bdy_interp:dt) "chem_co" "" "" 120 122 state real chem_o ikjftb scalar 1 - i01rusdf=(bdy_interp:dt) "chem_o" "" "" … … 130 132 state real chem_n2 ikjftb scalar 1 - i01rusdf=(bdy_interp:dt) "chem_n2" "" "" 131 133 state real chem_ar ikjftb scalar 1 - i01rusdf=(bdy_interp:dt) "chem_ar" "" "" 134 #### 132 135 #### 133 136 ####MARS MARS MARS MARS MARS … … 1267 1270 rconfig logical pert_coriolis namelist,dynamics max_domains .false. irh "pert_coriolis" "" "" 1268 1271 rconfig logical mix_full_fields namelist,dynamics max_domains .false. irh "mix_full_field" "" "" 1269 rconfig real base_pres namelist,dynamics 1 610.h "base_pres" "Mars Base state pressure, real only" "Pa"1270 rconfig real base_temp namelist,dynamics 1 220. h "base_temp" "Mars Base state sea level temperature, real only" "K"1271 rconfig real base_lapse namelist,dynamics 1 30. h "base_lapse" "Mars Base state temperature difference between base pres and 1/e of atm depth - do not change, real only" "K"1272 rconfig real base_pres namelist,dynamics 1 9.2e6 h "base_pres" "Mars Base state pressure, real only" "Pa" 1273 rconfig real base_temp namelist,dynamics 1 735. h "base_temp" "Mars Base state sea level temperature, real only" "K" 1274 rconfig real base_lapse namelist,dynamics 1 100. h "base_lapse" "Mars Base state temperature difference between base pres and 1/e of atm depth - do not change, real only" "K" 1272 1275 rconfig real tiso namelist,dynamics 1 140. h "tiso" "Mars isothermal value for high alt, real only" "K" 1273 1276 … … 1354 1357 package newwater mars==11 - scalar:qh2o,qh2o_ice,qdust,qdustn 1355 1358 package newwatersca mars==12 - scalar:qh2o,qh2o_ice,qdust,qdustn,qccn,qccnn 1356 package cloudco2 mars==32 - scalar:qh2o,qh2o_ice,qdust,qdustn,qccn,qccnn,qco2,qco2_ice,qccn_co2,qccnn_co21357 1359 package photochem mars==42 - scalar:qco2,chem_co,chem_o,chem_o1d,chem_o2,chem_o3,chem_h,chem_h2,chem_oh,chem_ho2,chem_h2o2,chem_ch4,chem_n2,chem_ar,qh2o_ice,qh2o,qdust,qdustn 1358 1360 ##### MARS OPTIONS -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_big_step_utilities_em.F
r11 r1724 18 18 USE module_configure 19 19 USE module_wrf_error 20 21 20 CONTAINS 22 21 … … 569 568 ENDDO 570 569 ENDDO 571 570 !print*,'muu(i,j)',muu(1,:) 572 571 ELSE IF (name .EQ. 'v')THEN 573 572 … … 588 587 ENDDO 589 588 ENDDO 590 589 !print*,'muv(i,j)',muv(1,:) 591 590 ELSE IF (name .EQ. 'w')THEN 592 591 itf=MIN(ite,ide-1) … … 621 620 ENDDO 622 621 ENDDO 623 622 !print*,'field(i,k,j)',field(1,:,1) 623 !print*,'(mu(i,j)+mub(i,j))',(mu(1,:)+mub(1,:)) 624 624 ENDIF 625 625 … … 1052 1052 1053 1053 IF (non_hydrostatic) THEN 1054 1054 print*,'n_moist',n_moist 1055 print*,'PARAM_FIRST_SCALAR',PARAM_FIRST_SCALAR 1055 1056 IF (n_moist >= PARAM_FIRST_SCALAR ) THEN 1056 1057 print*,'p(i,k,j)_before',p(1,:,1) 1057 1058 DO j=jts,jtf 1058 1059 DO k=kts,ktf … … 1075 1076 ENDDO 1076 1077 ENDDO 1077 1078 print*,'p(i,k,j)_after',p(1,:,1) 1078 1079 ELSE 1079 1080 … … 4075 4076 INTEGER :: i_start, i_end, j_start, j_end, k_start, k_end, i_startu, j_startv 4076 4077 INTEGER :: i, j, k 4077 REAL :: w1, w2, z0, z1, z2 4078 REAL :: w1, w2, z0, z1, z2,temp 4078 4079 4079 4080 !----------------------------------------------------------------------- … … 4099 4100 4100 4101 ! compute thermodynamics and velocities at pressure points 4101 4102 4102 do j = j_start,j_end 4103 4103 do k = k_start, k_end … … 4107 4107 p_phy(i,k,j) = p(i,k,j) + pb(i,k,j) 4108 4108 pi_phy(i,k,j) = (p_phy(i,k,j)/p1000mb)**rcp 4109 t_phy(i,k,j) = th_phy(i,k,j)*pi_phy(i,k,j) 4109 IF (planet .eq. "venus" ) THEN 4110 t_phy(i,k,j)= (th_phy(i,k,j)**nu - nu*(TT00**nu)*log((p1000mb/p_phy(i,k,j))**rcp))**(1/nu) 4111 ELSE 4112 t_phy(i,k,j) = th_phy(i,k,j)*pi_phy(i,k,j) 4113 ENDIF 4110 4114 rho(i,k,j) = 1./alt(i,k,j)*(1.+moist(i,k,j,P_QV)) 4111 4115 mu_3d(i,k,j) = mu(i,j) -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_init_utilities.F
r11 r1724 91 91 END FUNCTION interp_0 92 92 93 real function interp_0_log( v_in, & 94 p_in, p_out, nz_in ) 95 implicit none 96 integer nz_in, nz_out 97 real v_in(nz_in), p_in(nz_in) 98 real p_out 99 100 integer kp, k, im, ip 101 logical interp, increasing_z 102 real height, w1, w2 103 logical debug 104 parameter ( debug = .false. ) 105 106 ! does vertical coordinate increase or decrease with increasing k? 107 ! set offset appropriately 108 109 height = p_out 110 111 if(debug) write(6,*) ' height in interp_0 ',height 112 113 if (p_in(nz_in) .gt. p_in(1)) then 114 115 if(debug) write(6,*) ' monotonic increase in z in interp_0 ' 116 IF (height > p_in(nz_in)) then 117 if(debug) write(6,*) ' point 1 in interp_0 ' 118 w2 = log(p_in(nz_in)/height)/log(p_in(nz_in)/p_in(nz_in-1)) 119 w1 = 1.-w2 120 interp_0_log = w1*v_in(nz_in) + w2*v_in(nz_in-1) 121 ELSE IF (height < p_in(1)) then 122 if(debug) write(6,*) ' point 2 in interp_0 ' 123 w2 = log(p_in(2)/height)/log(p_in(2)/p_in(1)) 124 w1 = 1.-w2 125 interp_0_log = w1*v_in(2) + w2*v_in(1) 126 ELSE 127 if(debug) write(6,*) ' point 3 in interp_0 ' 128 interp = .false. 129 kp = nz_in 130 DO WHILE ( (interp .eqv. .false.) .and. (kp .ge. 2) ) 131 IF( ((p_in(kp) .ge. height) .and. & 132 (p_in(kp-1) .le. height)) ) THEN 133 w2 = log(height/p_in(kp))/log(p_in(kp-1)/p_in(kp)) 134 w1 = 1.-w2 135 interp_0_log = w1*v_in(kp) + w2*v_in(kp-1) 136 if(debug) write(6,*) ' interp data, kp, w1, w2 ',kp, w1, w2 137 if(debug) write(6,*) ' interp data, v_in(kp), v_in(kp-1), interp_0_p ', & 138 v_in(kp), v_in(kp-1), interp_0_log 139 interp = .true. 140 END IF 141 kp = kp-1 142 ENDDO 143 ENDIF 144 145 else 146 147 if(debug) write(6,*) ' monotonic decrease in z in interp_0 ' 148 149 IF (height < p_in(nz_in)) then 150 if(debug) write(6,*) ' point 1 in interp_0 ' 151 w2 = log(p_in(nz_in)/height)/log(p_in(nz_in)/p_in(nz_in-1)) 152 w1 = 1.-w2 153 interp_0_log = w1*v_in(nz_in) + w2*v_in(nz_in-1) 154 ELSE IF (height > p_in(1)) then 155 if(debug) write(6,*) ' point 2 in interp_0 ' 156 w2 = log(p_in(2)/height)/log(p_in(2)/p_in(1)) 157 w1 = 1.-w2 158 interp_0_log = w1*v_in(2) + w2*v_in(1) 159 ELSE 160 if(debug) write(6,*) ' point 3 in interp_0 ' 161 interp = .false. 162 kp = nz_in 163 height = p_out 164 DO WHILE ( (interp .eqv. .false.) .and. (kp .ge. 2) ) 165 IF( ((p_in(kp) .le. height) .and. & 166 (p_in(kp-1) .ge. height)) ) THEN 167 w2 = log(height/p_in(kp))/log(p_in(kp-1)/p_in(kp)) 168 w1 = 1.-w2 169 interp_0_log = w1*v_in(kp) + w2*v_in(kp-1) 170 interp = .true. 171 END IF 172 kp = kp-1 173 ENDDO 174 ENDIF 175 176 end if 177 178 return 179 END FUNCTION interp_0_log 180 93 181 END MODULE module_init_utilities 94 182 -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_initialize_real.F
r1662 r1724 21 21 USE module_soil_pre 22 22 USE module_date_time 23 use module_init_utilities 23 24 #ifdef DM_PARALLEL 24 25 USE module_dm … … 118 119 REAL :: max_dz 119 120 120 ! INTEGER , PARAMETER :: nl_max = 1000 121 INTEGER , PARAMETER :: nl_max = 1000 122 INTEGER :: nl_in 121 123 ! REAL , DIMENSION(nl_max) :: grid%em_dn 122 124 REAL, DIMENSION(nl_max) :: pd_in 125 REAL, DIMENSION(nl_max) :: profdustq,profdustn 123 126 integer::oops1,oops2 124 127 … … 149 152 !LOGICAL :: interp_theta = .false. ! Wee et al. 2012 correction 150 153 REAL :: pfu, pfd, phm 151 154 REAL :: tpot 152 155 153 156 #ifdef DM_PARALLEL … … 1080 1083 !!END DO 1081 1084 1082 1085 IF ( planet == "mars" ) then 1083 1086 !--get vertical size of the GCM input array and allocate new stuff 1084 sizegcm=SIZE(grid%em_rh_gc(1,:,1))1085 ALLOCATE(sig(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1))1086 !ALLOCATE(ap(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1))1087 ALLOCATE(bp(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1))1088 1089 DO j = jts , MIN ( jde-1 , jte )1090 DO i = its , MIN (ide-1 , ite )1087 sizegcm=SIZE(grid%em_rh_gc(1,:,1)) 1088 ALLOCATE(sig(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1)) 1089 !ALLOCATE(ap(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1)) 1090 ALLOCATE(bp(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1)) 1091 1092 DO j = jts , MIN ( jde-1 , jte ) 1093 DO i = its , MIN (ide-1 , ite ) 1091 1094 1092 1095 !!! Define old sigma levels for each column 1093 sig(i,:,j)=grid%em_p_gc(i,:,j)/grid%em_psfc_gc(i,j)1096 sig(i,:,j)=grid%em_p_gc(i,:,j)/grid%em_psfc_gc(i,j) 1094 1097 1095 1098 !!! Compute new sigma levels from old sigma levels with GCM (low-res) and WRF (hi-res) surface pressure 1096 1099 !!! (dimlevs,sigma_gcm, ps_gcm, ps_hr, sigma_hr) 1097 CALL build_sigma_hr(sizegcm,sig(i,:,j),grid%em_psfc_gc(i,j),grid%psfc(i,j),bp(i,:,j))1100 CALL build_sigma_hr(sizegcm,sig(i,:,j),grid%em_psfc_gc(i,j),grid%psfc(i,j),bp(i,:,j)) 1098 1101 1099 1102 !!! Calculate new pressure levels 1100 grid%em_pd_gc(i,:,j)=bp(i,:,j)*grid%psfc(i,j)1101 1102 END DO1103 END DO1104 1105 DEALLOCATE(sig)1106 DEALLOCATE(bp)1103 grid%em_pd_gc(i,:,j)=bp(i,:,j)*grid%psfc(i,j) 1104 1105 END DO 1106 END DO 1107 1108 DEALLOCATE(sig) 1109 DEALLOCATE(bp) 1107 1110 1108 1111 !!****MARS who knows... 1109 grid%em_rh_gc(:,:,:)=0.1112 grid%em_rh_gc(:,:,:)=0. 1110 1113 1111 1114 … … 1113 1116 !grid%em_pd_gc=grid%em_p_gc 1114 1117 !!****MARS 1115 1118 ELSE ! VENUS 1116 1119 1117 1120 … … 1120 1123 !! dry top pressure (constant). 1121 1124 ! 1122 !CALL p_dts ( grid%em_mu0 , grid%em_intq_gc , grid%psfc , grid%p_top , & 1123 ! ids , ide , jds , jde , 1 , num_metgrid_levels , & 1124 ! ims , ime , jms , jme , 1 , num_metgrid_levels , & 1125 ! its , ite , jts , jte , 1 , num_metgrid_levels ) 1126 1125 CALL p_dts ( grid%em_mu0 , grid%em_intq_gc , grid%psfc , grid%p_top , & 1126 ids , ide , jds , jde , 1 , num_metgrid_levels , & 1127 ims , ime , jms , jme , 1 , num_metgrid_levels , & 1128 its , ite , jts , jte , 1 , num_metgrid_levels ) 1129 ENDIF 1130 IF ( planet == "mars" ) then 1127 1131 !!****MARS 1128 DO j = jts , MIN ( jde-1 , jte )1129 DO i = its , MIN (ide-1 , ite )1130 1131 grid%em_mu0(i,j) = grid%psfc(i,j) - grid%p_top1132 1133 END DO1134 END DO1132 DO j = jts , MIN ( jde-1 , jte ) 1133 DO i = its , MIN (ide-1 , ite ) 1134 1135 grid%em_mu0(i,j) = grid%psfc(i,j) - grid%p_top 1136 1137 END DO 1138 END DO 1135 1139 !!****MARS 1136 1140 ELSE ! VENUS 1137 1141 1138 1142 !! Compute the dry, hydrostatic surface pressure. 1139 1143 ! 1140 !CALL p_dhs ( grid%em_pdhs , grid%ht , p00 , t00 , a , & 1141 ! ids , ide , jds , jde , kds , kde , & 1142 ! ims , ime , jms , jme , kms , kme , & 1143 ! its , ite , jts , jte , kts , kte ) 1144 CALL p_dhs ( grid%em_pdhs , grid%ht , p00 , t00 , a , & 1145 ids , ide , jds , jde , kds , kde , & 1146 ims , ime , jms , jme , kms , kme , & 1147 its , ite , jts , jte , kts , kte ) 1148 ENDIF 1144 1149 !!****MARS: voir remarques dans la routine 1145 1150 !!****MARS: dry hydrostatic pressure comes from the GCM ... … … 2294 2299 IF (( i .EQ. its ) .AND. ( j .EQ. jts )) print *, temp, k 2295 2300 !!! MODIF WRFV3.1 - parameter tiso 2296 grid%em_t_init(i,k,j) = temp*(p00/grid%em_pb(i,k,j))**(r_d/cp) - t0 2301 IF (planet .eq. "mars" ) THEN 2302 grid%em_t_init(i,k,j) = temp*(p00/grid%em_pb(i,k,j))**(r_d/cp) - t0 2303 ELSE 2304 grid%em_t_init(i,k,j) = (temp**nu + nu*(TT00**nu)*log((p00/grid%em_pb(i,k,j))**rcp))**(1/nu) -t0 2305 ENDIF 2297 2306 grid%em_alb(i,k,j) = (r_d/p1000mb)*(grid%em_t_init(i,k,j)+t0)*(grid%em_pb(i,k,j)/p1000mb)**cvpm 2298 2307 END DO … … 2601 2610 !!NB: q2 is used for other purpose ... 2602 2611 2603 2604 2612 ! END IF 2605 2613 … … 2780 2788 temp1 = MAX(tiso,t00+A*LOG(grid%em_pb(i,k,j)/p00)) 2781 2789 temp2 = MAX(tiso,t00+A*LOG( pb_int/p00)) 2782 grid%em_t_init(i,k,j) = temp1*(p00/grid%em_pb(i,k,j))**(r_d/cp) - t0 2783 t_init_int(i,k,j) = temp2*(p00/pb_int )**(r_d/cp) - t0 2790 IF (planet .eq. "mars" ) THEN 2791 grid%em_t_init(i,k,j) = temp1*(p00/grid%em_pb(i,k,j))**(r_d/cp) - t0 2792 t_init_int(i,k,j) = temp2*(p00/pb_int )**(r_d/cp) - t0 2793 ELSE 2794 ENDIF 2784 2795 grid%em_alb(i,k,j) = (r_d/p1000mb)*(grid%em_t_init(i,k,j)+t0)*(grid%em_pb(i,k,j)/p1000mb)**cvpm 2785 2796 END DO … … 4969 4980 ! temp = t00 + A*LOG(pb/p00) 4970 4981 temp = MAX ( tiso, t00 + A*LOG(pb/p00) ) 4971 t_init = temp*(p00/pb)**(r_d/cp) - t0 4982 IF (planet .eq. "mars" ) THEN 4983 t_init = temp*(p00/pb)**(r_d/cp) - t0 4984 ELSE 4985 t_init = (temp**nu + nu*(TT00**nu)*log((p00/pb)**(rcp)))**(1/nu) - t0 4986 ENDIF 4972 4987 alb(k) = (r_d/p1000mb)*(t_init+t0)*(pb/p1000mb)**cvpm 4973 4988 END DO … … 5005 5020 ! temp = t00 + A*LOG(pb/p00) 5006 5021 temp = MAX ( tiso, t00 + A*LOG(pb/p00) ) 5007 t_init = temp*(p00/pb)**(r_d/cp) - t0 5022 IF (planet .eq. "mars" ) THEN 5023 t_init = temp*(p00/pb)**(r_d/cp) - t0 5024 ELSE 5025 t_init = (temp**nu + nu*(TT00**nu)*log((p00/pb)**(rcp)))**(1/nu) -t0 5026 ENDIF 5008 5027 alb(k) = (r_d/p1000mb)*(t_init+t0)*(pb/p1000mb)**cvpm 5009 5028 znw(k+1) = znw(k) - dz*g / ( mub*alb(k) ) … … 5025 5044 ! temp = t00 + A*LOG(pb/p00) 5026 5045 temp = MAX ( tiso, t00 + A*LOG(pb/p00) ) 5027 t_init = temp*(p00/pb)**(r_d/cp) - t0 5046 IF (planet .eq. "mars" ) THEN 5047 t_init = temp*(p00/pb)**(r_d/cp) - t0 5048 ELSE 5049 t_init = (temp**nu + nu*(TT00**nu)*log((p00/pb)**(rcp)))**(1/nu) -t0 5050 ENDIF 5028 5051 alb(k) = (r_d/p1000mb)*(t_init+t0)*(pb/p1000mb)**cvpm 5029 5052 znw(k+1) = znw(k) - dz*g / ( mub*alb(k) ) … … 5052 5075 ! temp = t00 + A*LOG(pb/p00) 5053 5076 temp = MAX ( tiso, t00 + A*LOG(pb/p00) ) 5054 t_init = temp*(p00/pb)**(r_d/cp) - t0 5077 IF (planet .eq. "mars" ) THEN 5078 t_init = temp*(p00/pb)**(r_d/cp) - t0 5079 ELSE 5080 t_init = (temp**nu + nu*(TT00**nu)*log((p00/pb)**(rcp)))**(1/nu) -t0 5081 ENDIF 5055 5082 alb(k) = (r_d/p1000mb)*(t_init+t0)*(pb/p1000mb)**cvpm 5056 5083 END DO … … 5720 5747 end subroutine build_sigma_hr 5721 5748 5722 5723 5724 5725 5726 5749 END MODULE module_initialize 5727 5750 -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/solve_em.F
r1590 r1724 160 160 ijds = min(ids, jds) 161 161 ijde = max(ide, jde) 162 162 !num_moist = 3 163 163 num_3d_m = num_moist 164 164 num_3d_c = num_chem … … 892 892 & ,HR_SW=grid%HR_SW & 893 893 & ,HR_LW=grid%HR_LW & 894 & ,HR_DYN=grid%HR_DYN & 895 & ,DDT=grid%DDT & 896 & ,DT_RAD=grid%DT_RAD & 897 & ,DT_VDF=grid%DT_VDF & 898 & ,DT_AJS=grid%DT_AJS & 894 899 & ,SWDOWNZ=grid%SWDOWNZ & 895 900 & ,TAU_DUST=grid%TAU_DUST & -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_mars_lmd_new/update_outputs_physiq_mod.F
r1590 r1724 160 160 SWDOWNZ,TAU_DUST,QSURFDUST,& 161 161 MTOT,ICETOT,TAU_ICE,& 162 HR_SW,HR_LW, &162 HR_SW,HR_LW,HR_DYN,DT,DTRAD,DTVDF,DTAJS,& 163 163 RDUST,VMR_ICE,RICE) 164 164 … … 171 171 MTOT,ICETOT,TAU_ICE 172 172 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(INOUT ) :: & 173 HR_SW,HR_LW,RDUST,VMR_ICE,RICE 173 HR_SW,HR_LW,RDUST,VMR_ICE,RICE,HR_DYN,DT,DTRAD,DTVDF,DTAJS 174 174 INTEGER :: i,j,subs 175 175 -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_prescribed_void_lmd_new/update_outputs_physiq_mod.F
r1603 r1724 52 52 SUBROUTINE update_outputs_physiq_turb( & 53 53 ims,ime,jms,jme,kms,kme,& 54 ips,ipe,jps,jpe, &54 ips,ipe,jps,jpe,kps,kpe,& 55 55 M_Q2,M_WSTAR,& 56 56 HFMAX,ZMAX,USTM,HFX) … … 67 67 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 68 68 SUBROUTINE update_outputs_physiq_diag( & 69 70 71 72 73 HR_SW,HR_LW,&74 69 ims,ime,jms,jme,kms,kme,& 70 ips,ipe,jps,jpe,kps,kpe,& 71 SWDOWNZ,TAU_DUST,QSURFDUST,& 72 MTOT,ICETOT,TAU_ICE,& 73 HR_SW,HR_LW,HR_DYN,DT,DTRAD,DTVDF,DTAJS,& 74 RDUST,VMR_ICE,RICE) 75 75 76 76 INTEGER, INTENT(IN) :: ims,ime,jms,jme,kms,kme … … 80 80 MTOT,ICETOT,TAU_ICE 81 81 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(INOUT ) :: & 82 HR_SW,HR_LW, RDUST,VMR_ICE,RICE82 HR_SW,HR_LW,HR_DYN,RDUST,VMR_ICE,RICE,DT,DTRA,DTVDF,DTAJS 83 83 INTEGER :: i,j,k,subs 84 REAL, DIMENSION(kms:kme) :: phr_sw,phr_lw 84 REAL, DIMENSION(kms:kme) :: phr_sw,phr_lw,phr_dyn 85 85 86 86 open(17,file='prescribed_sw.txt',form='formatted',status='old') 87 87 open(18,file='prescribed_lw.txt',form='formatted',status='old') 88 open(19,file='prescribed_dyn.txt',form='formatted',status='old') 88 89 rewind(17) 89 90 rewind(18) 91 rewind(19) 90 92 DO k=1,kpe-kps+1 91 93 read(17,*) phr_sw(k) 92 94 read(18,*) phr_lw(k) 95 read(19,*) phr_dyn(k) 93 96 ENDDO 97 close(19) 98 close(18) 94 99 close(17) 95 close(18) 96 print*,'phr_lw',phr_lw 100 !print*,'phr_lw',phr_lw 97 101 DO j=jps,jpe 98 102 DO i=ips,ipe 99 103 HR_SW(i,:,j)=phr_sw(:) 100 104 HR_LW(i,:,j)=phr_lw(:) 105 HR_DYN(i,:,j)=phr_dyn(:) 101 106 ENDDO 102 107 ENDDO -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_venus_lmd_new/callphysiq_mod.F
r1634 r1724 12 12 CONTAINS 13 13 14 SUBROUTINE call_physiq(planet_type, klon,llm,nqtot, 14 SUBROUTINE call_physiq(planet_type, klon,llm,nqtot,tname, & 15 15 debut_split,lafin_split, & 16 16 jD_cur,jH_cur_split,zdt_split, & … … 23 23 24 24 USE physiq_mod, ONLY: physiq 25 USE module_model_constants, only : p0,rcp 25 USE module_model_constants, only : p0,rcp,cp 26 use moyzon_mod, only: tmoy 26 27 IMPLICIT NONE 27 28 … … 31 32 INTEGER,INTENT(IN) :: llm ! number of atmospheric layers 32 33 INTEGER,INTENT(IN) :: nqtot ! number of tracers 34 CHARACTER(len=*),INTENT(IN) :: tname(nqtot) ! tracer names 33 35 LOGICAL,INTENT(IN) :: debut_split ! .true. if very first call to physics 34 36 LOGICAL,INTENT(IN) :: lafin_split ! .true. if last call to physics 35 REAL* 4,INTENT(IN) :: JD_cur ! Julian day36 REAL* 4,INTENT(IN) :: JH_cur_split ! Julian hour (fraction of day)37 REAL* 4,INTENT(IN) :: zdt_split ! time step over which the physics are evaluated38 REAL* 4,INTENT(IN) :: zplev_omp(klon,llm+1) ! interlayer pressure (Pa)39 REAL* 4,INTENT(IN) :: zplay_omp(klon,llm) ! mid-layer pressure (Pa)40 REAL* 4,INTENT(INOUT) :: zpk_omp(klon,llm)41 REAL* 4,INTENT(IN) :: zphi_omp(klon,llm) ! geopotential at midlayer42 REAL* 4,INTENT(INOUT) :: zphis_omp(klon) ! surface geopotential43 REAL* 4,INTENT(INOUT) :: presnivs_omp(llm) ! approximate pressure of atm. layers44 REAL* 4,INTENT(IN) :: zufi_omp(klon,llm) ! zonal wind (m/s)45 REAL* 4,INTENT(IN) :: zvfi_omp(klon,llm) ! meridional wind (m/s)46 REAL* 4,INTENT(INOUT) :: zrfi_omp(klon,llm) ! relative wind vorticity, in s-147 REAL* 4,INTENT(IN) :: ztfi_omp(klon,llm) ! temperature (K)48 REAL* 4,INTENT(IN) :: zqfi_omp(klon,llm,nqtot) ! tracers (*/kg of air)49 REAL* 4,INTENT(IN) :: flxwfi_omp(klon,llm) ! Vertical mass flux on lower mesh interfaces (kg/s)37 REAL*8,INTENT(IN) :: JD_cur ! Julian day 38 REAL*8,INTENT(IN) :: JH_cur_split ! Julian hour (fraction of day) 39 REAL*8,INTENT(IN) :: zdt_split ! time step over which the physics are evaluated 40 REAL*8,INTENT(IN) :: zplev_omp(klon,llm+1) ! interlayer pressure (Pa) 41 REAL*8,INTENT(IN) :: zplay_omp(klon,llm) ! mid-layer pressure (Pa) 42 REAL*8,INTENT(INOUT) :: zpk_omp(klon,llm) 43 REAL*8,INTENT(IN) :: zphi_omp(klon,llm) ! geopotential at midlayer 44 REAL*8,INTENT(INOUT) :: zphis_omp(klon) ! surface geopotential 45 REAL*8,INTENT(INOUT) :: presnivs_omp(llm) ! approximate pressure of atm. layers 46 REAL*8,INTENT(IN) :: zufi_omp(klon,llm) ! zonal wind (m/s) 47 REAL*8,INTENT(IN) :: zvfi_omp(klon,llm) ! meridional wind (m/s) 48 REAL*8,INTENT(INOUT) :: zrfi_omp(klon,llm) ! relative wind vorticity, in s-1 49 REAL*8,INTENT(IN) :: ztfi_omp(klon,llm) ! temperature (K) 50 REAL*8,INTENT(IN) :: zqfi_omp(klon,llm,nqtot) ! tracers (*/kg of air) 51 REAL*8,INTENT(IN) :: flxwfi_omp(klon,llm) ! Vertical mass flux on lower mesh interfaces (kg/s) 50 52 ! tendencies (in */s) from the physics: 51 REAL*4,INTENT(OUT) :: zdufi_omp(klon,llm) ! tendency on zonal winds 52 REAL*4,INTENT(OUT) :: zdvfi_omp(klon,llm) ! tendency on meridional winds 53 REAL*4,INTENT(OUT) :: zdtfi_omp(klon,llm) ! tendency on temperature 54 REAL*4,INTENT(OUT) :: zdqfi_omp(klon,llm,nqtot) ! tendency on tracers 55 REAL*4,INTENT(OUT) :: zdpsrf_omp(klon) ! tendency on surface pressure 53 REAL*8,INTENT(OUT) :: zdufi_omp(klon,llm) ! tendency on zonal winds 54 REAL*8,INTENT(OUT) :: zdvfi_omp(klon,llm) ! tendency on meridional winds 55 REAL*8,INTENT(OUT) :: zdtfi_omp(klon,llm) ! tendency on temperature 56 REAL*8,INTENT(OUT) :: zdqfi_omp(klon,llm,nqtot) ! tendency on tracers 57 REAL*8,INTENT(OUT) :: zdpsrf_omp(klon) ! tendency on surface pressure 58 REAL*8 :: zplevmoy(llm+1) ! planet-averaged mean pressure (Pa) at interfaces 59 REAL*8 :: ztmoy(llm) 56 60 57 61 ! ! Local variables … … 77 81 78 82 ! Set dummy variables for Mars to zero (additional and prob useless security) 79 zpk_omp=(zplay_omp/p0)**rcp 80 zphis_omp(:)=zphi_omp(1,1) 83 ! NB: tname already filled with tracers' names (though not used here) 84 zpk_omp(1:klon,1:llm)=cp*((zplay_omp(1:klon,1:llm)/p0)**rcp) 85 !print*,'zpk_omp',zpk_omp(1,:) 86 zphis_omp(1:klon)=zphi_omp(1:klon,1) 81 87 presnivs_omp(:)=0. 82 88 zrfi_omp(:,:)=0. 89 ztmoy(:)=ztfi_omp(1,:) 90 zplevmoy(:)=zplev_omp(1,:) 83 91 ! Call physics package with required inputs/outputs 84 92 CALL physiq(klon, & … … 101 109 zqfi_omp, & 102 110 flxwfi_omp, & 111 zplevmoy, & 112 ztmoy, & 103 113 zdufi_omp, & 104 114 zdvfi_omp, & … … 106 116 zdqfi_omp, & 107 117 zdpsrf_omp) 108 118 deallocate(tmoy) 109 119 END SUBROUTINE call_physiq 110 120 -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_venus_lmd_new/iniphysiq_mod.F
r1596 r1724 10 10 ! dtphys,daysec,day_ini,hour_ini 11 11 use comconst_mod, only : cpp 12 use cpdet_ mod, only: cpdet,ini_cpdet12 use cpdet_phy_mod, only: init_cpdet_phy 13 13 USE control_mod, ONLY: planet_type 14 14 !use surfdat_h, only: ini_surfdat_h … … 18 18 use dimphy, only: init_dimphy 19 19 USE phys_state_var_mod 20 20 use module_model_constants, only : nu, TT00 21 21 implicit none 22 22 … … 27 27 REAL,intent(in) :: punjours 28 28 !DOUBLE PRECISION,intent(in) :: ptimestep 29 REAL ,intent(in) :: phour_ini29 REAL*8,intent(in) :: phour_ini 30 30 31 31 !real,intent(in) :: prad ! radius of the planet (m) … … 35 35 !real,intent(in) :: punjours ! length (in s) of a standard day [daysec] 36 36 integer,intent(in) :: pdayref ! reference day of for the simulation [day_ini] 37 real* 4,intent(in) :: ptimestep !physics time step (s) [dtphys]37 real*8,intent(in) :: ptimestep !physics time step (s) [dtphys] 38 38 integer,intent(in) :: iflag_phys ! type of physics to be called 39 39 … … 43 43 !real,intent(in) :: phour_ini ! start time (fraction of day) of the run 0=<phour_ini<1 44 44 real,intent(in) :: piphysiq ! call physics every piphysiq dynamical timesteps 45 45 real*8 :: CPPP,nuvenus,T0venus 46 46 47 47 ! copy some fundamental parameters to physics … … 81 81 cpp=pcpp 82 82 planet_type="venus" 83 call ini_cpdet 83 CPPP=pcpp 84 nuvenus=nu 85 T0venus=TT00 86 call init_cpdet_phy(CPPP,nuvenus,T0venus) 84 87 85 88 !! a few time constants initialization -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_venus_lmd_new/update_inputs_physiq_mod.F
r1634 r1724 1 1 MODULE update_inputs_physiq_mod 2 3 IMPLICIT NONE4 5 CHARACTER(len=20),save,allocatable,dimension(:) :: traceurs ! tracer names6 2 7 3 CONTAINS … … 17 13 !SUBROUTINE update_inputs_physiq_slope 18 14 15 !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 16 17 18 !c Returns solar longitude, Ls (in deg.), from day number (in sol), 19 !c where sol=0=Ls=0 at the northern hemisphere spring equinox 20 21 22 !!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 19 23 20 24 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 31 35 REAL, INTENT(IN) :: GMT,elaps,lon_input,ls_input,lct_input 32 36 REAL,INTENT(OUT) :: MY 33 REAL ,INTENT(OUT) :: ptime,pday37 REAL*8,INTENT(OUT) :: ptime,pday 34 38 35 39 ! 36 40 ! specified 37 41 ! 38 ptime = (GMT + elaps/3700.) !! universal time (0<ptime<1): ptime=0.5 at 12:00 UT 42 IF (JULYR .ne. 9999) THEN 43 ptime = (GMT + elaps/420000.) !! universal time (0<ptime<1): ptime=0.5 at 12:00 UT 39 44 ptime = MODULO(ptime,24.) !! the two arguments of MODULO must be of the same type 40 45 ptime = ptime / 24. 41 pday = (JULDAY - 1 + INT((3700*GMT+elaps)/88800)) 46 pday = (JULDAY - 1 + INT((420000.0*GMT+elaps)/1.008e7)) 47 pday = MODULO(int(pday),2) 48 MY = (JULYR-2000) + (1.008e7*(JULDAY - 1)+420000.0*GMT+elaps)/2.016e7 49 MY = INT(MY) 50 ELSE 51 ptime = lct_input - lon_input / 15. + elaps/(4200.) 52 ptime = MODULO(ptime,2808.) 53 ptime = ptime / 2808. 54 print*,'ptime',ptime 42 55 pday = MODULO(int(pday),669) 43 MY = (JULYR-2000) + (88800.*(JULDAY - 1)+3700.*GMT+elaps)/59496000.44 MY = INT(MY)56 MY = 2024 57 ENDIF 45 58 46 59 END SUBROUTINE update_inputs_physiq_time … … 48 61 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 49 62 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 50 SUBROUTINE update_inputs_physiq_tracers(nq,MARS_MODE )63 SUBROUTINE update_inputs_physiq_tracers(nq,MARS_MODE,tname) 51 64 52 65 !use infotrac … … 54 67 implicit none 55 68 INTEGER, INTENT(IN) :: nq,MARS_MODE 56 57 ALLOCATE(traceurs(nq)) 58 t raceurs(:)='zolbxs'69 CHARACTER(len=*), INTENT(INOUT) :: tname(nq) ! tracer names 70 71 tname(:)='zolbxs' 59 72 !call infotrac_init ! Need traceur.def 60 73 … … 93 106 ips,ipe,jps,jpe,& 94 107 JULYR,ngrid,nlayer,& 95 D X,DY,MSFT,&108 DDX,DDY,MSFT,& 96 109 lat_input, lon_input,& 97 110 XLAT,XLONG) … … 105 118 USE geometry_mod, ONLY: latitude,latitude_deg,& 106 119 longitude,longitude_deg,& 107 cell_area 120 cell_area,dx,dy 108 121 109 122 implicit none … … 113 126 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN) :: & 114 127 MSFT,XLAT,XLONG 115 REAL, INTENT(IN) :: d x,dy128 REAL, INTENT(IN) :: ddx,ddy 116 129 REAL, INTENT(IN) :: lat_input, lon_input 117 130 INTEGER :: i,j,subs … … 130 143 !----------------------------------------! 131 144 !parea(subs) = dx*dy !! 1. idealized cases - computational grid 132 parea(subs) = (d x/msft(i,j))*(dy/msft(i,j)) !! 2. WRF map scale factors - assume that msfx=msfy (msf=covariance)145 parea(subs) = (ddx/msft(i,j))*(ddy/msft(i,j)) !! 2. WRF map scale factors - assume that msfx=msfy (msf=covariance) 133 146 !parea(subs)=dx*dy/msfu(i,j) !! 3. special for Mercator GCM-like simulations 134 147 … … 167 180 IF(.not.ALLOCATED(latitude_deg)) ALLOCATE(latitude_deg(ngrid)) 168 181 IF(.not.ALLOCATED(cell_area)) ALLOCATE(cell_area(ngrid)) 182 IF (.not.ALLOCATED(dx)) ALLOCATE(dx(ngrid)) 183 IF (.not.ALLOCATED(dy)) ALLOCATE(dy(ngrid)) 169 184 longitude(:) = plon(:) 170 185 latitude(:) = plat(:) … … 184 199 M_ALBEDO,CST_AL,& 185 200 M_TSURF,M_EMISS,M_CO2ICE,& 186 M_GW,M_Z0, CST_Z0,&201 M_GW,M_Z0,& 187 202 M_H2OICE,& 188 203 phisfi_val) … … 195 210 INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,JULYR,MARS_MODE 196 211 INTEGER :: i,j,subs,nlast 197 REAL, INTENT(IN ) :: CST_AL, phisfi_val , CST_Z0212 REAL, INTENT(IN ) :: CST_AL, phisfi_val 198 213 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN) :: & 199 214 M_ALBEDO,M_TSURF,M_EMISS,M_CO2ICE,M_H2OICE,M_Z0 … … 334 349 M_Q2,M_WSTAR) 335 350 336 !use turb_mod, only: q2,wstar,turb_resolved351 use turb_mod, only: q2,wstar,turb_resolved 337 352 338 353 implicit none … … 340 355 INTEGER, INTENT(IN) :: ims,ime,jms,jme,kms,kme 341 356 INTEGER, INTENT(IN) :: ips,ipe,jps,jpe 342 INTEGER :: i,j,subs,nlast 357 INTEGER :: i,j,subs,nlast 343 358 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN) :: M_WSTAR 344 359 REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(IN) :: M_Q2 345 360 LOGICAL, INTENT(IN ) :: RESTART,isles 346 361 347 !! Nothing is done 362 turb_resolved =.true. 363 print*,'turb_resolved :',isles 364 365 DO j = jps,jpe 366 DO i = ips,ipe 367 368 !-----------------------------------! 369 ! 1D subscript for physics "cursor" ! 370 !-----------------------------------! 371 subs = (j-jps)*(ipe-ips+1)+(i-ips+1) 372 373 !PBL wind variance 374 IF (.not. restart) THEN 375 q2(subs,:) = 1.E-6 376 wstar(subs)=0. 377 ELSE 378 q2(subs,:)=M_Q2(i,:,j) 379 wstar(subs)=M_WSTAR(i,j) 380 ENDIF 381 382 ENDDO 383 ENDDO 384 385 !!---------------------!! 386 !! OUTPUT FOR CHECKING !! 387 !!---------------------!! 388 nlast = (ipe-ips+1)*(jpe-jps+1) 389 print*,"check: q2",q2(1,1),q2(nlast,kme+1) 390 print*,"check: wstar",wstar(1),wstar(nlast) 348 391 349 392 END SUBROUTINE update_inputs_physiq_turb -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_venus_lmd_new/update_outputs_physiq_mod.F
r1596 r1724 118 118 SUBROUTINE update_outputs_physiq_turb( & 119 119 ims,ime,jms,jme,kms,kme,& 120 ips,ipe,jps,jpe, &120 ips,ipe,jps,jpe,kps,kpe,& 121 121 M_Q2,M_WSTAR,& 122 122 HFMAX,ZMAX,USTM,HFX) 123 123 124 !use turb_mod, only: q2,wstar,ustar,sensibFlux,&124 use turb_mod, only: q2,wstar,yustar,sens!,& 125 125 ! hfmax_th,zmax_th 126 126 … … 128 128 129 129 INTEGER, INTENT(IN) :: ims,ime,jms,jme,kms,kme 130 INTEGER, INTENT(IN) :: ips,ipe,jps,jpe 131 INTEGER :: i,j,subs 130 INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,kps,kpe 131 INTEGER :: i,j,subs 132 132 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: & 133 133 M_WSTAR,HFMAX,ZMAX,USTM,HFX 134 134 REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT) :: M_Q2 135 135 136 DO j = jps,jpe 137 DO i = ips,ipe 138 139 !-----------------------------------! 140 ! 1D subscript for physics "cursor" ! 141 !-----------------------------------! 142 subs = (j-jps)*(ipe-ips+1)+(i-ips+1) 143 144 !-------------------------------------------------------! 145 ! Save key variables for restart and output and nesting ! 146 !-------------------------------------------------------! 147 M_Q2(i,kps:kpe+1,j) = q2(subs,:) 148 M_WSTAR(i,j) = wstar(subs) 149 150 !! output only (arrays already in phys modules) 151 !HFMAX(i,j) = HFMAX_TH(subs) 152 !ZMAX(i,j) = ZMAX_TH(subs) 153 USTM(i,j) = yustar(subs) 154 HFX(i,j) = sens(subs) 155 156 ENDDO 157 ENDDO 136 158 137 159 END SUBROUTINE update_outputs_physiq_turb … … 144 166 SWDOWNZ,TAU_DUST,QSURFDUST,& 145 167 MTOT,ICETOT,TAU_ICE,& 146 HR_SW,HR_LW, &168 HR_SW,HR_LW,HR_DYN,DT,DTRAD,DTVDF,DTAJS,& 147 169 RDUST,VMR_ICE,RICE) 148 170 … … 155 177 MTOT,ICETOT,TAU_ICE 156 178 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(INOUT ) :: & 157 HR_SW,HR_LW, RDUST,VMR_ICE,RICE179 HR_SW,HR_LW,HR_DYN,RDUST,VMR_ICE,RICE,DT,DTRAD,DTVDF,DTAJS 158 180 INTEGER :: i,j,subs 159 181 … … 171 193 HR_SW(i,kps:kpe,j) = comm_HR_SW(subs,kps:kpe) 172 194 HR_LW(i,kps:kpe,j) = comm_HR_LW(subs,kps:kpe) 195 HR_DYN(i,kps:kpe,j) = comm_HR_DYN(subs,kps:kpe) 196 DT(i,kps:kpe,j) = comm_DT(subs,kps:kpe) 197 DTRAD(i,kps:kpe,j) = comm_DT_RAD(subs,kps:kpe) 198 DTVDF(i,kps:kpe,j) = comm_DT_VDF(subs,kps:kpe) 199 DTAJS(i,kps:kpe,j) = comm_DT_AJS(subs,kps:kpe) 173 200 174 201 ENDDO -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/update_outputs_physiq_mod.F
r1590 r1724 71 71 SWDOWNZ,TAU_DUST,QSURFDUST,& 72 72 MTOT,ICETOT,TAU_ICE,& 73 HR_SW,HR_LW, &73 HR_SW,HR_LW,HR_DYN,DT,DTRAD,DTVDF,DTAJS,& 74 74 RDUST,VMR_ICE,RICE) 75 75 … … 80 80 MTOT,ICETOT,TAU_ICE 81 81 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(INOUT ) :: & 82 HR_SW,HR_LW,RDUST,VMR_ICE,RICE 82 HR_SW,HR_LW,RDUST,VMR_ICE,RICE,HR_DYN,DT,DTRAD,DTVDF,DTAJS 83 83 INTEGER :: i,j,subs 84 84 -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F.new
r1636 r1724 40 40 isfflx, diff_opt, km_opt, & 41 41 HISTORY_INTERVAL, & 42 HR_SW,HR_LW, SWDOWNZ,&42 HR_SW,HR_LW,HR_DYN,DDT,DT_RAD,DT_VDF,DT_AJS,SWDOWNZ,& 43 43 TAU_DUST,RDUST,QSURFDUST,& 44 44 MTOT,ICETOT,VMR_ICE,TAU_ICE,RICE,& … … 109 109 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(OUT ) :: & 110 110 RTHBLTEN,RUBLTEN,RVBLTEN, & 111 HR_SW,HR_LW, RDUST,VMR_ICE,RICE111 HR_SW,HR_LW,HR_DYN,DDT,DT_RAD,DT_VDF,DT_AJS,RDUST,VMR_ICE,RICE 112 112 REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT ) :: & 113 113 M_Q2 … … 138 138 ! ------> inputs: 139 139 INTEGER :: ngrid,nlayer,nq,nsoil 140 REAL :: pday,ptime,MY 140 REAL*8 :: pday,ptime 141 REAL :: MY 141 142 REAL :: phisfi_val 142 143 LOGICAL :: firstcall,lastcall 143 144 ! ---------- 144 REAL ,DIMENSION(:,:),ALLOCATABLE :: pplev,pplay,pphi,pu,pv,pt,flxw145 REAL ,DIMENSION(:,:,:),ALLOCATABLE :: pq145 REAL*8,DIMENSION(:,:),ALLOCATABLE :: pplev,pplay,pphi,pu,pv,pt,flxw 146 REAL*8,DIMENSION(:,:,:),ALLOCATABLE :: pq 146 147 147 148 ! <------ outputs: 148 149 ! physical tendencies 149 REAL ,DIMENSION(:),ALLOCATABLE :: pdpsrf150 REAL ,DIMENSION(:,:),ALLOCATABLE :: pdu,pdv,pdt151 REAL ,DIMENSION(:,:,:),ALLOCATABLE :: pdq150 REAL*8,DIMENSION(:),ALLOCATABLE :: pdpsrf 151 REAL*8,DIMENSION(:,:),ALLOCATABLE :: pdu,pdv,pdt,pdtheta 152 REAL*8,DIMENSION(:,:,:),ALLOCATABLE :: pdq 152 153 ! ... intermediate arrays 153 154 REAL, DIMENSION(:), ALLOCATABLE :: & … … 158 159 ! Additional control variables 159 160 INTEGER :: sponge_top,relax,ips,ipe,jps,jpe,kps,kpe 160 REAL :: elaps, ptimestep 161 REAL :: elaps 162 REAL*8 :: ptimestep 161 163 INTEGER :: test 162 164 REAL :: wappel_phys … … 173 175 dp_save 174 176 REAL, DIMENSION(:,:,:), ALLOCATABLE, SAVE :: & 175 du_save, dv_save, dt_save 177 du_save, dv_save, dt_save,dtheta_save 176 178 REAL, DIMENSION(:,:,:,:), ALLOCATABLE, SAVE :: & 177 179 dq_save … … 180 182 dp_save 181 183 REAL, DIMENSION(:,:), ALLOCATABLE, SAVE :: & 182 du_save, dv_save, dt_save 184 du_save, dv_save, dt_save,dtheta_save 183 185 REAL, DIMENSION(:,:,:), ALLOCATABLE, SAVE :: & 184 186 dq_save … … 191 193 192 194 !! arguments to physiq 193 REAL,ALLOCATABLE :: zpk_omp(:,:) 194 REAL,ALLOCATABLE :: zphis_omp(:) ! surface geopotential 195 REAL,ALLOCATABLE :: presnivs_omp(:) ! approximate pressure of atm. layers 196 REAL,ALLOCATABLE :: zrfi_omp(:,:) ! relative wind vorticity, in s-1 197 195 CHARACTER(len=20),ALLOCATABLE :: tname(:) ! tracer names 196 REAL*8,ALLOCATABLE :: zpk_omp(:,:) 197 REAL*8,ALLOCATABLE :: zphis_omp(:) ! surface geopotential 198 REAL*8,ALLOCATABLE :: presnivs_omp(:) ! approximate pressure of atm. layers 199 REAL*8,ALLOCATABLE :: zrfi_omp(:,:) ! relative wind vorticity, in s-1 200 REAL :: tk1,tk2 198 201 !================================================================== 199 202 ! CODE … … 301 304 ALLOCATE(dv_save(ngrid,nlayer,max_dom)) 302 305 ALLOCATE(dt_save(ngrid,nlayer,max_dom)) 306 ALLOCATE(dtheta_save(ngrid,nlayer,max_dom)) 303 307 ALLOCATE(dq_save(ngrid,nlayer,nq,max_dom)) 304 308 dp_save(:,:)=0. !! initialize these arrays ... … … 306 310 dv_save(:,:,:)=0. 307 311 dt_save(:,:,:)=0. 312 dtheta_save(:,:,:)=0. 308 313 dq_save(:,:,:,:)=0. 309 314 ENDIF … … 319 324 ALLOCATE(dv_save(ngrid,nlayer)) 320 325 ALLOCATE(dt_save(ngrid,nlayer)) 326 ALLOCATE(dtheta_save(ngrid,nlayer)) 321 327 ALLOCATE(dq_save(ngrid,nlayer,nq)) 322 328 ENDIF … … 325 331 dv_save(:,:)=0. 326 332 dt_save(:,:)=0. 333 dtheta_save(:,:)=0. 327 334 dq_save(:,:,:)=0. 328 335 flag_first_restart=.false. … … 369 376 ! ALLOCATE ! 370 377 !----------! 378 IF (.not.ALLOCATED(tname)) ALLOCATE(tname(nq)) 371 379 !-------------------------------------------------------------------------------! 372 380 ! outputs: ! … … 381 389 ALLOCATE(pdv(ngrid,nlayer)) 382 390 ALLOCATE(pdt(ngrid,nlayer)) 391 ALLOCATE(pdtheta(ngrid,nlayer)) 383 392 ALLOCATE(pdq(ngrid,nlayer,nq)) 384 393 !!! … … 392 401 pdv(:,:)=dv_save(:,:,id) 393 402 pdt(:,:)=dt_save(:,:,id) 403 pdtheta(:,:)=dtheta_save(:,:,id) 394 404 pdq(:,:,:)=dq_save(:,:,:,id) 395 405 #else 406 print*,'else' 396 407 pdpsrf(:)=dp_save(:) 397 408 pdu(:,:)=du_save(:,:) 398 409 pdv(:,:)=dv_save(:,:) 399 410 pdt(:,:)=dt_save(:,:) 411 pdtheta(:,:)=dtheta_save(:,:) 400 412 pdq(:,:,:)=dq_save(:,:,:) 401 413 #endif … … 442 454 !! tracers' name 443 455 PRINT *,'** ',planet_type,'** TRACERS NAMES' 444 CALL update_inputs_physiq_tracers(nq,MARS_MODE )456 CALL update_inputs_physiq_tracers(nq,MARS_MODE,tname) 445 457 !! PHYSICS VARIABLES (cf. iniphysiq in LMD GCM) 446 458 !! parameters are defined in the module_model_constants.F WRF routine … … 504 516 ENDIF 505 517 ENDIF 506 507 IF (MARS_MODE .EQ. 32) THEN508 IF (firstcall .EQV. .true. .and. (.not. restart)) THEN509 q_prof(:,7) = 0.95510 !! traceurs(7) = 'co2'511 ENDIF512 ENDIF513 514 518 515 519 IF (firstcall .EQV. .true.) THEN … … 621 625 M_ALBEDO,CST_AL,& 622 626 M_TSURF,M_EMISS,M_CO2ICE,& 623 M_GW,M_Z0, CST_Z0,&627 M_GW,M_Z0,& 624 628 M_H2OICE,& 625 629 phisfi_val) … … 653 657 pdv(:,:)=0. 654 658 pdt(:,:)=0. 659 pdtheta(:,:)=0. 655 660 pdq(:,:,:)=0. 656 661 print *, '** ',planet_type,'** CALL TO LMD PHYSICS' … … 662 667 ptime,pday,MY) 663 668 !!! 664 CALL call_physiq(planet_type,ngrid,nlayer,nq, 669 CALL call_physiq(planet_type,ngrid,nlayer,nq,tname, & 665 670 firstcall,lastcall, & 666 671 pday,ptime,ptimestep, & … … 679 684 ENDIF 680 685 #endif 686 687 IF (planet_type .eq. "venus" ) THEN 688 DO j=jps,jpe 689 DO i=ips,ipe 690 do k=kps,kpe 691 subs=(j-jps)*(ipe-ips+1)+(i-ips+1) 692 tk1=(pt(subs,k)**nu + nu*TT00**nu*log((p1000mb/pplay(subs,k))**rcp))**(1/nu) 693 tk2=((pt(subs,k) + pdt(subs,k))**nu + nu*TT00**nu*log((p1000mb/pplay(subs,k))**rcp))**(1/nu) 694 pdtheta(subs,k)=tk2-tk1 695 enddo 696 ENDDO 697 ENDDO 698 ENDIF 681 699 682 700 print *, '** ',planet_type,'** CALL TO LMD PHYSICS DONE' … … 694 712 DEALLOCATE(zrfi_omp) 695 713 696 697 714 !---------------------------------------------------------------------------------! 698 715 ! PHYSIQ TENDENCIES ARE SAVED TO BE SPLIT WITHIN INTERMEDIATE DYNAMICAL TIMESTEPS ! … … 703 720 dv_save(:,:,id)=pdv(:,:) 704 721 dt_save(:,:,id)=pdt(:,:) 722 dtheta_save(:,:,id)=pdtheta(:,:) 705 723 dq_save(:,:,:,id)=pdq(:,:,:) 706 724 #else … … 709 727 dv_save(:,:)=pdv(:,:) 710 728 dt_save(:,:)=pdt(:,:) 729 dtheta_save(:,:)=pdtheta(:,:) 711 730 dq_save(:,:,:)=pdq(:,:,:) 712 731 #endif … … 737 756 CALL update_outputs_physiq_turb( & 738 757 ims,ime,jms,jme,kms,kme,& 739 ips,ipe,jps,jpe, &758 ips,ipe,jps,jpe,kps,kpe,& 740 759 M_Q2,M_WSTAR,& 741 760 HFMAX,ZMAX,USTM,HFX) … … 746 765 SWDOWNZ,TAU_DUST,QSURFDUST,& 747 766 MTOT,ICETOT,TAU_ICE,& 748 HR_SW,HR_LW, &767 HR_SW,HR_LW,HR_DYN,DDT,DT_RAD,DT_VDF,DT_AJS,& 749 768 RDUST,VMR_ICE,RICE) 750 769 !!! 770 print*,"update_outputs_physiq_diag" 771 772 751 773 ENDIF call_physics 752 774 … … 770 792 ! --is the one calculated during the last call to physics ! 771 793 !------------------------------------------------------------------! 772 794 !print*,'pdt',pdt(1,1),pdt(1,nlayer) 795 !print*,'exner',exner(1,:,1) 773 796 DO j = jps,jpe 774 797 DO i = ips,ipe … … 778 801 ! zonal wind 779 802 RUBLTEN(i,kps:kpe,j) = pdu(subs,kps:kpe) 780 781 803 ! meridional wind 782 804 RVBLTEN(i,kps:kpe,j) = pdv(subs,kps:kpe) 783 784 805 ! potential temperature 785 806 ! (dT = dtheta * exner for isobaric coordinates or if pressure variations are negligible) 786 RTHBLTEN(i,kps:kpe,j) = pdt(subs,kps:kpe) / exner(i,kps:kpe,j) 787 807 IF (planet_type .eq. "venus" ) THEN 808 RTHBLTEN(i,kps:kpe,j) = pdtheta(subs,kps:kpe) 809 ELSE 810 RTHBLTEN(i,kps:kpe,j) = pdt(subs,kps:kpe) / exner(i,kps:kpe,j) 811 ENDIF 788 812 ! update surface pressure (cf CO2 cycle in physics) 789 813 ! here dt is needed 790 814 PSFC(i,j)=PSFC(i,j)+pdpsrf(subs)*dt 791 792 815 ! tracers 793 816 SCALAR(i,kps:kpe,j,1)=0. … … 807 830 ENDDO 808 831 ENDDO 809 810 832 DEALLOCATE(pdpsrf) 811 833 DEALLOCATE(pdu) … … 813 835 DEALLOCATE(pdt) 814 836 DEALLOCATE(pdq) 815 837 DEALLOCATE(pdtheta) 816 838 !!*****!! 817 839 !! END !! -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/share/Makefile
r11 r1724 17 17 module_optional_si_input.o \ 18 18 module_compute_geop.o \ 19 module_soil_pre.o 19 module_soil_pre.o \ 20 cpdet_mod.o 20 21 21 22 OBJS = \ -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/share/module_model_constants.F
r1604 r1724 8 8 9 9 ! A really small number. 10 10 character(len=15) :: planet 11 11 REAL , PARAMETER :: epsilon = 1.E-15 12 12 … … 183 183 REAL :: z_scale ! scale height 184 184 185 REAL :: TT00 186 REAL :: nu 185 187 CONTAINS 186 188 SUBROUTINE init_planet_constants 187 189 IMPLICIT NONE 188 character(len=15) :: planet189 190 Call initial_config 190 planet=model_config_rec%planet191 191 !write(*,*) "unknown planet type", planet 192 192 !stop … … 239 239 wvolcapa = 1.e6 ! volumetric capacity of soil (new soil model) 240 240 #endif 241 TT00=0. 242 nu=0. 241 243 !#endif 242 244 ELSE if ( planet == "venus") then … … 255 257 womeg = 0.2992549E-06 256 258 wdaysec = 0.1008707E08 259 TT00=460. 260 nu=0.35 257 261 ELSE if ( planet == "prescribed") then 258 262 open(17,file='planet_constant',form='formatted',status='old') … … 268 272 p1000mb=p0 269 273 reradius=1./rad 274 TT00=0. 275 nu=0. 270 276 Else 271 277 write(*,*) "unknown planet type:", planet … … 295 301 write(*,*) "t0 = ", t0 296 302 write(*,*) "p0 = ", p0 303 write(*,*) "T0 = ", TT00 304 write(*,*) "nu = ", nu 297 305 END SUBROUTINE init_planet_constants 298 306 END MODULE module_model_constants
Note: See TracChangeset
for help on using the changeset viewer.