Changeset 2299 for trunk/LMDZ.GENERIC/libf
- Timestamp:
- Apr 27, 2020, 4:39:37 PM (5 years ago)
- Location:
- trunk/LMDZ.GENERIC/libf/phystd
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/callkeys_mod.F90
r2297 r2299 61 61 logical,save :: haze 62 62 !$OMP THREADPRIVATE(photochem) 63 logical,save :: calllott_nonoro 64 logical,save :: gwd_convective_source 65 !$OMP THREADPRIVATE(calllott_nonoro,gwd_convective_source) 63 66 64 67 integer,save :: iddist … … 135 138 real,save :: surfemis 136 139 !$OMP THREADPRIVATE(surfalbedo,surfemis) 140 real,save :: epflux_max 141 !$OMP THREADPRIVATE(epflux_max) 137 142 138 143 logical,save :: iscallphys=.false.!existence of callphys.def -
trunk/LMDZ.GENERIC/libf/phystd/inifis_mod.F90
r2297 r2299 22 22 use planetwide_mod, only: planetwide_sumval 23 23 use callkeys_mod 24 use ioipsl_getin_p_mod, only : getin_p 24 25 use mod_phys_lmdz_para, only : is_parallel 25 26 … … 290 291 write(*,*) " calladj = ",calladj 291 292 293 write(*,*)"call Lott's non-oro GWs parameterisation scheme ?" 294 calllott_nonoro=.false. ! default value 295 call getin_p("calllott_nonoro",calllott_nonoro) 296 write(*,*)" calllott_nonoro = ",calllott_nonoro 297 298 write(*,*)"Max Value of EP flux at launching altitude" 299 epflux_max=0.0 ! default value 300 call getin_p("epflux_max",epflux_max) 301 write(*,*)"epflux_max = ",epflux_max 302 292 303 write(*,*) "call thermal plume model ?" 293 304 calltherm=.false. ! default value -
trunk/LMDZ.GENERIC/libf/phystd/phyetat0_mod.F90
r1763 r2299 22 22 use slab_ice_h, only: noceanmx 23 23 use callkeys_mod, only: CLFvarying,surfalbedo,surfemis 24 24 use nonoro_gwd_ran_mod, only: du_nonoro_gwd, dv_nonoro_gwd, & 25 east_gwstress, west_gwstress 25 26 implicit none 26 27 … … 389 390 call soil_settings(nid_start,ngrid,nsoil,tsurf,tsoil,indextime) 390 391 endif ! of if (startphy_file) 392 393 ! Non-orographic gravity waves 394 if (startphy_file) then 395 call get_field("du_nonoro_gwd",du_nonoro_gwd,found,indextime) 396 if (.not.found) then 397 write(*,*) "phyetat0: <du_nonoro_gwd> not in file" 398 du_nonoro_gwd(:,:)=0. 399 else 400 write(*,*) "phyetat0: Memory of zonal wind tendency due to non-orographic GW" 401 write(*,*) " <du_nonoro_gwd> range:", & 402 minval(du_nonoro_gwd), maxval(du_nonoro_gwd) 403 endif 404 endif ! of if (startphy_file) 405 if (startphy_file) then 406 call get_field("dv_nonoro_gwd",dv_nonoro_gwd,found,indextime) 407 if (.not.found) then 408 write(*,*) "phyetat0: <dv_nonoro_gwd> not in file" 409 dv_nonoro_gwd(:,:)=0. 410 else 411 write(*,*) "phyetat0: Memory of meridional wind tendency due to non-orographic GW" 412 write(*,*) " <dv_nonoro_gwd> range:", & 413 minval(dv_nonoro_gwd), maxval(dv_nonoro_gwd) 414 endif 415 endif ! of if (startphy_file) 416 if (startphy_file) then 417 call get_field("east_gwstress",east_gwstress,found,indextime) 418 if (.not.found) then 419 write(*,*) "phyetat0: <east_gwstress> not in file" 420 east_gwstress(:,:)=0. 421 else 422 write(*,*) "phyetat0: Memory of eastward stress profile due to non-orographic GW" 423 write(*,*) " <east_gwstress> range:", & 424 minval(east_gwstress), maxval(east_gwstress) 425 endif 426 endif ! of if (startphy_file) 427 if (startphy_file) then 428 call get_field("west_gwstress",west_gwstress,found,indextime) 429 if (.not.found) then 430 write(*,*) "phyetat0: <west_gwstress> not in file" 431 west_gwstress(:,:)=0. 432 else 433 write(*,*) "phyetat0: Memory of westward stress profile due to non-orographic GW" 434 write(*,*) " <west_gwstress> range:", & 435 minval(west_gwstress), maxval(west_gwstress) 436 endif 437 endif ! of if (startphy_file) 391 438 ! 392 439 ! close file: -
trunk/LMDZ.GENERIC/libf/phystd/phyredem.F90
r1800 r2299 142 142 use tracer_h, only: noms 143 143 use slab_ice_h, only: noceanmx 144 use callkeys_mod, only: ok_slab_ocean 144 use callkeys_mod, only: ok_slab_ocean, calllott_nonoro 145 use nonoro_gwd_ran_mod, only: du_nonoro_gwd, dv_nonoro_gwd, & 146 east_gwstress, west_gwstress 145 147 146 148 implicit none … … 208 210 enddo 209 211 endif ! of if (nq>0) 212 213 ! Non-orographic gavity waves 214 if (calllott_nonoro) then 215 call put_field("du_nonoro_gwd","Zonal wind tendency due to GW",du_nonoro_gwd) 216 call put_field("dv_nonoro_gwd","Meridional wind tendency due to GW",dv_nonoro_gwd) 217 call put_field("east_gwstress","Eastward stress profile due to GW",east_gwstress) 218 call put_field("west_gwstress","Westward stress profile due to GW",west_gwstress) 219 endif 220 210 221 ! close file 211 222 CALL close_restartphy -
trunk/LMDZ.GENERIC/libf/phystd/phys_state_var_mod.F90
r2133 r2299 18 18 zmea, zstd, zsig, zgam, zthe 19 19 use turb_mod, only: q2,sensibFlux,wstar,ustar,tstar,hfmax_th,zmax_th 20 use nonoro_gwd_ran_mod, only: ini_nonoro_gwd_ran, end_nonoro_gwd_ran 20 21 21 22 real,allocatable,dimension(:,:),save :: ztprevious ! Previous loop Atmospheric Temperature (K) … … 179 180 allocate(hfmax_th(klon)) 180 181 allocate(zmax_th(klon)) 181 182 ! allocate arrays in "nonoro_gwd_ran_mod" 183 call ini_nonoro_gwd_ran(klon,klev) 182 184 END SUBROUTINE phys_state_var_init 183 185 … … 251 253 deallocate(hfmax_th) 252 254 deallocate(zmax_th) 253 255 ! deallocate arrays in "nonoro_gwd_ran_mod" 256 call end_nonoro_gwd_ran 254 257 255 258 END SUBROUTINE phys_state_var_end -
trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90
r2232 r2299 48 48 use time_phylmdz_mod, only: daysec 49 49 use callkeys_mod 50 use nonoro_gwd_ran_mod, only: nonoro_gwd_ran 50 51 use conc_mod 51 52 use phys_state_var_mod … … 410 411 integer num_run 411 412 logical,save :: ice_update 413 ! Non-oro GW tendencies 414 REAL d_u_hin(ngrid,nlayer), d_v_hin(ngrid,nlayer) 415 REAL d_t_hin(ngrid,nlayer) 416 ! Diagnostics 2D of gw_nonoro 417 REAL zustrhi(ngrid), zvstrhi(ngrid) 412 418 413 419 … … 497 503 endif 498 504 #endif 499 500 505 if (pday.ne.day_ini) then 501 write(*,*) "ERROR in physiq.F90:"502 write(*,*) "bad synchronization between physics and dynamics"503 write(*,*) "dynamics day: ",pday504 write(*,*) "physics day: ",day_ini505 stop506 write(*,*) "ERROR in physiq.F90:" 507 write(*,*) "bad synchronization between physics and dynamics" 508 write(*,*) "dynamics day: ",pday 509 write(*,*) "physics day: ",day_ini 510 stop 506 511 endif 507 512 … … 680 685 if (ngrid.ne.1) then ! Note : no need to create a restart file in 1d. 681 686 call physdem0("restartfi.nc",longitude,latitude,nsoilmx,ngrid,nlayer,nq, & 682 683 687 ptimestep,pday+nday,time_phys,cell_area, & 688 albedo_bareground,inertiedat,zmea,zstd,zsig,zgam,zthe) 684 689 endif 685 690 #endif … … 1239 1244 1240 1245 endif ! end of 'calladj' 1246 !---------------------------------------------- 1247 ! Non orographic Gravity Waves: 1248 !--------------------------------------------- 1249 IF (calllott_nonoro) THEN 1250 1251 CALL nonoro_gwd_ran(ngrid,nlayer,ptimestep,pplay, & 1252 zmax_th, &! max altitude reached by thermals (m) 1253 pt, pu, pv, & 1254 pdt, pdu, pdv, & 1255 zustrhi,zvstrhi, & 1256 d_t_hin, d_u_hin, d_v_hin) 1257 1258 ! Update tendencies 1259 pdt(1:ngrid,1:nlayer) = pdt(1:ngrid,1:nlayer) & 1260 + d_t_hin(1:ngrid,1:nlayer) 1261 ! d_t_hin(:,:)= d_t_hin(:,:)/ptimestep ! K/s (for outputs?) 1262 pdu(1:ngrid,1:nlayer) = pdu(1:ngrid,1:nlayer) & 1263 + d_u_hin(1:ngrid,1:nlayer) 1264 ! d_u_hin(:,:)= d_u_hin(:,:)/ptimestep ! (m/s)/s (for outputs?) 1265 pdv(1:ngrid,1:nlayer) = pdv(1:ngrid,1:nlayer) & 1266 + d_v_hin(1:ngrid,1:nlayer) 1267 ! d_v_hin(:,:)= d_v_hin(:,:)/ptimestep ! (m/s)/s (for outputs?) 1268 print*,'du_nonoro: max ', maxval(d_u_hin), 'min ', minval(d_u_hin) 1269 print*,'dv_nonoro: max ', maxval(d_v_hin), 'min ', minval(d_v_hin) 1270 1271 ENDIF ! of IF (calllott_nonoro) 1272 1273 1241 1274 1242 1275 !----------------------------------------------- … … 2112 2145 call writediagfi(ngrid,'fraca','Updraft fraction','', 3, fraca) 2113 2146 endif 2147 2148 ! GW non-oro outputs 2149 if (calllott_nonoro) then 2150 call WRITEDIAGFI(ngrid,"dugwno","GW non-oro dU","m/s2", 3,d_u_hin/ptimestep) 2151 call WRITEDIAGFI(ngrid,"dvgwno","GW non-oro dV","m/s2", 3,d_v_hin/ptimestep) 2152 endif 2114 2153 2115 2154 ! Total energy balance diagnostics … … 2189 2228 !call writediagfi(ngrid,"zdtsw","SW heating","T s-1",3,zdtsw) 2190 2229 !call writediagfi(ngrid,"zdtlw","LW heating","T s-1",3,zdtlw) 2191 !call writediagfi(ngrid,"dtrad","radiative heating","K s-1",3,dtrad)2230 call writediagfi(ngrid,"dtrad","radiative heating","K s-1",3,dtrad) 2192 2231 ! call writediagfi(ngrid,"zdtdyn","Dyn. heating","T s-1",3,zdtdyn) 2193 2232
Note: See TracChangeset
for help on using the changeset viewer.