Changeset 1236 for trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2
- Timestamp:
- May 5, 2014, 11:38:51 AM (11 years ago)
- Location:
- trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/Registry/Registry.EM
r1095 r1236 209 209 #### 210 210 #### variables dans real 211 #### -- si on change le nom on doit le changer jusque readmeteo ! 211 212 #### 212 213 ############# in module_initialize ################# in geo_em.d**.nc ############################################ … … 229 230 #### variables dans wrf 230 231 #### 231 ############# in module_initialize ################## in solve_em and lmd_driver ############################### 232 state real albedo_gcm ij misc 1 - i012rd "MARS_ALB" "albedo of naked ground" "0 - 1 fraction" 233 state real therm_inert ij misc 1 - i012rd "MARS_TI" "thermal inertia" "J/m2/K/s0.5" 234 state real mars_z0 ij misc 1 - i012rd "MARS_Z0" "surface roughness" "m" 235 state real slpx ij misc 1 - i012rd "SLOPEX" "slope x direction" "rad" 236 state real slpy ij misc 1 - i012rd "SLOPEY" "slope y direction" "rad" 237 state real mars_emiss ij misc 1 - i012rd "MARS_EMISS" "emissivity" "0 - 1 fraction" 238 state real mars_cice ij misc 1 - i012rd "MARS_CICE" "co2 ice" "kg/m2" 239 state real mars_wice ij misc 1 - i012rd "MARS_WICE" "h2o ice" "kg/m2" 240 state real mars_fluxrad ij misc 1 - i012rd "MARS_FLUXRAD" "net rad flux at surf" "W.m-2" 241 state real mars_wstar ij misc 1 - i012rd "MARS_WSTAR" "free convection velocity" "m.s-1" 242 state real mars_tsurf ij misc 1 - i012rd "MARS_TSURF" "surface temperature" "K" 243 state real mars_tsoil ilj misc 1 - i012rd "MARS_TSOIL" "soil temperatures" "K" 244 state real mars_q2 ikj misc 1 Z i012rd "MARS_Q2" "turbulent kinetic energy" "kg.m-3" 245 state real mars_isoil ilj misc 1 - i012rd "MARS_ISOIL" "soil thermal inertia" "tiu" 246 state real mars_dsoil ilj misc 1 - i012rd "MARS_DSOIL" "soil depths" "m" 247 state real mars_gw ilj misc 1 - i012rd "MARS_GW" "gwparam" " " 232 #### 'm_' prefix is to avoid redundancies with possible existing terrestrial variables 233 #### 234 #### vvvv nom pour module_initialize, solve_em, lmd_driver (interne fortran) 235 #### vvvv nom fichier netCDF (important initialisation 236 ################################################################################################################ 237 state real m_albedo ij misc 1 - i012rd "MARS_ALB" "albedo of naked ground" "0 - 1 fraction" 238 state real m_ti ij misc 1 - i012rd "MARS_TI" "thermal inertia" "J/m2/K/s0.5" 239 state real m_z0 ij misc 1 - i012rd "MARS_Z0" "surface roughness" "m" 240 state real slpx ij misc 1 - i012rd "SLOPEX" "slope x direction" "rad" 241 state real slpy ij misc 1 - i012rd "SLOPEY" "slope y direction" "rad" 242 state real m_emiss ij misc 1 - i012rd "MARS_EMISS" "emissivity" "0 - 1 fraction" 243 state real m_co2ice ij misc 1 - i012rd "MARS_CICE" "co2 ground ice" "kg/m2" 244 state real m_h2oice ij misc 1 - i012rd "MARS_WICE" "h2o ground ice" "kg/m2" 245 state real m_fluxrad ij misc 1 - i012rd "MARS_FLUXRAD" "net rad flux at surf" "W.m-2" 246 state real m_wstar ij misc 1 - i012rd "MARS_WSTAR" "free convection velocity" "m.s-1" 247 state real m_tsurf ij misc 1 - i012rd "MARS_TSURF" "surface temperature" "K" 248 state real m_tsoil ilj misc 1 - i012rd "MARS_TSOIL" "soil temperatures" "K" 249 state real m_q2 ikj misc 1 Z i012rd "MARS_Q2" "parameterized TKE" "kg.m-3" 250 state real m_isoil ilj misc 1 - i012rd "MARS_ISOIL" "soil thermal inertia" "tiu" 251 state real m_dsoil ilj misc 1 - i012rd "MARS_DSOIL" "soil depths" "m" 252 state real m_gw ilj misc 1 - i012rd "MARS_GW" "gwparam" " " 248 253 #### 249 254 #### 250 255 ####MARS MARS MARS MARS MARS 251 256 ####MARS MARS MARS MARS MARS 252 253 254 257 255 258 #----------------------------------------------------------------------------------------------------------------------------------------------------------------- … … 360 363 ## 361 364 state real ptot ikj dyn_em 1 - irh "PTOT" "total pressure" "Pa" 362 ####### if you choose h here, you will probably want not to output u,v,w,t,etc...363 state real uave ikj dyn_em 1 - ir "UAVE" "average zonal wind" "m/s"364 state real ustd ikj dyn_em 1 - ir "USTD" "std dev zonal wind" "m/s"365 state real vave ikj dyn_em 1 - ir "VAVE" "average meridional wind" "m/s"366 state real vstd ikj dyn_em 1 - ir "VSTD" "std dev meridional wind" "m/s"367 state real wave ikj dyn_em 1 - ir "WAVE" "average vertical wind" "m/s"368 state real wstd ikj dyn_em 1 - ir "WSTD" "std dev vertical wind" "m/s"369 state real tave ikj dyn_em 1 - ir "TAVE" "average pert. potential temperature" "K"370 state real tstd ikj dyn_em 1 - ir "TSTD" "std dev pert. potential temperature" "K"371 #######372 ## ajouter tk, ptot, phtot ??? les deux derniers sont assez smooth...373 365 374 366 # -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/Registry/Registry.EM.newphys
r1234 r1236 75 75 #### variables physiques ecrites dans les fichiers WRF 76 76 #### - h indique l'ecriture 77 #### - en commentaire, les variables physiques dans physiq.F 78 #### - utiliser le script automatique Registry.bash 79 #### 80 #### YOU CAN OUTPUT ANY 2D OR 3D VARIABLE THAT IS AVAILABLE IN MESO_PHYSIQ.F 81 #### --- please indicate #SAVEMARS2 for 2D fields and #SAVEMARS3 for 3D fields 82 #### 83 ############ name in WRF !!!!! ############# name in NETCDF !!!! ############################################## name in meso_physiq !!!!! 84 state real wTSURF ij misc 1 - rhd "TSURF" "SURF TEMPERATURE" "K" #SAVEMARS2 tsurf 85 state real wCO2ICE ij misc 1 - rd "CO2ICE" "CO2 GROUND ICE" "kg m-2" #SAVEMARS2 co2ice 86 state real wEMISSIV ij misc 1 - rd "EMISSIV" "EMISSIVITY" "" #SAVEMARS2 emis 87 state real wTHETA ij misc 1 - rd "THETA" "SLOPE INCLINATION" "deg" #SAVEMARS2 theta_sl 88 state real wPSI ij misc 1 - rd "PSI" "SLOPE ORIENTATION" "deg" #SAVEMARS2 psi_sl 89 state real wTAU_DUST ij misc 1 - rhd "TAU_DUST" "REFERENCE VISIBLE DUST OPACITY" "" #SAVEMARS2 tauref 90 state real wSWDOWNZ ij misc 1 - rhd "SWDOWNZ" "DOWNWARD SW FLUX AT SURFACE" "W m-2" #SAVEMARS2 fluxsurf_sw_tot 91 state real wLWDOWNZ ij misc 1 - rhd "LWDOWNZ" "DOWNWARD LW FLUX AT SURFACE" "W m-2" #SAVEMARS2 fluxsurf_lw 92 state real wSWUP ij misc 1 - rd "SWUP" "UPWARD SW FLUX AT TOP" "W m-2" #SAVEMARS2 fluxtop_sw_tot 93 state real wLWUP ij misc 1 - rd "LWUP" "UPWARD LW FLUX AT TOP" "W m-2" #SAVEMARS2 fluxtop_lw 94 state real wMTOT ij misc 1 - rhd "MTOT" "TOTAL MASS WATER VAPOR in pmic" "pmic" #SAVEMARS2 mtot 95 state real wICETOT ij misc 1 - rhd "ICETOT" "TOTAL MASS WATER ICE" "kg m-2" #SAVEMARS2 icetot 96 state real wRAVE ij misc 1 - rhd "RAVE" "MEAN ICE RADIUS" "m" #SAVEMARS2 rave 97 state real wRICE ikj misc 1 - rd "RICE" "ICE RADIUS" "m" #SAVEMARS3 rice 98 state real wHR_SW ikj misc 1 - rd "HR_SW" "HEATING RATE SW" "K/s" #SAVEMARS3 zdtsw 99 state real wHR_LW ikj misc 1 - rd "HR_LW" "HEATING RATE LW" "K/s" #SAVEMARS3 zdtlw 100 state real wHR_SH ikj misc 1 - rd "HR_SH" "HEATING RATE sens. heat" "K/s" #SAVEMARS3 zdtdif 101 state real wQSURFICE ij misc 1 - rhd "QSURFICE" "WATER ICE AT SURFACE" "kg m-2" #SAVEMARS2 qsurfice 102 state real wQSURFDUST ij misc 1 - rd "QSURFDUST" "DUST MASS AT SURFACE" "kg m-2" #SAVEMARS2 qsurfdust 103 state real wRDUST ikj misc 1 - rd "RDUST" "DUST RADIUS" "m" #SAVEMARS3 rdust 104 state real wHR_NIR ikj misc 1 - rd "HR_NIR" "HEATING RATE nirco2" "K/s" #SAVEMARS3 zdtnirco2 105 state real wHR_NLTE ikj misc 1 - rd "HR_NLTE" "HEATING RATE nlte" "K/s" #SAVEMARS3 zdtnlte 106 state real wALBBARE ij misc 1 - rhd "ALBBARE" "SOIL ALBEDO" "" #SAVEMARS2 albedodat 107 state real wVMR_ICE ikj misc 1 - rhd "VMR_ICE" "VOL. MIXING RATIO ICE" "ppm" #SAVEMARS3 vmr 108 state real wTAU_ICE ij misc 1 - rhd "TAU_ICE" "CLOUD OD at 825 cm-1 TES" "" #SAVEMARS2 tauTES 109 state real wPDTZ ikj misc 1 - rd "PDT" "TEMP TENDENCY" "K s-1" #SAVEMARS3 pdt 110 state real wZMAX_TH ij misc 1 - rhd "ZMAX_TH" "MAXIMUM LEVEL REACHED IN TH" "m" #SAVEMARS2 zmax_th 111 state real wHFMAX_TH ij misc 1 - rhd "HFMAX_TH" "MAXIMUM TH HEAT FLUX" "m.K/s" #SAVEMARS2 hfmax_th 112 state real wWSTAR ij misc 1 - rhd "WSTAR" "FREE CONVECTION VELOCITY FROM TH" "m/s" #SAVEMARS2 wstar 113 state real wZ0SET ij misc 1 - rd "Z0SET" "SET SURFACE ROUGHNESS" "m" #SAVEMARS2 z0 114 77 #### 78 #### 79 #### RADIATIVE TRANSFER 80 state real HR_SW ikj misc 1 - h "HR_SW" "HEATING RATE SW" "K/s" 81 state real HR_LW ikj misc 1 - h "HR_LW" "HEATING RATE LW" "K/s" 82 state real SWDOWNZ ij misc 1 - h "SWDOWNZ" "DOWNWARD SW FLUX AT SURFACE" "W m-2" 83 #### DUST CYCLE 84 state real TAU_DUST ij misc 1 - h "TAU_DUST" "REFERENCE VISIBLE DUST OPACITY" "" 85 state real RDUST ikj misc 1 - h "RDUST" "DUST RADIUS" "m" 86 state real QSURFDUST ij misc 1 - h "QSURFDUST" "DUST MASS AT SURFACE" "kg m-2" 87 #### CLOUDS 88 state real MTOT ij misc 1 - h "MTOT" "TOTAL MASS WATER VAPOR in pmic" "pmic" 89 state real ICETOT ij misc 1 - h "ICETOT" "TOTAL MASS WATER ICE" "kg m-2" 90 state real VMR_ICE ikj misc 1 - h "VMR_ICE" "VOL. MIXING RATIO ICE" "ppm" 91 state real TAU_ICE ij misc 1 - h "TAU_ICE" "CLOUD OD at 825 cm-1 TES" "" 92 state real RICE ikj misc 1 - h "RICE" "ICE RADIUS" "m" 93 #### THERMALS 94 state real ZMAX ij misc 1 - h "ZMAX" "MAXIMUM LEVEL THERMALS" "m" 95 state real HFMAX ij misc 1 - h "HFMAX" "MAXIMUM PBL HEAT FLUX" "m.K/s" 115 96 #### 116 97 #### … … 209 190 #### 210 191 #### variables dans real 192 #### -- si on change le nom on doit le changer jusque readmeteo ! 211 193 #### 212 194 ############# in module_initialize ################# in geo_em.d**.nc ############################################ … … 229 211 #### variables dans wrf 230 212 #### 231 ############# in module_initialize ################## in solve_em and lmd_driver ############################### 232 state real albedo_gcm ij misc 1 - i012rd "MARS_ALB" "albedo of naked ground" "0 - 1 fraction" 233 state real therm_inert ij misc 1 - i012rd "MARS_TI" "thermal inertia" "J/m2/K/s0.5" 234 state real mars_z0 ij misc 1 - i012rd "MARS_Z0" "surface roughness" "m" 235 state real slpx ij misc 1 - i012rd "SLOPEX" "slope x direction" "rad" 236 state real slpy ij misc 1 - i012rd "SLOPEY" "slope y direction" "rad" 237 state real mars_emiss ij misc 1 - i012rd "MARS_EMISS" "emissivity" "0 - 1 fraction" 238 state real mars_cice ij misc 1 - i012rd "MARS_CICE" "co2 ice" "kg/m2" 239 state real mars_wice ij misc 1 - i012rd "MARS_WICE" "h2o ice" "kg/m2" 240 state real mars_fluxrad ij misc 1 - i012rd "MARS_FLUXRAD" "net rad flux at surf" "W.m-2" 241 state real mars_wstar ij misc 1 - i012rd "MARS_WSTAR" "free convection velocity" "m.s-1" 242 state real mars_tsurf ij misc 1 - i012rd "MARS_TSURF" "surface temperature" "K" 243 state real mars_tsoil ilj misc 1 - i012rd "MARS_TSOIL" "soil temperatures" "K" 244 state real mars_q2 ikj misc 1 Z i012rd "MARS_Q2" "turbulent kinetic energy" "kg.m-3" 245 state real mars_isoil ilj misc 1 - i012rd "MARS_ISOIL" "soil thermal inertia" "tiu" 246 state real mars_dsoil ilj misc 1 - i012rd "MARS_DSOIL" "soil depths" "m" 247 state real mars_gw ilj misc 1 - i012rd "MARS_GW" "gwparam" " " 213 #### 'm_' prefix is to avoid redundancies with possible existing terrestrial variables 214 #### 215 #### vvvv nom pour module_initialize, solve_em, lmd_driver (interne fortran) 216 #### vvvv nom fichier netCDF (important initialisation 217 ################################################################################################################ 218 state real m_albedo ij misc 1 - i012rd "MARS_ALB" "albedo of naked ground" "0 - 1 fraction" 219 state real m_ti ij misc 1 - i012rd "MARS_TI" "thermal inertia" "J/m2/K/s0.5" 220 state real m_z0 ij misc 1 - i012rd "MARS_Z0" "surface roughness" "m" 221 state real slpx ij misc 1 - i012rd "SLOPEX" "slope x direction" "rad" 222 state real slpy ij misc 1 - i012rd "SLOPEY" "slope y direction" "rad" 223 state real m_emiss ij misc 1 - i012rd "MARS_EMISS" "emissivity" "0 - 1 fraction" 224 state real m_co2ice ij misc 1 - i012rhd "MARS_CICE" "CO2 GROUND ICE" "kg/m2" 225 state real m_h2oice ij misc 1 - i012rhd "MARS_WICE" "H2O GROUND ICE" "kg/m2" 226 state real m_fluxrad ij misc 1 - i012rhd "MARS_FLUXRAD" "net rad flux at surf" "W.m-2" 227 state real m_wstar ij misc 1 - i012rhd "MARS_WSTAR" "FREE CONVECTION VELOCITY" "m.s-1" 228 state real m_tsurf ij misc 1 - i012rhd "MARS_TSURF" "SURFACE TEMPERATURE" "K" 229 state real m_tsoil ilj misc 1 - i012rhd "MARS_TSOIL" "SOIL TEMPERATURES" "K" 230 state real m_q2 ikj misc 1 Z i012rhd "MARS_Q2" "parameterized TKE" "kg.m-3" 231 state real m_isoil ilj misc 1 - i012rd "MARS_ISOIL" "soil thermal inertia" "tiu" 232 state real m_dsoil ilj misc 1 - i012rd "MARS_DSOIL" "soil depths" "m" 233 state real m_gw ilj misc 1 - i012rd "MARS_GW" "gwparam" " " 248 234 #### 249 235 #### 250 236 ####MARS MARS MARS MARS MARS 251 237 ####MARS MARS MARS MARS MARS 252 253 254 238 255 239 #----------------------------------------------------------------------------------------------------------------------------------------------------------------- … … 360 344 ## 361 345 state real ptot ikj dyn_em 1 - irh "PTOT" "total pressure" "Pa" 362 ####### if you choose h here, you will probably want not to output u,v,w,t,etc...363 state real uave ikj dyn_em 1 - ir "UAVE" "average zonal wind" "m/s"364 state real ustd ikj dyn_em 1 - ir "USTD" "std dev zonal wind" "m/s"365 state real vave ikj dyn_em 1 - ir "VAVE" "average meridional wind" "m/s"366 state real vstd ikj dyn_em 1 - ir "VSTD" "std dev meridional wind" "m/s"367 state real wave ikj dyn_em 1 - ir "WAVE" "average vertical wind" "m/s"368 state real wstd ikj dyn_em 1 - ir "WSTD" "std dev vertical wind" "m/s"369 state real tave ikj dyn_em 1 - ir "TAVE" "average pert. potential temperature" "K"370 state real tstd ikj dyn_em 1 - ir "TSTD" "std dev pert. potential temperature" "K"371 #######372 ## ajouter tk, ptot, phtot ??? les deux derniers sont assez smooth...373 346 374 347 # -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_initialize_quarter_ss.F
r1199 r1236 455 455 ENDIF 456 456 grid%tsk(i,j) = tsurf_input 457 grid%m_tsurf(i,j) = tsurf_input 457 458 !!MARS 458 459 grid%xlat(i,j) = lat_input 459 460 grid%xlong(i,j) = lon_input!+float(i)*config_flags%dx/59000. 460 grid%m ars_emiss(i,j)=0.95461 grid%m ars_cice(i,j)=0.462 grid%m ars_wice(i,j)=0.461 grid%m_emiss(i,j)=0.95 462 grid%m_co2ice(i,j)=0. 463 grid%m_h2oice(i,j)=0. 463 464 !! >> Used for restarts only: 464 grid%mars_q2(i,:,j)=0. 465 grid%mars_fluxrad(i,j)=0. 466 grid%mars_wstar(i,j)=0. 467 grid%mars_tsurf(i,j)=0. 465 grid%m_q2(i,:,j)=0. 466 grid%m_fluxrad(i,j)=0. 467 grid%m_wstar(i,j)=0. 468 468 !! << 469 469 write(6,*) 'NOTE TO SELF. slpx and slpy set to 0 which means no slope insolation.' 470 470 grid%slpx(i,j) = 0. 471 471 grid%slpy(i,j) = 0. 472 DO k=1,config_flags%num_soil_layers 473 grid%m_tsoil(i,k,j) = 0. 474 ENDDO 472 475 !!! COMMENT THE LINES BELOW IF YOU DON'T WANT CORIOLIS TERMS 473 476 !!! cf. doc WRF2008 page 11 for e and f expressions -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_initialize_real.F
r1199 r1236 266 266 DO j = jts, MIN(jte,jde-1) 267 267 DO i = its, MIN(ite,ide-1) 268 !!****MARS: tsk is surface temperature269 grid%tsk(i,j) = grid%em_tsk_gc(i,j)270 268 grid%tmn(i,j) = grid%em_tmn_gc(i,j) 271 269 grid%xlat(i,j) = grid%em_xlat_gc(i,j) … … 273 271 grid%ht(i,j) = grid%em_ht_gc(i,j) 274 272 !!****MARS 275 grid%albedo_gcm(i,j) = grid%em_albedo_gcm_gc(i,j) 276 grid%therm_inert(i,j) = grid%em_therm_inert_gc(i,j) 273 grid%m_tsurf(i,j) = grid%em_tsk_gc(i,j) 274 grid%m_albedo(i,j) = grid%em_albedo_gcm_gc(i,j) 275 grid%m_ti(i,j) = grid%em_therm_inert_gc(i,j) 277 276 grid%slpx(i,j) = grid%em_slpx_gc(i,j) 278 277 grid%slpy(i,j) = grid%em_slpy_gc(i,j) 279 grid%mars_emiss(i,j)=grid%st000010(i,j) 280 grid%mars_cice(i,j)=grid%st010040(i,j) 281 grid%mars_wice(i,j)=grid%sm100200(i,j) 282 !! >> Used for restarts only: 283 grid%mars_q2(i,:,j)=0. 284 grid%mars_tsurf(i,j)=0. 285 !! << 278 grid%m_emiss(i,j) = grid%st000010(i,j) 279 grid%m_co2ice(i,j) = grid%st010040(i,j) 280 grid%m_h2oice(i,j) = grid%sm100200(i,j) 281 grid%m_q2(i,:,j) = 0. 286 282 !! one more security ... co2ice cannot be negative 287 IF (grid%m ars_cice(i,j) .lt. 0.) grid%mars_cice(i,j)=0.288 IF (grid%m ars_wice(i,j) .lt. 0.) grid%mars_wice(i,j)=0.283 IF (grid%m_co2ice(i,j) .lt. 0.) grid%m_co2ice(i,j)=0. 284 IF (grid%m_h2oice(i,j) .lt. 0.) grid%m_h2oice(i,j)=0. 289 285 290 286 DO k = 1, config_flags%num_soil_layers 291 grid%m ars_tsoil(i,k,j)=grid%em_tsoil_gc(i,k+1,j) !!ici k+1, because em_tsoil_gc dim is num_metgrid_levels !!287 grid%m_tsoil(i,k,j)=grid%em_tsoil_gc(i,k+1,j) !!ici k+1, because em_tsoil_gc dim is num_metgrid_levels !! 292 288 ENDDO 293 289 … … 296 292 #ifdef NEWPHYS 297 293 298 grid%m ars_wstar(i,j)=0. !! used for restarts299 grid%m ars_fluxrad(i,j)=0. !! used for restarts300 301 grid%m ars_z0(i,j) = 0.302 grid%m ars_z0(i,j) = grid%em_z0_gc(i,j)*0.01 !! in cm in surface.nc but in m in physiq.F294 grid%m_wstar(i,j)=0. 295 grid%m_fluxrad(i,j)=0. 296 297 grid%m_z0(i,j) = 0. 298 grid%m_z0(i,j) = grid%em_z0_gc(i,j)*0.01 !! in cm in surface.nc but in m in physiq.F 303 299 !IF (config_flags%init_Z0 .ne. 0.) THEN 304 300 ! grid%z0 = grid%z0*0. + config_flags%init_Z0 … … 307 303 ! here, that bit is necessary for new soil model ! 308 304 IF (config_flags%init_TI .ne. 0.) THEN 309 grid% therm_inert = grid%therm_inert*0. + config_flags%init_TI305 grid%m_ti = grid%m_ti*0. + config_flags%init_TI 310 306 print *, 'constant thermal inertia ', config_flags%init_TI 311 307 ENDIF 312 308 313 309 DO k = 1, config_flags%num_soil_layers 314 grid%m ars_isoil(i,k,j)=grid%em_isoil_gc(i,k+1,j)315 grid%m ars_dsoil(i,k,j)=grid%em_dsoil_gc(i,k+1,j)310 grid%m_isoil(i,k,j)=grid%em_isoil_gc(i,k+1,j) 311 grid%m_dsoil(i,k,j)=grid%em_dsoil_gc(i,k+1,j) 316 312 ENDDO 317 313 318 314 DO k = 1, config_flags%num_soil_layers 319 315 !!!!!!!!!!!!!!!!! DONE in soil_setting.F 320 IF (grid%m ars_dsoil(i,k,j) == -999.) THEN !! old soil depths (or) no info in files321 grid%m ars_dsoil(i,k,j) = sqrt(887.75/3.14)*((2.**(k-0.5))-1.) * grid%therm_inert(i,j) / wvolcapa316 IF (grid%m_dsoil(i,k,j) == -999.) THEN !! old soil depths (or) no info in files 317 grid%m_dsoil(i,k,j) = sqrt(887.75/3.14)*((2.**(k-0.5))-1.) * grid%m_ti(i,j) / wvolcapa 322 318 !!! ATTENTION il faut interpoler si le nombre de niveaux change 323 319 !!! voir soil_setting.F (olddepthdef=.true. ; interpol=.true.) 324 320 !!! mais: en meso-echelle on a juste a prendre le mm nombre de niveaux que le GCM 325 321 ENDIF 326 IF (grid%m ars_isoil(i,k,j) == -999.) THEN !! old soil model (or) no 3D thermal inertia327 grid%m ars_isoil(i,k,j) = grid%therm_inert(i,j)322 IF (grid%m_isoil(i,k,j) == -999.) THEN !! old soil model (or) no 3D thermal inertia 323 grid%m_isoil(i,k,j) = grid%m_ti(i,j) 328 324 ELSE 329 IF (grid%m ars_dsoil(i,k,j) .le. sqrt(88775./3.14) * grid%therm_inert(i,j) / wvolcapa) THEN330 grid%m ars_isoil(i,k,j) = grid%therm_inert(i,j) !! if depth < skin depth, we use hi-res TI325 IF (grid%m_dsoil(i,k,j) .le. sqrt(88775./3.14) * grid%m_ti(i,j) / wvolcapa) THEN 326 grid%m_isoil(i,k,j) = grid%m_ti(i,j) !! if depth < skin depth, we use hi-res TI 331 327 ELSE !! if depth > skin depth, we use low-res (GCM) TI 332 328 !! except for a transition layer 333 329 !! EM: and, well, it would be wrong to sum up TI values 334 330 !! EM: (cf. last page of soil model technical document) 335 IF (grid%m ars_dsoil(i,k-1,j) .le. sqrt(88775./3.14) * grid%therm_inert(i,j) / wvolcapa) THEN336 grid%m ars_isoil(i,k,j) = &331 IF (grid%m_dsoil(i,k-1,j) .le. sqrt(88775./3.14) * grid%m_ti(i,j) / wvolcapa) THEN 332 grid%m_isoil(i,k,j) = & 337 333 sqrt( & 338 ( grid%m ars_dsoil(i,k+1,j) - grid%mars_dsoil(i,k-1,j) ) &334 ( grid%m_dsoil(i,k+1,j) - grid%m_dsoil(i,k-1,j) ) & 339 335 / & 340 ( ( (grid%m ars_dsoil(i,k,j) - grid%mars_dsoil(i,k-1,j)) &341 / (grid%m ars_isoil(i,k-1,j)*grid%mars_isoil(i,k-1,j)) ) &336 ( ( (grid%m_dsoil(i,k,j) - grid%m_dsoil(i,k-1,j)) & 337 / (grid%m_isoil(i,k-1,j)*grid%m_isoil(i,k-1,j)) ) & 342 338 + & 343 ( (grid%m ars_dsoil(i,k+1,j) - grid%mars_dsoil(i,k,j)) &344 / (grid%m ars_isoil(i,k+1,j)*grid%mars_isoil(i,k+1,j)) ) &339 ( (grid%m_dsoil(i,k+1,j) - grid%m_dsoil(i,k,j)) & 340 / (grid%m_isoil(i,k+1,j)*grid%m_isoil(i,k+1,j)) ) & 345 341 ) & 346 342 ) 347 ENDIF !! grid%m ars_isoil(i,k-1,j) was changed at previous step to value grid%therm_inert(i,j)348 !! grid%m ars_isoil(i,k+1,j) is defined to large-scale value grid%em_isoil_gc343 ENDIF !! grid%m_isoil(i,k-1,j) was changed at previous step to value grid%m_ti(i,j) 344 !! grid%m_isoil(i,k+1,j) is defined to large-scale value grid%em_isoil_gc 349 345 ENDIF 350 346 ENDIF 351 IF (grid%m ars_tsoil(i,k,j) .lt. 20.) THEN !!! une securite pour les anciens diagfi qui n'ont que 10 niveaux352 IF (k .ne. 1) grid%m ars_tsoil(i,k,j) = grid%mars_tsoil(i,k-1,j)347 IF (grid%m_tsoil(i,k,j) .lt. 20.) THEN !!! une securite pour les anciens diagfi qui n'ont que 10 niveaux 348 IF (k .ne. 1) grid%m_tsoil(i,k,j) = grid%m_tsoil(i,k-1,j) 353 349 ENDIF 354 350 !!!!!!!!!!!!!!!!! DONE in soil_setting.F … … 358 354 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 359 355 360 grid%m ars_gw(i,1,j)=grid%st040100(i,j) !!ZMEA361 grid%m ars_gw(i,2,j)=grid%st100200(i,j) !!ZSTD362 grid%m ars_gw(i,3,j)=grid%sm000010(i,j) !!ZSIG363 grid%m ars_gw(i,4,j)=grid%sm010040(i,j) !!ZGAM364 grid%m ars_gw(i,5,j)=grid%sm040100(i,j) !!ZTHE356 grid%m_gw(i,1,j)=grid%st040100(i,j) !!ZMEA 357 grid%m_gw(i,2,j)=grid%st100200(i,j) !!ZSTD 358 grid%m_gw(i,3,j)=grid%sm000010(i,j) !!ZSIG 359 grid%m_gw(i,4,j)=grid%sm010040(i,j) !!ZGAM 360 grid%m_gw(i,5,j)=grid%sm040100(i,j) !!ZTHE 365 361 366 362 END DO … … 385 381 !DO j = jts, MIN(jte,jde-1) 386 382 !DO i = its, MIN(ite,ide-1) 387 ! grid% therm_inert(i,j) = config_flags%init_TI383 ! grid%m_ti(i,j) = config_flags%init_TI 388 384 !ENDDO 389 385 !ENDDO 390 grid% therm_inert = grid%therm_inert*0. + config_flags%init_TI386 grid%m_ti = grid%m_ti*0. + config_flags%init_TI 391 387 print *, 'constant thermal inertia ', config_flags%init_TI 392 388 … … 411 407 !DO j = jts, MIN(jte,jde-1) 412 408 !DO i = its, MIN(ite,ide-1) 413 !yeah = grid%m ars_tsoil(i,k,j) + yeah409 !yeah = grid%m_tsoil(i,k,j) + yeah 414 410 !yeahc = yeahc + 1. 415 411 !ENDDO … … 418 414 !DO j = jts, MIN(jte,jde-1) 419 415 !DO i = its, MIN(ite,ide-1) 420 !grid%m ars_tsoil(i,k,j) = yeah / yeahc416 !grid%m_tsoil(i,k,j) = yeah / yeahc 421 417 !ENDDO 422 418 !ENDDO … … 427 423 IF (config_flags%init_AL .ne. 0.) THEN 428 424 429 grid% albedo_gcm = grid%albedo_gcm*0. + config_flags%init_AL425 grid%m_albedo = grid%m_albedo*0. + config_flags%init_AL 430 426 print *, 'constant albedo ', config_flags%init_AL 431 427 … … 477 473 print *, 'p', grid%em_rh_gc(its+1,:,jts+1) 478 474 print *, 'geop', grid%em_ght_gc(its+1,:,jts+1) 479 print *, 'albedo', grid% albedo_gcm(its+1,jts+1)480 print *, 'thermal inertia', grid% therm_inert(its+1,jts+1)475 print *, 'albedo', grid%m_albedo(its+1,jts+1) 476 print *, 'thermal inertia', grid%m_ti(its+1,jts+1) 481 477 print *, 'topography', grid%ht(its+1,jts+1) 482 478 print *, 'toposoil', grid%toposoil(its+1,jts+1) 483 print *, 'surface temperature', grid% tsk(its+1,jts+1)479 print *, 'surface temperature', grid%m_tsurf(its+1,jts+1) 484 480 print *, 'surface pressure', grid%psfc(its+1,jts+1), grid%em_psfc_gc(its+1,jts+1) 485 481 … … 491 487 grid%em_rh_gc(i,:,j)=grid%em_rh_gc(its+1,:,jts+1) 492 488 grid%em_ght_gc(i,:,j) = grid%em_ght_gc(its+1,:,jts+1) 493 grid% albedo_gcm(i,j) = grid%albedo_gcm(its+1,jts+1)494 grid% therm_inert(i,j) = grid%therm_inert(its+1,jts+1)489 grid%m_albedo(i,j) = grid%m_albedo(its+1,jts+1) 490 grid%m_ti(i,j) = grid%m_ti(its+1,jts+1) 495 491 grid%ht(i,j) = grid%ht(its+1,jts+1) 496 492 grid%toposoil(i,j) = grid%toposoil(its+1,jts+1) 497 grid% tsk(i,j) = grid%tsk(its+1,jts+1)493 grid%m_tsurf(i,j) = grid%m_tsurf(its+1,jts+1) 498 494 grid%psfc(i,j) = grid%psfc(its+1,jts+1) 499 495 grid%em_psfc_gc(i,j) = grid%em_psfc_gc(its+1,jts+1) 500 496 grid%slpx(i,j) = 0. 501 497 grid%slpy(i,j) = 0. 502 grid%m ars_emiss(i,j) = 0.95503 grid%m ars_cice(i,j) = 0.504 grid%m ars_wice(i,j) = 0.505 grid%m ars_tsoil(i,:,j)=grid%mars_tsoil(its+1,:,jts+1)498 grid%m_emiss(i,j) = 0.95 499 grid%m_co2ice(i,j) = 0. 500 grid%m_h2oice(i,j) = 0. 501 grid%m_tsoil(i,:,j)=grid%m_tsoil(its+1,:,jts+1) 506 502 507 503 !!! 508 grid%m ars_isoil(i,:,j)=grid%mars_isoil(its+1,:,jts+1)509 grid%m ars_dsoil(i,:,j)=grid%mars_dsoil(its+1,:,jts+1)504 grid%m_isoil(i,:,j)=grid%m_isoil(its+1,:,jts+1) 505 grid%m_dsoil(i,:,j)=grid%m_dsoil(its+1,:,jts+1) 510 506 511 507 !! T.Michaels trick to break symmetry -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/solve_em.F
r802 r1236 859 859 & ,MARS_MODE=config_flags%mars & 860 860 ! added variables 861 & ,M ARS_ALB=grid%albedo_gcm,MARS_TI=grid%therm_inert&862 & ,M ARS_CICE=grid%mars_cice,MARS_EMISS=grid%mars_emiss &863 & ,M ARS_WICE=grid%mars_wice&864 & ,M ARS_TSOIL=grid%mars_tsoil &865 & ,M ARS_Q2=grid%mars_q2 &866 & ,M ARS_TSURF=grid%mars_tsurf &861 & ,M_ALBEDO=grid%m_albedo,M_TI=grid%m_ti & 862 & ,M_CO2ICE=grid%m_co2ice,M_EMISS=grid%m_emiss & 863 & ,M_H2OICE=grid%m_h2oice & 864 & ,M_TSOIL=grid%m_tsoil & 865 & ,M_Q2=grid%m_q2 & 866 & ,M_TSURF=grid%m_tsurf & 867 867 #ifdef NEWPHYS 868 & ,M ARS_FLUXRAD=grid%mars_fluxrad &869 & ,M ARS_WSTAR=grid%mars_wstar &870 & ,M ARS_ISOIL=grid%mars_isoil &871 & ,M ARS_DSOIL=grid%mars_dsoil &872 & ,M ARS_Z0=grid%mars_z0 &868 & ,M_FLUXRAD=grid%m_fluxrad & 869 & ,M_WSTAR=grid%m_wstar & 870 & ,M_ISOIL=grid%m_isoil & 871 & ,M_DSOIL=grid%m_dsoil & 872 & ,M_Z0=grid%m_z0 & 873 873 & ,CST_Z0=config_flags%init_Z0 & 874 874 #endif 875 & ,M ARS_GW=grid%mars_gw &875 & ,M_GW=grid%m_gw & 876 876 & ,NUM_SOIL_LAYERS=config_flags%num_soil_layers & 877 877 ! cst fields … … 881 881 & ,DIFF_OPT=config_flags%diff_opt & 882 882 & ,KM_OPT=config_flags%km_opt & 883 ! additional diagnostics884 & ,UAVE=grid%em_uave, USTD=grid%em_ustd &885 & ,VAVE=grid%em_vave, VSTD=grid%em_vstd &886 & ,WAVE=grid%em_wave, WSTD=grid%em_wstd &887 & ,TAVE=grid%em_tave, TSTD=grid%em_tstd &888 883 & ,HISTORY_INTERVAL=model_config_rec%history_interval(1) & 889 884 #ifndef NOPHYS … … 891 886 ! OUTPUT VARIABLES ! 892 887 !------------------! 888 #ifdef NEWPHYS 889 & ,HR_SW=grid%HR_SW & 890 & ,HR_LW=grid%HR_LW & 891 & ,SWDOWNZ=grid%SWDOWNZ & 892 & ,TAU_DUST=grid%TAU_DUST & 893 & ,RDUST=grid%RDUST & 894 & ,QSURFDUST=grid%QSURFDUST & 895 & ,MTOT=grid%MTOT & 896 & ,ICETOT=grid%ICETOT & 897 & ,VMR_ICE=grid%VMR_ICE & 898 & ,TAU_ICE=grid%TAU_ICE & 899 & ,RICE=grid%RICE & 900 & ,ZMAX=grid%ZMAX & 901 & ,HFMAX=grid%HFMAX & 902 & ,USTM=grid%USTM & 903 & ,HFX=grid%HFX & 904 #else 893 905 #include "module_lmd_driver_output4.inc" 906 #endif 894 907 #endif 895 908 & ,SLPX=grid%slpx,SLPY=grid%slpy,RESTART=config_flags%restart) -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F
r1212 r1236 29 29 num_3d_s,SCALAR, & 30 30 MARS_MODE, & 31 M ARS_ALB,MARS_TI,MARS_CICE,MARS_EMISS, &32 M ARS_WICE, &33 M ARS_TSOIL, &34 M ARS_Q2, &35 M ARS_TSURF, &36 #ifdef NEWPHYS 37 M ARS_FLUXRAD, &38 M ARS_WSTAR, &39 M ARS_ISOIL, &40 M ARS_DSOIL, &41 M ARS_Z0, &31 M_ALBEDO,M_TI,M_CO2ICE,M_EMISS, & 32 M_H2OICE, & 33 M_TSOIL, & 34 M_Q2, & 35 M_TSURF, & 36 #ifdef NEWPHYS 37 M_FLUXRAD, & 38 M_WSTAR, & 39 M_ISOIL, & 40 M_DSOIL, & 41 M_Z0, & 42 42 CST_Z0, & 43 43 #endif 44 M ARS_GW, &44 M_GW, & 45 45 NUM_SOIL_LAYERS, & 46 46 CST_AL, & … … 49 49 diff_opt, & 50 50 km_opt, & 51 UAVE, USTD, &52 VAVE, VSTD, &53 WAVE, WSTD, &54 TAVE, TSTD, &55 51 HISTORY_INTERVAL, & 56 52 #ifndef NOPHYS … … 119 115 MSFT,MSFU,MSFV, & 120 116 XLAT,XLONG,HT, & 121 M ARS_ALB,MARS_TI,MARS_EMISS, &117 M_ALBEDO,M_TI,M_EMISS, & 122 118 SLPX,SLPY 123 119 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT ) :: & 124 M ARS_CICE,MARS_WICE, &125 M ARS_TSURF120 M_CO2ICE,M_H2OICE, & 121 M_TSURF 126 122 ! 3D arrays 127 123 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(IN ) :: & 128 124 dz8w,p8w,p,exner,t,t8w,rho,u,v,w,z,th 129 125 REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT ) :: & 130 M ARS_Q2126 M_Q2 131 127 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 132 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(INOUT ) :: &133 UAVE, USTD, VAVE, VSTD, WAVE, WSTD, TAVE, TSTD134 128 INTEGER, INTENT(IN ) :: HISTORY_INTERVAL 135 129 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 136 130 REAL, DIMENSION( ims:ime, NUM_SOIL_LAYERS, jms:jme ), INTENT(INOUT ) :: & 137 M ARS_TSOIL131 M_TSOIL 138 132 #ifdef NEWPHYS 139 133 REAL, INTENT(IN ) :: CST_Z0 140 134 REAL, DIMENSION( ims:ime, NUM_SOIL_LAYERS, jms:jme ), INTENT(IN ) :: & 141 M ARS_ISOIL, MARS_DSOIL135 M_ISOIL, M_DSOIL 142 136 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN ) :: & 143 M ARS_Z0137 M_Z0 144 138 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT ) :: & 145 M ARS_FLUXRAD,MARS_WSTAR139 M_FLUXRAD,M_WSTAR 146 140 #endif 147 141 REAL, DIMENSION( ims:ime, 5, jms:jme ), INTENT(IN ) :: & 148 M ARS_GW142 M_GW 149 143 ! 4D arrays 150 144 INTEGER, INTENT(IN ) :: num_3d_s … … 924 918 !-----------------------------------------! 925 919 IF (JULYR .ne. 9999) THEN 926 zmea_val=M ARS_GW(i,1,j)927 zstd_val=M ARS_GW(i,2,j)928 zsig_val=M ARS_GW(i,3,j)929 zgam_val=M ARS_GW(i,4,j)930 zthe_val=M ARS_GW(i,5,j)920 zmea_val=M_GW(i,1,j) 921 zstd_val=M_GW(i,2,j) 922 zsig_val=M_GW(i,3,j) 923 zgam_val=M_GW(i,4,j) 924 zthe_val=M_GW(i,5,j) 931 925 ELSE 932 926 IF ( (i == ips) .AND. (j == jps) ) PRINT *,'** Mars ** IDEALIZED SIMULATION GWdrag OFF' … … 943 937 IF (JULYR .ne. 9999) THEN 944 938 IF (CST_AL == 0) THEN 945 albedodat_val=M ARS_ALB(i,j)939 albedodat_val=M_ALBEDO(i,j) 946 940 ELSE 947 941 albedodat_val=CST_AL … … 949 943 ENDIF 950 944 IF (CST_TI == 0) THEN 951 inertiedat_val=M ARS_TI(i,j)945 inertiedat_val=M_TI(i,j) 952 946 ELSE 953 947 inertiedat_val=CST_TI … … 967 961 IF (JULYR .ne. 9999) THEN 968 962 IF (CST_Z0 == 0) THEN 969 z0_val = M ARS_Z0(i,j)963 z0_val = M_Z0(i,j) 970 964 ELSE 971 965 z0_val = CST_Z0 … … 999 993 ! Ground temperature, emissivity, CO2 ice cover ! 1000 994 !-----------------------------------------------! 1001 IF (.not. restart) THEN 1002 tsurf_val=tsk(i,j) ! because tsk is not updated in lmd_driver, the stored value in restart is at t, not t+dt 1003 ! note to aslmd: i dont know why we dont update tsk, so I use MARS_TSURF to be conservative 1004 ELSE 1005 tsurf_val=MARS_TSURF(i,j) 1006 ENDIF 1007 emis_val=MARS_EMISS(i,j) 1008 co2ice_val=MARS_CICE(i,j) 995 IF (M_TSURF(i,j) .gt. 0.) THEN 996 tsurf_val=M_TSURF(i,j) 997 ELSE 998 tsurf_val=TSK(i,j) ! retro-compatibility 999 ENDIF 1000 emis_val=M_EMISS(i,j) 1001 co2ice_val=M_CO2ICE(i,j) 1009 1002 1010 1003 !------------------------! … … 1012 1005 !------------------------! 1013 1006 IF (JULYR .ne. 9999) THEN 1014 IF (M ARS_TSOIL(i,1,j) .gt. 0.) THEN1015 tsoil_val(:)=M ARS_TSOIL(i,:,j)1007 IF (M_TSOIL(i,1,j) .gt. 0.) THEN 1008 tsoil_val(:)=M_TSOIL(i,:,j) 1016 1009 ELSE 1017 1010 tsoil_val = tsoil_val*0. + tsurf_val 1018 1011 ENDIF 1019 1012 #ifdef NEWPHYS 1020 isoil_val(:)=M ARS_ISOIL(i,:,j)1021 dsoil_val(:)=M ARS_DSOIL(i,:,j)1013 isoil_val(:)=M_ISOIL(i,:,j) 1014 dsoil_val(:)=M_DSOIL(i,:,j) 1022 1015 #endif 1023 1016 ELSE … … 1028 1021 ELSE 1029 1022 !this is a restart run. We must not set tsoil to tsurf in the init. 1030 !tsoil was saved in physiq.F under the name M ARS_TSOIL in the restart file1023 !tsoil was saved in physiq.F under the name M_TSOIL in the restart file 1031 1024 !(see Registry) 1032 tsoil_val(k)=M ARS_TSOIL(i,k,j)1025 tsoil_val(k)=M_TSOIL(i,k,j) 1033 1026 ENDIF 1034 1027 … … 1055 1048 CASE(1) 1056 1049 qsurf_val(1)=0. 1057 qsurf_val(2)=M ARS_WICE(i,j) !! logique avec wtnom(2) = 'h2o_ice' defini ci-dessus1050 qsurf_val(2)=M_H2OICE(i,j) !! logique avec wtnom(2) = 'h2o_ice' defini ci-dessus 1058 1051 !! ----- retrocompatible ancienne physique 1059 1052 !! ----- [H2O ice is last tracer in qsurf in LMD physics] … … 1066 1059 CASE(11) 1067 1060 qsurf_val(1)=0. 1068 qsurf_val(2)=M ARS_WICE(i,j) !! logique avec wtnom(2) = 'h2o_ice' defini ci-dessus1061 qsurf_val(2)=M_H2OICE(i,j) !! logique avec wtnom(2) = 'h2o_ice' defini ci-dessus 1069 1062 qsurf_val(3)=0. !! not coupled with lifting for the moment [non remobilise] 1070 1063 qsurf_val(4)=0. 1071 1064 CASE(12) 1072 1065 qsurf_val(1)=0. 1073 qsurf_val(2)=M ARS_WICE(i,j) !! logique avec wtnom(2) = 'h2o_ice' defini ci-dessus1066 qsurf_val(2)=M_H2OICE(i,j) !! logique avec wtnom(2) = 'h2o_ice' defini ci-dessus 1074 1067 qsurf_val(3)=0. !! not coupled with lifting for the moment [non remobilise] 1075 1068 qsurf_val(4)=0. … … 1156 1149 #endif 1157 1150 ELSE 1158 q2_val(:)=M ARS_Q2(i,:,j)1159 #ifdef NEWPHYS 1160 fluxrad_val=M ARS_FLUXRAD(i,j)1161 wstar_val=M ARS_WSTAR(i,j)1151 q2_val(:)=M_Q2(i,:,j) 1152 #ifdef NEWPHYS 1153 fluxrad_val=M_FLUXRAD(i,j) 1154 wstar_val=M_WSTAR(i,j) 1162 1155 #endif 1163 1156 ENDIF … … 1524 1517 #ifndef NORESTART 1525 1518 #ifdef SPECIAL_NEST_SAVE 1526 M ARS_TSOIL(i,:,j)=save_tsoil_restart(subs,:,id)1527 M ARS_CICE(i,j)=save_co2ice_restart(subs,id)1528 M ARS_Q2(i,kps:kpe+1,j)=save_q2_restart(subs,:,id)1519 M_TSOIL(i,:,j)=save_tsoil_restart(subs,:,id) 1520 M_CO2ICE(i,j)=save_co2ice_restart(subs,id) 1521 M_Q2(i,kps:kpe+1,j)=save_q2_restart(subs,:,id) 1529 1522 SELECT CASE (MARS_MODE) 1530 1523 CASE (1,11,12) 1531 M ARS_WICE(i,j)=save_qsurf_restart(subs,2,id) !! see above Tracer at surface1524 M_H2OICE(i,j)=save_qsurf_restart(subs,2,id) !! see above Tracer at surface 1532 1525 END SELECT 1533 M ARS_TSURF(i,j)=save_tsurf_restart(subs,id)1534 #ifdef NEWPHYS 1535 M ARS_WSTAR(i,j)=save_wstar_restart(subs,id)1536 M ARS_FLUXRAD(i,j)=save_fluxrad_restart(subs,id)1526 M_TSURF(i,j)=save_tsurf_restart(subs,id) 1527 #ifdef NEWPHYS 1528 M_WSTAR(i,j)=save_wstar_restart(subs,id) 1529 M_FLUXRAD(i,j)=save_fluxrad_restart(subs,id) 1537 1530 #endif 1538 1531 #else 1539 M ARS_TSOIL(i,:,j)=save_tsoil_restart(subs,:)1540 M ARS_CICE(i,j)=save_co2ice_restart(subs)1541 M ARS_Q2(i,kps:kpe+1,j)=save_q2_restart(subs,:)1532 M_TSOIL(i,:,j)=save_tsoil_restart(subs,:) 1533 M_CO2ICE(i,j)=save_co2ice_restart(subs) 1534 M_Q2(i,kps:kpe+1,j)=save_q2_restart(subs,:) 1542 1535 SELECT CASE (MARS_MODE) 1543 1536 CASE (1,11,12) 1544 M ARS_WICE(i,j)=save_qsurf_restart(subs,2) !! see above Tracer at surface1537 M_H2OICE(i,j)=save_qsurf_restart(subs,2) !! see above Tracer at surface 1545 1538 END SELECT 1546 M ARS_TSURF(i,j)=save_tsurf_restart(subs)1547 #ifdef NEWPHYS 1548 M ARS_WSTAR(i,j)=save_wstar_restart(subs)1549 M ARS_FLUXRAD(i,j)=save_fluxrad_restart(subs)1539 M_TSURF(i,j)=save_tsurf_restart(subs) 1540 #ifdef NEWPHYS 1541 M_WSTAR(i,j)=save_wstar_restart(subs) 1542 M_FLUXRAD(i,j)=save_fluxrad_restart(subs) 1550 1543 #endif 1551 1544 #endif -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F.new
r1234 r1236 30 30 num_3d_s,SCALAR, & 31 31 MARS_MODE, & 32 MARS_ALB,MARS_TI,MARS_CICE,MARS_EMISS, & 33 MARS_WICE, & 34 MARS_TSOIL, & 35 MARS_Q2, & 36 MARS_TSURF, & 37 MARS_FLUXRAD, & 38 MARS_WSTAR, & 39 MARS_ISOIL, & 40 MARS_DSOIL, & 41 MARS_Z0, & 42 CST_Z0, & 43 MARS_GW, & 32 M_ALBEDO,M_TI,M_CO2ICE,M_EMISS, & 33 M_H2OICE,M_TSOIL,M_Q2,M_TSURF, & 34 M_FLUXRAD,M_WSTAR,M_ISOIL,M_DSOIL,& 35 M_Z0, CST_Z0, M_GW, & 44 36 NUM_SOIL_LAYERS, & 45 CST_AL, & 46 CST_TI, & 47 isfflx, & 48 diff_opt, & 49 km_opt, & 50 UAVE, USTD, & 51 VAVE, VSTD, & 52 WAVE, WSTD, & 53 TAVE, TSTD, & 37 CST_AL, CST_TI, & 38 isfflx, diff_opt, km_opt, & 54 39 HISTORY_INTERVAL, & 40 ! sert a rien ce NOPHYS. il le faudrait sur tout. 55 41 #ifndef NOPHYS 56 #include "module_lmd_driver_output1.inc" 42 HR_SW,HR_LW,SWDOWNZ,& 43 TAU_DUST,RDUST,QSURFDUST,& 44 MTOT,ICETOT,VMR_ICE,TAU_ICE,RICE,& 45 HFMAX,ZMAX,& 46 USTM,HFX,& 57 47 #endif 58 48 SLPX,SLPY,RESTART) … … 83 73 peri_day,obliquit,emin_turb, & 84 74 lmixmin 85 use turb_mod, only: q2,wstar,hfmax_th 75 use turb_mod, only: q2,wstar,ustar,sensibFlux,& 76 hfmax_th,zmax_th,turb_resolved 86 77 use dimradmars_mod, only: fluxrad 87 78 use tracer_mod, only: noms 88 79 use comcstfi_h, only: omeg,mugaz 89 80 use comgeomfi_h, only: ini_fillgeom 81 USE comm_wrf 90 82 #endif 91 83 … … 93 85 IMPLICIT NONE 94 86 !================================================================== 95 96 !==================================================================97 ! COMMON98 !==================================================================99 100 #ifndef NOPHYS101 !102 ! INCLUDE AUTOMATIQUEMENT GENERE A PARTIR DU REGISTRY103 !104 include "../mars_lmd/libf/phymars/wrf_output_2d.h"105 include "../mars_lmd/libf/phymars/wrf_output_3d.h"106 #endif107 87 108 88 !================================================================== … … 124 104 REAL, INTENT(IN ) :: CST_AL, CST_TI 125 105 REAL, INTENT(IN ) :: PTOP 106 INTEGER, INTENT(IN ) :: HISTORY_INTERVAL 126 107 ! 2D arrays 127 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN 108 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: & 128 109 MSFT,MSFU,MSFV, & 129 110 XLAT,XLONG,HT, & 130 MARS_ALB,MARS_TI,MARS_EMISS, & 131 SLPX,SLPY 132 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT ) :: & 133 MARS_CICE,MARS_WICE, & 134 MARS_TSURF 111 M_ALBEDO,M_TI,M_EMISS, & 112 SLPX,SLPY, & 113 M_CO2ICE,M_H2OICE, & 114 M_TSURF, M_Z0, & 115 M_FLUXRAD,M_WSTAR, & 116 PSFC,TSK 117 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(OUT) :: & 118 SWDOWNZ,& 119 TAU_DUST,QSURFDUST,& 120 MTOT,ICETOT,TAU_ICE,& 121 HFMAX,ZMAX,& 122 USTM,HFX 135 123 ! 3D arrays 136 124 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(IN ) :: & 137 125 dz8w,p8w,p,exner,t,t8w,rho,u,v,w,z,th 126 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(OUT ) :: & 127 RTHBLTEN,RUBLTEN,RVBLTEN, & 128 HR_SW,HR_LW,RDUST,VMR_ICE,RICE 138 129 REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT ) :: & 139 MARS_Q2 140 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 141 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(INOUT ) :: & 142 UAVE, USTD, VAVE, VSTD, WAVE, WSTD, TAVE, TSTD 143 INTEGER, INTENT(IN ) :: HISTORY_INTERVAL 144 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 130 M_Q2 145 131 REAL, DIMENSION( ims:ime, NUM_SOIL_LAYERS, jms:jme ), INTENT(INOUT ) :: & 146 M ARS_TSOIL132 M_TSOIL,M_ISOIL, M_DSOIL 147 133 REAL, INTENT(IN ) :: CST_Z0 148 REAL, DIMENSION( ims:ime, NUM_SOIL_LAYERS, jms:jme ), INTENT(IN ) :: &149 MARS_ISOIL, MARS_DSOIL150 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN ) :: &151 MARS_Z0152 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT ) :: &153 MARS_FLUXRAD,MARS_WSTAR154 134 REAL, DIMENSION( ims:ime, 5, jms:jme ), INTENT(IN ) :: & 155 M ARS_GW135 M_GW 156 136 ! 4D arrays 157 137 INTEGER, INTENT(IN ) :: num_3d_s … … 160 140 ! Logical 161 141 LOGICAL, INTENT(IN ) :: restart 162 163 !-------------------------------------------164 ! OUTPUT VARIABLES165 !-------------------------------------------166 !167 ! Generated from Registry168 !169 ! default definitions :170 ! 2D : TSK, PSFC171 ! 3D : RTHBLTEN,RUBLTEN,RVBLTEN172 #ifndef NOPHYS173 #include "module_lmd_driver_output2.inc"174 REAL, DIMENSION(:,:), ALLOCATABLE :: output_tab2d175 REAL, DIMENSION(:,:,:), ALLOCATABLE :: output_tab3d176 #else177 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: PSFC,TSK178 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(OUT) :: RTHBLTEN,RUBLTEN,RVBLTEN179 #endif180 !-------------------------------------------181 ! OUTPUT VARIABLES182 !-------------------------------------------183 184 142 185 143 !------------------------------------------- … … 201 159 REAL :: aire_val,lat_val,lon_val 202 160 REAL :: phisfi_val,albedodat_val,inertiedat_val 203 REAL :: tsurf_val,co2ice_val,emis_val204 161 REAL :: zmea_val,zstd_val,zsig_val,zgam_val,zthe_val 205 162 REAL :: theta_val, psi_val … … 230 187 INTEGER :: test 231 188 REAL :: wappel_phys 232 LOGICAL :: flag_LES233 189 LOGICAL, SAVE :: flag_first_restart 234 190 !************************************************** … … 270 226 271 227 IF (JULYR .ne. 9999) THEN 272 flag_LES= .false. ! "True" LES is not available in this version228 turb_resolved = .false. ! "True" LES is not available in this version 273 229 PRINT *, '*** REAL-CASE SIMULATION ***' 274 230 ELSE … … 278 234 PRINT *, '*** diff_opt = 2 *** km_opt = 2' 279 235 PRINT *, '*** forcing is isfflx = ',isfflx 280 flag_LES= .true.236 turb_resolved = .true. 281 237 !! SPECIAL LES 282 238 ELSE … … 284 240 PRINT *, '*** diff_opt = ',diff_opt 285 241 PRINT *, '*** km_opt = ',km_opt 286 flag_LES= .false.242 turb_resolved = .false. 287 243 !! IDEALIZED, no LES 288 244 !! cependant, ne veut-on pas pouvoir … … 302 258 jte = j_end(num_tiles) 303 259 !! 304 IF ( flag_LES.eqv. .false.) THEN260 IF (turb_resolved .eqv. .false.) THEN 305 261 relax=0 306 262 sponge_top=0 ! another value than 0 triggers instabilities … … 311 267 jps=jts 312 268 jpe=jte 313 IF ( flag_LES.eqv. .false.) THEN269 IF (turb_resolved .eqv. .false.) THEN 314 270 IF (ips .eq. ids) ips=its+relax !! IF tests necesary for parallel runs 315 271 IF (ipe .eq. ide-1) ipe=ite-relax … … 318 274 ENDIF 319 275 kps=kts !! start at surface 320 IF ( flag_LES.eqv. .false.) THEN276 IF (turb_resolved .eqv. .false.) THEN 321 277 kpe=kte-sponge_top 322 278 ELSE … … 492 448 ! inputs ... 493 449 #ifndef NOPHYS 494 ALLOCATE(output_tab2d(ngrid,n2d)) 495 ALLOCATE(output_tab3d(ngrid,nlayer,n3d)) 450 CALL allocate_comm_wrf(ngrid,nlayer) 496 451 #endif 497 452 ALLOCATE(q2_val(nlayer+1)) … … 841 796 IF (JULYR .ne. 9999) THEN 842 797 IF (CST_AL == 0) THEN 843 albedodat_val=M ARS_ALB(i,j)798 albedodat_val=M_ALBEDO(i,j) 844 799 ELSE 845 800 albedodat_val=CST_AL … … 855 810 !-----------------------------------------! 856 811 IF (JULYR .ne. 9999) THEN 857 zmea_val=M ARS_GW(i,1,j)858 zstd_val=M ARS_GW(i,2,j)859 zsig_val=M ARS_GW(i,3,j)860 zgam_val=M ARS_GW(i,4,j)861 zthe_val=M ARS_GW(i,5,j)812 zmea_val=M_GW(i,1,j) 813 zstd_val=M_GW(i,2,j) 814 zsig_val=M_GW(i,3,j) 815 zgam_val=M_GW(i,4,j) 816 zthe_val=M_GW(i,5,j) 862 817 ELSE 863 818 IF ( (i == ips) .AND. (j == jps) ) PRINT *,'** Mars ** IDEALIZED SIMULATION GWdrag OFF' … … 880 835 IF (JULYR .ne. 9999) THEN 881 836 IF (CST_Z0 == 0) THEN 882 z0_val = M ARS_Z0(i,j)837 z0_val = M_Z0(i,j) 883 838 ELSE 884 839 z0_val = CST_Z0 … … 905 860 ! Ground temperature, emissivity, CO2 ice cover ! 906 861 !-----------------------------------------------! 907 IF (.not. restart) THEN 908 tsurf_val=tsk(i,j) ! because tsk is not updated in lmd_driver, the stored value in restart is at t, not t+dt 909 ! note to aslmd: i dont know why we dont update tsk, so I use MARS_TSURF to be conservative 910 ELSE 911 tsurf_val=MARS_TSURF(i,j) 912 ENDIF 913 tsurf(subs) = tsurf_val 914 emis(subs) = MARS_EMISS(i,j) 915 co2ice(subs) = MARS_CICE(i,j) 862 tsurf(subs) = M_TSURF(i,j) 863 emis(subs) = M_EMISS(i,j) 864 co2ice(subs) = M_CO2ICE(i,j) 916 865 !-------------------! 917 866 ! Tracer at surface ! … … 920 869 SELECT CASE (MARS_MODE) 921 870 CASE(1) 922 qsurf_val(2)=M ARS_WICE(i,j) !! logique avec noms(2) = 'h2o_ice' defini ci-dessus871 qsurf_val(2)=M_H2OICE(i,j) !! logique avec noms(2) = 'h2o_ice' defini ci-dessus 923 872 !! ----- retrocompatible ancienne physique 924 873 !! ----- [H2O ice is last tracer in qsurf in LMD physics] … … 929 878 qsurf_val(2)=q_prof(1,2) 930 879 CASE(11) 931 qsurf_val(2)=M ARS_WICE(i,j) !! logique avec noms(2) = 'h2o_ice' defini ci-dessus880 qsurf_val(2)=M_H2OICE(i,j) !! logique avec noms(2) = 'h2o_ice' defini ci-dessus 932 881 qsurf_val(3)=0. !! not coupled with lifting for the moment [non remobilise] 933 882 CASE(12) 934 qsurf_val(2)=M ARS_WICE(i,j) !! logique avec noms(2) = 'h2o_ice' defini ci-dessus883 qsurf_val(2)=M_H2OICE(i,j) !! logique avec noms(2) = 'h2o_ice' defini ci-dessus 935 884 qsurf_val(3)=0. !! not coupled with lifting for the moment [non remobilise] 936 885 END SELECT … … 945 894 IF (JULYR .ne. 9999) THEN 946 895 IF (CST_TI == 0) THEN 947 inertiedat_val=M ARS_TI(i,j)896 inertiedat_val=M_TI(i,j) 948 897 ELSE 949 898 inertiedat_val=CST_TI … … 957 906 !--pb de dimensions???!!??? 958 907 IF (JULYR .ne. 9999) THEN 959 isoil_val(:)=M ARS_ISOIL(i,:,j)960 dsoil_val(:)=M ARS_DSOIL(i,:,j)908 isoil_val(:)=M_ISOIL(i,:,j) 909 dsoil_val(:)=M_DSOIL(i,:,j) 961 910 ELSE 962 911 IF ( nsoil .lt. 18 ) THEN … … 986 935 ! Deep soil temperatures ! 987 936 !------------------------! 988 IF (JULYR .ne. 9999) THEN 989 IF (MARS_TSOIL(i,1,j) .gt. 0.) THEN 990 tsoil_val(:)=MARS_TSOIL(i,:,j) 991 ELSE 992 tsoil_val = tsoil_val*0. + tsurf_val 993 ENDIF 994 ELSE 995 IF ( (i == ips) .AND. (j == jps) ) PRINT *,'** Mars ** IDEALIZED SIMULATION tsoil is set to tsurf' 937 IF (M_TSOIL(i,1,j) .gt. 0. .and. JULYR .ne. 9999) THEN 938 tsoil_val(:)=M_TSOIL(i,:,j) 939 ELSE 940 IF ( (i == ips) .AND. (j == jps) ) PRINT *,'** Mars ** no tsoil. set it to tsurf.' 996 941 do k=1,nsoil 997 IF (.not.restart) THEN 998 tsoil_val(k) = tsurf_val 999 ELSE 1000 !this is a restart run. We must not set tsoil to tsurf in the init. 1001 !tsoil was saved in physiq.F under the name MARS_TSOIL in the restart file 1002 !(see Registry) 1003 tsoil_val(k)=MARS_TSOIL(i,k,j) 1004 ENDIF 942 tsoil_val(k) = M_TSURF(i,j) 1005 943 enddo 1006 944 ENDIF … … 1014 952 wstar_val=0. 1015 953 ELSE 1016 q2_val(:)=M ARS_Q2(i,:,j)1017 wstar_val=M ARS_WSTAR(i,j)954 q2_val(:)=M_Q2(i,:,j) 955 wstar_val=M_WSTAR(i,j) 1018 956 ENDIF 1019 957 q2(subs,:) = q2_val(:) … … 1026 964 fluxrad_val=0. 1027 965 ELSE 1028 fluxrad_val=M ARS_FLUXRAD(i,j)966 fluxrad_val=M_FLUXRAD(i,j) 1029 967 ENDIF 1030 968 fluxrad(subs) = fluxrad_val … … 1107 1045 firstcall,lastcall,pday,ptime,ptimestep, & 1108 1046 pplev,pplay,pphi,pu,pv,pt,pq,pw, & 1109 pdu,pdv,pdt,pdq,pdpsrf,tracerdyn, & 1110 output_tab2d,output_tab3d,flag_LES) 1047 pdu,pdv,pdt,pdq,pdpsrf,tracerdyn) 1111 1048 #endif 1049 print *, '** Mars ** CALL TO LMD PHYSICS DONE' 1112 1050 DEALLOCATE(pplev) 1113 1051 DEALLOCATE(pplay) … … 1118 1056 DEALLOCATE(pw) 1119 1057 DEALLOCATE(pq) 1120 1121 !-------------------------------!1122 ! PHYSIQ OUTPUT IN THE WRF FILE !1123 !-------------------------------!1124 #ifndef NOPHYS1125 DO j = jps,jpe1126 DO i = ips,ipe1127 subs = (j-jps)*(ipe-ips+1)+(i-ips+1)1128 #include "module_lmd_driver_output3.inc"1129 ! ^-- generated from Registry1130 ENDDO1131 ENDDO1132 DEALLOCATE(output_tab2d)1133 DEALLOCATE(output_tab3d)1134 #endif1135 1058 1136 1059 !---------------------------------------------------------------------------------! … … 1150 1073 dq_save(:,:,:)=pdq(:,:,:) 1151 1074 #endif 1075 1076 !! OUTPUT OUTPUT OUTPUT 1077 DO j = jps,jpe 1078 DO i = ips,ipe 1079 1080 subs = (j-jps)*(ipe-ips+1)+(i-ips+1) 1081 1082 !-------------------------------------------------------! 1083 ! Save key variables for restart and output and nesting ! 1084 !-------------------------------------------------------! 1085 M_TSOIL(i,:,j) = tsoil(subs,:) 1086 M_CO2ICE(i,j) = co2ice(subs) 1087 M_Q2(i,kps:kpe+1,j) = q2(subs,:) 1088 M_TSURF(i,j) = tsurf(subs) 1089 M_WSTAR(i,j) = wstar(subs) 1090 M_FLUXRAD(i,j) = fluxrad(subs) 1091 SELECT CASE (MARS_MODE) 1092 CASE (1,11,12) 1093 M_H2OICE(i,j) = qsurf(subs,2) !! see above Tracer at surface 1094 END SELECT 1095 1096 !! output only (arrays already in phys modules) 1097 HFMAX(i,j) = HFMAX_TH(subs) 1098 ZMAX(i,j) = ZMAX_TH(subs) 1099 USTM(i,j) = ustar(subs) 1100 HFX(i,j) = sensibFlux(subs) 1101 1102 !! output only (cf comm_wrf) 1103 SWDOWNZ(i,j) = comm_SWDOWNZ(subs) 1104 TAU_DUST(i,j) = comm_TAU_DUST(subs) 1105 QSURFDUST(i,j) = comm_QSURFDUST(subs) 1106 MTOT(i,j) = comm_MTOT(subs) 1107 ICETOT(i,j) = comm_ICETOT(subs) 1108 TAU_ICE(i,j) = comm_TAU_ICE(subs) 1109 HR_SW(i,kps:kpe,j) = comm_HR_SW(subs,kps:kpe) 1110 HR_LW(i,kps:kpe,j) = comm_HR_LW(subs,kps:kpe) 1111 RDUST(i,kps:kpe,j) = comm_RDUST(subs,kps:kpe) 1112 VMR_ICE(i,kps:kpe,j) = comm_VMR_ICE(subs,kps:kpe) 1113 RICE(i,kps:kpe,j) = comm_RICE(subs,kps:kpe) 1114 1115 ENDDO 1116 ENDDO 1117 1118 CALL deallocate_comm_wrf 1119 1152 1120 ENDIF call_physics 1153 1121 … … 1206 1174 END SELECT 1207 1175 1208 !------------------------------------!1209 ! Save key variables for restart !1210 !------------------------------------!1211 MARS_TSOIL(i,:,j) = tsoil(subs,:)1212 MARS_CICE(i,j) = co2ice(subs)1213 MARS_Q2(i,kps:kpe+1,j) = q2(subs,:)1214 MARS_TSURF(i,j) = tsurf(subs)1215 MARS_WSTAR(i,j) = wstar(subs)1216 MARS_FLUXRAD(i,j) = fluxrad(subs)1217 SELECT CASE (MARS_MODE)1218 CASE (1,11,12)1219 MARS_WICE(i,j) = qsurf(subs,2) !! see above Tracer at surface1220 END SELECT1221 1222 1176 ENDDO 1223 1177 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.