160 likes | 278 Vues
Initialization for Real Data Cases. Dave Gill gill@ucar.edu wrf-model.org. 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:
E N D
Initialization for Real Data Cases Dave Gill gill@ucar.edu wrf-model.org
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: How to run real data initialization • Fix namelist • Put SI data in right place • Run real.exe • 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 • Modify times to process: time_step_max • 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: dx, dy dt, ztop • 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 – # 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 • # ./real.exe Single processor only
Data Files before and after • Before: Foreach time period - real_input_em_d01.2002-06-27_18:00:00 Only once - real_input_em.global.metadata • From SI system, final output from vinterp
Data Files before and after • After: wrfinput, wrfbdy • Currently, in netCDF format, view with ncdump utility
Necessary Fields • 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 • Generic reader routine
Balancing - base • Define base state surface pressure, function of elevation • pb = znu(psurf-ptop) + ptop • tb = (t00 + A ln(pb/p00) * (p00/pb)^(R/Cp) • alb = (R/p1000)*tb*(pb/p1000)^cvpm • mub = psurf – ptop; mu = pdsurf - psurf • phb = phb k-1 – 1/znu * mub * alb The code
Balancing • Top level: p = -0.5 (mu + q * mub * 1/znu) qv = 1 + 1.61 q alt = (R/p1000)*t*qv((p+pb)/p1000)^cvpm al = alt – alb The code
Balancing • Integrate down: p, moisture, inverse density ph = ph k-1 – dnw * ( mub + mu*alt ) • u,v as input; w=0 • 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 • 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 • Single processor only • mm52wrf only works for eh
Program Flow • 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 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