[Dart-dev] DART/branches Revision: 12399
dart at ucar.edu
dart at ucar.edu
Thu Feb 8 16:59:06 MST 2018
thoar at ucar.edu
2018-02-08 16:59:06 -0700 (Thu, 08 Feb 2018)
83
Reads and identifies the bad values ... just needs to update the netCDF file now.
Modified: DART/branches/cesm_clm/assimilation_code/programs/forcing_check/forcing_check.f90
===================================================================
--- DART/branches/cesm_clm/assimilation_code/programs/forcing_check/forcing_check.f90 2018-02-08 19:26:21 UTC (rev 12398)
+++ DART/branches/cesm_clm/assimilation_code/programs/forcing_check/forcing_check.f90 2018-02-08 23:59:06 UTC (rev 12399)
@@ -8,7 +8,7 @@
! program to take a netCDF file ...
-use types_mod, only : r4, r8
+use types_mod, only : r4, MISSING_I, MISSING_R4
use utilities_mod, only : register_module, error_handler, E_ERR, E_MSG, &
open_file, close_file, get_next_filename, &
find_namelist_in_file, check_namelist_read, &
@@ -32,15 +32,15 @@
! variables used to read the netcdf info
integer, parameter :: maxd = 7
-integer :: i, j, ndims, odims, ncrc, etype, nitems, nvars, xtype
-integer :: ncinid1
-integer :: invarid1
-integer :: dimid(maxd), dimlen(maxd), odimid(maxd), odimlen(maxd)
-character(128) :: dimname(maxd), odimname(maxd)
+integer :: i, j, ndims, ncrc, etype, nitems, nvars, xtype
+integer :: ncid, varID
+logical :: has_FillValue
+integer :: dimid(maxd), dimlen(maxd)
+character(NF90_MAX_NAME) :: dimname(maxd)
integer :: nin1Dimensions, nin1Variables, nin1Attributes, in1unlimitedDimID
! arrays for all possible dimensions, real and int
-real(r4) :: r4missing
+real(r4) :: r4FillValue
real(r4) :: zerod1
real(r4), allocatable :: oned1(:)
real(r4), allocatable :: twod1(:,:)
@@ -50,7 +50,7 @@
real(r4), allocatable :: sixd1(:,:,:,:,:,:)
real(r4), allocatable :: sevend1(:,:,:,:,:,:,:)
-integer :: imissing
+integer :: iFillValue
integer :: izerod1
integer, allocatable :: ioned1(:)
integer, allocatable :: itwod1(:,:)
@@ -63,11 +63,11 @@
logical, save :: module_initialized = .false.
! arg parsing code
-character(len=256) :: argline
+character(len=1024) :: argline
integer :: argcount = 1
-character(len=NF90_MAX_NAME) :: argwords(3)
+character(len=256) :: argwords(3)
-character(len=NF90_MAX_NAME) :: infile1
+character(len=256) :: infile1
character(len=NF90_MAX_NAME) :: nextfield
logical :: from_file
@@ -157,10 +157,10 @@
endif
! open the files
-ncrc = nf90_open(infile1, NF90_NOWRITE, ncinid1)
+ncrc = nf90_open(infile1, NF90_NOWRITE, ncid)
call nc_check(ncrc, routine, 'nf90_open', infile1)
-ncrc = nf90_inquire(ncinid1, nin1Dimensions, nin1Variables, &
+ncrc = nf90_inquire(ncid, nin1Dimensions, nin1Variables, &
nin1Attributes, in1unlimitedDimID)
call nc_check(ncrc, routine, 'nf90_inquire', infile1)
@@ -184,7 +184,7 @@
! get the variable name of interest
if (do_all_numeric_fields) then
- ncrc = nf90_inquire_variable(ncinid1, i, nextfield)
+ ncrc = nf90_inquire_variable(ncid, i, nextfield)
call nc_check(ncrc, routine, 'nf90_inquire_variable', nextfield, infile1)
else
if (from_file) then
@@ -196,7 +196,7 @@
endif
! check if variable exists, get the ID
- ncrc = nf90_inq_varid(ncinid1, nextfield, invarid1)
+ ncrc = nf90_inq_varid(ncid, nextfield, varID)
if (ncrc /= NF90_NOERR) then
string2 = ' not found in input file "'//trim(infile1)//'"'
if (etype == E_ERR) then
@@ -208,7 +208,7 @@
cycle fieldloop
endif
- ncrc = nf90_inquire_variable(ncinid1, invarid1, xtype=xtype)
+ ncrc = nf90_inquire_variable(ncid, varID, xtype=xtype)
call nc_check(ncrc, routine, 'inquire for xtype', nextfield, infile1)
if (xtype /= NF90_INT .and. xtype /= NF90_FLOAT .and. xtype /= NF90_DOUBLE) then
@@ -220,13 +220,13 @@
endif
More information about the Dart-dev
mailing list