1 / 32

WRF Model: Physics Implementation

P. F. I. H. R. C. Y. W. S. S. WRF Model: Physics Implementation. Shu-hua Chen NCAR/AFWA (UC Davis, Sep.). OUTLINE. Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might need to do. P. F. I. H. R. C. Y. W. S. S.

Download Presentation

WRF Model: Physics Implementation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. P F I H R C Y W S S WRF Model: Physics Implementation Shu-hua Chen NCAR/AFWA (UC Davis, Sep.) OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might need to do

  2. P F I H R C Y W S S Scheme Selection Simple schemes for operation Complicated schemes for research

  3. P F I H R C Y W S S Physics Schemes Physical Process Available Microphysics Kessler, Lin et al. , Ncloud3, Ncloud5 Cumulus KF, BMJ Subgrid scale turbulence TKE, Smagrinsky, Constant K Radiation RRTM(L), Dudhia(S), Goddard(S) PBL MRF Surface layer Similarity theory Land-surface layer 5-layer soil temperature

  4. P F I H R C Y W S S • User friendly • Different dynamics cores • Simple Three-level structure => Physics Interface Design

  5. P F I H R C Y W S S Solver Physics_driver SELECT CASE (CHOICE) CASE ( NOPHY ) CASE( SCHEME1 ) CALL XXX CASE( SCHEME2 ) CALL YYY . CASE DEFAULT END SELECT Individual physics scheme ( XXX ) Three-level Structure

  6. P F I R H C W Y S S phy_prep phy_init Radiation_driver pbl_driver Cumulus_driver moist_physics_prep microphysics_driver … INIT . WRF solve_rk … ADV TENDENCIES . ADVANCE VARS .

  7. P F I H R C Y W S S phy_prep & moist_physics_prep • Decouple variables • Convert variables from C grid to A grid

  8. P F I H R C Y W S S Solver Physics_driver SELECT CASE (CHOICE) CASE ( NOPHY ) CASE( SCHEME1 ) CALL XXX CASE( SCHEME2 ) CALL YYY . CASE DEFAULT END SELECT Individual physics scheme ( XXX ) Three-level Structure

  9. P F I H R C Y W S S Physics_driver SELECT CASE (CHOICE) CASE ( NOPHY ) CASE( SCHEME1 ) CALL XXX(…) CASE( SCHEME2 ) CALL YYY(…) . CASE DEFAULT END SELECT Physics Standard Interface

  10. P F I H R C Y W S S Solver Physics_driver SELECT CASE (CHOICE) CASE ( NOPHY ) CASE( SCHEME1 ) CALL XXX CASE( SCHEME2 ) CALL YYY . CASE DEFAULT END SELECT Individual physics scheme ( XXX ) Three-level Structure

  11. P F I H R C Y W S S Three Sets of Dimensions Domain size: ids, ide, jds, jde, kds, kde Memory size: ims, ime, jms, jme, kms, kme Tile size: its, ite, jts, jte, kts, kte

  12. P F I H R C Y W S S (ids,ide) Logical Domain (ids,kds,jds)

  13. P F I H R C Y W S S patch patch patch halo halo patch patch halo patch halo (ims,ime) patch patch patch (ids,ide) Memory size (ims,kms,jms)

  14. P F I H R C Y W S S halo tile tile tile halo halo (its,ite) tile tile tile halo (ims,ime) Tile size (its,kts,jds)

  15. P F I R H C W Y S S phy_prep phy_init Radiation_driver pbl_driver Cumulus_driver moist_physics_prep microphysics_driver … INIT . WRF solve_rk … ADV TENDENCIES . ADVANCE VARS .

  16. P F I H R C Y W S S Rules for WRF Physics • Coding rules

  17. P F I H R C Y W S S F77 Subroutine kessler(QV, T, & its,ite,jts,jte,kts,kte, & ims,ime,jms,jme,kms,kme, & ids,ide,jds,jde,kds,kde) F90 Subroutine kessler(QV, T, . . . & its,ite,jts,jte,kts,kte,& ims,ime,jms,jme,kms,kme,& ids,ide,jds,jde,kds,kde ) Coding Rules 1. F90 • Replace continuation characters in the 6th column with f90 continuation `&‘ at end of previous line

  18. P F I H R C Y W S S F77 c This is a test F90 ! This is a test Coding Rules 1. F90 • Replace continuation characters in the 6th column with f90 continuation `&‘ at end of previous line b)Replace the 1st column `C` for comment with `!`

  19. P F I H R C Y W S S Coding Rules 1. F90 • Replace continuation characters in the 6th column with f90 continuation `&‘ at end of previous line b)Replace the 1st column `C` for comment with `!` 2. No common block 3. Use “ implicit none ” 4. Use “ intent ” 5. Variable dimensions and do loops

  20. P F I H R C Y W S S Rules for WRF Physics • Coding rules • One scheme one module • Naming rules

  21. P F I H R C Y W S S Naming Rules module_yy_xxx.F(module) yy = ra is for radiation bl is for PBL cu is for cumulus mp is for microphysics. xxx = individual scheme ex, module_cu_kf.F

  22. P F I H R C Y W S S Naming Rules RXXYYTEN(tendencies) XX = variable (th, u, v, qv, qc, … ) YY = ra is for radiation bl is for PBL cu is for cumulus ex, RTHBLTEN

  23. P F I H R C Y W S S Rules for WRF Physics • Coding rules • One scheme one module • Naming rules • Vectorized code preferred ( might depend on which physics component )

  24. P F I H R C Y W S S REAL , PARAMETER :: r_d = 287. REAL , PARAMETER :: r_v = 461.6 REAL , PARAMETER :: cp = 7.*r_d/2. REAL , PARAMETER :: cv = cp-r_d . . . WRF Physics Features • Unified global constatnts (module_model_constants.F)

  25. P F I H R C Y W S S WRF Physics Features • Unified global constatnts (module_model_constants.F) • Unified common calculations (saturation mixing ratio) • Vertical index (kms is at the bottom)

  26. P F I H R C Y W S S Solver Physics_driver SELECT CASE (CHOICE) CASE ( NOPHY ) CASE( SCHEME1 ) CALL XXX CASE( SCHEME2 ) CALL YYY . CASE DEFAULT END SELECT Individual physics scheme ( XXX ) Three-level Structure

  27. P F I H R C Y W S S WRF Physics Features • Unified global constatnts (module_model_constants.F) • Unified common calculations (saturation mixing ratio) • Vertical index (kms is at bottom) • kme = kte + 1 (physics) kme = kte (dynamics)

  28. P F I H R C Y W S S WRF Language • Patch, tile, …. • Moisture field, moist(i,k,j,?), is 4D • ? = P_QV, P_QC, P_QR, P_QI,P_QS, P_QG (module_state_description.F) • PARAM_FIRST_SCALAR IF ( P_QI .ge. PARAM_FIRST_SCALAR ) . . .

  29. P F I H R C Y W S S package kesslerscheme mp_physics==1 - moist:qv,qc,qr package linscheme mp_physics==2 - moist:qv,qc,qr,qi,qs,qg package ncepcloud3 mp_physics==3 - moist:qv,qc,qr package ncepcloud5 mp_physics==4 - moist:qv,qc, P_QV, P_QC, P_QR, … Registry

  30. P F I H R C Y W S S Physics Buffet (namelist.input) mp_physics = 2, ra_lw_physics = 1, ra_sw_physics = 1, bl_sfclay_physics = 1, bl_surface_physics = 1, bl_pbl_physics = 1, cu_physics = 1, What you might need to do ? • Run existing codes

  31. P F I H R C Y W S S What you might need to do ? • Run existing codes • Modify existing codes • Plug in your own codes

  32. P F I H R C Y W S S WRF Development Team

More Related