[Dart-dev] DART/branches Revision: 12641
dart at ucar.edu
dart at ucar.edu
Thu Jun 7 09:36:36 MDT 2018
thoar at ucar.edu
2018-06-07 09:36:36 -0600 (Thu, 07 Jun 2018)
47
Works with the netcdf_utilities_mod.f90 r12614
Modified: DART/branches/coamps/models/coamps_nest/coamps_util_mod.f90
===================================================================
--- DART/branches/coamps/models/coamps_nest/coamps_util_mod.f90 2018-06-06 22:35:50 UTC (rev 12640)
+++ DART/branches/coamps/models/coamps_nest/coamps_util_mod.f90 2018-06-07 15:36:36 UTC (rev 12641)
@@ -26,7 +26,8 @@
register_module
use netcdf_utilities_mod, only : nc_check, &
- nc_get_variable_info, &
+ nc_get_variable_num_dimensions, &
+ nc_get_variable_size, &
nc_get_variable, &
nc_put_variable
@@ -514,8 +515,8 @@
real(r8), allocatable :: chunk2D(:,:)
real(r8), allocatable :: chunk3D(:,:,:)
- call nc_get_variable_info(hdf5_unit, variable_name, xtype=xtype, ndims=ndims,&
- dimlens=dimlens, dimnames=dimnames, nAtts=nAtts, context=routine)
+ call nc_get_variable_num_dimensions(hdf5_unit, variable_name, ndims, context=routine)
+ call nc_get_variable_size(hdf5_unit, variable_name, dimlens(1:ndims), context=routine)
if ( ndims == 1) then
@@ -571,10 +572,8 @@
real(r8), allocatable :: chunk2D(:,:)
real(r8), allocatable :: chunk3D(:,:,:)
-call nc_get_variable_info(ncFileID, forecast_name, &
- ndims=ndims, &
- dimlens=dimlens, &
- context=routine )
+call nc_get_variable_num_dimensions(ncFileID, forecast_name, ndims, context=routine)
+call nc_get_variable_size(ncFileID, forecast_name, dimlens(1:ndims), context=routine)
!>@todo ... must clamp if needed ... coamps_statevar_mod:is_nonnegative works
!> on type(state_variable) ... which we don't have here.
@@ -583,7 +582,6 @@
allocate( chunk1D(dimlens(1)) )
call nc_get_variable(ncFileID, forecast_name, chunk1D, context=routine)
-! call nc_put_variable(hdf5unit, analysis_name, chunk1D, context=routine)
call write_hdf5_data(real(chunk1D, kind=4), analysis_name, hdf5_file_write, ierr)
if (ierr /= 0) then
@@ -597,7 +595,6 @@
allocate( chunk2D( dimlens(1), dimlens(2) ) )
call nc_get_variable(ncFileID, forecast_name, chunk2D, context=routine)
-! call nc_put_variable(hdf5unit, analysis_name, chunk2D, context=routine)
call write_hdf5_data(real(chunk2D, kind=4), analysis_name, hdf5_file_write, ierr)
if (ierr /= 0) then
More information about the Dart-dev
mailing list