Initialization for Real Data Cases Dave Gill
Pandas Pandas Ingest only bamboo shoots Lethargic, indifferent mating habits real.exe Ingests only SI data Doesn’t screw you very often
WRF real-data init NECESSARY – the minimum changes: NECESSARY – the minimum changes: How to run real data initialization 1)Fix namelist 2)Put SI data in right place 3)Run real.exe Rest of things to take up time slot Rest of things to take up time slot Files you see before and after Necessary fields Balancing List of gotcha’s Program flow
Running real-data init Real.exe controlled by namelist file (same one as WRF). Located in./WRFV1/test/em_real directory Real.exe controlled by namelist file (same one as WRF). Located in./WRFV1/test/em_real directory Modify times to process: Modify times to process:time_step_max Domain size (maximal dimensions for C-grid) Domain size (maximal dimensions for C-grid) s_we, e_we s_sn, e_sn s_vert, e_vert
Running real-data init Domain grid configuration: Domain grid configuration: dx, dy dt, ztop Times to process: Times to process: start_year, start_month, start_day, start_hour end_year, end_month, end_day, end_hour interval_seconds
Running real-data init Get SI-output data in place – Get SI-output data in place – # cd./WRFV1/test/em_real # ln –s ${SI_LOC}/data/siprd/real_input_em.*. Expect to have a single file for each time period to be processed + the metadata file Run the executable in this directory Run the executable in this directory #./real.exe #./real.exe Single processor only
Data Files before and after Before: Before: Foreach time period - real_input_em_d _18:00:00 Only once - real_input_em.global.metadata From SI system, final output from vinterp From SI system, final output from vinterp
Data Files before and after After: After: wrfinput, wrfbdy Currently, in netCDF format, view with ncdump utility Currently, in netCDF format, view with ncdump utility
Necessary Fields SI provides 3d, 2d, 1d, and constants SI provides 3d, 2d, 1d, and constants 3d: u, v, mixing ratio, potential temperature 2d: map factors, Coriolis, lat/lon, map rotations, ground temp, skin temp, dry surface pressure, land use categories, terrain 1d: eta (vertical coordinate) Already on correct vertical coordinate, each variable is in its correct staggering location, all maximally dimensioned (i,j,k) ordering Already on correct vertical coordinate, each variable is in its correct staggering location, all maximally dimensioned (i,j,k) ordering Generic reader routine Generic reader routine Generic reader routine Generic reader routine
Balancing - base 1. Define base state surface pressure, function of elevation 2. pb = znu(psurf-ptop) + ptop 3. tb = (t00 + A ln(pb/p00) * (p00/pb)^(R/Cp) 4. alb = (R/p1000)*tb*(pb/p1000)^cvpm 5. mub = psurf – ptop; mu = pdsurf - psurf 6. phb = phb k-1 – 1/znu * mub * alb The code code
Balancing Top level: Top level: p = -0.5 (mu + q * mub * 1/znu) qv = q alt = (R/p1000)*t*qv((p+pb)/p1000)^cvpm al = alt – alb The code code
Balancing Integrate down: Integrate down: p, moisture, inverse density ph = ph k-1 – dnw * ( mub + mu*alt ) u,v as input; w=0 u,v as input; w=0 No other moisture initialized than mixing ratio No other moisture initialized than mixing ratio
List of Gotcha’s LSM: num_soil_layers = 4, must re- run real.exe if swapping bl_surface_physics LSM: num_soil_layers = 4, must re- run real.exe if swapping bl_surface_physics Dates must match SI output files, SI files must be in working directory Dates must match SI output files, SI files must be in working directory Domain size and various grid configurations are compared to the namelist values – don’t share the global metadata file Domain size and various grid configurations are compared to the namelist values – don’t share the global metadata file Single processor only Single processor only mm52wrf only works for eh mm52wrf only works for eh
Program Flow All main programs are in./WRFV1/main All main programs are in./WRFV1/main Do-it-once items: namelist, allocate space Time loop initialize domain for current time if time=0, output IC couple u,v,t,ph,q for lateral BC compute tendencies, output if time > 0 End Time loop
Program Flow Inside each time loop Inside each time loop Read SI input file (flat, binary, Fortran) Assign 2d arrays – be careful of array sizes Logic to determine which fields to use based on which fields you have and physics options selected Soil data initialization and adjustment, % categorical Base state computations Diagnose balanced fields for input to WRF