Skip to content

Commit

Permalink
fixing eval tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaolella committed Oct 20, 2017
1 parent 4bf0f2b commit 71533e6
Show file tree
Hide file tree
Showing 6 changed files with 319 additions and 0 deletions.
6 changes: 6 additions & 0 deletions eval/la_test/emis.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ORL POINT
#TYPE Point Source Inventory for CAPS
#COUNTRY US
#YEAR 2005
#DESC FIPS","PLANTID","POINTID","STACKID","SEGMENT","PLANT","SCC","ERPTYPE","SRCTYPE","STKHGT","STKDIAM","STKTEMP","STKFLOW","STKVEL","SIC","MACT","NAICS","CTYPE","XLOC","YLOC","UTMZ","POLCODE","ANN_EMIS","AVD_EMIS","CEFF","REFF","CPRI","CSEC","NEI_UNIQUE_ID","ORIS_FACILITY_CODE","ORIS_BOILER_ID","IPM_YN","DATA_SOURCE","STACK_DEFAULT_FLAG","LOCATION_DEFAULT_FLAG","YEAR","TRIBAL_CODE","HORIZONTAL_AREA_FUGITIVE","RELEASE_HEIGHT_FUGITIVE","ZIPCODE","NAICS_FLAG","MACT_FLAG","PROCESS_MACT_COMPLIANCE_STATUS","IPM_FACILITY","IPM_UNIT","BART_SOURCE","BART_UNIT","CONTROL_STATUS","START_DATE","END_DATE","WINTER_THROUGHPUT_PCT","SPRING_THROUGHPUT_PCT","SUMMER_THROUGHPUT_PCT","FALL_THROUGHPUT_PCT","ANNUAL_AVG_DAYS_PER_WEEK","ANNUAL_AVG_WEEKS_PER_YEAR","ANNUAL_AVG_HOURS_PER_DAY","ANNUAL_AVG_HOURS_PER_YEAR","PERIOD_DAYS_PER_WEEK","PERIOD_WEEKS_PER_PERIOD","PERIOD_HOURS_PER_DAY","PERIOD_HOURS_PER_PERIOD","DESIGN_CAPACITY"
"18043","00004","002","1","1","PSIENERGY-GALLAGHER","10100202","02","01",441.05,17.201,303,15176.16,65.3076,"4911","1808-1","221112","L",-118.231869,34.038390,-9,"PEC",100.00000,,,,,,"NEI31676","1008","2","Y","E-E","11111"," ","2005","000",,,"47150",,,,"01",,"Y",,,"NA","20050101","20051231",,,,,,,,,,,,
165 changes: 165 additions & 0 deletions eval/la_test/namelist.input
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
&time_control
run_days = 46,
run_hours = 0,
run_minutes = 0,
run_seconds = 0,
start_year = 2004, 2004, 2004,
start_month = 12, 12, 12,
start_day = 27, 27, 27,
start_hour = 00, 00, 00,
start_minute = 00, 00, 00,
start_second = 00, 00, 00,
end_year = 2005, 2005, 2005,
end_month = 02, 02, 02,
end_day = 16, 16, 16,
end_hour = 00, 00, 00,
end_minute = 00, 00, 00,
end_second = 00, 00, 00,
interval_seconds = 21600,
input_from_file = .true., .true., .true.,
history_interval_h = 1, 1, 1,
auxhist1_interval = 60, 60, 60,
frames_per_outfile = 24, 24, 24,
frames_per_auxhist1 = 24, 24, 24,
restart = .false.,
restart_interval_h = 1104,
io_form_history = 2,
io_form_auxhist1 = 0,
io_form_restart = 2,
io_form_input = 2,
io_form_boundary = 2,
io_form_auxinput5 = 2,
io_form_auxinput6 = 0,
io_form_auxinput7 = 0,
io_form_auxinput12 = 0,
frames_per_auxinput5 = 24, 24, 24,
auxinput5_interval_m = 60, 60, 60,
frames_per_auxinput7 = 1, 1, 1,
auxinput7_interval_m = 60, 60, 60,
auxinput7_inname = wrffirechemi_d<domain>_<date>,
auxinput12_inname = wrf_chem_input_d<domain>,
nocolons = .true.,
debug_level = 0,
/

