Module station_data_mod
OVERVIEW
This module is used for outputing model results in a list
of stations (not gridded arrrays). The user needs to supply
a list of stations with lat, lon values of each station.
Data at a single point (I,J) that is closest to each station will
be written to a file. No interpolation is made when a station
is between two or more grid points.
In the output file, a 3D field will have a format of array(n1,n2) and
a 2D field is array(n1) where n1 is number of stations and n2 is number
of vertical levels or depths.
Here are some basic steps of how to use station_data_mod
1/Call data_station_init
user needs to supply 2 tables: list_stations and station_data_table as follows:
example of list of stations (# sign means comment)
# station_id lat lon
station_1 20.4 100.8
example of station_data_table (# sign means comment)
# General descriptor
Am2p14 station data
# start time (should be the same as model's initial time)
19800101
# file inforamtion
# filename, output_frequency, frequency_unit, time_axis_unit
"ocean_day" 1 "days" "hours"
# field information
# module field_name filename time_method pack
Ice_mod temperature ocean_day . true. 2
Ice_mod pressure ocean_day .false. 2
2/
Call register_station_field to register each field that needs to be written to a file, the call register_station_field returns a field_id that will be used later in send_station_data
3/
Call send_station_data will send data at each station in the list
to a file
4/ Finally, call station_data_end after the last time step.
OTHER MODULES USED
axis_utils_mod
mpp_io_mod
fms_mod
mpp_mod
mpp_domains_mod
diag_axis_mod
diag_output_mod
diag_manager_mod
diag_util_mod
time_manager_mod
PUBLIC INTERFACE
PUBLIC DATA
None.
PUBLIC ROUTINES
-
station_data_init
station_data_init ()
-
DESCRIPTION
- read in lat. lon of each station
create station_id based on lat, lon
read station_data_table, initialize output_fields and output files
-
register_station_field
register_station_field (module_name,fieldname,glo_lat,glo_lon,levels,init_time, domain,longname,units)
-
DESCRIPTION
- This function is similar to register_diag_field of diag_manager_mod. All arguments
are inputs that user needs to supply, some are optional. The names of input args are
self-describing.
levels is absent for 2D fields.
Note that pair (module_name, fieldname) must be unique in the
station_data_table or a fatal error will occur.
A field id is returned from this call that will be used later in send_station_data.
-
send_station_data
send_station_data (field_id, data, time)
-
DESCRIPTION
- data should have the size of compute domain(isc:iec,jsc:jec)
time is model's time
field_id is returned from register_station_field
only data at stations will be be sent to root_pe which, in turn, sends to output file
-
station_data_end
station_data_end (time)
-
DESCRIPTION
- Must be called after the last time step to write the buffer content
DATA SETS
None.
ERROR MESSAGES
None.