Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | filename | |||
type(verticalData), | intent(inout) | :: | vertical_data | |||
integer, | intent(out), | optional | :: | rc |
subroutine get_file_levels(filename,vertical_data,rc) character(len=*), intent(in) :: filename type(VerticalData), intent(inout) :: vertical_data integer, intent(out), optional :: rc integer :: status type(NetCDF4_fileFormatter) :: formatter type(FileMetadata) :: basic_metadata type(FileMetadataUtils) :: metadata character(len=:), allocatable :: lev_name character(len=ESMF_MAXSTR) :: long_name character(len=ESMF_MAXSTR) :: standard_name character(len=ESMF_MAXSTR) :: vcoord character(len=ESMF_MAXSTR) :: lev_units real, allocatable, target :: levs(:) real, pointer :: plevs(:) call formatter%open(trim(filename),pFIO_Read,_RC) basic_metadata=formatter%read(_RC) call metadata%create(basic_metadata,trim(filename)) lev_name = metadata%get_level_name(_RC) if (lev_name /= '') then call metadata%get_coordinate_info(lev_name,coords=levs,coordUnits=lev_units,long_name=long_name,& standard_name=standard_name,coordinate_attr=vcoord,_RC) plevs => levs vertical_data = VerticalData(levels=plevs,vunit=lev_units,vcoord=vcoord,standard_name=standard_name,long_name=long_name, & force_no_regrid=.true.,_RC) nullify(plevs) end if if (present(rc)) then rc=_SUCCESS end if end subroutine get_file_levels