&domains
time_step = 72,
use_adaptive_time_step = .false.,
time_step_fract_num = 0,
time_step_fract_den = 1,
max_dom = 3,
e_we = 34, 34, 34,
e_sn = 34, 34, 34,
e_vert = 30, 30, 30,
p_top_requested = 5000,
num_metgrid_levels = 27,
num_metgrid_soil_levels = 4,
dx = 9000, 3000, 1000,
dy = 9000, 3000, 1000,
grid_id = 1, 2, 3,
parent_id = 1, 1, 2,
i_parent_start = 1, 11, 11,
j_parent_start = 1, 11, 11,
parent_grid_ratio = 1, 3, 3,
parent_time_step_ratio = 1, 3, 3,
feedback = 1,
smooth_option = 0,
/

&physics
mp_physics = 3, 3, 3,
ra_lw_physics = 3, 3, 3,
ra_sw_physics = 3, 3, 3,
radt = 9, 3, 1,
sf_sfclay_physics = 1, 1, 1,
sf_surface_physics = 2, 2, 2,
bl_pbl_physics = 1, 1, 1,
bldt = 0, 0, 0,
cu_physics = 5, 5, 5,
cu_rad_feedback = .true., .true., .true.,
cudt = 0, 0, 0,
cu_diag = 1, 1, 1,
isfflx = 1,
ifsnow = 1,
icloud = 1,
surface_input_source = 1,
num_soil_layers = 4,
sf_urban_physics = 0, 0, 0,
/

&fdda
grid_fdda = 1, 1, 1,
gfdda_inname = wrffdda_d<domain>,
gfdda_interval_m = 360, 360, 360,
gfdda_end_h = 8760, 8760, 8760,
io_form_gfdda = 2,
/

&dynamics
w_damping = 1,
diff_opt = 1,
km_opt = 4,
diff_6th_opt = 0, 0, 0,
diff_6th_factor = 0.12, 0.12, 0.12,
base_temp = 290.0,
damp_opt = 0,
zdamp = 5000.0, 5000.0, 5000.0,
dampcoef = 0.2, 0.2, 0.2,
khdif = 0, 0, 0,
kvdif = 0, 0, 0,
non_hydrostatic = .true., .true., .true.,
chem_adv_opt = 2, 2, 2,
moist_adv_opt = 2, 2, 2,
scalar_adv_opt = 2, 2, 2,
tke_adv_opt = 2, 2, 2,
/

&bdy_control
spec_bdy_width = 5,
spec_zone = 1,
relax_zone = 4,
specified = .true., .false., .false.,
nested = .false., .true., .true.,
/

&grib2
/

&namelist_quilt
nio_tasks_per_group = 0,
nio_groups = 1,
/

&chem
kemit = 1,
chem_opt = 108, 108, 108,
bioemdt = 30, 30, 30,
photdt = 30, 30, 30,
chemdt = 0, 0, 0,
emiss_inpt_opt = 1, 1, 1,
emiss_opt = 3, 3, 3,
io_style_emissions = 2,
chem_in_opt = 0, 0, 0,
phot_opt = 2, 2, 2,
gas_drydep_opt = 1, 1, 1,
aer_drydep_opt = 1, 1, 1,
bio_emiss_opt = 0, 0, 0,
dust_opt = 0,
dmsemis_opt = 0,
seas_opt = 0,
gas_bc_opt = 1, 1, 1,
gas_ic_opt = 1, 1, 1,
aer_bc_opt = 1, 1, 1,
aer_ic_opt = 1, 1, 1,
gaschem_onoff = 0, 0, 0,
aerchem_onoff = 0, 0, 0,
wetscav_onoff = 0, 0, 0,
cldchem_onoff = 0, 0, 0,
vertmix_onoff = 1, 1, 1,
chem_conv_tr = 1, 1, 1,
biomass_burn_opt = 0, 0, 0,
plumerisefire_frq = 30, 30, 30,
have_bcs_chem = .true., .true., .true.,
aer_ra_feedback = 0, 0, 0,
/

