easy_netcdf Module


Uses

  • module~~easy_netcdf~2~~UsesGraph module~easy_netcdf~2 easy_netcdf module~parkind1~2 PARKIND1 module~easy_netcdf~2->module~parkind1~2 netcdf netcdf module~easy_netcdf~2->netcdf module~radiation_io~2 radiation_io module~easy_netcdf~2->module~radiation_io~2 module~yomlun_ifsaux YOMLUN_IFSAUX module~radiation_io~2->module~yomlun_ifsaux module~yomlun_ifsaux->module~parkind1~2

Used by

  • module~~easy_netcdf~2~~UsedByGraph module~easy_netcdf~2 easy_netcdf proc~save_fluxes~2 save_fluxes proc~save_fluxes~2->module~easy_netcdf~2 proc~setup_general_aerosol_optics_legacy setup_general_aerosol_optics_legacy proc~setup_general_aerosol_optics_legacy->module~easy_netcdf~2 proc~setup_aerosol_optics~2 setup_aerosol_optics proc~setup_aerosol_optics~2->module~easy_netcdf~2 proc~save_general_cloud_optics save_general_cloud_optics proc~save_general_cloud_optics->module~easy_netcdf~2 proc~read_ckd_model read_ckd_model proc~read_ckd_model->module~easy_netcdf~2 proc~save_radiative_properties~2 save_radiative_properties proc~save_radiative_properties~2->module~easy_netcdf~2 program~ecrad_ifs_driver~2 ecrad_ifs_driver program~ecrad_ifs_driver~2->module~easy_netcdf~2 proc~read_ckd_model~2 read_ckd_model proc~read_ckd_model~2->module~easy_netcdf~2 proc~read_spectral_definition~2 read_spectral_definition proc~read_spectral_definition~2->module~easy_netcdf~2 proc~save_inputs save_inputs proc~save_inputs->module~easy_netcdf~2 proc~setup_general_aerosol_optics~2 setup_general_aerosol_optics proc~setup_general_aerosol_optics~2->module~easy_netcdf~2 proc~read~2 read proc~read~2->module~easy_netcdf~2 proc~read_ckd_gas~2 read_ckd_gas proc~read_ckd_gas~2->module~easy_netcdf~2 program~ecrad_ifs_driver ecrad_ifs_driver program~ecrad_ifs_driver->module~easy_netcdf~2 proc~save_general_cloud_optics_data save_general_cloud_optics_data proc~save_general_cloud_optics_data->module~easy_netcdf~2 proc~save_net_fluxes save_net_fluxes proc~save_net_fluxes->module~easy_netcdf~2 proc~read_spectral_solar_cycle read_spectral_solar_cycle proc~read_spectral_solar_cycle->module~easy_netcdf~2 proc~save_inputs~2 save_inputs proc~save_inputs~2->module~easy_netcdf~2 proc~read read proc~read->module~easy_netcdf~2 proc~setup_general_cloud_optics~3 setup_general_cloud_optics proc~setup_general_cloud_optics~3->module~easy_netcdf~2 proc~setup_general_cloud_optics~2 setup_general_cloud_optics proc~setup_general_cloud_optics~2->module~easy_netcdf~2 proc~read_input read_input proc~read_input->module~easy_netcdf~2 proc~setup_cloud_optics~6 setup_cloud_optics proc~setup_cloud_optics~6->module~easy_netcdf~2 proc~setup_aerosol_optics~6 setup_aerosol_optics proc~setup_aerosol_optics~6->module~easy_netcdf~2 proc~setup_pdf_sampler~2 setup_pdf_sampler proc~setup_pdf_sampler~2->module~easy_netcdf~2 module~easy_netcdf_read_mpi easy_netcdf_read_mpi module~easy_netcdf_read_mpi->module~easy_netcdf~2 program~ecrad_driver ecrad_driver program~ecrad_driver->module~easy_netcdf~2 proc~setup_cloud_optics~2 setup_cloud_optics proc~setup_cloud_optics~2->module~easy_netcdf~2 proc~save_sw_diagnostics save_sw_diagnostics proc~save_sw_diagnostics->module~easy_netcdf~2 proc~read_spectral_definition read_spectral_definition proc~read_spectral_definition->module~easy_netcdf~2 proc~setup_general_aerosol_optics_legacy~2 setup_general_aerosol_optics_legacy proc~setup_general_aerosol_optics_legacy~2->module~easy_netcdf~2 proc~read_from_netcdf read_from_netcdf proc~read_from_netcdf->module~easy_netcdf~2 proc~save_surface_fluxes save_surface_fluxes proc~save_surface_fluxes->module~easy_netcdf~2 proc~setup_general_aerosol_optics setup_general_aerosol_optics proc~setup_general_aerosol_optics->module~easy_netcdf~2 proc~save_fluxes save_fluxes proc~save_fluxes->module~easy_netcdf~2 proc~read_ckd_gas read_ckd_gas proc~read_ckd_gas->module~easy_netcdf~2 proc~save_aerosol_optics~2 save_aerosol_optics proc~save_aerosol_optics~2->module~easy_netcdf~2 proc~save_radiative_properties save_radiative_properties proc~save_radiative_properties->module~easy_netcdf~2 proc~save_aerosol_optics save_aerosol_optics proc~save_aerosol_optics->module~easy_netcdf~2 proc~get_index~2 get_index proc~get_index~2->module~easy_netcdf~2 proc~setup_pdf_sampler setup_pdf_sampler proc~setup_pdf_sampler->module~easy_netcdf~2

