|
| pure real function | calc_direction (u, v) |
| |
| pure real function | calc_speed (u, v) |
| |
| pure real function | calc_u (direction, magnitude) |
| |
| pure real function | calc_v (direction, magnitude) |
| |
| pure real function | calc_sat_lapse_rate (T, mr) |
| |
| pure real function | calc_moist_stability (t_top, t_bot, z_top, z_bot, qv_top, qv_bot, qc) |
| |
| pure real function | calc_dry_stability (th_top, th_bot, z_top, z_bot) |
| |
| pure real function | calc_stability (th_top, th_bot, pii_top, pii_bot, z_top, z_bot, qv_top, qv_bot, qc) |
| |
| pure real function | calc_domain_stability (domain) |
| |
| subroutine | linear_winds (domain, Nsq, vsmooth, reverse, useDensity, debug, savedata) |
| |
| subroutine | add_buffer_topo (terrain, buffer_topo, smooth_window, debug) |
| |
| subroutine | initialize_spatial_winds (domain, options, reverse, useDensity) |
| |
| real function | calc_weight (indata, bestpos, nextpos, match) |
| |
| subroutine | spatial_winds (domain, reverse, vsmooth) |
| |
| subroutine | set_module_options (options) |
| |
| subroutine | setup_linwinds (domain, options, reverse, useDensity) |
| |
|
| logical | variable_n |
| |
| logical | smooth_nsq |
| |
| real | n_squared |
| |
| real, dimension(:,:), allocatable | k |
| |
| real, dimension(:,:), allocatable | l |
| |
| real, dimension(:,:), allocatable | kl |
| |
| real, dimension(:,:), allocatable | sig |
| |
complex(c_double_complex),
dimension(:,:), allocatable | denom |
| |
complex(c_double_complex),
dimension(:,:), allocatable | m |
| |
complex(c_double_complex),
dimension(:,:), allocatable | ineta |
| |
complex(c_double_complex),
dimension(:,:), allocatable | msq |
| |
complex(c_double_complex),
dimension(:,:), allocatable | mimag |
| |
complex(c_double_complex),
dimension(:,:,:), pointer | uhat |
| |
complex(c_double_complex),
dimension(:,:,:), pointer | u_hat |
| |
complex(c_double_complex),
dimension(:,:,:), pointer | vhat |
| |
complex(c_double_complex),
dimension(:,:,:), pointer | v_hat |
| |
| logical | data_allocated =.False. |
| |
| type(c_ptr) | uh_aligned_data |
| |
| type(c_ptr) | u_h_aligned_data |
| |
| type(c_ptr) | vh_aligned_data |
| |
| type(c_ptr) | v_h_aligned_data |
| |
type(c_ptr), dimension(:),
allocatable | uplans |
| |
type(c_ptr), dimension(:),
allocatable | vplans |
| |
| real, dimension(:), allocatable | dir_values |
| |
| real, dimension(:), allocatable | nsq_values |
| |
| real, dimension(:), allocatable | spd_values |
| |
real, dimension(:,:,:,:,:,:),
allocatable, target | hi_u_lut |
| |
real, dimension(:,:,:,:,:,:),
allocatable, target | hi_v_lut |
| |
real, dimension(:,:,:,:,:,:),
allocatable, target | rev_u_lut |
| |
real, dimension(:,:,:,:,:,:),
allocatable, target | rev_v_lut |
| |
real, dimension(:,:,:,:,:,:),
pointer | u_lut |
| |
real, dimension(:,:,:,:,:,:),
pointer | v_lut |
| |
| real, dimension(:,:), allocatable | linear_mask |
| |
| real, dimension(:,:), allocatable | nsq_calibration |
| |
| real, dimension(:,:,:), allocatable | u_perturbation |
| |
| real, dimension(:,:,:), allocatable | v_perturbation |
| |
| logical | use_spatial_linear_fields |
| |
| logical | use_linear_mask |
| |
| logical | use_nsq_calibration |
| |
| integer | buffer |
| |
| integer | original_buffer |
| |
| integer | stability_window_size |
| |
| real | max_stability |
| |
| real | min_stability |
| |
| real | linear_contribution = 1.0 |
| |
| real | linear_update_fraction = 1.0 |
| |
| real | dirmax |
| |
| real | dirmin |
| |
| real | spdmax |
| |
| real | spdmin |
| |
| real | nsqmax |
| |
| real | nsqmin |
| |
| integer | n_dir_values =36 |
| |
| integer | n_nsq_values =10 |
| |
| integer | n_spd_values =10 |
| |
| complex, parameter | j = (0, 1) |
| |
This module provides the linear wind theory calculations
Code is based primarily off equations in Barstad and Gronas (2006)
- See also
- Appendix A of Barstad and Gronas (2006) Tellus,58A,2-18
The main entry point to the code is: linear_perturb(domain, options, vsmooth, reverse, useDensity)
Call tree graph :
linear_perturb->[ setup_linwinds -> add_buffer_topo,
calc_domain_stability,
linear_winds -> various fft routines] High level routine descriptions / purpose
calc_domain_stability - calculates a mean Brunt Vaisala frequency over the domain
linear_winds - primary routine that calculates the linear wind perturbation
add_buffer_topo - generates a topo grid that with a surrounding buffer for the fft
initialize_spatial_winds - generated the look up tables to use spatially varying linear winds
setup_linwinds - sets up module level variables and calls add_buffer_topo
linear_perturb - main entry point, calls setup on first entry for a given domain
Inputs: domain, options, vsmooth, reverse, useDensity
domain,options = as defined in data_structures
vsmooth = number of vertical levels to smooth winds over
reverse = remove linear perturbation instead of adding it
useDensity = create a linear field that attempts to mitigate the
boussinesq approx that is embedded in the linear theory
so it advection can properly incorporate density.
- Author
- Ethan Gutmann (gutma.nosp@m.nn@u.nosp@m.car.e.nosp@m.du)