diff --git a/README.txt b/README.txt index 52e8259ba49d2f9462fa49d5ae00ea92fccb6cf4..8984c289a65924b91f8f5cd2e839544446add0d8 100644 --- a/README.txt +++ b/README.txt @@ -107,10 +107,11 @@ origin_z origin of the domain in the vertical direction -A variety of chemical species can be inlcuded. -Aerosols can be included and are weighted based on specified aerosol size bins -# Latest update (Feb/March 2022) +# Latest update (March/April 2022) -Any chemical specie from wrf-chem can be selected in the configuration file and will be included in the dynamic driver. -Extensive changes were made to palm_dynamic_output and palm_dynamic_config to accomdate the changes above. -Resolved issue: missing horizontal interpolation of chemical species has been resolved. --README file updated and new defaults included. +-Default setting revised. +-Base state temperature corrected to 290. diff --git a/configurations/mbees_les_test_10.conf b/configurations/mbees_les_test_10.conf new file mode 100644 index 0000000000000000000000000000000000000000..5e4e8623aba6a8ec052fe4c9c92674cc089b1109 --- /dev/null +++ b/configurations/mbees_les_test_10.conf @@ -0,0 +1,58 @@ +# Test case for developing WRF-CHEM for PALM +# see GMD: https://doi.org/10.5194/gmd-2020-175 + +# PALM case, domain, and configuration parameters +domain = 'mbees' +resolution = '10' +scenario = 'les_test' +nested_domain = False + +# dynamic driver output +dynamic_driver_file = "/cfs/home/d/u/dupreeda/MBEES/PALM/palm_model_system-v21.10/JOBS/augs3_1/augs3_1_dynamic" + +# import grid parameters for dynamic driver from static driver +grid_from_static = True +# static driver input +static_driver_file = "/cfs/home/d/u/dupreeda/MBEES/PALM/palm_model_system-v21.10/JOBS/augs3_1/augs3_1_static2" + +# reference coordinate system of PALM simulation +proj_palm = "EPSG:32633" +# projection lon-lat +proj_wgs84 = 'EPSG:4326' + +# vertical grid +dz = 10.0 +nz = 192 # z in grids +dz_stretch_level = 3000.0 # in meters +dz_stretch_factor = 1.00 +dz_max = 10.0 + +# time origin and extent of the simulation (format YYYY-MM-DD hh:mm:ss) +origin_time = "2022-03-16 08:00:00" +simulation_hours = 3 + +# wrf_chem input dir and mask +wrf_dir_name = '/cfs/home/d/u/dupreeda/MBEES/PALM/wrf_chem_data' + +wrf_file_mask = "wrfout_d01_2022*" +wrf_hybrid_levs = False +vinterp_terrain_smoothing = None +# interpolated files +interp_dir_name = '/cfs/home/d/u/dupreeda/MBEES/PALM/wrf_chem_data/interp' + +# WRF-chem gaseous species +#wrfchem_spec = ['no'] +#wrfchem_spec = ['no', 'no2','hno3', 'nh3', 'h2so4', 'ocnv','ocsv'] + +# Salsa parameters (only aerosol species) +aerosol_wrfchem = False +wrfchem_bin_limits = [3.9e-8, 1.56e-7, 6.25e-7, 2.5e-6, 1.0e-5] +listspec = ['OC', 'NO', 'NH'] +nbin = [1,7] +reglim = [3.9e-8, 5.0e-8, 2.5e-6] +nf2a = 1.0 + +# radiation +radiation_from_wrf = False +wrf_rad_file_mask = "auxhist6_*" +radiation_smoothing_distance = 10000.0 diff --git a/dynamic/__pycache__/palm_dynamic_aerosol.cpython-38.pyc b/dynamic/__pycache__/palm_dynamic_aerosol.cpython-38.pyc index 7d470348cf7ff1934b653ee60144b4c01ff7eddb..a8452069ac1539828e1ad031c21907a1fafe95a7 100644 Binary files a/dynamic/__pycache__/palm_dynamic_aerosol.cpython-38.pyc and b/dynamic/__pycache__/palm_dynamic_aerosol.cpython-38.pyc differ diff --git a/dynamic/__pycache__/palm_dynamic_output.cpython-38.pyc b/dynamic/__pycache__/palm_dynamic_output.cpython-38.pyc index c4be1995deb026f5d2628f050be78705db25fc34..bfcfcdab510ccab90eab857bade91730c46025ac 100644 Binary files a/dynamic/__pycache__/palm_dynamic_output.cpython-38.pyc and b/dynamic/__pycache__/palm_dynamic_output.cpython-38.pyc differ diff --git a/dynamic/__pycache__/palm_wrf_utils.cpython-38.pyc b/dynamic/__pycache__/palm_wrf_utils.cpython-38.pyc index 22a713ae7626a20a29c0099e105c08587b1baff9..da8e9f56cf3e6df8c06e5ec6d80341c726d5b0a2 100644 Binary files a/dynamic/__pycache__/palm_wrf_utils.cpython-38.pyc and b/dynamic/__pycache__/palm_wrf_utils.cpython-38.pyc differ diff --git a/dynamic/palm_dynamic.py b/dynamic/palm_dynamic.py index fe28a4b6624c5fd8448b371b4b6fb192b85ab6b8..d44d137393d1e7f027bcaf1c88cfa92c996511b1 100644 --- a/dynamic/palm_dynamic.py +++ b/dynamic/palm_dynamic.py @@ -7,9 +7,6 @@ #------------------------------------------------------------------------------# '''Scripts for processing of WRF-CHEM files to PALM dynamic driver. -Usage: palm_dynamic -c [-w] -python3 palm_dynamic.py -c augsburg_validation_summer_10 - Script requires name of the configuration on command line. The corresponding case configuration files are placed in subdirectory "configuration" and the are named .conf. The template @@ -248,6 +245,8 @@ for i in range(nz-1): if z_levels[i+1] + dzs >= dz_stretch_level: dzs = min(dzs * dz_stretch_factor, dz_max) ztop = z_levels[-1] + dzs / 2. +print('z:',z_levels) +print('zw:',z_levels_stag) ###################################### # get time extent of the PALM simulation ###################################### diff --git a/dynamic/palm_dynamic_defaults.py b/dynamic/palm_dynamic_defaults.py index 741d2de61ff18b652a232a8f89c4584a77590b28..02a3f6e465f89b6942ade2a59b5b19c5e75ad310 100644 --- a/dynamic/palm_dynamic_defaults.py +++ b/dynamic/palm_dynamic_defaults.py @@ -24,14 +24,14 @@ proj_wgs84 = 'EPSG:4326' # layer height (dz = 0.0 means dz is assigned from dx) dz = 0.0 # we need description of the PALM vertical structure for dynamic driver -nz = 80 # z in grids -dz_stretch_level = 1200.0 # in meters -dz_stretch_factor = 1.02 -dz_max = 60.0 +nz = 200 # z in grids +dz_stretch_level = 5000.0 # in meters +dz_stretch_factor = 1.0 +dz_max = 100.0 # time origin and extent of the simulation (format YYYY-MM-DD hh:mm:ss) origin_time = "" -simulation_hours = 2 +simulation_hours = 24 # WRF related configurations wrf_hybrid_levs = True diff --git a/dynamic/palm_wrf_utils.py b/dynamic/palm_wrf_utils.py index 1647d4610a48f5375b85690d0bb8e17ef5bfdce1..d719bb652429bdfb4302fb3ca741e9061a5df010 100644 --- a/dynamic/palm_wrf_utils.py +++ b/dynamic/palm_wrf_utils.py @@ -283,10 +283,9 @@ def palm_wrf_vertical_interp(infile, outfile, wrffile, z_levels, z_levels_stag, # Report gpdelta = gpf2 - gpf - #print('GP deltas by level:') - # Changed here - #for k in range(gpf.shape[0]): - #print_dstat(k, gpdelta[k]) + print('GP deltas by level:') + for k in range(gpf.shape[0]): + print_dstat(k, gpdelta[k]) # Because we require levels below the lowest level from WRF, we will always # add one layer at zero level with repeated values from the lowest level. @@ -308,7 +307,7 @@ def palm_wrf_vertical_interp(infile, outfile, wrffile, z_levels, z_levels_stag, vdata = nc_outfile.createVariable('init_atmosphere_qv', "f4", ("Time", "z","south_north","west_east")) vdata[0,:,:,:] = init_atmosphere_qv # ======================= POTENTIAL TEMPERATURE ========================== - pt_raw = nc_infile.variables['T'][0] + 300. # from perturbation pt to standard + pt_raw = nc_infile.variables['T'][0] + 290. # from perturbation pt to standard (T00 wrf-chem variable) pt_raw = np.r_[pt_raw[0:1], pt_raw] init_atmosphere_pt = interpolate_1d(z_levels, height, pt_raw)