Contents


Derived Types

type, public ::  netcdf_file

Components

Type Visibility Attributes Name Initial
integer, public :: ncid = -1
integer, public :: iverbose
logical, public :: do_transpose_2d = .false.
logical, public :: is_write_mode = .false.
logical, public :: is_define_mode = .true.
logical, public :: is_double_precision = .false.
logical, public :: do_permute_3d = .false.
logical, public :: do_permute_4d = .false.
integer, public :: i_permute_3d(3) = (/1, 2, 3/)
integer, public :: i_permute_4d(4) = (/1, 2, 3, 4/)
character(len=511), public :: file_name

Type-Bound Procedures

procedure , public :: open => open_netcdf_file Subroutine
procedure , public :: create => create_netcdf_file Subroutine
procedure , public :: close => close_netcdf_file Subroutine
procedure , public :: is_open Function
procedure , public :: get_real_scalar Subroutine
procedure , public :: get_int_scalar Subroutine
procedure , public :: get_real_vector Subroutine
procedure , public :: get_int_vector Subroutine
procedure , public :: get_real_matrix Subroutine
procedure , public :: get_real_array3 Subroutine
procedure , public :: get_real_scalar_indexed Subroutine
procedure , public :: get_real_vector_indexed Subroutine
procedure , public :: get_real_matrix_indexed Subroutine
procedure , public :: get_real_array3_indexed Subroutine
procedure , public :: get_real_array4 Subroutine
procedure , public :: get_char_vector Subroutine
procedure , public :: get_char_matrix Subroutine
generic, public :: get => get_real_scalar, get_int_scalar, get_real_vector, get_int_vector, get_real_matrix, get_real_array3, get_real_array4, get_real_scalar_indexed, get_real_vector_indexed, get_real_matrix_indexed, get_real_array3_indexed, get_char_vector, get_char_matrix
procedure , public :: get_real_scalar_attribute Subroutine
procedure , public :: get_string_attribute Subroutine
generic, public :: get_attribute => get_real_scalar_attribute, get_string_attribute
procedure , public :: get_global_attribute Subroutine
procedure , public :: define_dimension Subroutine
procedure , public :: define_variable Subroutine
procedure , public :: put_attribute Subroutine
procedure , public :: put_global_attributes Subroutine
procedure , public :: put_global_attribute Subroutine
procedure , public :: put_real_scalar Subroutine
procedure , public :: put_real_vector Subroutine
procedure , public :: put_int_vector Subroutine
procedure , public :: put_real_matrix Subroutine
procedure , public :: put_real_array3 Subroutine
procedure , public :: put_real_scalar_indexed Subroutine
procedure , public :: put_real_vector_indexed Subroutine
procedure , public :: put_real_matrix_indexed Subroutine
generic, public :: put => put_real_scalar, put_real_vector, put_real_matrix, put_real_array3, put_real_scalar_indexed, put_real_vector_indexed, put_real_matrix_indexed, put_int_vector
procedure , public :: set_verbose Subroutine
procedure , public :: transpose_matrices Subroutine
procedure , public :: double_precision Subroutine
procedure , public :: permute_3d_arrays Subroutine
procedure , public :: get_rank Function
procedure , public :: exists Function
procedure , public :: get_outer_dimension Function
procedure , public :: attribute_exists Function
procedure , public :: global_attribute_exists Function
procedure , public :: copy_variable_definition Subroutine
procedure , public :: copy_variable Subroutine

