Write proploss scenario data to a netCDF file using a ragged array structure.
Write proploss data to to netCDF file.
This ragged array concept (see reference) stores the proploss data in a one dimensional list and uses an externally defined index to lookup the appropriate elements for each target.
This ragged array concept is used to define the intensity, phase, source_de, source_az, target_de, target_az, surface, bottom, and caustic variables. The proploss_index variable defines the lookup index into these arrays for the summed proploss for each target. The eigenray_index variable defines a similar index for the beginning of the eigenray list. Subsequent eigenrays for this target immediately follow the 1st eigenray. The eigenray_number variable defines the number of eigenrays for each target.
The user is responsible for ensuring that sum_eigenrays() has been called prior to this routine.
This file structure is illustrated (for a single target with direct path, surface, and bottom eigenrays) in the netCDF sample below:
netcdf eigenray_basic {
dimensions:
frequency = 1 ;
rows = 1 ;
cols = 1 ;
eigenrays = 4 ;
launch_de = 25 ;
launch_az = 5 ;
variables:
double source_latitude ;
source_latitude:units = "degrees_north" ;
double source_longitude ;
source_longitude:units = "degrees_east" ;
double source_altitude ;
source_altitude:units = "meters" ;
source_altitude:positive = "up" ;
double launch_de(launch_de) ;
launch_de:units = "degrees" ;
launch_de:positive = "up" ;
double launch_az(launch_az) ;
launch_az:units = "degrees_true" ;
launch_az:positive = "clockwise" ;
double time_step ;
time_step:units = "seconds" ;
double frequency(frequency) ;
frequency:units = "hertz" ;
double latitude(rows, cols) ;
latitude:units = "degrees_north" ;
double longitude(rows, cols) ;
longitude:units = "degrees_east" ;
double altitude(rows, cols) ;
altitude:units = "meters" ;
altitude:positive = "up" ;
short proploss_index(rows, cols) ;
proploss_index:units = "count" ;
short eigenray_index(rows, cols) ;
eigenray_index:units = "count" ;
short eigenray_num(rows, cols) ;
eigenray_num:units = "count" ;
double intensity(eigenrays, frequency) ;
intensity:units = "dB" ;
double phase(eigenrays, frequency) ;
phase:units = "radians" ;
double travel_time(eigenrays) ;
travel_time:units = "seconds" ;
double source_de(eigenrays) ;
source_de:units = "degrees" ;
source_de:positive = "up" ;
double source_az(eigenrays) ;
source_az:units = "degrees_true" ;
source_az:positive = "clockwise" ;
double target_de(eigenrays) ;
target_de:units = "degrees" ;
target_de:positive = "up" ;
double target_az(eigenrays) ;
target_az:units = "degrees_true" ;
target_az:positive = "clockwise" ;
short surface(eigenrays) ;
surface:units = "count" ;
short bottom(eigenrays) ;
bottom:units = "count" ;
short caustic(eigenrays) ;
caustic:units = "count" ;
// global attributes:
:long_name = "eigenray_basic test" ;
:Conventions = "COARDS" ;
data:
source_latitude = 45 ;
source_longitude = -45 ;
source_altitude = -1000 ;
launch_de = -60, -55, -50, -45, -40, -35, -30, -25, -20, -15, -10, -5, 0, 5,
10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60 ;
launch_az = -2, -1, 0, 1, 2 ;
time_step = 0.1 ;
frequency = 100000 ;
latitude = 45.02 ;
longitude = -45 ;
altitude = -1000 ;
proploss_index = 0 ;
eigenray_index = 1 ;
eigenray_num = 3 ;
intensity = 64.1427331557955, 66.9694875322853, 69.5617366839523, 77.9679676720843 ;
phase = 0.082693193293971, 0, -3.14159265358979, 0 ;
travel_time = 1.88788322659623, 1.48401881064351, 1.99622641373789, 3.03542140949814 ;
source_de = 6.86829906648868, -0.00988717967364023, 41.9270555318522, -61.0113452826929 ;
source_az = 0, 0, 0, 0 ;
target_de = -6.86819212315001, 0.0101128206074365, -41.9270291816411, 61.0112432784064 ;
target_az = 0, 0, 0, 0 ;
surface = 0, 0, 1, 0 ;
bottom = 0, 0, 0, 1 ;
caustic = 0, 0, 0, 0 ;
}
- Parameters
-
filename | Name of the file to write to disk. |
long_name | Optional global attribute for identifying data-set. |
- References:
- "The NetCDF Users Guide - Data Model, Programming Interfaces,
and Format for Self-Describing, Portable Data NetCDF", Version 3.6.3, Section 3.4, 7 June 2008.