[Dart-dev] DART/branches Revision: 12444
dart at ucar.edu
dart at ucar.edu
Wed Mar 14 11:18:15 MDT 2018
nancy at ucar.edu
2018-03-14 11:18:14 -0600 (Wed, 14 Mar 2018)
198
fix the perturb routines in mpas_atm and wrf.
add tests to fail out if a netcdf variable has
scale or offset attributes so we don't return bad data.
remove commented out code from assim_tools_mod.
Modified: DART/branches/rma_netcdf_utils/assimilation_code/modules/assimilation/assim_tools_mod.f90
===================================================================
--- DART/branches/rma_netcdf_utils/assimilation_code/modules/assimilation/assim_tools_mod.f90 2018-03-12 22:42:44 UTC (rev 12443)
+++ DART/branches/rma_netcdf_utils/assimilation_code/modules/assimilation/assim_tools_mod.f90 2018-03-14 17:18:14 UTC (rev 12444)
@@ -730,15 +730,6 @@
scalar2=vertvalue_obs_in_localization_coord, scalar3=whichvert_real)
endif
- !>@todo FIXME it should be ok to remove this, right?
- !> i'm the owner - i should not have to set anything here because
- !> this obs was already converted
- !if (is_doing_vertical_conversion) then
- ! ! use converted vertical coordinate from owner
- ! call set_vertical(base_obs_loc, query_location(my_obs_loc(owners_index), 'VLOC'), &
- ! int(query_location(my_obs_loc(owners_index), 'WHICH_VERT')))
- !endif
-
! Next block is done by processes that do NOT own this observation
!-----------------------------------------------------------------------
else
Modified: DART/branches/rma_netcdf_utils/assimilation_code/modules/utilities/netcdf_utilities_mod.f90
===================================================================
--- DART/branches/rma_netcdf_utils/assimilation_code/modules/utilities/netcdf_utilities_mod.f90 2018-03-12 22:42:44 UTC (rev 12443)
+++ DART/branches/rma_netcdf_utils/assimilation_code/modules/utilities/netcdf_utilities_mod.f90 2018-03-14 17:18:14 UTC (rev 12444)
@@ -23,7 +23,7 @@
!> intentionally, for array entries.
-use types_mod, only : r4, r8, digits12, i4, i8, PI, MISSING_R8, MISSING_I
+use types_mod, only : r4, r8, digits12, i2, i4, i8, PI, MISSING_R8, MISSING_I
use utilities_mod, only : error_handler, E_DBG, E_MSG, E_ALLMSG, E_WARN, E_ERR
use netcdf
@@ -44,6 +44,7 @@
nc_define_real_scalar, &
nc_define_double_scalar, &
nc_global_attribute_exists, &
+ nc_variable_attribute_exists, &
nc_dimension_exists, &
nc_variable_exists, &
nc_put_variable, &
@@ -117,12 +118,15 @@
end interface
interface nc_get_variable
+ module procedure nc_get_short_1d
module procedure nc_get_single_int_1d
module procedure nc_get_int_1d
module procedure nc_get_single_real_1d
module procedure nc_get_real_1d
+ module procedure nc_get_short_2d
module procedure nc_get_int_2d
module procedure nc_get_real_2d
+ module procedure nc_get_short_3d
module procedure nc_get_int_3d
module procedure nc_get_real_3d
end interface
@@ -150,7 +154,7 @@
!> operations on the same task. which i believe is true for all
!> our current code.
-integer, parameter :: MAX_NCFILES = 10
+integer, parameter :: MAX_NCFILES = 20
integer, parameter :: FH_EMPTY = -1
type ncinfo_type
@@ -642,8 +646,6 @@
ret = nf90_def_var(ncid, varname, nf90_int, dimid, varid)
call nc_check(ret, routine, 'define integer variable '//trim(varname), context, filename, ncid)
-print *, trim(varname), varid, trim(dimname), dimid, ret
-
end subroutine nc_define_var_int_1d
!--------------------------------------------------------------------
@@ -878,6 +880,27 @@
!--------------------------------------------------------------------
+function nc_variable_attribute_exists(ncid, varname, attname)
+
+integer, intent(in) :: ncid
+character(len=*), intent(in) :: varname
+character(len=*), intent(in) :: attname
+logical :: nc_variable_attribute_exists
+
+character(len=*), parameter :: routine = 'nc_variable_attribute_exists'
+integer :: varid, ret
+
+ret = nf90_inq_varid(ncid, varname, varid)
+nc_variable_attribute_exists = (ret == NF90_NOERR)
+if (ret /= NF90_NOERR) return
+
+ret = nf90_inquire_attribute(ncid, varid, attname)
+nc_variable_attribute_exists = (ret == NF90_NOERR)
+
+end function nc_variable_attribute_exists
+
+!--------------------------------------------------------------------
+
More information about the Dart-dev
mailing list