Functions

public function is_open(this)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this

Return Value logical

public function get_rank(this, var_name) result(ndims)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name

Return Value integer

public function get_outer_dimension(this, var_name) result(n)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name

Return Value integer

public function exists(this, var_name) result(is_present)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name

Return Value logical

public function attribute_exists(this, var_name, attr_name, len) result(is_present)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
character(len=*), intent(in) :: attr_name
integer, intent(in), optional :: len

Return Value logical

public function global_attribute_exists(this, attr_name, len) result(is_present)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: attr_name
integer, intent(in), optional :: len

Return Value logical


Subroutines

public subroutine open_netcdf_file(this, file_name, iverbose, is_write_mode, is_hdf5_file)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: file_name
integer, intent(in), optional :: iverbose
logical, intent(in), optional :: is_write_mode
logical, intent(in), optional :: is_hdf5_file

public subroutine create_netcdf_file(this, file_name, iverbose, is_hdf5_file)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: file_name
integer, intent(in), optional :: iverbose
logical, intent(in), optional :: is_hdf5_file

public subroutine close_netcdf_file(this)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this

public subroutine set_verbose(this, ival)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
integer, optional :: ival

public subroutine double_precision(this, is_double)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
logical, optional :: is_double

public subroutine transpose_matrices(this, do_transpose)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
logical, optional :: do_transpose

public subroutine permute_3d_arrays(this, ipermute)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
integer, intent(in) :: ipermute(3)

public subroutine permute_4d_arrays(this, ipermute)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
integer, intent(in) :: ipermute(4)

public subroutine get_variable_id(this, var_name, ivarid)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
integer, intent(out) :: ivarid

public subroutine get_array_dimensions(this, ivarid, ndims, ndimlens, ntotal)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
integer, intent(in) :: ivarid
integer, intent(out) :: ndims
integer, intent(out) :: ndimlens(NF90_MAX_VAR_DIMS)
integer(kind=jpib), intent(out), optional :: ntotal

public subroutine end_define_mode(this)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this

public subroutine get_real_scalar(this, var_name, scalar)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
real(kind=jprb), intent(out) :: scalar

public subroutine get_int_scalar(this, var_name, scalar)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
integer, intent(out) :: scalar

public subroutine get_real_scalar_indexed(this, var_name, scalar, index)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
real(kind=jprb), intent(out) :: scalar
integer, intent(in) :: index

public subroutine get_real_vector(this, var_name, vector)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
real(kind=jprb), intent(out), allocatable :: vector(:)

public subroutine get_char_vector(this, var_name, vector)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
character(len=1), intent(out), allocatable :: vector(:)

public subroutine get_int_vector(this, var_name, vector)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
integer, intent(out), allocatable :: vector(:)

public subroutine get_real_vector_indexed(this, var_name, vector, index)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
real(kind=jprb), intent(out), allocatable :: vector(:)
integer, intent(in) :: index

public subroutine get_real_matrix(this, var_name, matrix, do_transp)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
real(kind=jprb), intent(out), allocatable :: matrix(:,:)
logical, intent(in), optional :: do_transp

public subroutine get_char_matrix(this, var_name, matrix, do_transp)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
character(len=1), intent(inout), allocatable :: matrix(:,:)
logical, intent(in), optional :: do_transp

public subroutine get_real_matrix_indexed(this, var_name, matrix, index, do_transp)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
real(kind=jprb), intent(out), allocatable :: matrix(:,:)
integer, intent(in) :: index
logical, intent(in), optional :: do_transp

public subroutine get_real_array3(this, var_name, var, ipermute)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
real(kind=jprb), intent(out), allocatable :: var(:,:,:)
integer, intent(in), optional :: ipermute(3)

public subroutine get_real_array3_indexed(this, var_name, var, index, ipermute)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
real(kind=jprb), intent(out), allocatable :: var(:,:,:)
integer, intent(in) :: index
integer, intent(in), optional :: ipermute(3)

public subroutine get_real_array4(this, var_name, var, ipermute)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
real(kind=jprb), intent(out), allocatable :: var(:,:,:,:)
integer, intent(in), optional :: ipermute(4)

