Presentation is loading. Please wait.

Presentation is loading. Please wait.

PALM structogram Palm-Seminar Zingst, July 2005 Micha Gryschka I NSTITUT FÜR M ETEOROLOGIE U ND K LIMATOLOGIE Universität Hannover.

Similar presentations


Presentation on theme: "PALM structogram Palm-Seminar Zingst, July 2005 Micha Gryschka I NSTITUT FÜR M ETEOROLOGIE U ND K LIMATOLOGIE Universität Hannover."— Presentation transcript:

1 PALM structogram Palm-Seminar Zingst, July 2005 Micha Gryschka I NSTITUT FÜR M ETEOROLOGIE U ND K LIMATOLOGIE Universität Hannover

2 Flow chart –Initialization –Run-time (detailed) –Final steps Important variables Preprocessor directives Contents

3 read_var_list user_parin package_parin user_header local_tremain_ini init_dvrp_logging poisfft_hybrid_inipoisfft_init Initialization (I)

4 poisfft_hybridpoisfftsorpoismg Initialization (II)

5 standard advection For details, see Run-time (III). Run-time (I) time_integration (I)

6 1D topol. plot_1dplot_3d plot_2d Run-time (II) time_integration (II)

7 standard advection prognostic_equationsprognostic_equations_fast DO i=nxl,nxr DO j=nys,nyn u-component ENDDO ENDDO DO i=nxl,nxr DO j=nys,nyn v-component ENDDO ENDDO DO i=nxl,nxr DO j=nys,nyn e (TKE) ENDDO ENDDO w pt q or s DO i=nxl,nxr DO j=nys,nyn u-component v-component w-component pt q or s e (TKE) ENDDO For each variable: u-, v-, w-component, pt, q or s, e (TKE) advec_{uvws} diffusion_{uvwse} coriolis buoyancy user_actions (i,j,***- tendency) production_e calc_mean_pt_profile production_e_init calc_radiation impact_of_latent_heat calc_precipitation Run-time (III) prognostic_equations

8 write_particles Final steps

9 space –indices: i: nxl-1...nxr+1 j: nys-1...nyn+1 k: nzb_2d(j,i)...nzt+1 –x, y: simple variables;z: vertical arrays (1:nzt+1) zu(k), zw dx, dy ;dzu(k) =zu(k)-zu(k-1), dzw ddx=1/dx, ddy;ddzu(k)=1/dzu(k), ddzw time –timestep: dt_3d ( timestep.f90) –counters: nt_anz = nt_anz + 1 simulated_time = simulated_time + dt_3d Important variables (I)

10 prognostic variables, pointers –u, v, w, pt, e, q (k,j,i) –each variable has three pointer arrays and three target arrays: u_m => u_1 ; u => u_2 ; u_p => u_3... –to swap timelevel, only the targets of the pointers are changed, e.g.: u_m => u_2 ; u => u_3 ; u_p => u_1... diagnostic variables –hom (contains, for example, horizontal and domain averages) Important variables (II)

11 What are preprocessor directives? –Preprocessor directives are little instructions to the Fortran compiler that allow to explicitly exclude certain parts of the source code from compilation. (Syntax next slide) Where does PALM use preprocessor directives? –Optional software packages: Certain parts of the source code will only be activated through parameters to be set in mrun (dvrp graphics, spectra, particle advection). –Maschine dependencies: Maschine architectures differ. A good solution on one maschine may be slow or may not work on another machine. As a portable model, PALM includes solutions for various machine types. But only the relevant parts of source code are active for a particular run. Preprocessor directives (I)

12 Syntax (example): #if defined( __parallel ) print*,'parallel mode' #else print*,'nonparallel mode' #endif && logical "and" || logical "or" Important machines: __ibm IBM regatta (HLRN) __lcmuk linux cluster (IMUK) __nec NEC vector (Hamburg) __t3eb CRAY T3e (Berlin) Important variables: __parallel parallel execution Optional software packages: __dvrp_graphics extra graphics __spectra power spectra __particles particle advection Preprocessor directives (II)

13 3 main program phases –Initialization, Run-time and Final steps –Main hierarchy: palm.f90, time_integration.f90, prognostic_equations.f90 staggered grid: two z-coordinates –use multiplication with ddx, ddy, ddzu, ddzw instead of division be aware of pointers be aware of preprocessor directives some key points


Download ppt "PALM structogram Palm-Seminar Zingst, July 2005 Micha Gryschka I NSTITUT FÜR M ETEOROLOGIE U ND K LIMATOLOGIE Universität Hannover."

Similar presentations


Ads by Google