wrf_domains: plot WRF domains

Description Usage Arguments Value Note Examples

View source: R/wrf_domains.R

Description

wrf_domains plots domains on dynamic map.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
wrf_domains(
  max_dom = 2,
  map_proj = "lambert",
  ref_lat = -21.299,
  ref_lon = -46.147,
  truelat1 = -21.456,
  truelat2 = -24.55,
  stand_lon = -46.147,
  parent_id = c(1, 1),
  parent_grid_ratio = c(1, 5),
  i_parent_start = c(1, 41),
  j_parent_start = c(1, 31),
  e_we = c(101, 151),
  e_sn = c(99, 116),
  dx = 25000,
  dy = 25000,
  dtm = (102.42 * 1000),
  ...
)

Arguments

max_dom

Integer; number of domains

map_proj

Character; 'lambert', 'mercator', 'polar' or 'lat-lon'(crs 4326).

ref_lat

Real; Latitude coordinate of center of parent domain;

ref_lon

Real; Longitude coordinate of center of parent domain;

truelat1

Real; the first true latitude for the Lambert conformal projection, or the only true latitude for the Mercator and polar stereographic projections. Not used.

truelat2

Real; the second true latitude for the Lambert conformal projection, or the only true latitude for the Mercator and polar stereographic projections. Not used.

stand_lon

Real; real value specifying, for ARW, the longitude that is parallel with the y-axis in the Lambert conformal and polar stereographic projections. For the regular latitude-longitude projection, this value gives the rotation about the earth's geographic poles. Not used.

parent_id

A list of max_dom integers specifying, for each nest, the nesting ratio relative to the domain’s parent. Not used.

parent_grid_ratio

A list of max_dom integers specifying, for each nest, the nesting ratio relative to the domain’s parent.

i_parent_start

A list of max_dom integers specifying, for each nest, the x-coordinate of the lower-left corner of the nest in the parent unstaggered grid. For the coarsest domain, a value of 1 should be specified.

j_parent_start

A list of max_dom integers specifying, for each nest, the j-coordinate of the lower-left corner of the nest in the parent unstaggered grid. For the coarsest domain, a value of 1 should be specified.

e_we

A list of max_dom integers specifying, for each nest, the nest’s full west-east dimension. For nested domains, e_we must be one greater than an integer multiple of the nest's parent_grid_ratio (i.e., e_we = n*parent_grid_ratio+1 for some positive integer n).

e_sn

A list of max_dom integers which should all be set to 1.

dx

real value specifying the grid distance in the x-direction where the map scale factor is 1. For ARW, the grid distance is in meters for the 'polar', 'lambert', and 'mercator' projection, and in degrees longitude for the 'lat-lon' projection; for NMM, the grid distance is in degrees longitude. Grid distances for nests are determined recursively based on values specified for parent_grid_ratio and parent_id.

dy

A real value specifying the nominal grid distance in the y-direction where the map scale factor is 1. For ARW, the grid distance is in meters for the 'polar', 'lambert', and 'mercator' projection, and in degrees latitude for the 'lat-lon' projection; for NMM, the grid distance is in degrees latitude. Grid distances for nests are determined recursively based on values specified for parent_grid_ratio and parent_id.

dtm

A real value to convert degrees to meters.

...

ignored

Value

a list of map and sf

Note

This function pltos the domains with mapview. Internally it creates polygons with sf. It currently works with ARW and assuming lambert as WGS84 with epsg = 4326. Help me to improve this sergio.ibarra 'at' usp.br The definitions comes mostly from the only WRF manual available at: http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap3.htm

Examples

1
2
3
{
a <- wrf_domains()
}

atmoschem/wrftools documentation built on Oct. 28, 2021, 4:17 p.m.