SCALE-RM
|
module FILE I/O (netcdf) More...
Functions/Subroutines | |
subroutine, public | fileio_setup |
Setup. More... | |
subroutine, public | fileio_set_coordinates (LON, LONX, LONY, LONXY, LAT, LATX, LATY, LATXY, CZ, FZ) |
set latlon and z More... | |
subroutine, public | fileio_set_axes (fid, dtype, xy) |
write axis to the file More... | |
subroutine | fileio_read_1d (var, basename, varname, axistype, step) |
Read 1D data from file. More... | |
subroutine | fileio_read_2d (var, basename, varname, axistype, step) |
Read 2D data from file. More... | |
subroutine | fileio_read_3d (var, basename, varname, axistype, step) |
Read 3D data from file. More... | |
subroutine | fileio_read_4d (var, basename, varname, axistype, step) |
Read 4D data from file. More... | |
subroutine | fileio_write_1d (var, basename, title, varname, desc, unit, axistype, datatype, date, subsec, append) |
Write 1D data to file. More... | |
subroutine | fileio_write_2d (var, basename, title, varname, desc, unit, axistype, datatype, date, subsec, append, nohalo, nozcoord) |
Write 2D data to file. More... | |
subroutine | fileio_write_3d (var, basename, title, varname, desc, unit, axistype, datatype, date, subsec, append, nohalo) |
Write 3D data to file. More... | |
subroutine | fileio_write_3d_t (var, basename, title, varname, desc, unit, axistype, datatype, timeintv, tsince, append, timetarg, nohalo) |
Write 3D data with time dimension to file. More... | |
subroutine | fileio_write_4d (var, basename, title, varname, desc, unit, axistype, datatype, timeintv, tsince, append, timetarg, nohalo) |
Write 4D data to file. More... | |
subroutine | getcftunits (tunits, date) |
subroutine, public | fileio_create (fid, basename, title, datatype, date, subsec, append, nozcoord) |
Create/open a netCDF file. More... | |
subroutine, public | fileio_enddef (fid) |
Exit netCDF file define mode. More... | |
subroutine, public | fileio_close (fid) |
Close a netCDF file. More... | |
subroutine | fileio_def_axes (fid, dtype, xy) |
define axis variables in the file More... | |
subroutine | fileio_write_axes (fid, xy) |
write axis to the file More... | |
subroutine, public | fileio_def_var (fid, vid, varname, desc, unit, axistype, datatype, timeintv) |
Define a variable to file. More... | |
subroutine | fileio_write_var_1d (fid, vid, var, varname, axistype) |
Write 1D data to file. More... | |
subroutine | fileio_write_var_2d (fid, vid, var, varname, axistype, nohalo) |
Write 2D data to file. More... | |
subroutine | fileio_write_var_3d (fid, vid, var, varname, axistype, nohalo) |
Write 3D data to file. More... | |
subroutine | fileio_write_var_3d_t (fid, vid, var, varname, axistype, timeintv, timetarg, nohalo) |
Write 3D data with time dimension to file. More... | |
subroutine | fileio_write_var_4d (fid, vid, var, varname, axistype, timeintv, timetarg, nohalo) |
Write 4D data to file. More... | |
module FILE I/O (netcdf)
subroutine, public scale_fileio::fileio_setup | ( | ) |
Setup.
Definition at line 102 of file scale_fileio.F90.
References scale_stdio::h_institute, scale_stdio::h_source, scale_grid_index::imaxb, scale_stdio::io_fid_log, scale_stdio::io_l, and scale_grid_index::jmaxb.
Referenced by mod_rm_driver::scalerm(), and mod_rm_prep::scalerm_prep().
subroutine, public scale_fileio::fileio_set_coordinates | ( | real(rp), dimension (ia,ja), intent(in) | LON, |
real(rp), dimension(ia,ja), intent(in) | LONX, | ||
real(rp), dimension(ia,ja), intent(in) | LONY, | ||
real(rp), dimension(ia,ja), intent(in) | LONXY, | ||
real(rp), dimension (ia,ja), intent(in) | LAT, | ||
real(rp), dimension(ia,ja), intent(in) | LATX, | ||
real(rp), dimension(ia,ja), intent(in) | LATY, | ||
real(rp), dimension(ia,ja), intent(in) | LATXY, | ||
real(rp), dimension ( ka,ia,ja), intent(in) | CZ, | ||
real(rp), dimension (0:ka,ia,ja), intent(in) | FZ | ||
) |
set latlon and z
Definition at line 138 of file scale_fileio.F90.
References scale_const::const_d2r, scale_grid_index::ieb, scale_grid_index::isb, scale_grid_index::jeb, and scale_grid_index::jsb.
Referenced by scale_grid_real::real_setup(), and scale_grid_real::real_update_z().
subroutine, public scale_fileio::fileio_set_axes | ( | integer, intent(in) | fid, |
integer, intent(in) | dtype, | ||
logical, intent(in), optional | xy | ||
) |
write axis to the file
Definition at line 172 of file scale_fileio.F90.
References gtool_file::filesettattr(), scale_grid::grid_cbfx, scale_grid::grid_cbfxg, scale_grid::grid_cbfy, scale_grid::grid_cbfyg, scale_grid::grid_cbfz, scale_grid::grid_cdx, scale_grid::grid_cdy, scale_grid::grid_cdz, scale_grid::grid_cx, scale_grid::grid_cxg, scale_grid::grid_cy, scale_grid::grid_cyg, scale_grid::grid_cz, scale_grid::grid_fbfx, scale_grid::grid_fbfxg, scale_grid::grid_fbfy, scale_grid::grid_fbfyg, scale_grid::grid_fbfz, scale_grid::grid_fdx, scale_grid::grid_fdy, scale_grid::grid_fdz, scale_grid::grid_fx, scale_grid::grid_fxg, scale_grid::grid_fy, scale_grid::grid_fyg, scale_grid::grid_fz, scale_land_grid::grid_lcz, scale_land_grid::grid_lfz, scale_urban_grid::grid_ucz, scale_urban_grid::grid_ufz, scale_grid_index::ieb, scale_grid_index::isb, scale_grid_index::jeb, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::ks, scale_land_grid_index::lke, scale_land_grid_index::lks, scale_urban_grid_index::uke, and scale_urban_grid_index::uks.
Referenced by fileio_write_1d(), fileio_write_2d(), fileio_write_3d(), fileio_write_3d_t(), and fileio_write_4d().
subroutine scale_fileio::fileio_read_1d | ( | real(rp), dimension(:), intent(out) | var, |
character(len=*), intent(in) | basename, | ||
character(len=*), intent(in) | varname, | ||
character(len=*), intent(in) | axistype, | ||
integer, intent(in) | step | ||
) |
Read 1D data from file.
[out] | var | value of the variable |
[in] | basename | basename of the file |
[in] | varname | name of the variable |
[in] | axistype | axis type (Z/X/Y) |
[in] | step | step number |
Definition at line 345 of file scale_fileio.F90.
References scale_grid_index::ieb, scale_grid_index::imaxb, scale_stdio::io_fid_log, scale_stdio::io_l, scale_grid_index::isb, scale_grid_index::jeb, scale_grid_index::jmaxb, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::kmax, scale_grid_index::ks, scale_process::prc_mpistop(), scale_process::prc_myrank, scale_prof::prof_rapend(), and scale_prof::prof_rapstart().
subroutine scale_fileio::fileio_read_2d | ( | real(rp), dimension(:,:), intent(out) | var, |
character(len=*), intent(in) | basename, | ||
character(len=*), intent(in) | varname, | ||
character(len=*), intent(in) | axistype, | ||
integer, intent(in) | step | ||
) |
Read 2D data from file.
[out] | var | value of the variable |
[in] | basename | basename of the file |
[in] | varname | name of the variable |
[in] | axistype | axis type (Z/X/Y) |
[in] | step | step number |
Definition at line 403 of file scale_fileio.F90.
References scale_grid_index::ieb, scale_grid_index::imaxb, scale_stdio::io_fid_log, scale_stdio::io_l, scale_grid_index::isb, scale_grid_index::jeb, scale_grid_index::jmaxb, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::kmax, scale_grid_index::ks, scale_process::prc_mpistop(), scale_process::prc_myrank, scale_prof::prof_rapend(), and scale_prof::prof_rapstart().
subroutine scale_fileio::fileio_read_3d | ( | real(rp), dimension(:,:,:), intent(out) | var, |
character(len=*), intent(in) | basename, | ||
character(len=*), intent(in) | varname, | ||
character(len=*), intent(in) | axistype, | ||
integer, intent(in) | step | ||
) |
Read 3D data from file.
[out] | var | value of the variable |
[in] | basename | basename of the file |
[in] | varname | name of the variable |
[in] | axistype | axis type (Z/X/Y/T) |
[in] | step | step number |
Definition at line 464 of file scale_fileio.F90.
References scale_grid_index::ieb, scale_grid_index::imaxb, scale_stdio::io_fid_log, scale_stdio::io_l, scale_grid_index::isb, scale_grid_index::jeb, scale_grid_index::jmaxb, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::kmax, scale_grid_index::ks, scale_land_grid_index::lke, scale_land_grid_index::lkmax, scale_land_grid_index::lks, scale_process::prc_mpistop(), scale_process::prc_myrank, scale_prof::prof_rapend(), scale_prof::prof_rapstart(), scale_urban_grid_index::uke, scale_urban_grid_index::ukmax, and scale_urban_grid_index::uks.
subroutine scale_fileio::fileio_read_4d | ( | real(rp), dimension(:,:,:,:), intent(out) | var, |
character(len=*), intent(in) | basename, | ||
character(len=*), intent(in) | varname, | ||
character(len=*), intent(in) | axistype, | ||
integer, intent(in) | step | ||
) |
Read 4D data from file.
[out] | var | value of the variable |
[in] | basename | basename of the file |
[in] | varname | name of the variable |
[in] | axistype | axis type (Z/X/Y/Time) |
[in] | step | step number |
Definition at line 552 of file scale_fileio.F90.
References scale_grid_index::ieb, scale_grid_index::imaxb, scale_stdio::io_fid_log, scale_stdio::io_l, scale_grid_index::isb, scale_grid_index::jeb, scale_grid_index::jmaxb, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::kmax, scale_grid_index::ks, scale_process::prc_mpistop(), scale_process::prc_myrank, scale_prof::prof_rapend(), and scale_prof::prof_rapstart().
subroutine scale_fileio::fileio_write_1d | ( | real(rp), dimension(:), intent(in) | var, |
character(len=*), intent(in) | basename, | ||
character(len=*), intent(in) | title, | ||
character(len=*), intent(in) | varname, | ||
character(len=*), intent(in) | desc, | ||
character(len=*), intent(in) | unit, | ||
character(len=*), intent(in) | axistype, | ||
character(len=*), intent(in) | datatype, | ||
integer, dimension(6), intent(in), optional | date, | ||
real(dp), intent(in), optional | subsec, | ||
logical, intent(in), optional | append | ||
) |
Write 1D data to file.
[in] | var | value of the variable |
[in] | basename | basename of the file |
[in] | title | title of the file |
[in] | varname | name of the variable |
[in] | desc | description of the variable |
[in] | unit | unit of the variable |
[in] | axistype | axis type (Z/X/Y) |
[in] | datatype | data type (REAL8/REAL4/default) |
[in] | date | ymdhms of the time |
[in] | subsec | subsec of the time |
[in] | append | switch whether append existing file or not (default=false) |
Definition at line 620 of file scale_fileio.F90.
References gtool_file_h::file_real4, gtool_file_h::file_real8, gtool_file::filecreate(), fileio_set_axes(), getcftunits(), scale_stdio::h_institute, scale_stdio::h_source, scale_grid_index::ieb, scale_grid_index::imaxb, scale_grid_index::isb, scale_grid_index::jeb, scale_grid_index::jmaxb, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::kmax, scale_grid_index::ks, scale_rm_process::prc_2drank, scale_process::prc_masterrank, scale_process::prc_mpistop(), scale_process::prc_myrank, scale_prof::prof_rapend(), scale_prof::prof_rapstart(), scale_precision::rp, scale_time::time_nowdate, scale_time::time_nowdaysec, and scale_time::time_nowms.
subroutine scale_fileio::fileio_write_2d | ( | real(rp), dimension(:,:), intent(in) | var, |
character(len=*), intent(in) | basename, | ||
character(len=*), intent(in) | title, | ||
character(len=*), intent(in) | varname, | ||
character(len=*), intent(in) | desc, | ||
character(len=*), intent(in) | unit, | ||
character(len=*), intent(in) | axistype, | ||
character(len=*), intent(in) | datatype, | ||
integer, dimension(6), intent(in), optional | date, | ||
real(dp), intent(in), optional | subsec, | ||
logical, intent(in), optional | append, | ||
logical, intent(in), optional | nohalo, | ||
logical, intent(in), optional | nozcoord | ||
) |
Write 2D data to file.
[in] | var | value of the variable |
[in] | basename | basename of the file |
[in] | title | title of the file |
[in] | varname | name of the variable |
[in] | desc | description of the variable |
[in] | unit | unit of the variable |
[in] | axistype | axis type (Z/X/Y) |
[in] | datatype | data type (REAL8/REAL4/default) |
[in] | date | ymdhms of the time |
[in] | subsec | subsec of the time |
[in] | append | switch whether append existing file or not (default=false) |
[in] | nohalo | switch whether include halo data or not (default=false) |
[in] | nozcoord | switch whether include zcoordinate or not (default=false) |
Definition at line 760 of file scale_fileio.F90.
References gtool_file_h::file_real4, gtool_file_h::file_real8, gtool_file::filecreate(), fileio_set_axes(), getcftunits(), scale_stdio::h_institute, scale_stdio::h_source, scale_grid_index::ia, scale_grid_index::ie, scale_grid_index::ieb, scale_grid_index::imaxb, scale_grid_index::is, scale_grid_index::isb, scale_grid_index::ja, scale_grid_index::je, scale_grid_index::jeb, scale_grid_index::jmaxb, scale_grid_index::js, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::kmax, scale_grid_index::ks, scale_rm_process::prc_2drank, scale_process::prc_masterrank, scale_process::prc_mpistop(), scale_process::prc_myrank, scale_prof::prof_rapend(), scale_prof::prof_rapstart(), gtool_file::rmiss, scale_precision::rp, scale_time::time_nowdate, scale_time::time_nowdaysec, and scale_time::time_nowms.
subroutine scale_fileio::fileio_write_3d | ( | real(rp), dimension(:,:,:), intent(in) | var, |
character(len=*), intent(in) | basename, | ||
character(len=*), intent(in) | title, | ||
character(len=*), intent(in) | varname, | ||
character(len=*), intent(in) | desc, | ||
character(len=*), intent(in) | unit, | ||
character(len=*), intent(in) | axistype, | ||
character(len=*), intent(in) | datatype, | ||
integer, dimension(6), intent(in), optional | date, | ||
real(dp), intent(in), optional | subsec, | ||
logical, intent(in), optional | append, | ||
logical, intent(in), optional | nohalo | ||
) |
Write 3D data to file.
[in] | var | value of the variable |
[in] | basename | basename of the file |
[in] | title | title of the file |
[in] | varname | name of the variable |
[in] | desc | description of the variable |
[in] | unit | unit of the variable |
[in] | axistype | axis type (Z/X/Y) |
[in] | datatype | data type (REAL8/REAL4/default) |
[in] | date | ymdhms of the time |
[in] | subsec | subsec of the time |
[in] | append | append existing (closed) file? |
[in] | nohalo | include halo data? |
Definition at line 964 of file scale_fileio.F90.
References gtool_file_h::file_real4, gtool_file_h::file_real8, gtool_file::filecreate(), fileio_set_axes(), getcftunits(), scale_stdio::h_institute, scale_stdio::h_source, scale_grid_index::ia, scale_grid_index::ie, scale_grid_index::ieb, scale_grid_index::imaxb, scale_grid_index::is, scale_grid_index::isb, scale_grid_index::ja, scale_grid_index::je, scale_grid_index::jeb, scale_grid_index::jmaxb, scale_grid_index::js, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::kmax, scale_grid_index::ks, scale_land_grid_index::lke, scale_land_grid_index::lkmax, scale_land_grid_index::lks, scale_rm_process::prc_2drank, scale_process::prc_masterrank, scale_process::prc_mpistop(), scale_process::prc_myrank, scale_prof::prof_rapend(), scale_prof::prof_rapstart(), gtool_file::rmiss, scale_precision::rp, scale_time::time_nowdate, scale_time::time_nowdaysec, scale_time::time_nowms, scale_urban_grid_index::uke, scale_urban_grid_index::ukmax, and scale_urban_grid_index::uks.
subroutine scale_fileio::fileio_write_3d_t | ( | real(rp), dimension(:,:,:), intent(in) | var, |
character(len=*), intent(in) | basename, | ||
character(len=*), intent(in) | title, | ||
character(len=*), intent(in) | varname, | ||
character(len=*), intent(in) | desc, | ||
character(len=*), intent(in) | unit, | ||
character(len=*), intent(in) | axistype, | ||
character(len=*), intent(in) | datatype, | ||
real(rp), intent(in) | timeintv, | ||
integer, dimension(6), intent(in) | tsince, | ||
logical, intent(in), optional | append, | ||
integer, intent(in), optional | timetarg, | ||
logical, intent(in), optional | nohalo | ||
) |
Write 3D data with time dimension to file.
[in] | var | value of the variable |
[in] | basename | basename of the file |
[in] | title | title of the file |
[in] | varname | name of the variable |
[in] | desc | description of the variable |
[in] | unit | unit of the variable |
[in] | axistype | axis type (X/Y/Time) |
[in] | datatype | data type (REAL8/REAL4/default) |
[in] | timeintv | time interval [sec] |
[in] | tsince | start time |
[in] | append | append existing (closed) file? |
[in] | timetarg | target timestep (optional) |
[in] | nohalo | include halo data? |
Definition at line 1210 of file scale_fileio.F90.
References gtool_file_h::file_real4, gtool_file_h::file_real8, gtool_file::filecreate(), fileio_set_axes(), scale_stdio::h_institute, scale_stdio::h_source, scale_grid_index::ia, scale_grid_index::ie, scale_grid_index::ieb, scale_grid_index::imaxb, scale_grid_index::is, scale_grid_index::isb, scale_grid_index::ja, scale_grid_index::je, scale_grid_index::jeb, scale_grid_index::jmaxb, scale_grid_index::js, scale_grid_index::jsb, scale_rm_process::prc_2drank, scale_process::prc_masterrank, scale_process::prc_mpistop(), scale_process::prc_myrank, scale_prof::prof_rapend(), scale_prof::prof_rapstart(), gtool_file::rmiss, and scale_precision::rp.
subroutine scale_fileio::fileio_write_4d | ( | real(rp), dimension(:,:,:,:), intent(in) | var, |
character(len=*), intent(in) | basename, | ||
character(len=*), intent(in) | title, | ||
character(len=*), intent(in) | varname, | ||
character(len=*), intent(in) | desc, | ||
character(len=*), intent(in) | unit, | ||
character(len=*), intent(in) | axistype, | ||
character(len=*), intent(in) | datatype, | ||
real(rp), intent(in) | timeintv, | ||
integer, dimension(6), intent(in) | tsince, | ||
logical, intent(in), optional | append, | ||
integer, intent(in), optional | timetarg, | ||
logical, intent(in), optional | nohalo | ||
) |
Write 4D data to file.
[in] | var | value of the variable |
[in] | basename | basename of the file |
[in] | title | title of the file |
[in] | varname | name of the variable |
[in] | desc | description of the variable |
[in] | unit | unit of the variable |
[in] | axistype | axis type (Z/X/Y/Time) |
[in] | datatype | data type (REAL8/REAL4/default) |
[in] | timeintv | time interval [sec] |
[in] | tsince | start time |
[in] | append | append existing (closed) file? |
[in] | timetarg | target timestep (optional) |
[in] | nohalo | include halo data? |
Definition at line 1422 of file scale_fileio.F90.
References gtool_file_h::file_real4, gtool_file_h::file_real8, gtool_file::filecreate(), fileio_set_axes(), getcftunits(), scale_stdio::h_institute, scale_stdio::h_source, scale_grid_index::ia, scale_grid_index::ie, scale_grid_index::ieb, scale_grid_index::imaxb, scale_grid_index::is, scale_grid_index::isb, scale_grid_index::ja, scale_grid_index::je, scale_grid_index::jeb, scale_grid_index::jmaxb, scale_grid_index::js, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::kmax, scale_grid_index::ks, scale_rm_process::prc_2drank, scale_process::prc_masterrank, scale_process::prc_mpistop(), scale_process::prc_myrank, scale_prof::prof_rapend(), scale_prof::prof_rapstart(), gtool_file::rmiss, and scale_precision::rp.
subroutine scale_fileio::getcftunits | ( | character(len=34), intent(out) | tunits, |
integer, dimension(6), intent(in) | date | ||
) |
Definition at line 1641 of file scale_fileio.F90.
Referenced by fileio_create(), fileio_write_1d(), fileio_write_2d(), fileio_write_3d(), and fileio_write_4d().
subroutine, public scale_fileio::fileio_create | ( | integer, intent(out) | fid, |
character(len=*), intent(in) | basename, | ||
character(len=*), intent(in) | title, | ||
character(len=*), intent(in) | datatype, | ||
integer, dimension(6), intent(in), optional | date, | ||
real(dp), intent(in), optional | subsec, | ||
logical, intent(in), optional | append, | ||
logical, intent(in), optional | nozcoord | ||
) |
Create/open a netCDF file.
[out] | fid | file ID |
[in] | basename | basename of the file |
[in] | title | title of the file |
[in] | datatype | data type (REAL8/REAL4/default) |
[in] | date | ymdhms of the time |
[in] | subsec | subsec of the time |
[in] | append | switch whether append existing file or not (default=false) |
[in] | nozcoord | switch whether include zcoordinate or not (default=false) |
Definition at line 1660 of file scale_fileio.F90.
References gtool_file_h::file_real4, gtool_file_h::file_real8, gtool_file::filecreate(), fileio_def_axes(), getcftunits(), scale_stdio::h_institute, scale_stdio::h_source, scale_rm_process::prc_2drank, scale_process::prc_masterrank, scale_process::prc_mpistop(), scale_process::prc_myrank, scale_prof::prof_rapend(), scale_prof::prof_rapstart(), scale_precision::rp, scale_time::time_nowdate, scale_time::time_nowdaysec, and scale_time::time_nowms.
Referenced by mod_atmos_dyn_vars::atmos_dyn_vars_restart_create(), mod_atmos_phy_ae_vars::atmos_phy_ae_vars_restart_create(), mod_atmos_phy_ch_vars::atmos_phy_ch_vars_restart_create(), mod_atmos_phy_cp_vars::atmos_phy_cp_vars_restart_create(), mod_atmos_phy_mp_vars::atmos_phy_mp_vars_restart_create(), mod_atmos_phy_rd_vars::atmos_phy_rd_vars_restart_create(), mod_atmos_phy_sf_vars::atmos_phy_sf_vars_restart_create(), mod_atmos_phy_tb_vars::atmos_phy_tb_vars_restart_create(), mod_atmos_vars::atmos_vars_restart_create(), mod_land_vars::land_vars_restart_create(), mod_ocean_vars::ocean_vars_restart_create(), and mod_urban_vars::urban_vars_restart_create().
subroutine, public scale_fileio::fileio_enddef | ( | integer, intent(in) | fid | ) |
Exit netCDF file define mode.
[in] | fid | file ID |
Definition at line 1779 of file scale_fileio.F90.
References gtool_file::fileenddef(), fileio_write_axes(), scale_prof::prof_rapend(), and scale_prof::prof_rapstart().
Referenced by mod_atmos_dyn_vars::atmos_dyn_vars_restart_enddef(), mod_atmos_phy_ae_vars::atmos_phy_ae_vars_restart_enddef(), mod_atmos_phy_ch_vars::atmos_phy_ch_vars_restart_enddef(), mod_atmos_phy_cp_vars::atmos_phy_cp_vars_restart_enddef(), mod_atmos_phy_mp_vars::atmos_phy_mp_vars_restart_enddef(), mod_atmos_phy_rd_vars::atmos_phy_rd_vars_restart_enddef(), mod_atmos_phy_sf_vars::atmos_phy_sf_vars_restart_enddef(), mod_atmos_phy_tb_vars::atmos_phy_tb_vars_restart_enddef(), mod_atmos_vars::atmos_vars_restart_enddef(), mod_land_vars::land_vars_restart_enddef(), mod_ocean_vars::ocean_vars_restart_enddef(), and mod_urban_vars::urban_vars_restart_enddef().
subroutine, public scale_fileio::fileio_close | ( | integer, intent(in) | fid | ) |
Close a netCDF file.
[in] | fid | file ID |
Definition at line 1806 of file scale_fileio.F90.
References gtool_file::fileclose(), scale_prof::prof_rapend(), and scale_prof::prof_rapstart().
Referenced by mod_atmos_dyn_vars::atmos_dyn_vars_restart_close(), mod_atmos_phy_ae_vars::atmos_phy_ae_vars_restart_close(), mod_atmos_phy_ch_vars::atmos_phy_ch_vars_restart_close(), mod_atmos_phy_cp_vars::atmos_phy_cp_vars_restart_close(), mod_atmos_phy_mp_vars::atmos_phy_mp_vars_restart_close(), mod_atmos_phy_rd_vars::atmos_phy_rd_vars_restart_close(), mod_atmos_phy_sf_vars::atmos_phy_sf_vars_restart_close(), mod_atmos_phy_tb_vars::atmos_phy_tb_vars_restart_close(), mod_atmos_vars::atmos_vars_restart_close(), mod_land_vars::land_vars_restart_close(), mod_ocean_vars::ocean_vars_restart_close(), and mod_urban_vars::urban_vars_restart_close().
subroutine scale_fileio::fileio_def_axes | ( | integer, intent(in) | fid, |
integer, intent(in) | dtype, | ||
logical, intent(in), optional | xy | ||
) |
define axis variables in the file
Definition at line 1829 of file scale_fileio.F90.
References gtool_file::filedefassociatedcoordinates(), gtool_file::filedefaxis(), gtool_file::filesettattr(), scale_grid_index::ia, scale_grid_index::ieb, scale_grid_index::ihalo, scale_grid_index::imax, scale_grid_index::isb, scale_grid_index::ja, scale_grid_index::jeb, scale_grid_index::jhalo, scale_grid_index::jmax, scale_grid_index::jsb, scale_grid_index::ka, scale_grid_index::ke, scale_grid_index::ks, scale_land_grid_index::lke, scale_land_grid_index::lks, scale_rm_process::prc_num_x, scale_rm_process::prc_num_y, scale_urban_grid_index::uke, and scale_urban_grid_index::uks.
Referenced by fileio_create().
subroutine scale_fileio::fileio_write_axes | ( | integer, intent(in) | fid, |
logical, intent(in), optional | xy | ||
) |
write axis to the file
Definition at line 1975 of file scale_fileio.F90.
References scale_grid::grid_cbfx, scale_grid::grid_cbfxg, scale_grid::grid_cbfy, scale_grid::grid_cbfyg, scale_grid::grid_cbfz, scale_grid::grid_cdx, scale_grid::grid_cdy, scale_grid::grid_cdz, scale_grid::grid_cx, scale_grid::grid_cxg, scale_grid::grid_cy, scale_grid::grid_cyg, scale_grid::grid_cz, scale_grid::grid_fbfx, scale_grid::grid_fbfxg, scale_grid::grid_fbfy, scale_grid::grid_fbfyg, scale_grid::grid_fbfz, scale_grid::grid_fdx, scale_grid::grid_fdy, scale_grid::grid_fdz, scale_grid::grid_fx, scale_grid::grid_fxg, scale_grid::grid_fy, scale_grid::grid_fyg, scale_grid::grid_fz, scale_land_grid::grid_lcz, scale_land_grid::grid_lfz, scale_urban_grid::grid_ucz, scale_urban_grid::grid_ufz, scale_grid_index::ieb, scale_grid_index::isb, scale_grid_index::jeb, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::ks, scale_land_grid_index::lke, scale_land_grid_index::lks, scale_urban_grid_index::uke, and scale_urban_grid_index::uks.
Referenced by fileio_enddef().
subroutine, public scale_fileio::fileio_def_var | ( | integer, intent(in) | fid, |
integer, intent(out) | vid, | ||
character(len=*), intent(in) | varname, | ||
character(len=*), intent(in) | desc, | ||
character(len=*), intent(in) | unit, | ||
character(len=*), intent(in) | axistype, | ||
character(len=*), intent(in) | datatype, | ||
real(rp), intent(in), optional | timeintv | ||
) |
Define a variable to file.
[in] | fid | file ID |
[out] | vid | variable ID |
[in] | varname | name of the variable |
[in] | desc | description of the variable |
[in] | unit | unit of the variable |
[in] | axistype | axis type (Z/X/Y) |
[in] | datatype | data type (REAL8/REAL4/default) |
[in] | timeintv | time interval [sec] |
Definition at line 2121 of file scale_fileio.F90.
References gtool_file_h::file_real4, gtool_file_h::file_real8, gtool_file::filedefinevariable(), scale_process::prc_mpistop(), scale_prof::prof_rapend(), scale_prof::prof_rapstart(), and scale_precision::rp.
Referenced by mod_atmos_dyn_vars::atmos_dyn_vars_restart_def_var(), mod_atmos_phy_ae_vars::atmos_phy_ae_vars_restart_def_var(), mod_atmos_phy_ch_vars::atmos_phy_ch_vars_restart_def_var(), mod_atmos_phy_cp_vars::atmos_phy_cp_vars_restart_def_var(), mod_atmos_phy_mp_vars::atmos_phy_mp_vars_restart_def_var(), mod_atmos_phy_rd_vars::atmos_phy_rd_vars_restart_def_var(), mod_atmos_phy_sf_vars::atmos_phy_sf_vars_restart_def_var(), mod_atmos_phy_tb_vars::atmos_phy_tb_vars_restart_def_var(), mod_atmos_vars::atmos_vars_restart_def_var(), mod_land_vars::land_vars_restart_def_var(), mod_ocean_vars::ocean_vars_restart_def_var(), and mod_urban_vars::urban_vars_restart_def_var().
subroutine scale_fileio::fileio_write_var_1d | ( | integer, intent(in) | fid, |
integer, intent(in) | vid, | ||
real(rp), dimension(:), intent(in) | var, | ||
character(len=*), intent(in) | varname, | ||
character(len=*), intent(in) | axistype | ||
) |
Write 1D data to file.
[in] | fid | file ID |
[in] | vid | netCDF variable ID |
[in] | var | value of the variable |
[in] | varname | name of the variable |
[in] | axistype | axis type (Z/X/Y) |
Definition at line 2241 of file scale_fileio.F90.
References scale_grid_index::ieb, scale_grid_index::imaxb, scale_grid_index::isb, scale_grid_index::jeb, scale_grid_index::jmaxb, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::kmax, scale_grid_index::ks, scale_process::prc_mpistop(), scale_prof::prof_rapend(), scale_prof::prof_rapstart(), and scale_time::time_nowdaysec.
subroutine scale_fileio::fileio_write_var_2d | ( | integer, intent(in) | fid, |
integer, intent(in) | vid, | ||
real(rp), dimension(:,:), intent(in) | var, | ||
character(len=*), intent(in) | varname, | ||
character(len=*), intent(in) | axistype, | ||
logical, intent(in), optional | nohalo | ||
) |
Write 2D data to file.
[in] | fid | file ID |
[in] | vid | netCDF variable ID |
[in] | var | value of the variable |
[in] | varname | name of the variable |
[in] | axistype | axis type (Z/X/Y) |
[in] | nohalo | switch whether include halo data or not (default=false) |
Definition at line 2300 of file scale_fileio.F90.
References scale_grid_index::ia, scale_grid_index::ie, scale_grid_index::ieb, scale_grid_index::imaxb, scale_grid_index::is, scale_grid_index::isb, scale_grid_index::ja, scale_grid_index::je, scale_grid_index::jeb, scale_grid_index::jmaxb, scale_grid_index::js, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::kmax, scale_grid_index::ks, scale_process::prc_mpistop(), scale_prof::prof_rapend(), scale_prof::prof_rapstart(), gtool_file::rmiss, and scale_time::time_nowdaysec.
subroutine scale_fileio::fileio_write_var_3d | ( | integer, intent(in) | fid, |
integer, intent(in) | vid, | ||
real(rp), dimension(:,:,:), intent(in) | var, | ||
character(len=*), intent(in) | varname, | ||
character(len=*), intent(in) | axistype, | ||
logical, intent(in), optional | nohalo | ||
) |
Write 3D data to file.
[in] | fid | file ID |
[in] | vid | netCDF variable ID |
[in] | var | value of the variable |
[in] | varname | name of the variable |
[in] | axistype | axis type (Z/X/Y) |
[in] | nohalo | include halo data? |
Definition at line 2422 of file scale_fileio.F90.
References scale_grid_index::ia, scale_grid_index::ie, scale_grid_index::ieb, scale_grid_index::imaxb, scale_grid_index::is, scale_grid_index::isb, scale_grid_index::ja, scale_grid_index::je, scale_grid_index::jeb, scale_grid_index::jmaxb, scale_grid_index::js, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::kmax, scale_grid_index::ks, scale_land_grid_index::lke, scale_land_grid_index::lkmax, scale_land_grid_index::lks, scale_process::prc_mpistop(), scale_prof::prof_rapend(), scale_prof::prof_rapstart(), gtool_file::rmiss, scale_time::time_nowdaysec, scale_urban_grid_index::uke, scale_urban_grid_index::ukmax, and scale_urban_grid_index::uks.
subroutine scale_fileio::fileio_write_var_3d_t | ( | integer, intent(in) | fid, |
integer, intent(in) | vid, | ||
real(rp), dimension(:,:,:), intent(in) | var, | ||
character(len=*), intent(in) | varname, | ||
character(len=*), intent(in) | axistype, | ||
real(rp), intent(in) | timeintv, | ||
integer, intent(in), optional | timetarg, | ||
logical, intent(in), optional | nohalo | ||
) |
Write 3D data with time dimension to file.
[in] | fid | file ID |
[in] | vid | netCDF variable ID |
[in] | var | value of the variable |
[in] | varname | name of the variable |
[in] | axistype | axis type (X/Y/Time) |
[in] | timeintv | time interval [sec] |
[in] | timetarg | target timestep (optional) |
[in] | nohalo | include halo data? |
Definition at line 2581 of file scale_fileio.F90.
References scale_grid_index::ia, scale_grid_index::ie, scale_grid_index::ieb, scale_grid_index::imaxb, scale_grid_index::is, scale_grid_index::isb, scale_grid_index::ja, scale_grid_index::je, scale_grid_index::jeb, scale_grid_index::jmaxb, scale_grid_index::js, scale_grid_index::jsb, scale_process::prc_mpistop(), scale_prof::prof_rapend(), scale_prof::prof_rapstart(), and gtool_file::rmiss.
subroutine scale_fileio::fileio_write_var_4d | ( | integer, intent(in) | fid, |
integer, intent(in) | vid, | ||
real(rp), dimension(:,:,:,:), intent(in) | var, | ||
character(len=*), intent(in) | varname, | ||
character(len=*), intent(in) | axistype, | ||
real(rp), intent(in) | timeintv, | ||
integer, intent(in), optional | timetarg, | ||
logical, intent(in), optional | nohalo | ||
) |
Write 4D data to file.
[in] | fid | file ID |
[in] | vid | netCDF variable ID |
[in] | var | value of the variable |
[in] | varname | name of the variable |
[in] | axistype | axis type (Z/X/Y/Time) |
[in] | timeintv | time interval [sec] |
[in] | timetarg | target timestep (optional) |
[in] | nohalo | include halo data? |
Definition at line 2722 of file scale_fileio.F90.
References scale_grid_index::ia, scale_grid_index::ie, scale_grid_index::ieb, scale_grid_index::imaxb, scale_grid_index::is, scale_grid_index::isb, scale_grid_index::ja, scale_grid_index::je, scale_grid_index::jeb, scale_grid_index::jmaxb, scale_grid_index::js, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::kmax, scale_grid_index::ks, scale_process::prc_mpistop(), scale_prof::prof_rapend(), scale_prof::prof_rapstart(), and gtool_file::rmiss.