#include <stdio.h>
#include <netcdf.h>
#include <assert.h>
#include "crusde_api.h"
Include dependency graph for netcdf.c:
Defines | |
#define | NDIMS 4 |
#define | ERRCODE 2 |
#define | ERR(e) {printf("Error (%s, %d): %s\n", __FILE__, __LINE__, nc_strerror(e)); crusde_exit(ERRCODE);} |
Functions | |
const char * | get_name () |
const char * | get_version () |
const char * | get_authors () |
const PluginCategory | get_category () |
void | request_plugins () |
int | register_output_fields () |
const char * | get_description () |
void | run () |
Performs the fast convolution. | |
void | clear () |
void | init () |
Initialization of the convolution. Allocation of memory for inputs and outputs. | |
void | register_parameter () |
Register parameters this Kernel claims from the input. | |
void | set_model_data (double **data, int dim_x, int dim_y) |
Variables | |
int | status |
int | nc_id = -1 |
int | NLAT |
int | NLON |
int | NTIM |
int | NDIR |
int | lat_dimid = -1 lon_dimid=-1 t_dimid=-1 dir_dimid=-1 |
int | lat_varid = -1 lon_varid=-1 data_varid=-1 t_varid=-1 dir_varid=-1 |
int | dimids [NDIMS] |
double ** | data_out |
boolean | data_written |
const char * | filename |
const char * | netcdf_history = "written by CrusDe\'s netCDF Plugin, direction indices are: " |
const char * | netcdf_latitude = "latitude" |
const char * | netcdf_longitude = "longitude" |
const char * | netcdf_longname = "experiment name" |
const char * | netcdf_time = "time" |
const char * | netcdf_direction = "direction" |
const char * | netcdf_deg_east = "degrees_east" |
const char * | netcdf_deg_north = "degrees_north" |
const char * | netcdf_meters = "m" |
const char * | netcdf_days = "days" |
latitude, longitude, time, direction.
This plugin creates a netCDF file with either the filename given in the experiment definition or the default name for output (experiment.nc) on initialization. At each time step the the model results are saved to this file for all directions (x,y,z, other). The file gets deleted during unloading if no data was written.
|
|
|
|
|
|
|
Clean-up before this plug-in gets unloaded. |
|
|
|
returns DATAOUT_PLUGIN |
|
|
|
|
|
|
|
Initialization of the convolution. Allocation of memory for inputs and outputs. This function must not be called before register_parameter() unless none of the necessary values depends on parameters provided by the user, which are only set after they have been registered. This function is called some time after register_parameter(). |
|
empty |
|
Register parameters this Kernel claims from the input. empty
|
|
empty |
|
Performs the fast convolution. does the writing to the file |
|
set pointer to modelling result |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|