define a dimension to the netCDF file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_ncfile), | intent(inout) | :: | sf |
self |
||
| character(len=*), | intent(in) | :: | dimname_in |
name of the dimension |
||
| integer, | intent(in) | :: | dimlen |
length of the dimension |
||
| integer, | intent(out) | :: | dimid |
id of the dimension |
SUBROUTINE ncfile_def_dim(sf,dimname_in,dimlen,dimid) ! MODULES IMPLICIT NONE !------------------------------------------------------------------------------------------------------------------------------- ! INPUT VARIABLES CHARACTER(LEN=*),INTENT(IN) :: dimname_in !! name of the dimension INTEGER,INTENT(IN) :: dimlen !! length of the dimension !------------------------------------------------------------------------------------------------------------------------------- ! OUTPUT VARIABLES CLASS(t_ncfile),INTENT(INOUT):: sf !! self INTEGER,INTENT(OUT) :: dimid !! id of the dimension !=============================================================================================================================== CALL mpi_check_single_access() #if NETCDF sf%ioError = nf90_def_dim(sf%nc_id, dimname_in, dimlen, dimid) CALL sf%handle_error("define dimension '"//TRIM(dimname_in)//"'") #endif /*NETCDF*/ END SUBROUTINE ncfile_def_dim