Skip to content

Commit

Permalink
Merge pull request wrf-model#11 from domingom/feature/cell_perturbati…
Browse files Browse the repository at this point in the history
…on_method

implementation of the cell perturation method (including momentum per…
  • Loading branch information
jsauer-NCAR authored Aug 29, 2019
2 parents 853f565 + 6158393 commit 7aeb854
Show file tree
Hide file tree
Showing 8 changed files with 2,078 additions and 3 deletions.
35 changes: 35 additions & 0 deletions Registry/registry.cell_pert
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
###########################################################################################
# Cell perturbation method for inflow turbulence generation (Domingo Munoz-Esparza, NCAR) #
###########################################################################################
rconfig logical cell_pert namelist,dynamics max_domains .false. - "flag to activate cell perturbation method"
rconfig logical cell_pert_2d namelist,dynamics max_domains .false. - "flag to activate cell perturbations along 2 boundaries"
rconfig logical cell_pert_1d namelist,dynamics max_domains .false. - "flag to activate cell perturbations along 1 boundary (west)"
rconfig integer cell_pert_2d_opt namelist,dynamics max_domains 0 - "==0: 2-boundaries (south and west); ==1: 2-boundaries (north and west)"
rconfig real cell_pert_amp namelist,dynamics max_domains 0.1 - "maximum amplitude for the potential temperature perturbations"
rconfig real pert_tsec namelist,dynamics max_domains 100. - "number of seconds after which perturbations are seeded"
rconfig integer cell_gppc namelist,dynamics max_domains 8 - "number of grid points conforming the cell"
rconfig integer cell_nbcx namelist,dynamics max_domains 3 - "number of cells normal to x-boundary"
rconfig integer cell_nbcy namelist,dynamics max_domains 3 - "number of cells normal to y-boundary"
rconfig real cell_zbottom namelist,dynamics max_domains 20. - "vertical height (m) where the perturbations start"
rconfig integer cell_kbottom namelist,dynamics max_domains 2 - "vertical height (m) where the perturbations start"
rconfig real cell_ztop namelist,dynamics max_domains 400. - "vertical height (m) where the perturbations end"
state real Pxy ikj dyn_em 1 - - "Pxy" "Potential temperature perturbation field" "K"
# residual layer
rconfig logical cell_pert_RL namelist,dynamics max_domains .false. - "flag to activate cell perturbation method for residual layer (RL)"
rconfig real cellRL_zbottom namelist,dynamics max_domains 0. - "vertical height (m) where the perturbations start RL"
rconfig real cellRL_ztop namelist,dynamics max_domains 0. - "vertical height (m) where the perturbations end RL"
rconfig real cellRL_pert_amp namelist,dynamics max_domains 0.1 - "maximum amplitude for the potential temperature perturbations RL"
# CBL
rconfig logical cell_pert_cbl namelist,dynamics max_domains .false. - "flag to activate cell perturbation method for convective boundary layers"
rconfig real cell_cbl_zitop namelist,dynamics max_domains 1000. - "boundary layer height for CBL scaling (m)"
rconfig real cell_cbl_uowthst namelist,dynamics max_domains 1. - "ratio of capping inversion wind speed to convective velocity scale times temperature scale (K)"
### time-varying parameters for the cell perturbation method
rconfig logical cell_tvcp namelist,dynamics max_domains .false. - "flag to activate time-varying cell perturbation parameters"
state real zpert_tvcp - dyn_em max_domains - i5r "zpert_tvcp" "time-varying maximum vertical height to perturb" "m"
state real dthpert_tvcp - dyn_em max_domains - i5r "dthpert_tvcp" "time-varying potential temperature perturbation magnitude" "K"
state real zpertRLs_tvcp - dyn_em max_domains - i5r "zpertRLs_tvcp" "time-varying lowest vertical height to perturb RL" "m"
state real zpertRLe_tvcp - dyn_em max_domains - i5r "zpertRLe_tvcp" "time-varying highest vertical height to perturb RL" "m"
state real dthpertRL_tvcp - dyn_em max_domains - i5r "dthpertRL_tvcp" "time-varying potential temperature perturbation magnitude RL" "K"
###
halo HALO_EM_PXY dyn_em 8:Pxy
period PERIOD_EM_PXY dyn_em 3:Pxy
2 changes: 2 additions & 0 deletions Registry/registry.em_shared_collection
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ include registry.hyb_coord
include registry.new3d_wif
include registry.trad_fields
include registry.tsout
include registry.cell_pert
include registry.mom_pert
29 changes: 29 additions & 0 deletions Registry/registry.mom_pert
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#########################
# Laura Mazzaro #
# LJMB #
#########################

# Extension of the cell perturbation method to use momentum perturbations

rconfig logical m_pert_uv namelist,dynamics max_domains .false. - "flag to activate horizontal momentum perturbations at inflow boundaries"
rconfig logical m_pert_w namelist,dynamics max_domains .false. - "flag to activate vertical momentum perturbations at inflow boundaries"
rconfig integer m_pert_locx namelist,dynamics max_domains -1 - "Momentum perturbation boundary in x: 0: don't perturb, -1: perturb -x, 1:perturb +x"
rconfig integer m_pert_locy namelist,dynamics max_domains -1 - "Momentum perturbation boundary in y: 0: don't perturb, 1: perturb -y, 1:perturb +y"
state real mom_pert_u ikj dyn_em 1 X r "mom_pert_u" "momentum perturbation field for u-tendency" "kg s^-4""
state real mom_pert_v ikj dyn_em 1 X r "mom_pert_v" "momentum perturbation field for v-tendency" "kg s^-4""
state real mom_pert_w ikj dyn_em 1 Y r "mom_pert_w" "momentum perturbation field for w-tendency" "kg s^-4"
rconfig integer cell_width namelist,dynamics max_domains 8 - "number of grid points conforming the cell"
rconfig real mom_pert_amp_uv namelist,dynamics max_domains 1000 - "maximum amplitude for the horizontal momentum perturbations"
rconfig real mom_pert_amp_w namelist,dynamics max_domains 1500 - "maximum amplitude for the vertical momentum perturbations"
rconfig real mom_pert_gps namelist,dynamics max_domains 24 - "Number of perturbed grid-point rows/columns at boundaries"
rconfig real mom_pert_ktop namelist,dynamics max_domains 75 - "top of perturbations [gps]"
rconfig real mom_pert_kbot namelist,dynamics max_domains 0 - "bottom of perturbations [gps]"

#########################

halo HALO_EM_MOM_PERT_U dyn_em 8:mom_pert_u
period PERIOD_EM_MOM_PERT_U dyn_em 3:mom_pert_u
halo HALO_EM_MOM_PERT_V dyn_em 8:mom_pert_v
period PERIOD_EM_MOM_PERT_V dyn_em 3:mom_pert_v
halo HALO_EM_MOM_PERT_W dyn_em 8:mom_pert_w
period PERIOD_EM_MOM_PERT_W dyn_em 3:mom_pert_w
1 change: 1 addition & 0 deletions dyn_em/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ MODULES = \
module_stoch.o \
module_after_all_rk_steps.o \
module_tsout.o \
module_cellpert.o \
$(CASE_MODULE)

# possible CASE_MODULE settings
Expand Down
Loading

0 comments on commit 7aeb854

Please sign in to comment.