Soil Water Balance (SWB2)
|
Contain a single module, netcdf4_support, which provides support for use of netCDF files as input or output. More...
Go to the source code of this file.
Data Types | |
type | netcdf4_support::t_netcdf_dimension |
type | netcdf4_support::t_netcdf_attribute |
type | netcdf4_support::t_netcdf_variable |
type | netcdf4_support::t_netcdf4_file |
Modules | |
module | netcdf4_support |
Provide support for use of netCDF files as input for time-varying, gridded meteorlogic data, or output for any SWB-generated variable. |
Functions/Subroutines | |
logical(c_bool) function, public | netcdf4_support::netcdf_date_within_range (ncfile, ijulianday) |
integer(c_int) function | netcdf4_support::nf_julian_day_to_index (ncfile, rjulianday) |
We need two functions to convert from index to timeval, and timeval to JD; note that timeval refers to the number of days from the origin of the netCDF file. | |
real(c_double) function | netcdf4_support::nf_index_to_dayvalue (ncfile, iindex) |
real(c_double) function | netcdf4_support::nf_dayvalue_to_julian_day (ncfile, rdayvalue) |
integer(c_size_t) function | netcdf4_support::nf_julian_day_to_index_adj (ncfile, rjulianday) |
integer(c_int) function | netcdf4_support::nf_return_varid (ncfile, ivarindex) |
integer(c_int) function | netcdf4_support::nf_return_dimid (ncfile, idimindex) |
integer(c_int) function | netcdf4_support::nf_return_varindex (ncfile, ivarid) |
character(len=256) function | netcdf4_support::nf_return_attvalue (ncfile, ivarindex, sattname) |
integer(c_int) function | netcdf4_support::nf_return_dimindex (ncfile, idimid) |
integer(c_size_t) function | netcdf4_support::nf_return_dimsize (ncfile, idimid) |
subroutine | netcdf4_support::nf_guess_z_variable_name (ncfile) |
subroutine, public | netcdf4_support::netcdf_open_and_prepare_for_merging (ncfile, sfilename, guess_z_var_name) |
subroutine, public | netcdf4_support::netcdf_open_and_prepare_as_input (ncfile, sfilename, lfliphorizontal, lflipvertical, lallowautomaticdataflipping, rx_coord_addoffset, ry_coord_addoffset, svariableorder, svarname_x, svarname_y, svarname_z, svarname_time, rcoordinatetolerance, tgridbounds, ilu) |
subroutine, public | netcdf4_support::netcdf_open_and_prepare_as_output_archive (ncfile, ncfile_archive, ioriginmonth, ioriginday, ioriginyear, istartyear, iendyear) |
subroutine, public | netcdf4_support::netcdf_open_and_prepare_as_output (ncfile, svariablename, svariableunits, inx, iny, fx, fy, startdate, enddate, proj4_string, history_list, executable_name, dplat, dplon, fvalidmin, fvalidmax, write_time_bounds, filename_prefix, filename_modifier) |
subroutine | netcdf4_support::nf_set_z_variable_name (ncfile, svarname_z) |
subroutine | netcdf4_support::nf_set_iteration_bounds (ncfile) |
subroutine | netcdf4_support::nf_set_start_count_stride (ncfile) |
subroutine | netcdf4_support::nf_return_native_coord_bounds (ncfile) |
subroutine | netcdf4_support::nf_get_time_vals (ncfile) |
subroutine | netcdf4_support::nf_get_x_and_y (ncfile) |
subroutine | netcdf4_support::nf_open_file (ncfile, sfilename, ilu) |
subroutine, public | netcdf4_support::netcdf_open_file (ncfile, sfilename, ilu) |
subroutine | netcdf4_support::nf_trap (iresultcode, sfilename, ilinenumber, netcdf_filename) |
subroutine, public | netcdf4_support::netcdf_close_file (ncfile) |
subroutine, public | netcdf4_support::netcdf_deallocate_data_struct (ncfile) |
subroutine, public | netcdf4_support::netcdf_nullify_data_struct (ncfile) |
subroutine | netcdf4_support::nf_populate_dimension_struct (ncfile) |
subroutine | netcdf4_support::nf_populate_variable_struct (ncfile) |
subroutine | netcdf4_support::nf_populate_attribute_struct (ncfile, pnc_att, inc_varid, iattnum) |
subroutine, public | netcdf4_support::netcdf_get_variable_id_for_variable (ncfile, variable_name, variable_id) |
subroutine, public | netcdf4_support::netcdf_get_attribute_list_for_variable (ncfile, variable_name, attribute_name_list, attribute_value_list) |
subroutine, public | netcdf4_support::netcdf_set_coordinate_tolerance (ncfile, tolerance) |
subroutine, public | netcdf4_support::netcdf_get_variable_list (ncfile, variable_list) |
logical(c_bool) function, public | netcdf4_support::netcdf_update_time_starting_index (ncfile, ijulianday) |
subroutine, public | netcdf4_support::netcdf_get_variable_slice (ncfile, rvalues, dpvalues, ivalues) |
subroutine | netcdf4_support::nf_get_variable_slice_short (ncfile, i2values) |
subroutine | netcdf4_support::nf_get_variable_slice_int (ncfile, ivalues) |
subroutine | netcdf4_support::nf_get_variable_slice_float (ncfile, rvalues) |
subroutine | netcdf4_support::nf_get_variable_slice_double (ncfile, dpvalues) |
subroutine | netcdf4_support::nf_get_variable_vector_short (ncfile, inc_varid, inc_start, inc_count, inc_stride, inc_vars) |
subroutine | netcdf4_support::nf_get_variable_array_short (ncfile, inc_varid, inc_start, inc_count, inc_stride, inc_vars) |
subroutine | netcdf4_support::nf_get_variable_array_as_vector_short (ncfile, inc_varid, inc_start, inc_count, inc_stride, inc_vars) |
subroutine | netcdf4_support::nf_get_variable_array_as_vector_int (ncfile, inc_varid, inc_start, inc_count, inc_stride, inc_vars) |
subroutine | netcdf4_support::nf_get_variable_vector_int (ncfile, inc_varid, inc_start, inc_count, inc_stride, inc_vars) |
subroutine | netcdf4_support::nf_get_variable_vector_double (ncfile, inc_varid, inc_start, inc_count, inc_stride, dpnc_vars) |
subroutine | netcdf4_support::nf_get_variable_array_double (ncfile, inc_varid, inc_start, inc_count, inc_stride, dpnc_vars) |
subroutine | netcdf4_support::nf_get_variable_array_as_vector_double (ncfile, inc_varid, inc_start, inc_count, inc_stride, dpnc_vars) |
subroutine | netcdf4_support::nf_get_variable_vector_float (ncfile, inc_varid, inc_start, inc_count, inc_stride, rnc_vars) |
subroutine | netcdf4_support::nf_get_variable_array_float (ncfile, inc_varid, inc_start, inc_count, inc_stride, rnc_vars) |
subroutine | netcdf4_support::nf_get_variable_array_as_vector_float (ncfile, inc_varid, inc_start, inc_count, inc_stride, rnc_vars) |
subroutine, public | netcdf4_support::netcdf_dump_cdl (ncfile, ilu) |
real(c_double) function, dimension(0:1) | netcdf4_support::nf_get_first_and_last (ncfile, ivarindex) |
subroutine | netcdf4_support::nf_calculate_time_range (ncfile) |
subroutine | netcdf4_support::nf_get_time_units (ncfile) |
subroutine | netcdf4_support::nf_get_xyz_units (ncfile) |
subroutine | netcdf4_support::nf_get_scale_and_offset (ncfile) |
subroutine | netcdf4_support::nf_get_variable_id_and_type (ncfile, strict_asserts) |
integer(c_int) function | netcdf4_support::nf_return_index_double (rvalues, rtargetvalue, roffsetvalue) |
integer(c_size_t) function, dimension(2), public | netcdf4_support::netcdf_coord_to_col_row (ncfile, rx, ry) |
integer(c_int) function | netcdf4_support::nf_get_varid (ncfile, svariablename) |
subroutine | netcdf4_support::nf_create (ncfile, sfilename, ilu) |
subroutine | netcdf4_support::nf_define_deflate (ncfile, ivarid, ishuffle, ideflate, ideflate_level) |
subroutine | netcdf4_support::nf_enddef (ncfile) |
subroutine | netcdf4_support::nf_redef (ncfile) |
subroutine | netcdf4_support::nf_define_dimension (ncfile, sdimensionname, idimensionsize) |
subroutine | netcdf4_support::nf_delete_attribute (ncfile, svariablename, sattributename) |
subroutine | netcdf4_support::nf_define_dimensions (ncfile) |
subroutine | netcdf4_support::nf_set_standard_dimensions (ncfile, inx, iny, write_time_bounds) |
subroutine | netcdf4_support::nf_set_standard_variables (ncfile, svarname_z, llatlon, write_time_bounds) |
subroutine | netcdf4_support::nf_set_global_attributes (ncfile, sdatatype, executable_name, history_list, ssourcefile) |
subroutine | netcdf4_support::nf_set_standard_attributes (ncfile, sorigintext, proj4_string, llatlon, fvalidmin, fvalidmax, write_time_bounds) |
subroutine | netcdf4_support::nf_put_x_and_y (ncfile, dpx, dpy) |
subroutine | netcdf4_support::nf_put_lat_and_lon (ncfile, dplat, dplon) |
integer(c_int) function | netcdf4_support::nf_define_variable (ncfile, svariablename, ivariabletype, inumberofdimensions, idimids) |
subroutine | netcdf4_support::nf_define_variables (ncfile) |
subroutine, public | netcdf4_support::netcdf_rewrite_attribute (ncfile, svariablename, sattributename, sattributevalue, iattributevalue, rattributevalue, dpattributevalue) |
subroutine | netcdf4_support::nf_put_attribute (ncfile, ivarid, sattributename, sattributevalue, iattributevalue, rattributevalue, dpattributevalue) |
subroutine | netcdf4_support::nf_put_attributes (ncfile) |
subroutine, public | netcdf4_support::netcdf_put_variable_array (ncfile, ivarid, istart, icount, istride, ivalues, i2values, rvalues, dpvalues) |
subroutine, public | netcdf4_support::netcdf_put_packed_variable_array (ncfile, ivarid, istart, icount, istride, lmask, ivalues, ifield, i2values, i2field, rvalues, rfield, dpvalues, dpfield) |
subroutine, public | netcdf4_support::netcdf_put_variable_vector (ncfile, ivarid, istart, icount, istride, ivalues, i2values, rvalues, dpvalues) |
Variables | |
integer(c_int), public | netcdf4_support::nc_readonly = 0 |
integer(c_int), public | netcdf4_support::nc_readwrite = 1 |
integer(c_int), parameter | netcdf4_support::nc_nat = 0 |
integer(c_int), parameter | netcdf4_support::nc_byte = 1 |
integer(c_int), parameter | netcdf4_support::nc_char = 2 |
integer(c_int), parameter | netcdf4_support::nc_short = 3 |
integer(c_int), parameter | netcdf4_support::nc_int = 4 |
integer(c_int), parameter | netcdf4_support::nc_long = NC_INT |
integer(c_int), parameter, public | netcdf4_support::nc_float = 5 |
integer(c_int), parameter | netcdf4_support::nc_double = 6 |
integer(c_int), parameter | netcdf4_support::nc_ubyte = 7 |
integer(c_int), parameter | netcdf4_support::nc_ushort = 8 |
integer(c_int), parameter | netcdf4_support::nc_uint = 9 |
integer(c_int), parameter | netcdf4_support::nc_int64 = 10 |
integer(c_int), parameter | netcdf4_support::nc_uint64 = 11 |
integer(c_int), parameter | netcdf4_support::nc_string = 12 |
integer(c_int), parameter | netcdf4_support::nc_fill_char = 0 |
integer(c_int), parameter | netcdf4_support::nc_fill_byte = -127 |
integer(c_int), parameter | netcdf4_support::nc_fill_short = -32767 |
integer(c_int), parameter, public | netcdf4_support::nc_fill_int = -2147483647 |
integer(c_int), parameter | netcdf4_support::nc_na_int = -9999 |
real(c_float), parameter, public | netcdf4_support::nc_fill_float = -9999.0_c_float |
real(c_double), parameter | netcdf4_support::nc_fill_double = -9.9e-20_c_double |
integer(c_int), parameter | netcdf4_support::nc_nowrite = 0 |
integer(c_int), parameter | netcdf4_support::nc_write = 1 |
integer(c_int), parameter | netcdf4_support::nc_clobber = 0 |
integer(c_int), parameter | netcdf4_support::nc_noclobber = 4 |
integer(c_int), parameter | netcdf4_support::nc_fill = 0 |
integer(c_int), parameter | netcdf4_support::nc_nofill = 256 |
integer(c_int), parameter | netcdf4_support::nc_lock = 1024 |
integer(c_int), parameter | netcdf4_support::nc_share = 2048 |
integer(c_int), parameter | netcdf4_support::nc_strict_nc3 = 8 |
integer(c_int), parameter | netcdf4_support::nc_64bit_offset = 512 |
integer(c_int), parameter | netcdf4_support::nc_sizehint_default = 0 |
integer(c_int), parameter | netcdf4_support::nc_align_chunk = -1 |
integer(c_int), parameter | netcdf4_support::nc_format_classic = 1 |
integer(c_int), parameter | netcdf4_support::nc_format_64bit = 2 |
integer(c_int), parameter | netcdf4_support::nc_format_netcdf4 = 3 |
integer(c_int), parameter | netcdf4_support::nc_format_netcdf4_classic = 4 |
integer(c_int), parameter | netcdf4_support::nc_max_dims = 1024 |
integer(c_int), parameter | netcdf4_support::nc_max_attrs = 8192 |
integer(c_int), parameter | netcdf4_support::nc_max_vars = 8192 |
integer(c_int), parameter | netcdf4_support::nc_max_name = 256 |
integer(c_int), parameter | netcdf4_support::nc_shuffle_yes = 1 |
integer(c_int), parameter | netcdf4_support::nc_shuffle_no = 0 |
integer(c_int), parameter | netcdf4_support::nc_deflate_yes = 1 |
integer(c_int), parameter | netcdf4_support::nc_deflate_no = 0 |
integer(c_int), parameter | netcdf4_support::nc_netcdf4 = 4096 |
integer(c_int), parameter | netcdf4_support::nc_classic_model = 256 |
integer(c_int), parameter | netcdf4_support::nc_unlimited = 0 |
integer(c_int), parameter | netcdf4_support::nc_global = -1 |
integer(c_int), parameter, public | netcdf4_support::nc_time = 0 |
@TODO: implement a more flexible way of tracking variable IDs; presently the code can break if lat and lon are omitted, but time_bnds is included; this is because if the lat and lon variables are not defined, NC_TIME_BNDS may be 4 or 5 or some other value. | |
integer(c_int), parameter, public | netcdf4_support::nc_y = 1 |
integer(c_int), parameter, public | netcdf4_support::nc_x = 2 |
integer(c_int), parameter, public | netcdf4_support::nc_z = 3 |
integer(c_int), parameter, public | netcdf4_support::nc_aux = 3 |
integer(c_int), parameter, public | netcdf4_support::nc_crs = 4 |
integer(c_int), parameter, public | netcdf4_support::nc_lat = 5 |
integer(c_int), parameter, public | netcdf4_support::nc_lon = 6 |
integer(c_int), public | netcdf4_support::nc_time_bnds = 7 |
integer(c_int), parameter | netcdf4_support::nc_first = 0 |
integer(c_int), parameter | netcdf4_support::nc_last = 1 |
integer(c_int), parameter | netcdf4_support::nc_by = 2 |
integer(c_int), parameter, public | netcdf4_support::nc_left = 0 |
integer(c_int), parameter, public | netcdf4_support::nc_right = 1 |
integer(c_int), parameter, public | netcdf4_support::nc_top = 0 |
integer(c_int), parameter, public | netcdf4_support::nc_bottom = 1 |
integer(c_int), parameter | netcdf4_support::column = 1 |
integer(c_int), parameter | netcdf4_support::row = 2 |
integer(c_int), parameter | netcdf4_support::leap_year = 0 |
integer(c_int), parameter | netcdf4_support::noleap_year = 1 |
integer(c_int), parameter | netcdf4_support::year_is_360_days = 2 |
character(len=25), dimension(4), parameter | netcdf4_support::netcdf_format_string = ["NC_FORMAT_CLASSIC ", "NC_FORMAT_64BIT ", "NC_FORMAT_NETCDF4 ", "NC_FORMAT_NETCDF4_CLASSIC" ] |
character(len=6), dimension(0:6), parameter | netcdf4_support::netcdf_data_type = ["nat ", "byte ", "char ", "short ", "int ", "float ", "double" ] |
Contain a single module, netcdf4_support, which provides support for use of netCDF files as input or output.
Supports use of netCDF files as input for time-varying, gridded meteorlogic data, or output for any SWB-generated variable.
from the C API: The nc_get_vars_l
type family of functions read a subsampled (strided) array section of values from a netCDF variable of an open netCDF dataset. The subsampled array section is specified by giving a corner, a vector of edge lengths, and a stride vector. The values are read with the last dimension of the netCDF variable varying fastest. ^^^^ ^^^^^^^ ^^^^^^^
from the Fortran 90 API: The values to be read are associated with the netCDF variable by assuming that the first dimension of the netCDF variable ^^^^^ varies fastest in the Fortran 90 interface. ^^^^^^ ^^^^^^^
Definition in file netcdf4_support.F90.