public subroutine get_string_attribute(this, var_name, attr_name, attr_str)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
character(len=*), intent(in) :: attr_name
character(len=*), intent(inout) :: attr_str

public subroutine get_real_scalar_attribute(this, var_name, attr_name, attr)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
character(len=*), intent(in) :: attr_name
real(kind=jprb), intent(out) :: attr

public subroutine get_global_attribute(this, attr_name, attr_str)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: attr_name
character(len=*), intent(inout) :: attr_str

public subroutine print_variable_attributes(this, ivarid, iunit)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
integer, intent(in) :: ivarid
integer, intent(in) :: iunit

public subroutine define_dimension(this, dim_name, n)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: dim_name
integer, intent(in) :: n

public subroutine define_variable(this, var_name, dim1_name, dim2_name, dim3_name, dim4_name, long_name, units_str, comment_str, standard_name, is_double, data_type_name, fill_value, deflate_level, shuffle, chunksizes, ndims)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
character(len=*), intent(in), optional :: dim1_name
character(len=*), intent(in), optional :: dim2_name
character(len=*), intent(in), optional :: dim3_name
character(len=*), intent(in), optional :: dim4_name
character(len=*), intent(in), optional :: long_name
character(len=*), intent(in), optional :: units_str
character(len=*), intent(in), optional :: comment_str
character(len=*), intent(in), optional :: standard_name
logical, intent(in), optional :: is_double
character(len=*), intent(in), optional :: data_type_name
real(kind=jprb), intent(in), optional :: fill_value
integer, intent(in), optional :: deflate_level
logical, intent(in), optional :: shuffle
integer, intent(in), optional, dimension(:) :: chunksizes
integer, intent(in), optional :: ndims

public subroutine put_global_attributes(this, title_str, inst_str, source_str, comment_str, references_str, creator_name, creator_email_str, contributor_name, project_str, conventions_str, prior_history_str)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in), optional :: title_str
character(len=*), intent(in), optional :: inst_str
character(len=*), intent(in), optional :: source_str
character(len=*), intent(in), optional :: comment_str
character(len=*), intent(in), optional :: references_str
character(len=*), intent(in), optional :: creator_name
character(len=*), intent(in), optional :: creator_email_str
character(len=*), intent(in), optional :: contributor_name
character(len=*), intent(in), optional :: project_str
character(len=*), intent(in), optional :: conventions_str
character(len=*), intent(in), optional :: prior_history_str

public subroutine put_global_attribute(this, attr_name, attr_str)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: attr_name
character(len=*), intent(in) :: attr_str

public subroutine put_attribute(this, var_name, attr_name, attr_str)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
character(len=*), intent(in) :: attr_name
character(len=*), intent(in) :: attr_str

public subroutine put_real_scalar(this, var_name, var)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
real(kind=jprb), intent(in) :: var

public subroutine put_real_scalar_indexed(this, var_name, index, var)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
integer, intent(in) :: index
real(kind=jprb), intent(in) :: var

public subroutine put_real_vector(this, var_name, var)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
real(kind=jprb), intent(in) :: var(:)

public subroutine put_int_vector(this, var_name, var)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
integer, intent(in) :: var(:)

public subroutine put_real_vector_indexed(this, var_name, var, index2, index3)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
real(kind=jprb), intent(in) :: var(:)
integer, intent(in) :: index2
integer, intent(in), optional :: index3

public subroutine put_real_matrix(this, var_name, var, do_transp)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
real(kind=jprb), intent(in) :: var(:,:)
logical, intent(in), optional :: do_transp

public subroutine put_real_matrix_indexed(this, var_name, var, index3, index4, do_transp)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
real(kind=jprb), intent(in) :: var(:,:)
integer, intent(in) :: index3
integer, intent(in), optional :: index4
logical, intent(in), optional :: do_transp

public subroutine put_real_array3(this, var_name, var, ipermute)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
character(len=*), intent(in) :: var_name
real(kind=jprb), intent(in) :: var(:,:,:)
integer, intent(in), optional :: ipermute(3)

public subroutine copy_variable_definition(this, infile, var_name)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
type(netcdf_file), intent(in) :: infile
character(len=*), intent(in) :: var_name

public subroutine copy_variable(this, infile, var_name)

Arguments

Type IntentOptional Attributes Name
class(netcdf_file) :: this
class(netcdf_file), intent(in) :: infile
character(len=*), intent(in) :: var_name