38 changes: 38 additions & 0 deletions eval/la_test/namelist.wps
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
&share
wrf_core = 'ARW',
max_dom = 3,
start_date = '2004-12-25_00:00:00', '2004-12-25_00:00:00', '2004-12-25_00:00:00',
end_date = '2006-01-01_00:00:00', '2006-01-01_00:00:00', '2006-01-01_00:00:00',
interval_seconds = 21600,
io_form_geogrid = 2,
/

&geogrid
parent_id = 1, 1, 2,
parent_grid_ratio = 1, 3, 3,
i_parent_start = 1, 11, 11,
j_parent_start = 1, 11, 11,
e_we = 34, 34, 34,
e_sn = 34, 34, 34,
geog_data_res = '2m', '2m', '2m',
dx = 9000,
dy = 9000,
map_proj = 'lambert',
ref_lat = 34.11,
ref_lon = -118.18,
truelat1 = 26.0,
truelat2 = 39.0,
stand_lon = -118.18,
geog_data_path = '/home/marshall/tessumcm/WRFinputs/geogV3.4',
/

&ungrib
out_format = 'WPS',
prefix = 'FILE',
/

&metgrid
fg_name = 'FILE',
io_form_metgrid = 2,
/

23 changes: 23 additions & 0 deletions eval/la_test/parseNamelist.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package main

import (
"encoding/json"
"fmt"
"github.com/ctessum/aep"
)

func main() {
const (
wrfNamelist = "/home/marshall/tessumcm/WRFchem_output/WRF.2005_inmaptest.la/1/namelist.input"
wpsNamelist = "/home/marshall/tessumcm/WRFchem_output/WPS.socab/namelist.wps"
)
config, err := aep.ParseWRFConfig(wpsNamelist, wrfNamelist)
if err != nil {
panic(err)
}
b, err := json.MarshalIndent(config, "", " ")
if err != nil {
panic(err)
}
fmt.Print(string(b))
}
85 changes: 85 additions & 0 deletions eval/la_test/wrfconfig.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"Max_dom": 3,
"Parent_id": [
1,
1,
2
],
"Parent_grid_ratio": [
1,
3,
3
],
"I_parent_start": [
1,
11,
11
],
"J_parent_start": [
1,
11,
11
],
"E_we": [
34,
34,
34
],
"E_sn": [
34,
34,
34
],
"Dx0": 9000,
"Dy0": 9000,
"Map_proj": "lambert",
"Ref_lat": 34.11,
"Ref_lon": -118.18,
"Truelat1": 26,
"Truelat2": 39,
"Stand_lon": -118.18,
"Ref_x": 17,
"Ref_y": 17,
"S": [
-148500,
-58500,
-28500
],
"W": [
-148500,
-58500,
-28500
],
"Dx": [
9000,
3000,
1000
],
"Dy": [
9000,
3000,
1000
],
"Nx": [
33,
33,
33
],
"Ny": [
33,
33,
33
],
"DomainNames": [
"d01",
"d02",
"d03"
],
"Frames_per_auxinput5": [
24,
24,
24
],
"Kemit": 1,
"Nocolons": true
}
2 changes: 2 additions & 0 deletions eval/obscompare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"os"
"path/filepath"
"strconv"
"strings"

"bitbucket.org/ctessum/cdf"
"github.com/GaryBoone/GoStats/stats"
Expand Down Expand Up @@ -570,6 +571,7 @@ func getWRFdata(wrfDataLoc string, wChan chan []*rtree.Rtree) {
}

func s2f(s string) float64 {
s = strings.Trim(s, "\x00")
f, err := strconv.ParseFloat(s, 64)
if err != nil {
panic(err)
Expand Down

0 comments on commit 71533e6

Please sign in to comment.