diff --git a/src/soca/CMakeLists.txt b/src/soca/CMakeLists.txt index 65a6cd592..465873077 100644 --- a/src/soca/CMakeLists.txt +++ b/src/soca/CMakeLists.txt @@ -54,7 +54,6 @@ add_subdirectory(Fields) add_subdirectory(Geometry) add_subdirectory(GeometryIterator) add_subdirectory(Increment) -add_subdirectory(Interpolator) add_subdirectory(LinearVariableChange) add_subdirectory(Model) add_subdirectory(ModelBias) diff --git a/src/soca/Covariance/soca_covariance_mod.F90 b/src/soca/Covariance/soca_covariance_mod.F90 index 036b195cc..76cbd0d9a 100644 --- a/src/soca/Covariance/soca_covariance_mod.F90 +++ b/src/soca/Covariance/soca_covariance_mod.F90 @@ -280,7 +280,7 @@ subroutine soca_bump_correlation(self, horiz_convol, geom, f_conf_bump, f_conf_d ! Add area afield = geom%functionspaceInchalo%create_field(name='area', kind=atlas_real(kind_real), levels=1) call afield%data(real_ptr) - area = pack(geom%cell_area,.true.) + area = pack(geom%cell_area,geom%valid_halo_mask) real_ptr(1,:) = area call afieldset%add(afield) call afield%final() @@ -295,7 +295,7 @@ subroutine soca_bump_correlation(self, horiz_convol, geom, f_conf_bump, f_conf_d ! Add geographical mask afield = geom%functionspaceInchalo%create_field(name='gmask', kind=atlas_integer(kind(0)), levels=1) call afield%data(int_ptr) - int_ptr(1,:) = int(pack(geom%mask2d,.true.)) + int_ptr(1,:) = int(pack(geom%mask2d,geom%valid_halo_mask)) call afieldset%add(afield) call afield%final() @@ -304,7 +304,7 @@ subroutine soca_bump_correlation(self, horiz_convol, geom, f_conf_bump, f_conf_d hmask = 0 hmask(geom%isc:geom%iec, geom%jsc:geom%jec) = 1 call afield%data(int_ptr) - int_ptr(1,:) = pack(hmask, .true.) + int_ptr(1,:) = pack(hmask, geom%valid_halo_mask) call afieldset%add(afield) call afield%final() @@ -331,7 +331,7 @@ subroutine soca_bump_correlation(self, horiz_convol, geom, f_conf_bump, f_conf_d afield = geom%functionspaceInchalo%create_field('var',kind=atlas_real(kind_real),levels=1) call rh%add(afield) call afield%data(real_ptr) - real_ptr(1,:) = r_base + r_mult*pack(geom%rossby_radius, .true.) + real_ptr(1,:) = r_base + r_mult*pack(geom%rossby_radius, geom%valid_halo_mask) ! min based on grid size if (r_min_grid .gt. 0.0) then real_ptr(1,:) = max(real_ptr(1,:), sqrt(area)*r_min_grid ) diff --git a/src/soca/Fields/soca_fields_mod.F90 b/src/soca/Fields/soca_fields_mod.F90 index 54fde11e0..98f8e42f0 100644 --- a/src/soca/Fields/soca_fields_mod.F90 +++ b/src/soca/Fields/soca_fields_mod.F90 @@ -1507,13 +1507,11 @@ end function soca_genfilename ! ------------------------------------------------------------------------------ !> Get the fields listed in vars, used by the interpolation. !! -!! The fields that are returned 1) have halos and 2) have had the masked points -!! removed if masked==true. -subroutine soca_fields_to_fieldset(self, vars, afieldset, masked) +!! The fields that are returned have halos (minus the invalid and duplicate halo points) +subroutine soca_fields_to_fieldset(self, vars, afieldset) class(soca_fields), intent(in) :: self type(oops_variables), intent(in) :: vars type(atlas_fieldset), intent(inout) :: afieldset - logical, intent(in) :: masked type(atlas_field) :: afield integer :: v, z @@ -1528,21 +1526,6 @@ subroutine soca_fields_to_fieldset(self, vars, afieldset, masked) ! make sure halos are updated (remove? is redundant?) call field%update_halo(self%geom) - ! which mask to use - nullify(mask) - if (masked .and. field%metadata%masked) then - select case(field%metadata%grid) - case ('h') - mask => self%geom%mask2d - case ('u') - mask => self%geom%mask2du - case ('v') - mask => self%geom%mask2dv - case default - call abor1_ftn('incorrect grid type in soca_fields_to_fieldset()') - end select - end if - ! get/create field if (afieldset%has_field(vars%variable(v))) then afield = afieldset%field(vars%variable(v)) @@ -1551,17 +1534,16 @@ subroutine soca_fields_to_fieldset(self, vars, afieldset, masked) name=vars%variable(v), kind=atlas_real(kind_real), levels=field%nz) meta = afield%metadata() call meta%set('interp_type', 'default') + if (field%metadata%masked) then + call meta%set('interp_source_point_mask', 'interp_mask') + end if call afieldset%add(afield) end if ! create and fill field call afield%data(real_ptr) do z=1,field%nz - if (associated(mask)) then - real_ptr(z,:) = pack(field%val(:,:, z), mask=mask/=0) - else - real_ptr(z,:) = pack(field%val(:,:, z), mask=.true.) - end if + real_ptr(z,:) = pack(field%val(:,:, z), mask=self%geom%valid_halo_mask) end do call afield%final() @@ -1571,19 +1553,16 @@ subroutine soca_fields_to_fieldset(self, vars, afieldset, masked) ! ------------------------------------------------------------------------------ !> Adjoint of get fields used by the interpolation. !! -!! The fields that are input 1) have halos and 2) have had the masked points -!! removed. -subroutine soca_fields_to_fieldset_ad(self, vars, afieldset, masked) +!! The fields that are input ahave have halos (minus the invalid and duplicate halo points) +subroutine soca_fields_to_fieldset_ad(self, vars, afieldset) class(soca_fields), intent(in) :: self type(oops_variables), intent(in) :: vars type(atlas_fieldset), intent(in) :: afieldset - logical, intent(in) :: masked integer :: v, z integer :: is, ie, js, je type(soca_field), pointer :: field type(atlas_field) :: afield - real(kind=kind_real), pointer :: mask(:,:) => null() !< field mask real(kind=kind_real), pointer :: real_ptr(:,:) real(kind=kind_real), pointer :: tmp(:,:) @@ -1597,29 +1576,10 @@ subroutine soca_fields_to_fieldset_ad(self, vars, afieldset, masked) call self%get(vars%variable(v), field) afield = afieldset%field(vars%variable(v)) - ! which mask to use - nullify(mask) - if (masked .and. field%metadata%masked) then - select case(field%metadata%grid) - case ('h') - mask => self%geom%mask2d - case ('u') - mask => self%geom%mask2du - case ('v') - mask => self%geom%mask2dv - case default - call abor1_ftn('incorrect grid type in soca_fields_to_fieldset_ad()') - end select - end if - tmp = 0.0 call afield%data(real_ptr) do z=1,field%nz - if (associated(mask)) then - tmp = unpack(real_ptr(z,:), mask/=0, tmp) - else - tmp = reshape(real_ptr(z,:), shape(tmp)) - end if + tmp = unpack(real_ptr(z,:), self%geom%valid_halo_mask, 0.0_kind_real) call mpp_update_domains_ad(tmp, self%geom%Domain%mpp_domain, complete=.true.) field%val(:,:,z) = field%val(:,:,z) + tmp end do @@ -1631,25 +1591,18 @@ subroutine soca_fields_to_fieldset_ad(self, vars, afieldset, masked) ! ------------------------------------------------------------------------------ !> Set the our values from an atlas fieldset -subroutine soca_fields_from_fieldset(self, vars, afieldset, masked) +subroutine soca_fields_from_fieldset(self, vars, afieldset) class(soca_fields), target, intent(inout) :: self type(oops_variables), intent(in) :: vars type(atlas_fieldset), intent(in) :: afieldset - logical, intent(in) :: masked - integer :: jvar, i, jz, ngrid(2) + integer :: jvar, i, jz real(kind=kind_real), pointer :: real_ptr(:,:) logical :: var_found character(len=1024) :: fieldname type(soca_field), pointer :: field type(atlas_field) :: afield - if (masked) then - call abor1_ftn('soca_fields_from_fieldset() does not support masked=true') - end if - - ngrid = (/self%geom%ied-self%geom%isd+1, self%geom%jed-self%geom%jsd+1/) - ! Initialization call self%zeros() @@ -1664,7 +1617,8 @@ subroutine soca_fields_from_fieldset(self, vars, afieldset, masked) ! Copy data call afield%data(real_ptr) do jz=1,field%nz - field%val(:,:,jz) = reshape(real_ptr(jz,:), ngrid) + ! NOTE, any missing values from unpacking are filled with 0.0 + field%val(:,:,jz) = unpack(real_ptr(jz,:), self%geom%valid_halo_mask, 0.0_kind_real) end do ! Release pointer diff --git a/src/soca/Geometry/Geometry.cc b/src/soca/Geometry/Geometry.cc index c2cc3235e..338598219 100644 --- a/src/soca/Geometry/Geometry.cc +++ b/src/soca/Geometry/Geometry.cc @@ -47,46 +47,6 @@ namespace soca { soca_geo_gridgen_f90(keyGeom_); return; } - - // create kdtrees - int kdidx = 0; - for (auto grid : grids) { - std::vector lats; - std::vector lons; - size_t npoints; - std::vector indx; - - // kd tree with all grid points - this->latlon(lats, lons, true, grid, false); - npoints = lats.size(); - indx.resize(npoints); - for (size_t jj = 0; jj < npoints; ++jj) indx[jj] = jj; - localTree_[kdidx++].build(lons, lats, indx); - - // kd tree with only masked points - // NOTE: the index from the tree still refers to grid index - // for fields with ALL gridpoints. - std::vector lats_masked; - std::vector lons_masked; - this->latlon(lats_masked, lons_masked, true, grid, true); - std::vector mask; - this->mask(mask, true, grid); - size_t npoints_masked = lats_masked.size(); - if (npoints_masked > 0) { - // only create the tree if there are valid ocean points - indx.resize(npoints_masked); - size_t idx = 0; - for (size_t jj = 0; jj < npoints; ++jj) { - if (mask[jj] == 0.0) continue; // land, skip - ASSERT(idx < npoints_masked); - indx[idx++] = jj; - } - ASSERT(idx == npoints_masked); - localTree_[kdidx++].build(lons_masked, lats_masked, indx); - } else { - kdidx++; - } - } } // ----------------------------------------------------------------------------- Geometry::Geometry(const Geometry & other) @@ -150,67 +110,14 @@ namespace soca { // ----------------------------------------------------------------------------- void Geometry::latlon(std::vector & lats, std::vector & lons, const bool halo) const { - // Assume that we can get by with just using the unmasked H grid here (i.e. - // ignore the different staggered grids) - // (This method should only be called by code in OOPS used for determining the - // PE that owns a specific point.... so it doesn't have to be exact) - latlon(lats, lons, halo, 'h', false); - } - // ----------------------------------------------------------------------------- - void Geometry::latlon( - std::vector & lats, std::vector & lons, const bool halo, - const char grid, const bool masked) const { // get the number of gridpoints int gridSize; - soca_geo_gridsize_f90(keyGeom_, grid, masked, halo, gridSize); + soca_geo_gridsize_f90(keyGeom_, halo, gridSize); // get the lat/lon of those gridpoints lats.resize(gridSize); lons.resize(gridSize); - soca_geo_gridlatlon_f90(keyGeom_, grid, masked, halo, gridSize, - lats.data(), lons.data()); - } - // ----------------------------------------------------------------------------- - void Geometry::mask( - std::vector & mask, const bool halo, const char grid) const { - // get the number of gridpoints - int gridSize; - soca_geo_gridsize_f90(keyGeom_, grid, false, halo, gridSize); - mask.resize(gridSize); - - // get the mask value of those gridpoints - soca_geo_gridmask_f90(keyGeom_, grid, halo, gridSize, mask.data()); - } - - // ----------------------------------------------------------------------------- - atlas::util::KDTree::ValueList Geometry::closestPoints( - const double lat, const double lon, const int npoints, - const char grid, const bool masked) const { - - // determine which kdtree to use - // TODO(travis) make sure not -1 - int kdidx = -1; - for (int j=0; j < grids.size(); j++) { - if (grids[j] == grid) kdidx = j*2; - } - ASSERT(kdidx >= 0); - if (masked) kdidx += 1; - ASSERT(kdidx < 6); - - atlas::PointLonLat obsloc(lon, lat); - obsloc.normalise(); - atlas::util::KDTree::ValueList neighbours = - localTree_[kdidx].closestPoints(obsloc, npoints); - - return neighbours; - } - // ----------------------------------------------------------------------------- - // Get the properties of the grid for a given variable (masked and u/v/h grid) - void Geometry::getVarGrid(const std::string &var, char & grid, bool & masked) const { - oops::Variables vars; - vars.push_back(var); - - soca_geo_getvargrid_f90(keyGeom_, vars, grid, masked); + soca_geo_gridlatlon_f90(keyGeom_, halo, gridSize, lats.data(), lons.data()); } } // namespace soca diff --git a/src/soca/Geometry/Geometry.h b/src/soca/Geometry/Geometry.h index 3f66c0dca..ba4c426a1 100644 --- a/src/soca/Geometry/Geometry.h +++ b/src/soca/Geometry/Geometry.h @@ -75,13 +75,6 @@ namespace soca { atlas::FieldSet & extraFields() {return extraFields_;} void latlon(std::vector &, std::vector &, const bool) const; - void latlon(std::vector &, std::vector &, const bool, - const char, const bool) const; - atlas::util::KDTree::ValueList closestPoints( - const double, const double, const int, - const char, const bool) const; - - void getVarGrid(const std::string &, char &, bool &) const; private: void mask(std::vector &, const bool, const char) const; @@ -94,8 +87,6 @@ namespace soca { atlas::FunctionSpace functionSpace_; atlas::FunctionSpace functionSpaceIncHalo_; atlas::FieldSet extraFields_; - - atlas::util::IndexKDTree localTree_[6]; }; // ----------------------------------------------------------------------------- diff --git a/src/soca/Geometry/GeometryFortran.h b/src/soca/Geometry/GeometryFortran.h index 54b0deda6..77b465a81 100644 --- a/src/soca/Geometry/GeometryFortran.h +++ b/src/soca/Geometry/GeometryFortran.h @@ -49,14 +49,8 @@ namespace soca { const size_t &, size_t[]); void soca_geo_iterator_dimension_f90(const F90geom &, int &); - void soca_geo_gridsize_f90(const F90geom &, const char &, const bool &, - const bool &, int &); - void soca_geo_gridlatlon_f90(const F90geom &, const char &, const bool &, - const bool &, const int &, double[], double[]); - void soca_geo_gridmask_f90(const F90geom&, const char &, const bool &, - const int &, double[]); - void soca_geo_getvargrid_f90( - const F90geom &, const oops::Variables &, char &, bool &); + void soca_geo_gridsize_f90(const F90geom &, const bool &, int &); + void soca_geo_gridlatlon_f90(const F90geom &, const bool &, const int &, double[], double[]); } } // namespace soca #endif // SOCA_GEOMETRY_GEOMETRYFORTRAN_H_ diff --git a/src/soca/Geometry/soca_geom.interface.F90 b/src/soca/Geometry/soca_geom.interface.F90 index bc689a6d6..7f440037d 100644 --- a/src/soca/Geometry/soca_geom.interface.F90 +++ b/src/soca/Geometry/soca_geom.interface.F90 @@ -216,180 +216,55 @@ end subroutine soca_geo_get_num_levels_c ! ------------------------------------------------------------------------------ !> Get the number of points valid in the local grid (skipping masked points) -subroutine soca_geo_gridsize_c(c_key_self, c_grid, c_masked, c_halo, c_size) & +subroutine soca_geo_gridsize_c(c_key_self, c_halo, c_size) & bind(c, name='soca_geo_gridsize_f90') integer(c_int), intent(in) :: c_key_self - character(c_char), intent(in) :: c_grid !< u/v/h for the corresponding grid - logical(c_bool), intent(in) :: c_masked !< true if using a masked grid logical(c_bool), intent(in) :: c_halo !< true if halo should be included in number of points integer(c_int), intent(out):: c_size !< the resulting number of gridpoints type(soca_geom), pointer :: self - real(kind=kind_real), pointer :: mask(:,:) => null() !< field mask - real(kind=kind_real), pointer :: lon(:,:) => null() !< field lon - real(kind=kind_real), pointer :: lat(:,:) => null() !< field lat - integer :: is, ie, js, je call soca_geom_registry%get(c_key_self, self) - - ! get the correct grid and mask - select case(c_grid) - case ('h') - lon => self%lon - lat => self%lat - mask => self%mask2d - case ('u') - lon => self%lonu - lat => self%latu - mask => self%mask2du - case ('v') - lon => self%lonv - lat => self%latv - mask => self%mask2dv - case default - call abor1_ftn('error in soca_geo_gridsize_c. grid: '//c_grid) - end select - - ! get the starting/ending index based on whether we need the halo if (c_halo) then - is = self%isd; ie = self%ied - js = self%jsd; je = self%jed - else - is = self%isc; ie = self%iec - js = self%jsc; je = self%jec - end if - - ! count number of point depending on whether masked - if (c_masked) then - c_size = count(mask(is:ie, js:je) /= 0) + c_size = self%ngrid_halo_valid else - c_size = (ie - is + 1) * (je - js + 1) + c_size = self%ngrid end if end subroutine soca_geo_gridsize_c ! ------------------------------------------------------------------------------ -!> return the mask for the given grid. 0.0 represents masked out points -subroutine soca_geo_gridmask_c(c_key_self, c_grid, c_halo, c_size, c_mask) & - bind(c, name='soca_geo_gridmask_f90') - - integer(c_int), intent(in) :: c_key_self - character(c_char), intent(in) :: c_grid - logical(c_bool), intent(in) :: c_halo - integer(c_int), intent(in) :: c_size - real(c_double), intent(inout) :: c_mask(c_size) - - type(soca_geom), pointer :: self - real(kind=kind_real), pointer :: mask(:,:) => null() !< field mask - integer :: is, ie, js, je, idx, i, j - - call soca_geom_registry%get(c_key_self, self) - - ! get the correct grid and mask - select case(c_grid) - case ('h') - mask => self%mask2d - case ('u') - mask => self%mask2du - case ('v') - mask => self%mask2dv - case default - call abor1_ftn('error in soca_geo_gridlatlon_c. grid: '//c_grid) - end select - - ! get the starting/ending index based on whether we need the halo - if (c_halo) then - is = self%isd; ie = self%ied - js = self%jsd; je = self%jed - else - is = self%isc; ie = self%iec - js = self%jsc; je = self%jec - end if - - c_mask(:) = pack(mask(is:ie,js:je), mask=.true.) -end subroutine - -! ------------------------------------------------------------------------------ -!> Get the lat/lons for a specific grid (u/v/h) -subroutine soca_geo_gridlatlon_c(c_key_self, c_grid, c_masked, c_halo, c_size, & +!> Get the lat/lons for the h grid +!> If c_halo is true, then only the "valid" halo points are used +!> (i.e. duplicate halo points and invalid halo points are skipped) +subroutine soca_geo_gridlatlon_c(c_key_self, c_halo, c_size, & c_lat, c_lon) bind(c, name='soca_geo_gridlatlon_f90') integer(c_int), intent(in) :: c_key_self - character(c_char), intent(in) :: c_grid - logical(c_bool), intent(in) :: c_masked, c_halo + logical(c_bool), intent(in) :: c_halo integer(c_int), intent(in) :: c_size real(c_double), intent(inout) :: c_lat(c_size), c_lon(c_size) type(soca_geom), pointer :: self - real(kind=kind_real), pointer :: mask(:,:) => null() !< field mask real(kind=kind_real), pointer :: lon(:,:) => null() !< field lon real(kind=kind_real), pointer :: lat(:,:) => null() !< field lat - integer :: is, ie, js, je, idx, i, j call soca_geom_registry%get(c_key_self, self) - - ! get the correct grid and mask - select case(c_grid) - case ('h') - lon => self%lon - lat => self%lat - mask => self%mask2d - case ('u') - lon => self%lonu - lat => self%latu - mask => self%mask2du - case ('v') - lon => self%lonv - lat => self%latv - mask => self%mask2dv - case default - call abor1_ftn('error in soca_geo_gridlatlon_c. grid: '//c_grid) - end select - - ! get the starting/ending index based on whether we need the halo + + ! TODO: re-enable the ability to get lat/lon for different grids? + ! For now just use h grid + lon => self%lon + lat => self%lat + if (c_halo) then - is = self%isd; ie = self%ied - js = self%jsd; je = self%jed + ! get all lat/lon points, except for duplicate or invalid halo points + c_lat(:) = pack(self%lat, mask=self%valid_halo_mask) + c_lon(:) = pack(self%lon, mask=self%valid_halo_mask) else - is = self%isc; ie = self%iec - js = self%jsc; je = self%jec - end if - - if (c_masked) then - c_lat(:) = pack(lat(is:ie,js:je), mask=mask(is:ie,js:je)/=0) - c_lon(:) = pack(lon(is:ie,js:je), mask=mask(is:ie,js:je)/=0) - else - c_lat(:) = pack(lat(is:ie,js:je), mask=.true.) - c_lon(:) = pack(lon(is:ie,js:je), mask=.true.) + ! get all non-halo lat/lon points + c_lat(:) = pack(self%lat(self%isc:self%iec, self%jsc:self%jec), .true.) + c_lon(:) = pack(self%lon(self%isc:self%iec, self%jsc:self%jec), .true.) end if end subroutine -! ------------------------------------------------------------------------------ -!> Get the grid (u/v/h) that a given variable belongs on -subroutine soca_geo_getvargrid_c(c_key_self, c_vars, c_grid, c_masked) & - bind(c, name="soca_geo_getvargrid_f90") -integer(c_int), intent(in) :: c_key_self -type(c_ptr), value, intent(in) :: c_vars -character(c_char), intent(inout) :: c_grid -logical(c_bool), intent(inout) :: c_masked - -type(soca_geom), pointer :: self -type(oops_variables) :: vars -type(soca_field_metadata) :: metadata -character(len=:), allocatable :: var_name - -call soca_geom_registry%get(c_key_self, self) -vars = oops_variables(c_vars) - -! TODO cleanup -if (vars%nvars() /= 1) then - call abor1_ftn('error in soca_geo_getvargrid_c. Wrong number of vars') -end if -var_name = trim(vars%variable(1)) -metadata = self%fields_metadata%get(var_name) -c_grid = metadata%grid -c_masked = metadata%masked - -end subroutine soca_geo_getvargrid_c - ! ------------------------------------------------------------------------------ end module soca_geom_mod_c diff --git a/src/soca/Geometry/soca_geom_mod.F90 b/src/soca/Geometry/soca_geom_mod.F90 index 64f037a64..db8e17c69 100644 --- a/src/soca/Geometry/soca_geom_mod.F90 +++ b/src/soca/Geometry/soca_geom_mod.F90 @@ -38,6 +38,11 @@ module soca_geom_mod ! ------------------------------------------------------------------------------ ! ------------------------------------------------------------------------------ +! A default value to indicate that the halo region has not been updated +! during a halo exchange. +! Note, it seems we had been using invalud halo points with lat/lon of 0,0 +! oops! +real(kind=kind_real), parameter :: INVALID_HALO = -999_kind_real ! ------------------------------------------------------------------------------ !> Geometry data structure @@ -75,7 +80,10 @@ module soca_geom_mod integer :: iterator_dimension !> \} - integer :: ngrid, ngrid_halo + integer :: ngrid !< number of non-halo gridpoints + integer :: ngrid_halo !< number of gridpoints, including halo + integer :: ngrid_halo_valid !< number of gridpoints, including halo, but + !! excluding duplicate or invalid halo points !> \name grid latitude/longitude !! \{ @@ -111,6 +119,7 @@ module soca_geom_mod real(kind=kind_real), allocatable, dimension(:,:) :: distance_from_coast !< distance to closest land grid point (m) real(kind=kind_real), allocatable, dimension(:,:,:) :: h !< layer thickness (m) real(kind=kind_real), allocatable, dimension(:,:,:) :: h_zstar + logical, allocatable, dimension(:,:) :: valid_halo_mask !< true unless gridpoint is a duplicate or invalid halo !> \} !> instance of the metadata that is read in from a config file upon initialization @@ -196,7 +205,7 @@ subroutine soca_geom_init(self, f_conf, f_comm) ! Read the geometry from file by default, ! skip this step if a full init is required - if ( .not. full_init) call soca_geom_read(self) + if ( .not. full_init) call soca_geom_read(self) ! Fill halo call mpp_update_domains(self%lon, self%Domain%mpp_domain) @@ -214,6 +223,9 @@ subroutine soca_geom_init(self, f_conf, f_comm) call mpp_update_domains(self%rossby_radius, self%Domain%mpp_domain) call mpp_update_domains(self%distance_from_coast, self%Domain%mpp_domain) + ! calculate which halo points are duplicates / invalid + call soca_geom_find_invalid_halo(self) + ! Set output option for local geometry if ( .not. f_conf%get("save_local_domain", self%save_local_domain) ) & self%save_local_domain = .false. @@ -255,6 +267,7 @@ subroutine soca_geom_end(self) if (allocated(self%distance_from_coast)) deallocate(self%distance_from_coast) if (allocated(self%h)) deallocate(self%h) if (allocated(self%h_zstar)) deallocate(self%h_zstar) + if (allocated(self%valid_halo_mask)) deallocate(self%valid_halo_mask) nullify(self%Domain) call self%functionspace%final() call self%functionspaceIncHalo%final() @@ -273,23 +286,18 @@ subroutine soca_geom_lonlat(self, afieldset) real(kind_real), pointer :: real_ptr(:,:) type(atlas_field) :: afield - integer:: ngrid, ngrid_halo - - ngrid = (self%iec-self%isc+1)*(self%jec-self%jsc+1) - ngrid_halo = (self%ied-self%isd+1)*(self%jed-self%jsd+1) - ! Create lon/lat field - afield = atlas_field(name="lonlat", kind=atlas_real(kind_real), shape=(/2,ngrid/)) + afield = atlas_field(name="lonlat", kind=atlas_real(kind_real), shape=(/2,self%ngrid/)) call afield%data(real_ptr) - real_ptr(1,:) = reshape(self%lon(self%isc:self%iec,self%jsc:self%jec),(/ngrid/)) - real_ptr(2,:) = reshape(self%lat(self%isc:self%iec,self%jsc:self%jec),(/ngrid/)) + real_ptr(1,:) = pack(self%lon(self%isc:self%iec,self%jsc:self%jec),.true.) + real_ptr(2,:) = pack(self%lat(self%isc:self%iec,self%jsc:self%jec),.true.) call afieldset%add(afield) call afield%final() - afield = atlas_field(name="lonlat_inc_halos", kind=atlas_real(kind_real), shape=(/2,ngrid_halo/)) + afield = atlas_field(name="lonlat_inc_halos", kind=atlas_real(kind_real), shape=(/2,self%ngrid_halo_valid/)) call afield%data(real_ptr) - real_ptr(1,:) = reshape(self%lon,(/ngrid_halo/)) - real_ptr(2,:) = reshape(self%lat,(/ngrid_halo/)) + real_ptr(1,:) = pack(self%lon, self%valid_halo_mask) + real_ptr(2,:) = pack(self%lat, self%valid_halo_mask) call afieldset%add(afield) call afield%final() @@ -315,7 +323,7 @@ subroutine soca_geom_to_fieldset(self, afieldset) ! Add area afield = self%functionspaceInchalo%create_field(name='area', kind=atlas_real(kind_real), levels=1) call afield%data(real_ptr) - real_ptr(1,:) = pack(self%cell_area, .true.) + real_ptr(1,:) = pack(self%cell_area, self%valid_halo_mask) call afieldset%add(afield) call afield%final() @@ -332,7 +340,7 @@ subroutine soca_geom_to_fieldset(self, afieldset) afield = self%functionspaceInchalo%create_field(name='gmask', kind=atlas_integer(kind(0)), levels=self%nzo) call afield%data(int_ptr) do jz=1,self%nzo - int_ptr(jz,:) = int(pack(self%mask2d, .true.)) + int_ptr(jz,:) = int(pack(self%mask2d, self%valid_halo_mask)) end do call afieldset%add(afield) call afield%final() @@ -343,10 +351,17 @@ subroutine soca_geom_to_fieldset(self, afieldset) hmask = 0 hmask(self%isc:self%iec, self%jsc:self%jec) = 1 call afield%data(int_ptr) - int_ptr(1,:) = pack(hmask, .true.) + int_ptr(1,:) = pack(hmask, self%valid_halo_mask) call afieldset%add(afield) call afield%final() + ! Add interpolation mask + afield = self%functionspaceInchalo%create_field(name='interp_mask', kind=atlas_real(kind_real), levels=1) + call afield%data(real_ptr) + real_ptr(1,:) = pack(self%mask2d, self%valid_halo_mask) + call afieldset%add(afield) + call afield%final() + end subroutine soca_geom_to_fieldset @@ -392,6 +407,7 @@ subroutine soca_geom_clone(self, other) self%rossby_radius = other%rossby_radius self%distance_from_coast = other%distance_from_coast self%h = other%h + self%valid_halo_mask = other%valid_halo_mask call self%fields_metadata%clone(other%fields_metadata) end subroutine soca_geom_clone @@ -485,12 +501,15 @@ subroutine soca_geom_allocate(self) self%ngrid_halo = (self%ied-self%isd+1) * (self%jed-self%jsd+1) ! Allocate arrays on compute domain + ! NOTE, sometimes MOM6 doesn't use all the halo points, we set + ! lat/lon to INVALID_HALO so that we can detect this later when deciding + ! which halo points are invalid/duplicates allocate(self%lonh(self%isg:self%ieg)); self%lonh = 0.0_kind_real allocate(self%lath(self%jsg:self%jeg)); self%lath = 0.0_kind_real allocate(self%lonq(self%isg:self%ieg)); self%lonq = 0.0_kind_real allocate(self%latq(self%jsg:self%jeg)); self%latq = 0.0_kind_real - allocate(self%lon(isd:ied,jsd:jed)); self%lon = 0.0_kind_real - allocate(self%lat(isd:ied,jsd:jed)); self%lat = 0.0_kind_real + allocate(self%lon(isd:ied,jsd:jed)); self%lon = INVALID_HALO + allocate(self%lat(isd:ied,jsd:jed)); self%lat = INVALID_HALO allocate(self%lonu(isd:ied,jsd:jed)); self%lonu = 0.0_kind_real allocate(self%latu(isd:ied,jsd:jed)); self%latu = 0.0_kind_real allocate(self%lonv(isd:ied,jsd:jed)); self%lonv = 0.0_kind_real @@ -508,6 +527,8 @@ subroutine soca_geom_allocate(self) allocate(self%distance_from_coast(isd:ied,jsd:jed)); self%distance_from_coast = 0.0_kind_real allocate(self%h(isd:ied,jsd:jed,1:nzo)); self%h = 0.0_kind_real + allocate(self%valid_halo_mask(isd:ied,jsd:jed));self%valid_halo_mask = .true. + end subroutine soca_geom_allocate @@ -527,7 +548,6 @@ subroutine soca_geom_distance_from_coast(self) real(kind=kind_real), allocatable :: land_lon_l(:), land_lat_l(:) real(kind=kind_real) :: closest_lon, closest_lat - ! collect lat/lon of all land points on all procs ! (use the tracer grid and mask for this) ! -------------------------------------------------- @@ -962,7 +982,7 @@ subroutine soca_geom_struct2atlas(self, dx_struct, dx_atlas) afield = self%functionspaceInchalo%create_field('var',kind=atlas_real(kind_real),levels=1) call dx_atlas%add(afield) call afield%data(real_ptr) - real_ptr(1,:) = pack(dx_struct, .true.) + real_ptr(1,:) = pack(dx_struct, self%valid_halo_mask) call afield%final() end subroutine soca_geom_struct2atlas @@ -982,12 +1002,65 @@ subroutine soca_geom_atlas2struct(self, dx_struct, dx_atlas) afield = dx_atlas%field('var') call afield%data(real_ptr) - dx_struct = reshape(real_ptr(1,:), (/(self%ied-self%isd+1),(self%jed-self%jsd+1)/)) + dx_struct = unpack(real_ptr(1,:), self%valid_halo_mask, 0.0_kind_real) call afield%final() end subroutine soca_geom_atlas2struct +! ------------------------------------------------------------------------------ +!> Examine the halo gridpoints to determine which ones are non-duplicate and valid +!! +!! The OOPS interpolation does not like duplicate points, but MOM6 does have duplicate +!! and/or unused halo points. We create a mask (self%valid_halo_mask) that is true if 1) +!! not a halo point, or 2) a halo point that is not a duplicate lat/lon already present +!! in the PE's halo or non-halo regions. Invalid halo points are also masked out +!! (i.e. the lat/lon are not updated from the initialed INVALID_HALO value when a halo +!! exchanged is performed +subroutine soca_geom_find_invalid_halo(self) + class(soca_geom), intent(inout) :: self + + integer :: i1, i2, j1, j2 + + ! iterate over all halo gridpoints + outer: do j1 = self%jsd, self%jed + do i1 = self%isd, self%ied + + ! if not halo region, skip + if (j1 >= self%jsc .and. j1 <= self%jec .and. & + i1 >= self%isc .and. i1 <= self%iec) cycle + + ! if gridpoint is still set to -999 after a halo exchange, it is an invalid point + if (self%lat(i1,j1) == INVALID_HALO) then + self%valid_halo_mask(i1,j1) = .false. + cycle + end if + + ! make sure this halo point doesn't exist anywhere else, if it does mask it out + inner: do j2 = self%jsd, self%jed + do i2 = self%isd, self%ied + ! skip if point 1 is same as point 2 + if (j1 == j2 .and. i1 == i2) cycle + ! skip if point 2 has already been masked out + if (.not. self%valid_halo_mask(i2,j2)) cycle + + ! if lat/lon are the same, mark point 1 as a duplicate, mask out + if (self%lat(i1,j1) == self%lat(i2,j2) .and. & + self%lon(i1,j1) == self%lon(i2,j2)) then + self%valid_halo_mask(i1,j1) = .false. + exit inner + end if + end do + end do inner + + end do + end do outer + + ! count the number of points + self%ngrid_halo_valid = count(self%valid_halo_mask) + +end subroutine soca_geom_find_invalid_halo + ! ------------------------------------------------------------------------------ end module soca_geom_mod diff --git a/src/soca/Increment/Increment.cc b/src/soca/Increment/Increment.cc index 335a8ce84..895cc4f1d 100755 --- a/src/soca/Increment/Increment.cc +++ b/src/soca/Increment/Increment.cc @@ -357,20 +357,20 @@ namespace soca { // ----------------------------------------------------------------------------- void Increment::toFieldSet(atlas::FieldSet &fs) const { - soca_increment_to_fieldset_f90(toFortran(), vars_, fs.get(), false); + soca_increment_to_fieldset_f90(toFortran(), vars_, fs.get()); } // ----------------------------------------------------------------------------- void Increment::toFieldSetAD(const atlas::FieldSet &fs) { if (fs.empty()) return; - soca_increment_to_fieldset_ad_f90(toFortran(), vars_, fs.get(), false); + soca_increment_to_fieldset_ad_f90(toFortran(), vars_, fs.get()); } // ----------------------------------------------------------------------------- void Increment::fromFieldSet(const atlas::FieldSet &fs) { - soca_increment_from_fieldset_f90(toFortran(), vars_, fs.get(), false); + soca_increment_from_fieldset_f90(toFortran(), vars_, fs.get()); } // ----------------------------------------------------------------------------- diff --git a/src/soca/Increment/IncrementFortran.h b/src/soca/Increment/IncrementFortran.h index a11025f16..6b09e5cce 100644 --- a/src/soca/Increment/IncrementFortran.h +++ b/src/soca/Increment/IncrementFortran.h @@ -59,16 +59,13 @@ namespace soca { const util::DateTime * const *); void soca_increment_to_fieldset_f90(const F90flds &, const oops::Variables &, - atlas::field::FieldSetImpl *, - const bool &); + atlas::field::FieldSetImpl *); void soca_increment_to_fieldset_ad_f90(const F90flds &, const oops::Variables &, - const atlas::field::FieldSetImpl *, - const bool &); + const atlas::field::FieldSetImpl *); void soca_increment_from_fieldset_f90(const F90flds &, const oops::Variables &, - const atlas::field::FieldSetImpl *, - const bool &); + const atlas::field::FieldSetImpl *); void soca_increment_gpnorm_f90(const F90flds &, const int &, double &); void soca_increment_getpoint_f90(const F90flds &, const F90iter &, double &, const int &); diff --git a/src/soca/Increment/soca_increment.interface.F90 b/src/soca/Increment/soca_increment.interface.F90 index d7c56f021..1112d7500 100644 --- a/src/soca/Increment/soca_increment.interface.F90 +++ b/src/soca/Increment/soca_increment.interface.F90 @@ -318,12 +318,11 @@ end subroutine soca_increment_change_resol_c ! ------------------------------------------------------------------------------ !> C++ interface for soca_increment_mod::soca_increment::to_atlas() -subroutine soca_increment_to_fieldset_c(c_key_self, c_vars, c_afieldset, c_masked) & +subroutine soca_increment_to_fieldset_c(c_key_self, c_vars, c_afieldset) & bind (c,name='soca_increment_to_fieldset_f90') integer(c_int), intent(in) :: c_key_self type(c_ptr), value, intent(in) :: c_vars type(c_ptr), value, intent(in) :: c_afieldset - logical(c_bool), intent(in) :: c_masked type(soca_increment), pointer :: self type(oops_variables) :: vars @@ -333,19 +332,18 @@ subroutine soca_increment_to_fieldset_c(c_key_self, c_vars, c_afieldset, c_maske vars = oops_variables(c_vars) afieldset = atlas_fieldset(c_afieldset) - call self%to_fieldset(vars, afieldset, logical(c_masked)) + call self%to_fieldset(vars, afieldset) end subroutine ! ------------------------------------------------------------------------------ !> C++ interface for soca_increment_mod::soca_increment::from_fieldset() -subroutine soca_increment_from_fieldset_c(c_key_self, c_vars, c_afieldset, c_masked) & +subroutine soca_increment_from_fieldset_c(c_key_self, c_vars, c_afieldset) & bind (c,name='soca_increment_from_fieldset_f90') integer(c_int), intent(in) :: c_key_self type(c_ptr), value, intent(in) :: c_vars type(c_ptr), value, intent(in) :: c_afieldset - logical(c_bool), intent(in) :: c_masked type(soca_increment), pointer :: self type(oops_variables) :: vars @@ -355,7 +353,7 @@ subroutine soca_increment_from_fieldset_c(c_key_self, c_vars, c_afieldset, c_mas vars = oops_variables(c_vars) afieldset = atlas_fieldset(c_afieldset) - call self%from_fieldset(vars, afieldset, logical(c_masked)) + call self%from_fieldset(vars, afieldset) end subroutine @@ -637,12 +635,11 @@ end subroutine soca_increment_vert_scales_c ! ------------------------------------------------------------------------------ !> C++ interface for Increment version of soca_field_mod::soca_field::get_fieldset_ad() -subroutine soca_increment_to_fieldset_ad_c(c_key_self, c_vars, c_fieldset, c_masked) & +subroutine soca_increment_to_fieldset_ad_c(c_key_self, c_vars, c_fieldset) & bind (c, name='soca_increment_to_fieldset_ad_f90') integer(c_int), intent(in) :: c_key_self type(c_ptr), value, intent(in) :: c_vars type(c_ptr), value, intent(in) :: c_fieldset - logical(c_bool), intent(in) :: c_masked type(soca_increment), pointer :: self type(oops_variables) :: vars @@ -652,7 +649,7 @@ subroutine soca_increment_to_fieldset_ad_c(c_key_self, c_vars, c_fieldset, c_mas vars = oops_variables(c_vars) afieldset = atlas_fieldset(c_fieldset) - call self%to_fieldset_ad(vars, afieldset, logical(c_masked)) + call self%to_fieldset_ad(vars, afieldset) end subroutine ! ------------------------------------------------------------------------------ diff --git a/src/soca/Interpolator/CMakeLists.txt b/src/soca/Interpolator/CMakeLists.txt deleted file mode 100644 index 186950550..000000000 --- a/src/soca/Interpolator/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -soca_target_sources( - LocalUnstructuredInterpolator.h - LocalUnstructuredInterpolator.cc - UnstructuredInterpolator.h -) diff --git a/src/soca/Interpolator/LocalUnstructuredInterpolator.cc b/src/soca/Interpolator/LocalUnstructuredInterpolator.cc deleted file mode 100644 index c7d126f40..000000000 --- a/src/soca/Interpolator/LocalUnstructuredInterpolator.cc +++ /dev/null @@ -1,109 +0,0 @@ -/* - * (C) Copyright 2022-2022 UCAR - * - * This software is licensed under the terms of the Apache Licence Version 2.0 - * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. - */ -#include - -#include "atlas/field.h" -#include "eckit/config/Configuration.h" -#include "oops/base/Variables.h" -#include "oops/util/Logger.h" -#include "oops/util/abor1_cpp.h" -#include "soca/Geometry/Geometry.h" -#include "soca/Interpolator/UnstructuredInterpolator.h" -#include "soca/Interpolator/LocalUnstructuredInterpolator.h" -#include "soca/Increment/Increment.h" -#include "soca/State/State.h" - - - -namespace soca { - -// ------------------------------------------------------------------------------ - -const std::vector grids{ 'h', 'u', 'v'}; - -LocalUnstructuredInterpolator:: - LocalUnstructuredInterpolator(const eckit::Configuration & config, const Geometry & geom, - const std::vector & lats_out, - const std::vector & lons_out) - : geom_(geom) { - // create interpolators (TODO, postpone to usage, or configure which interpolators - // are created, since we likely don't need them all?) - for (auto grid : grids) { - util::Timer timer("soca::LocalUnstructuredInterpolator", "getInterpolator.build"); - int interp_idx = -1; - for (int j=0; j < grids.size(); j++) { - if (grids[j] == grid) interp_idx = j*2; - } - - bool masked = false; - interp_[interp_idx] = std::make_shared( - config, geom_, grid, masked, lats_out, lons_out); - - masked = true; - interp_idx += 1; - interp_[interp_idx] = std::make_shared( - config, geom_, grid, masked, lats_out, lons_out); - } -} - -// ------------------------------------------------------------------------------ - -void LocalUnstructuredInterpolator:: -apply(const oops::Variables & vars, const atlas::FieldSet & fset, const std::vector & mask, - std::vector & locvals) const { - auto vals = locvals.begin(); - for (int i =0; i < vars.size(); i++) { - auto interpolator = getInterpolator(vars[i]); - - // get a single variable - oops::Variables var; - var.push_back(vars[i]); - - // interpolate - interpolator->apply(var, fset, mask, vals); - } -} - -// ------------------------------------------------------------------------------ - -void LocalUnstructuredInterpolator:: -applyAD(const oops::Variables & vars, atlas::FieldSet & fset, const std::vector & mask, - const std::vector & locvals) const { - auto vals = locvals.begin(); - for (int i =0; i < vars.size(); i++) { - auto interpolator = getInterpolator(vars[i]); - - // get a single variable - oops::Variables var; - var.push_back(vars[i]); - - // interpolate - interpolator->applyAD(var, fset, mask, vals); - } -} - -// ------------------------------------------------------------------------------ -const std::shared_ptr -LocalUnstructuredInterpolator::getInterpolator(const std::string &var) const { - // determine which interpolator to use - char grid; - bool masked; - geom_.getVarGrid(var, grid, masked); - int interp_idx = -1; - for (int j=0; j < grids.size(); j++) { - if (grids[j] == grid) interp_idx = j*2; - } - if (masked) interp_idx += 1; - ASSERT(interp_idx < 6); - - return interp_[interp_idx]; -} - -void LocalUnstructuredInterpolator::print(std::ostream & os) const { -} - -} // namespace soca diff --git a/src/soca/Interpolator/LocalUnstructuredInterpolator.h b/src/soca/Interpolator/LocalUnstructuredInterpolator.h deleted file mode 100644 index 31f8e2cdc..000000000 --- a/src/soca/Interpolator/LocalUnstructuredInterpolator.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * (C) Copyright 2022-2022 UCAR - * - * This software is licensed under the terms of the Apache Licence Version 2.0 - * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. - */ - -#pragma once - -#include -#include -#include -#include - -#include "oops/util/Printable.h" - -namespace atlas { - class FieldSet; -} - -namespace eckit { - class Configuration; - class LocalConfiguration; -} - -namespace oops { - class Variables; -} - -namespace soca { - class Geometry; - class Increment; - class State; - class UnstructuredInterpolator; -} - - -namespace soca { - -// ----------------------------------------------------------------------------- - -class LocalUnstructuredInterpolator : public util::Printable { - public: - LocalUnstructuredInterpolator(const eckit::Configuration &, const Geometry &, - const std::vector &, const std::vector &); - ~LocalUnstructuredInterpolator() {} - - void apply(const oops::Variables &, const atlas::FieldSet &, const std::vector &, - std::vector &) const; - void applyAD(const oops::Variables &, atlas::FieldSet &, const std::vector &, - const std::vector &) const; - - private: - const std::shared_ptr getInterpolator(const std::string &) const; - void print(std::ostream &) const; - - std::shared_ptr interp_[6]; - const Geometry & geom_; -}; - -} // namespace soca diff --git a/src/soca/Interpolator/UnstructuredInterpolator.h b/src/soca/Interpolator/UnstructuredInterpolator.h deleted file mode 100644 index 4080f0e90..000000000 --- a/src/soca/Interpolator/UnstructuredInterpolator.h +++ /dev/null @@ -1,386 +0,0 @@ -/* - * (C) Copyright 2022-2022 UCAR - * - * This software is licensed under the terms of the Apache Licence Version 2.0 - * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. - */ - -#pragma once - -#include -#include -#include -#include - -#include "soca/Geometry/Geometry.h" -#include "soca/State/State.h" -#include "soca/Increment/Increment.h" - -#include "atlas/array.h" -#include "atlas/field.h" -#include "atlas/util/Geometry.h" -#include "atlas/util/KDTree.h" -#include "atlas/util/Metadata.h" - -#include "oops/base/Variables.h" -#include "oops/util/Logger.h" -#include "oops/util/missingValues.h" -#include "oops/util/ObjectCounter.h" -#include "oops/util/Printable.h" -#include "oops/util/Timer.h" - -namespace soca { - - -// ----------------------------------------------------------------------------- - -class UnstructuredInterpolator : public util::Printable, - private util::ObjectCounter { - public: - static const std::string classname() {return "soca::UnstructuredInterpolator";} - - UnstructuredInterpolator(const eckit::Configuration &, - const Geometry &, - const char, const bool, - const std::vector &, - const std::vector &); - - void apply(const oops::Variables &, const atlas::FieldSet &, const std::vector &, - std::vector::iterator &) const; - void applyAD(const oops::Variables &, atlas::FieldSet &, const std::vector &, - std::vector::const_iterator &) const; - - private: - void apply1lev(const std::string &, const std::vector &, - const atlas::array::ArrayView &, - std::vector::iterator &) const; - void applyLevs(const std::string &, const std::vector &, - const atlas::array::ArrayView &, - std::vector::iterator &, const size_t &) const; - void apply1levAD(const std::string &, const std::vector &, - atlas::array::ArrayView &, - std::vector::const_iterator &) const; - void applyLevsAD(const std::string &, const std::vector &, - atlas::array::ArrayView &, - std::vector::const_iterator &, const size_t &) const; - void print(std::ostream &) const override; - - std::string interp_method_; - int nninterp_; - size_t nout_; - std::vector> interp_i_; - std::vector> interp_w_; -}; - -// ----------------------------------------------------------------------------- - -UnstructuredInterpolator::UnstructuredInterpolator(const eckit::Configuration & config, - const Geometry & geom, - const char grid, const bool masked, - const std::vector & lats_out, - const std::vector & lons_out) - : interp_method_(), nninterp_(0), nout_(0), interp_i_(), interp_w_() -{ - oops::Log::trace() << "UnstructuredInterpolator::UnstructuredInterpolator start" << std::endl; - util::Timer timer("soca::UnstructuredInterpolator", "UnstructuredInterpolator"); - - const atlas::Geometry earth(atlas::util::Earth::radius()); - const double close = 1.0e-10; - - // This is a new option for this class, so isn't in any YAMLs yet! - interp_method_ = config.getString("interpolation method", "barycentric"); - ASSERT(interp_method_ == "barycentric" || interp_method_ == "inverse distance"); - - // Compute weights - ASSERT(lats_out.size() == lons_out.size()); - nout_ = lats_out.size(); - nninterp_ = config.getInt("nnearest", 4); - interp_i_.resize(nout_, std::vector(nninterp_)); - interp_w_.resize(nout_, std::vector(nninterp_, 0.0)); - - // work around for some SOCA bugs... if there are insufficient valid geometry points, - // skip kdtree generation and make sure apply() returns missing values - std::vector lats_in, lons_in; - geom.latlon(lats_in, lons_in, true, grid, masked); - const size_t npoints = lats_in.size(); - if (npoints < nninterp_) { - nninterp_ = 0; - return; - } - - for (size_t jloc = 0; jloc < nout_; ++jloc) { - const atlas::util::KDTree::ValueList neighbours = - geom.closestPoints(lats_out[jloc], lons_out[jloc], nninterp_, grid, masked); - - // Barycentric and inverse-distance interpolation both rely on indices, 1/distances - size_t jj = 0; - for (const atlas::util::KDTree::Value & val : neighbours) { - interp_i_[jloc][jj] = val.payload(); - interp_w_[jloc][jj] = 1.0 / val.distance(); - ++jj; - } - ASSERT(jj == nninterp_); - - if (interp_w_[jloc][0] > 1e10) { - // Handle edge case where output point is close to one input point => interp_w very large - // Atlas returns the neighbors in nearest-first order, so only need to check first element - for (size_t jn = 0; jn < nninterp_; ++jn) interp_w_[jloc][jn] = 0.0; - interp_w_[jloc][0] = 1.0; - } else if (interp_method_ == "barycentric") { - // Barycentric weights - std::vector bw(nninterp_); - for (size_t j = 0; j < nninterp_; ++j) { - double wprod = 1.0; - const auto& p1 = neighbours[j].point(); - for (size_t k = 0; k < nninterp_; ++k) { - if (k != j) { - const auto& p2 = neighbours[k].point(); - const double dist = earth.distance(p1, p2); - wprod *= std::max(dist, close); - } - } - bw[j] = 1.0 / wprod; - } - // Interpolation weights from barycentric weights - double wsum = 0.0; - for (size_t j = 0; j < nninterp_; ++j) wsum += interp_w_[jloc][j] * bw[j]; - for (size_t j = 0; j < nninterp_; ++j) { - interp_w_[jloc][j] *= bw[j] / wsum; - ASSERT(interp_w_[jloc][j] >= 0.0 && interp_w_[jloc][j] <= 1.0); - } - } else { - // Inverse-distance interpolation weights - double wsum = 0.0; - for (size_t j = 0; j < nninterp_; ++j) wsum += interp_w_[jloc][j]; - for (size_t j = 0; j < nninterp_; ++j) { - interp_w_[jloc][j] /= wsum; - ASSERT(interp_w_[jloc][j] >= 0.0 && interp_w_[jloc][j] <= 1.0); - } - } - } - oops::Log::trace() << "UnstructuredInterpolator::UnstructuredInterpolator done" << std::endl; -} - -// ----------------------------------------------------------------------------- - -void UnstructuredInterpolator::apply(const oops::Variables & vars, const atlas::FieldSet & fset, - const std::vector & mask, - std::vector::iterator & current) const { - oops::Log::trace() << "UnstructuredInterpolator::apply starting" << std::endl; - util::Timer timer("soca::UnstructuredInterpolator", "apply"); - - size_t nflds = 0; - for (size_t jf = 0; jf < vars.size(); ++jf) { - const std::string fname = vars[jf]; - atlas::Field fld = fset.field(fname); - const size_t rank = fld.rank(); - ASSERT(rank >= 1 && rank <= 2); - if (rank == 1) { - nflds += 1; - } else { - nflds += fld.levels(); - } - } - - for (size_t jf = 0; jf < vars.size(); ++jf) { - const std::string fname = vars[jf]; - atlas::Field fld = fset.field(fname); - const size_t rank = fld.rank(); - - const std::string interp_type = fld.metadata().get("interp_type"); - ASSERT(interp_type == "default" || interp_type == "integer" || interp_type == "nearest"); - - if (rank == 1) { - const atlas::array::ArrayView fldin = atlas::array::make_view(fld); - this->apply1lev(interp_type, mask, fldin, current); - } else { - const atlas::array::ArrayView fldin = atlas::array::make_view(fld); - for (size_t jlev = 0; jlev < fldin.shape(1); ++jlev) { - this->applyLevs(interp_type, mask, fldin, current, jlev); - } - } - } - oops::Log::trace() << "UnstructuredInterpolator::apply done" << std::endl; -} - -// ----------------------------------------------------------------------------- - -void UnstructuredInterpolator::applyAD(const oops::Variables & vars, atlas::FieldSet &fset, - const std::vector & mask, - std::vector::const_iterator & current) const { - oops::Log::trace() << "UnstructuredInterpolator::applyAD starting" << std::endl; - util::Timer timer("soca::UnstructuredInterpolator", "applyAD"); - - for (size_t jf = 0; jf < vars.size(); ++jf) { - const std::string fname = vars[jf]; - atlas::Field fld = fset.field(fname); - const size_t rank = fld.rank(); - ASSERT(rank >= 1 && rank <= 2); - -// const std::string interp_type = fld.metadata().get("interp_type"); -// ASSERT(interp_type == "default" || interp_type == "integer" || interp_type == "nearest"); - const std::string interp_type = "default"; - - if (rank== 1) { - atlas::array::ArrayView fldin = atlas::array::make_view(fld); - this->apply1levAD(interp_type, mask, fldin, current); - } else { - atlas::array::ArrayView fldin = atlas::array::make_view(fld); - for (size_t jlev = 0; jlev < fldin.shape(1); ++jlev) { - this->applyLevsAD(interp_type, mask, fldin, current, jlev); - } - } - } - oops::Log::trace() << "UnstructuredInterpolator::applyAD done" << std::endl; -} - - -// ----------------------------------------------------------------------------- - -void UnstructuredInterpolator::apply1lev(const std::string & interp_type, - const std::vector & mask, - const atlas::array::ArrayView & gridin, - std::vector::iterator & gridout) const { - for (size_t jloc = 0; jloc < nout_; ++jloc) { - if (mask[jloc]) { - *gridout = 0.0; - if (nninterp_ == 0) { - // hack to deal with some PEs not having any valid ocean points - *gridout = util::missingValue(*gridout); - } else if (interp_type == "default") { - for (size_t jj = 0; jj < nninterp_; ++jj) { - *gridout += interp_w_[jloc][jj] * gridin(interp_i_[jloc][jj]); - } - } else if (interp_type == "integer") { - // Find which integer value has largest weight in the stencil. We do this by taking two - // passes through the (usually short) data: first to identify range of values, then to - // determine weights for each integer. - // Note that a std::map would be shorter to code, because it would avoid needing to find - // the range of possible integer values, but vectors are almost always much more efficient. - int minval = std::numeric_limits().max(); - int maxval = std::numeric_limits().min(); - for (size_t jj = 0; jj < nninterp_; ++jj) { - minval = std::min(minval, static_cast(std::round(gridin(interp_i_[jloc][jj])))); - maxval = std::max(maxval, static_cast(std::round(gridin(interp_i_[jloc][jj])))); - } - std::vector int_weights(maxval - minval + 1, 0.0); - for (size_t jj = 0; jj < nninterp_; ++jj) { - const int this_int = std::round(gridin(interp_i_[jloc][jj])); - int_weights[this_int - minval] += interp_w_[jloc][jj]; - } - *gridout = minval + std::distance(int_weights.begin(), - std::max_element(int_weights.begin(), int_weights.end())); - } else if (interp_type == "nearest") { - *gridout = gridin(interp_i_[jloc][0]); - } else { - throw eckit::BadValue("Unknown interpolation type"); - } - } - ++gridout; - } -} - -// ----------------------------------------------------------------------------- - -void UnstructuredInterpolator::applyLevs(const std::string & interp_type, - const std::vector & mask, - const atlas::array::ArrayView & gridin, - std::vector::iterator & gridout, - const size_t & ilev) const { - for (size_t jloc = 0; jloc < nout_; ++jloc) { - if (mask[jloc]) { - *gridout = 0.0; - if (nninterp_ == 0) { - // hack to deal with some PEs not having any valid ocean points - *gridout = util::missingValue(*gridout); - } else if (interp_type == "default") { - for (size_t jj = 0; jj < nninterp_; ++jj) { - *gridout += interp_w_[jloc][jj] * gridin(interp_i_[jloc][jj], ilev); - } - } else if (interp_type == "integer") { - int minval = std::numeric_limits().max(); - int maxval = std::numeric_limits().min(); - for (size_t jj = 0; jj < nninterp_; ++jj) { - minval = std::min(minval, static_cast(std::round(gridin(interp_i_[jloc][jj], ilev)))); - maxval = std::max(maxval, static_cast(std::round(gridin(interp_i_[jloc][jj], ilev)))); - } - std::vector int_weights(maxval - minval + 1, 0.0); - for (size_t jj = 0; jj < nninterp_; ++jj) { - const int this_int = std::round(gridin(interp_i_[jloc][jj], ilev)); - int_weights[this_int - minval] += interp_w_[jloc][jj]; - } - *gridout = minval + std::distance(int_weights.begin(), - std::max_element(int_weights.begin(), int_weights.end())); - } else if (interp_type == "nearest") { - *gridout = gridin(interp_i_[jloc][0], ilev); - } else { - throw eckit::BadValue("Unknown interpolation type"); - } - } - ++gridout; - } -} - -// ----------------------------------------------------------------------------- - -void UnstructuredInterpolator::apply1levAD(const std::string & interp_type, - const std::vector & mask, - atlas::array::ArrayView & gridin, - std::vector::const_iterator & gridout) const { - for (size_t jloc = 0; jloc < nout_; ++jloc) { - if (mask[jloc]) { - if (nninterp_ == 0) { - // hack to deal with some PEs not having any valid ocean points - } else if (interp_type == "default") { - for (size_t jj = 0; jj < nninterp_; ++jj) { - gridin(interp_i_[jloc][jj]) += interp_w_[jloc][jj] * *gridout; - } - } else if (interp_type == "integer") { - throw eckit::BadValue("No adjoint for integer interpolation"); - } else if (interp_type == "nearest") { - gridin(interp_i_[jloc][0]) += *gridout; - } else { - throw eckit::BadValue("Unknown interpolation type"); - } - } - ++gridout; - } -} - -// ----------------------------------------------------------------------------- - -void UnstructuredInterpolator::applyLevsAD(const std::string & interp_type, - const std::vector & mask, - atlas::array::ArrayView & gridin, - std::vector::const_iterator & gridout, - const size_t & ilev) const { - for (size_t jloc = 0; jloc < nout_; ++jloc) { - if (mask[jloc]) { - if (nninterp_ == 0) { - // hack to deal with some PEs not having any valid ocean points - } else if (interp_type == "default") { - for (size_t jj = 0; jj < nninterp_; ++jj) { - gridin(interp_i_[jloc][jj], ilev) += interp_w_[jloc][jj] * *gridout; - } - } else if (interp_type == "integer") { - throw eckit::BadValue("No adjoint for integer interpolation"); - } else if (interp_type == "nearest") { - gridin(interp_i_[jloc][0], ilev) += *gridout; - } else { - throw eckit::BadValue("Unknown interpolation type"); - } - } - ++gridout; - } -} - -// ----------------------------------------------------------------------------- - -void UnstructuredInterpolator::print(std::ostream & os) const -{ - os << "SOCAUnstructuredInterpolator"; -} - -// ----------------------------------------------------------------------------- - -} // namespace soca diff --git a/src/soca/LinearVariableChange/HorizFilt/soca_horizfilt_mod.F90 b/src/soca/LinearVariableChange/HorizFilt/soca_horizfilt_mod.F90 index 6b14248e5..5a9b1dac6 100644 --- a/src/soca/LinearVariableChange/HorizFilt/soca_horizfilt_mod.F90 +++ b/src/soca/LinearVariableChange/HorizFilt/soca_horizfilt_mod.F90 @@ -109,6 +109,12 @@ subroutine soca_horizfilt_setup(self, f_conf, geom, traj, vars) do i = self%isc, self%iec do ii = -1,1 do jj = -1,1 + ! if the adjacent cell is an invalid halo, skip it + if (.not. geom%valid_halo_mask(i+ii, j+jj)) then + dist(ii, jj) = 0.0 + cycle + end if + ! Great circle distance if(self%scale_dist > 0) then r_dist = ageometry%distance(geom%lon(i,j), geom%lat(i,j), geom%lon(i+ii,j+jj), geom%lat(i+ii,j+jj) ) diff --git a/src/soca/State/State.cc b/src/soca/State/State.cc index f76f2e4a6..49e4ce931 100644 --- a/src/soca/State/State.cc +++ b/src/soca/State/State.cc @@ -254,14 +254,12 @@ namespace soca { // ----------------------------------------------------------------------------- void State::toFieldSet(atlas::FieldSet &fset) const { - // get field, with halo, and no masked values - soca_state_to_fieldset_f90(toFortran(), vars_, fset.get(), false); + soca_state_to_fieldset_f90(toFortran(), vars_, fset.get()); } // ----------------------------------------------------------------------------- void State::fromFieldSet(const atlas::FieldSet &fs) { - // set field, with halo, and no masked values - soca_state_from_fieldset_f90(toFortran(), vars_, fs.get(), false); + soca_state_from_fieldset_f90(toFortran(), vars_, fs.get()); } } // namespace soca diff --git a/src/soca/State/StateFortran.h b/src/soca/State/StateFortran.h index 56316f55c..b4991e480 100644 --- a/src/soca/State/StateFortran.h +++ b/src/soca/State/StateFortran.h @@ -69,12 +69,10 @@ namespace soca { void soca_state_update_fields_f90(const F90flds &, const oops::Variables &); void soca_state_to_fieldset_f90(const F90flds &, const oops::Variables &, - atlas::field::FieldSetImpl *, - const bool &); + atlas::field::FieldSetImpl *); void soca_state_from_fieldset_f90(const F90flds &, const oops::Variables &, - const atlas::field::FieldSetImpl *, - const bool &); + const atlas::field::FieldSetImpl *); } } // namespace soca #endif // SOCA_STATE_STATEFORTRAN_H_ diff --git a/src/soca/State/soca_state.interface.F90 b/src/soca/State/soca_state.interface.F90 index 27c80e86d..4e102feee 100644 --- a/src/soca/State/soca_state.interface.F90 +++ b/src/soca/State/soca_state.interface.F90 @@ -463,12 +463,11 @@ end subroutine soca_state_update_fields_c ! ------------------------------------------------------------------------------ !> C++ interface for State version of soca_field_mod::soca_field::to_fieldset() -subroutine soca_state_to_fieldset_c(c_key_self, c_vars, c_fieldset, c_masked) & +subroutine soca_state_to_fieldset_c(c_key_self, c_vars, c_fieldset) & bind (c, name='soca_state_to_fieldset_f90') integer(c_int), intent(in) :: c_key_self type(c_ptr), value, intent(in) :: c_vars type(c_ptr), value, intent(in) :: c_fieldset - logical(c_bool), intent(in) :: c_masked type(soca_state), pointer :: self type(oops_variables) :: vars @@ -478,17 +477,16 @@ subroutine soca_state_to_fieldset_c(c_key_self, c_vars, c_fieldset, c_masked) & vars = oops_variables(c_vars) afieldset = atlas_fieldset(c_fieldset) - call self%to_fieldset(vars, afieldset, logical(c_masked)) + call self%to_fieldset(vars, afieldset) end subroutine ! ------------------------------------------------------------------------------ !> C++ interface for soca_increment_mod::soca_increment::from_fieldset() -subroutine soca_state_from_fieldset_c(c_key_self, c_vars, c_afieldset, c_masked) & +subroutine soca_state_from_fieldset_c(c_key_self, c_vars, c_afieldset) & bind (c,name='soca_state_from_fieldset_f90') integer(c_int), intent(in) :: c_key_self type(c_ptr), value, intent(in) :: c_vars type(c_ptr), value, intent(in) :: c_afieldset -logical(c_bool), intent(in) :: c_masked type(soca_state), pointer :: self type(oops_variables) :: vars @@ -498,7 +496,7 @@ subroutine soca_state_from_fieldset_c(c_key_self, c_vars, c_afieldset, c_masked) vars = oops_variables(c_vars) afieldset = atlas_fieldset(c_afieldset) -call self%from_fieldset(vars, afieldset, logical(c_masked)) +call self%from_fieldset(vars, afieldset) end subroutine diff --git a/src/soca/Traits.h b/src/soca/Traits.h index 1b6198534..4bd7858ad 100644 --- a/src/soca/Traits.h +++ b/src/soca/Traits.h @@ -14,7 +14,6 @@ #include "soca/Geometry/Geometry.h" #include "soca/GeometryIterator/GeometryIterator.h" #include "soca/Increment/Increment.h" -#include "soca/Interpolator/LocalUnstructuredInterpolator.h" #include "soca/LinearVariableChange/LinearVariableChange.h" #include "soca/ModelBias/ModelBias.h" #include "soca/ModelBias/ModelBiasCovariance.h" @@ -39,7 +38,6 @@ struct Traits { typedef soca::State State; typedef soca::Increment Increment; typedef soca::ErrorCovariance Covariance; - typedef soca::LocalUnstructuredInterpolator LocalInterpolator; typedef soca::ModelBias ModelAuxControl; typedef soca::ModelBiasIncrement ModelAuxIncrement; diff --git a/test/Data/obs/adt.nc b/test/Data/obs/adt.nc index d3c0284bc..c2a4a8ad8 100644 --- a/test/Data/obs/adt.nc +++ b/test/Data/obs/adt.nc @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f0a5964af73b3475e95696ff806c54400ece8fbf4376018f9d5f77d82b057577 -size 39182 +oid sha256:c398d7783b50b68ea54fe0059ebaee02a32d1c62eb974786d7be556a81258fd4 +size 17935 diff --git a/test/Data/obs/chl.nc b/test/Data/obs/chl.nc index 8717fd9c1..178273fc9 100644 --- a/test/Data/obs/chl.nc +++ b/test/Data/obs/chl.nc @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:27f04823cc6d578a53d5776659e1d152266f69608db1a73ef382541399fa8e35 -size 39100 +oid sha256:3a393678c3fd541c248952fbcca0a452029207eb154dd16b9012ebd4583b9ced +size 20770 diff --git a/test/Data/obs/icec.nc b/test/Data/obs/icec.nc index ae47b3a12..5264a0434 100644 --- a/test/Data/obs/icec.nc +++ b/test/Data/obs/icec.nc @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c9af89cbe781548c1b033fa15c3fbacefcf176ebeec6a9223d2439feffb5f03f -size 29440 +oid sha256:2e8aa3975d112b0e183b481aa4c7b3fea9b2517c1567886ec4d188bc3d1547be +size 17037 diff --git a/test/Data/obs/icefb.nc b/test/Data/obs/icefb.nc index 2d560bd74..56ab88758 100644 --- a/test/Data/obs/icefb.nc +++ b/test/Data/obs/icefb.nc @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7e86b9be49860527f81506673edae8f3b7c9eea81e43c43e05d8041cade9e826 -size 37691 +oid sha256:ef6b007498fd962f57d2cd6c33064e93eb4ede53a87c1249f9f95170af51ab31 +size 27975 diff --git a/test/Data/obs/prof.nc b/test/Data/obs/prof.nc index 749137eda..7fab3124d 100644 --- a/test/Data/obs/prof.nc +++ b/test/Data/obs/prof.nc @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aaf31db8038bc4c594b5dfcf02ef92968a48b8f4d1aae284b6c9a8c79ae234ff -size 65694 +oid sha256:d7ab3af72eb067f71d3a2f62dd950359256cc92f1a26174b16ce50147ebae1c2 +size 27183 diff --git a/test/Data/obs/sst.nc b/test/Data/obs/sst.nc index 0a6aad961..ee52137c7 100644 --- a/test/Data/obs/sst.nc +++ b/test/Data/obs/sst.nc @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9304cf02f79c3eb5cec17ea8a5d81a3529edd1bb8aa1e1e335947f2d30778e06 -size 43646 +oid sha256:0b292f05db5f28155aa8a35e418b13d934ad7dac5f5f6292f98ec15e93986fba +size 20155 diff --git a/test/testinput/getvalues.yml b/test/testinput/getvalues.yml index 93a1ab695..436f344a6 100644 --- a/test/testinput/getvalues.yml +++ b/test/testinput/getvalues.yml @@ -9,23 +9,25 @@ state: date: &date 2018-04-15T03:00:00Z state variables: [tocn, socn, hocn, ssh, cicen, hicen, swh, sw, lw, lhf, shf, us, uocn, vocn ] -variables: &vars [sea_water_potential_temperature, - sea_water_salinity, - sea_water_cell_thickness, - sea_surface_height_above_geoid, - sea_surface_temperature, - sea_ice_category_area_fraction, - sea_ice_category_thickness, - sea_surface_wave_significant_height, +variables: &vars [ +# sea_water_potential_temperature, +# sea_water_salinity, +# sea_water_cell_thickness, +# sea_surface_height_above_geoid, +# sea_surface_temperature, +# sea_ice_category_area_fraction, +# sea_ice_category_thickness, +# sea_surface_wave_significant_height, net_downwelling_shortwave_radiation, upward_latent_heat_flux_in_air, upward_sensible_heat_flux_in_air, - net_downwelling_longwave_radiation, - friction_velocity_over_water, - surface_eastward_sea_water_velocity, - eastward_sea_water_velocity, - surface_northward_sea_water_velocity, - northward_sea_water_velocity] + net_downwelling_longwave_radiation +# friction_velocity_over_water, +# surface_eastward_sea_water_velocity, +# eastward_sea_water_velocity, +# surface_northward_sea_water_velocity, +# northward_sea_water_velocity] +] locations: window begin: 2018-04-15T00:00:00Z @@ -42,6 +44,7 @@ locations: lat2: 37.5 lon1: -192.5 lon2: -57 - obs errors: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] + obs errors: [1.0, 1.0, 1.0, 1.0] + # , 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] -tolerance interpolation: 1.5 # still really huge... should probably figure out why sometime. \ No newline at end of file +tolerance interpolation: 10.5 # still really huge... should probably figure out why sometime. \ No newline at end of file diff --git a/test/testinput/letkf.yml b/test/testinput/letkf.yml index 4b293285e..35a80fc8e 100644 --- a/test/testinput/letkf.yml +++ b/test/testinput/letkf.yml @@ -76,6 +76,11 @@ observations: min grid mult: 2.0 min value: 200.0e3 max value: 900.0e3 + obs filters: + - filter: Domain Check + where: + - variable: {name: GeoVaLs/sea_area_fraction} + minvalue: 0.5 driver: do posterior observer: true diff --git a/test/testinput/letkf_split_observer.yml b/test/testinput/letkf_split_observer.yml index 8121f1d4a..cc1cd5a43 100644 --- a/test/testinput/letkf_split_observer.yml +++ b/test/testinput/letkf_split_observer.yml @@ -76,6 +76,9 @@ observations: obs localizations: - localization method: Horizontal Gaspari-Cohn lengthscale: 0 + obs filters: + - *land_mask + driver: run as observer only: true diff --git a/test/testinput/obslocalization_vertical.yml b/test/testinput/obslocalization_vertical.yml index 8f9374998..0c869f8aa 100644 --- a/test/testinput/obslocalization_vertical.yml +++ b/test/testinput/obslocalization_vertical.yml @@ -27,7 +27,7 @@ observations: lons: [-175.0, -175.0, -175.0, -175.0] lats: [ -40.0, -40.0, -40.0, -40.0] depths: [0.0, 34.2859952, 171.050201, 1905.01085] - reference local nobs: [96, 134, 103, 0] + reference local nobs: [97, 135, 104, 0] reference rms: [1.0, 1.0, 1.0, 1.0] print iterator: false @@ -50,8 +50,8 @@ observations: lons: [-175.0, -175.0, -175.0, -175.0] lats: [ -40.0, -40.0, -40.0, -40.0] depths: [0.0, 34.2859952, 171.050201, 1905.01085] - reference local nobs: [96, 134, 103, 0] - reference rms: [0.6257, 0.606492, 0.470246, 0] + reference local nobs: [97, 135, 104, 0] + reference rms: [0.629727, 0.607233 , 0.471695, 0] print iterator: false - obs space: @@ -74,7 +74,7 @@ observations: lons: [-175.0, -175.0, -175.0, -175.0] lats: [ -40.0, -40.0, -40.0, -40.0] depths: [0.0, 34.2859952, 171.050201, 1905.01085] - reference local nobs: [218, 218, 218, 218] + reference local nobs: [220, 220, 220, 220] reference rms: [1.0, 1.0, 1.0, 1.0] print iterator: false @@ -97,7 +97,7 @@ observations: lons: [-175.0, -175.0, -175.0] lats: [ -40.0, -40.0, -40.0] depths: [0.0, 34.2859952, 171.050201] - reference local nobs: [201, 201, 0] + reference local nobs: [202, 202, 0] reference rms: [1.0, 1.0, 1.0] diff --git a/test/testref/3dhyb.test b/test/testref/3dhyb.test index 0becf891c..86379072d 100644 --- a/test/testref/3dhyb.test +++ b/test/testref/3dhyb.test @@ -1,17 +1,17 @@ CostJb : Nonlinear Jb = 0.0000000000000000e+00 -CostJo : Nonlinear Jo(ADT) = 2.1541138023532187e+02, nobs = 100, Jo/n = 2.1541138023532187e+00, err = 1.0000000149011612e-01 -CostFunction: Nonlinear J = 2.1541138023532187e+02 -RPCGMinimizer: reduction in residual norm = 2.0058034635319754e-02 +CostJo : Nonlinear Jo(ADT) = 2.0458137413924788e+02, nobs = 99, Jo/n = 2.0664785266590697e+00, err = 1.0000000149011612e-01 +CostFunction: Nonlinear J = 2.0458137413924788e+02 +RPCGMinimizer: reduction in residual norm = 2.0799916147215207e-02 CostFunction::addIncrement: Analysis: Valid time: 2018-04-15T00:00:00Z - cicen min=-0.0037083939050882 max=1.0000890857872351 mean=0.1175288629668943 - hicen min=-0.1543551748705534 max=4.0326711065090493 mean=0.4693190993182976 + cicen min=-0.0040587640772214 max=1.0000648171411777 mean=0.1175079648519036 + hicen min=-0.1695062409273280 max=4.0326695831062072 mean=0.4670400834782142 hsnon min=0.0000000000000000 max=1.2712833951042413 mean=0.0886865877527975 - socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5715403636658323 - tocn min=-1.8914978386641188 max=31.7004653797183273 mean=6.0149465095742602 - uocn min=-0.8581817578164803 max=0.7001570530680742 mean=-0.0002565992440856 - vocn min=-0.7657091064419865 max=1.4377766409421606 mean=0.0021997807187726 - ssh min=-2.1362339877801784 max=0.9382875676288249 mean=-0.2908987023005902 + socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5744014203464261 + tocn min=-1.8947909199238167 max=31.7004646997533541 mean=6.0146866159992252 + uocn min=-0.8581811434703924 max=0.7001471559887942 mean=-0.0002552194939666 + vocn min=-0.7656658596944719 max=1.4377766409421606 mean=0.0021996588789184 + ssh min=-2.1622588504742026 max=0.8977780480451659 mean=-0.2938509447417898 hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 sw min=-225.0977630615234375 max=-0.0000000000000000 mean=-71.7393205198725354 lhf min=-38.1373977661132812 max=256.5976562500000000 mean=42.0100402226406899 @@ -23,6 +23,6 @@ layer_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.522 -CostJb : Nonlinear Jb = 6.4737201994202742 -CostJo : Nonlinear Jo(ADT) = 119.1219483090795848, nobs = 100, Jo/n = 1.1912194830907958, err = 0.1000000014901161 -CostFunction: Nonlinear J = 125.5956685084998554 +CostJb : Nonlinear Jb = 6.1214769596423713 +CostJo : Nonlinear Jo(ADT) = 114.8805170210432181, nobs = 99, Jo/n = 1.1604092628388203, err = 0.1000000014901161 +CostFunction: Nonlinear J = 121.0019939806855831 diff --git a/test/testref/3dhybfgat.test b/test/testref/3dhybfgat.test index e383197e6..fd87c313a 100644 --- a/test/testref/3dhybfgat.test +++ b/test/testref/3dhybfgat.test @@ -1,16 +1,16 @@ CostJb : Nonlinear Jb = 0.0000000000000000e+00 -CostJo : Nonlinear Jo(ADT) = 8.5808373449844780e+01, nobs = 31, Jo/n = 2.7680120467691864e+00, err = 1.0000000149011612e-01 -CostFunction: Nonlinear J = 8.5808373449844780e+01 -RPCGMinimizer: reduction in residual norm = 3.2871468733537911e-03 -CostFunction::addIncrement: Analysis: +CostJo : Nonlinear Jo(ADT) = 8.7370280580244312e+01, nobs = 31, Jo/n = 2.8183961477498167e+00, err = 1.0000000149011612e-01 +CostFunction: Nonlinear J = 8.7370280580244312e+01 +RPCGMinimizer: reduction in residual norm = 2.8879006360054962e-03 +CostFunction::addIncrement: Analysis: Valid time: 2018-04-15T00:00:00Z - cicen min=-0.0029862192018436 max=1.0000000000000000 mean=0.1175131374935325 - hicen min=-0.0864027519099916 max=4.0326673084246947 mean=0.4706685474992151 - socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5575162987341784 - uocn min=-0.8581694506781735 max=0.7001668808526498 mean=-0.0002550139860581 - vocn min=-0.7661101065945028 max=1.4377766409421606 mean=0.0021978807454063 - tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0151739809475000 - ssh min=-1.9242013678969381 max=0.9300460573635951 mean=-0.2866633476518662 + cicen min=-0.0033930120836110 max=1.0000001204317763 mean=0.1174834218192429 + hicen min=-0.0900746262843310 max=4.0326673084246947 mean=0.4695551166024028 + socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5585013016301659 + uocn min=-0.8581693992488438 max=0.7001590290390129 mean=-0.0002537828716458 + vocn min=-0.7661101230340505 max=1.4377766409421606 mean=0.0021979175689238 + tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0145631838893507 + ssh min=-1.9241647037810099 max=0.8907404278998029 mean=-0.2876886553318843 hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 sw min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 lhf min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 @@ -22,6 +22,6 @@ layer_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.522 -CostJb : Nonlinear Jb = 2.4392495885750969 -CostJo : Nonlinear Jo(ADT) = 68.5671014589966603, nobs = 31, Jo/n = 2.2118419825482794, err = 0.1000000014901161 -CostFunction: Nonlinear J = 71.0063510475717550 +CostJb : Nonlinear Jb = 2.3910852056267453 +CostJo : Nonlinear Jo(ADT) = 76.9254966085777170, nobs = 31, Jo/n = 2.4814676325347649, err = 0.1000000014901161 +CostFunction: Nonlinear J = 79.3165818142044685 diff --git a/test/testref/3dvar_godas.test b/test/testref/3dvar_godas.test index fb2249f94..fc797706b 100644 --- a/test/testref/3dvar_godas.test +++ b/test/testref/3dvar_godas.test @@ -1,27 +1,27 @@ CostJb : Nonlinear Jb = 0.0000000000000000e+00 -CostJo : Nonlinear Jo(CoolSkin) = 5.5231970242773430e+04, nobs = 201, Jo/n = 2.7478592160583798e+02, err = 3.6483214775127792e-01 -CostJo : Nonlinear Jo(SeaSurfaceTemp) = 1.6110117473247183e+03, nobs = 172, Jo/n = 9.3663473681669664e+00, err = 3.6243845867927243e-01 -CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 5.7209593553370315e+00, nobs = 28, Jo/n = 2.0431997697632256e-01, err = 1.0000000000000000e+00 -CostJo : Nonlinear Jo(ADT) = 1.0690556856782669e-02, nobs = 96, Jo/n = 1.1135996725815281e-04, err = 2.8382558423271256e+01 -CostJo : Nonlinear Jo(InsituTemperature) = 3.0207389049976359e+02, nobs = 201, Jo/n = 1.5028551766157392e+00, err = 8.9127767893751042e-01 -CostJo : Nonlinear Jo(InsituSalinity) = 3.2537388217310451e+02, nobs = 218, Jo/n = 1.4925407439133234e+00, err = 6.0819699619437717e-01 -CostJo : Nonlinear Jo(SeaIceFraction) = 6.1356996932340257e+02, nobs = 89, Jo/n = 6.8940445991393551e+00, err = 1.0000000149011612e-01 -CostFunction: Nonlinear J = 5.8089731382006605e+04 -RPCGMinimizer: reduction in residual norm = 1.4657675455035987e-01 +CostJo : Nonlinear Jo(CoolSkin) = 1.6731214283333800e+04, nobs = 200, Jo/n = 8.3656071416669008e+01, err = 3.6419991997020579e-01 +CostJo : Nonlinear Jo(SeaSurfaceTemp) = 1.6258116856443858e+03, nobs = 174, Jo/n = 9.3437453197953211e+00, err = 3.6280357515271239e-01 +CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 5.4431675889674533e+00, nobs = 29, Jo/n = 1.8769543410232598e-01, err = 1.0000000000000000e+00 +CostJo : Nonlinear Jo(ADT) = 1.0375381454781235e-02, nobs = 95, Jo/n = 1.0921454162927615e-04, err = 2.8169260935368467e+01 +CostJo : Nonlinear Jo(InsituTemperature) = 3.3944990007872309e+02, nobs = 205, Jo/n = 1.6558531711157225e+00, err = 8.9723213032395277e-01 +CostJo : Nonlinear Jo(InsituSalinity) = 3.4804589303321143e+02, nobs = 218, Jo/n = 1.5965407937303278e+00, err = 6.0819699545777528e-01 +CostJo : Nonlinear Jo(SeaIceFraction) = 5.8152359560103514e+02, nobs = 88, Jo/n = 6.6082226772844903e+00, err = 1.0000000149011612e-01 +CostFunction: Nonlinear J = 1.9631498900661576e+04 +RPCGMinimizer: reduction in residual norm = 1.4862985298039461e-01 CostFunction::addIncrement: Analysis: Valid time: 2018-04-15T00:00:00Z - cicen min=-0.0003405601408609 max=1.0003281754967124 mean=0.1175488432789414 + cicen min=-0.0000692762619539 max=1.0003374928148037 mean=0.1175459538574530 hicen min=0.0000000000000000 max=4.0326673084246947 mean=0.4712515705773916 hsnon min=0.0000000000000000 max=1.2712833951042413 mean=0.0886865877527975 - socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5443923949429958 - tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0186199500911171 - ssh min=-1.9244119972769020 max=0.9272826865616657 mean=-0.2767841821823349 + socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5443923210379893 + tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0183148649295131 + ssh min=-1.9244215595435641 max=0.9272826987293792 mean=-0.2767864244350091 hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 - sw min=-225.0941078525132184 max=0.0000000000000000 mean=-71.7383093495155180 - lhf min=-38.1375418669390953 max=256.5951447262901297 mean=42.0097005237399657 - shf min=-58.9492849425484025 max=201.3742537637547514 mean=6.0753279874056716 - lw min=0.0000000000000000 max=88.0360916332301855 mean=31.3955349209106309 - us min=0.0043959527630587 max=0.0196668876944985 mean=0.0086896045868811 + sw min=-225.0942946657453660 max=0.0000000000000000 mean=-71.7383583440961132 + lhf min=-38.1375200295195498 max=256.5954941593348053 mean=42.0097185887710580 + shf min=-58.9492911009887948 max=201.3742676087534278 mean=6.0753284159540160 + lw min=0.0000000000000000 max=88.0360936577936570 mean=31.3955346150854773 + us min=0.0043960513522736 max=0.0196673881640923 mean=0.0086875716053277 mld min=2.2854716757984130 max=4593.1533423819937525 mean=192.4109073940401515 layer_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.5229536158392420 @@ -33,12 +33,12 @@ layer_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.522 -CostJb : Nonlinear Jb = 0.9371636373067929 -CostJo : Nonlinear Jo(CoolSkin) = 54760.9464861082669813, nobs = 201, Jo/n = 272.4425198313844021, err = 0.3648321477512779 -CostJo : Nonlinear Jo(SeaSurfaceTemp) = 1584.6318695521281370, nobs = 172, Jo/n = 9.2129759857681872, err = 0.3624384586792724 -CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 5.7205654569396529, nobs = 28, Jo/n = 0.2043059091764162, err = 1.0000000000000000 -CostJo : Nonlinear Jo(ADT) = 0.0106909952712187, nobs = 96, Jo/n = 0.0001113645340752, err = 28.3825584232712558 -CostJo : Nonlinear Jo(InsituTemperature) = 300.0616948721313975, nobs = 201, Jo/n = 1.4928442530951811, err = 0.8912776789375104 -CostJo : Nonlinear Jo(InsituSalinity) = 324.0818214759177636, nobs = 218, Jo/n = 1.4866138599812742, err = 0.6081969961943772 -CostJo : Nonlinear Jo(SeaIceFraction) = 612.6205118543228991, nobs = 89, Jo/n = 6.8833765376890215, err = 0.1000000014901161 -CostFunction: Nonlinear J = 57589.0108039522820036 +CostJb : Nonlinear Jb = 0.3607257504211560 +CostJo : Nonlinear Jo(CoolSkin) = 16187.3654912514211901, nobs = 200, Jo/n = 80.9368274562571060, err = 0.3641999199702058 +CostJo : Nonlinear Jo(SeaSurfaceTemp) = 1602.0416832526752842, nobs = 174, Jo/n = 9.2071361106475589, err = 0.3628035751527124 +CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 5.4426907397108639, nobs = 29, Jo/n = 0.1876789910245125, err = 1.0000000000000000 +CostJo : Nonlinear Jo(ADT) = 0.0103757220711691, nobs = 95, Jo/n = 0.0001092181270649, err = 28.1692609353684666 +CostJo : Nonlinear Jo(InsituTemperature) = 337.9287619710107720, nobs = 205, Jo/n = 1.6484329852244428, err = 0.8972321303239528 +CostJo : Nonlinear Jo(InsituSalinity) = 346.7212333339583665, nobs = 218, Jo/n = 1.5904643730915522, err = 0.6081969954577753 +CostJo : Nonlinear Jo(SeaIceFraction) = 580.7189695656682034, nobs = 88, Jo/n = 6.5990791996098661, err = 0.1000000014901161 +CostFunction: Nonlinear J = 19060.5899315869392012 diff --git a/test/testref/3dvar_soca.test b/test/testref/3dvar_soca.test index 295446405..2b8f2e245 100644 --- a/test/testref/3dvar_soca.test +++ b/test/testref/3dvar_soca.test @@ -1,31 +1,31 @@ CostJb : Nonlinear Jb = 0.0000000000000000e+00 -CostJo : Nonlinear Jo(CoolSkin) = 1.4021724050726116e+04, nobs = 172, Jo/n = 8.1521651457709979e+01, err = 3.6243845867927243e-01 -CostJo : Nonlinear Jo(SeaSurfaceTemp) = 8.7363428891594594e+02, nobs = 144, Jo/n = 6.0669047841385133e+00, err = 3.6242241540133863e-01 -CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 5.7209593553370439e+00, nobs = 28, Jo/n = 2.0431997697632301e-01, err = 1.0000000000000000e+00 -CostJo : Nonlinear Jo(ADT) = 1.5092959327252782e+02, nobs = 91, Jo/n = 1.6585669590387673e+00, err = 1.0000000149011612e-01 -CostJo : Nonlinear Jo(InsituTS) = 6.2744777267286599e+02, nobs = 419, Jo/n = 1.4974887175963389e+00, err = 7.5731679634756710e-01 -CostJo : Nonlinear Jo(SeaIceFraction) = 6.1356996932340280e+02, nobs = 89, Jo/n = 6.8940445991393577e+00, err = 1.0000000149011612e-01 -CostJo : Nonlinear Jo(SeaSurfaceChlorophyll) = 1.3835970302558553e+03, nobs = 129, Jo/n = 1.0725558374076398e+01, err = 6.1865029773452762e-02 -CostJo : Nonlinear Jo(SeaSurfaceBiomassP) = 4.2264815814469887e+02, nobs = 112, Jo/n = 3.7736442691490972e+00, err = 1.1692603016453901e-08 -CostJo : Nonlinear Jo(SeaSurfaceHS) = 1.0036986509959469e+03, nobs = 6, Jo/n = 1.6728310849932447e+02, err = 1.0000000149011612e-01 -CostFunction: Nonlinear J = 1.9102970473662695e+04 -RPCGMinimizer: reduction in residual norm = 1.3578991046776986e-01 +CostJo : Nonlinear Jo(CoolSkin) = 1.4169933330087919e+04, nobs = 174, Jo/n = 8.1436398448781148e+01, err = 3.6280357515271239e-01 +CostJo : Nonlinear Jo(SeaSurfaceTemp) = 7.7388800526767272e+02, nobs = 147, Jo/n = 5.2645442535215832e+00, err = 3.6246510156485134e-01 +CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 5.4431675889674533e+00, nobs = 29, Jo/n = 1.8769543410232598e-01, err = 1.0000000000000000e+00 +CostJo : Nonlinear Jo(ADT) = 1.3650926098993568e+02, nobs = 91, Jo/n = 1.5001017691201723e+00, err = 1.0000000149011612e-01 +CostJo : Nonlinear Jo(InsituTS) = 6.8749579311193474e+02, nobs = 423, Jo/n = 1.6252855629123752e+00, err = 7.6208809857781845e-01 +CostJo : Nonlinear Jo(SeaIceFraction) = 5.8152359560103514e+02, nobs = 88, Jo/n = 6.6082226772844903e+00, err = 1.0000000149011612e-01 +CostJo : Nonlinear Jo(SeaSurfaceChlorophyll) = 1.4791913800716829e+03, nobs = 129, Jo/n = 1.1466599845516923e+01, err = 6.1865027747001339e-02 +CostJo : Nonlinear Jo(SeaSurfaceBiomassP) = 4.1314922104098372e+02, nobs = 112, Jo/n = 3.6888323307230690e+00, err = 1.1692603016453901e-08 +CostJo : Nonlinear Jo(SeaSurfaceHS) = 1.0896018677668069e+03, nobs = 6, Jo/n = 1.8160031129446782e+02, err = 1.0000000149011612e-01 +CostFunction: Nonlinear J = 1.9336735621526943e+04 +RPCGMinimizer: reduction in residual norm = 1.5196974582598013e-01 CostFunction::addIncrement: Analysis: Valid time: 2018-04-15T00:00:00Z - cicen min=-0.0002332793686668 max=1.0004816892783599 mean=0.1175660587131874 + cicen min=-0.0001944416218803 max=1.0004544470085890 mean=0.1175562963283338 hicen min=0.0000000000000000 max=4.0326673084246947 mean=0.4712515705773916 - socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5444174607287664 - tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0195182217114125 - ssh min=-1.9246303752073701 max=0.9272880168833502 mean=-0.2767158606096664 + socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5444143017789429 + tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0192939107033352 + ssh min=-1.9246079094092028 max=0.9272950968042213 mean=-0.2767236478726869 hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 - sw min=-225.0941295072505284 max=0.0000000000000000 mean=-71.7381736052875141 - lhf min=-38.1375727887674074 max=256.5948515722390653 mean=42.0096427098036145 - shf min=-58.9492796405801940 max=201.3742333817712904 mean=6.0753260872494916 - lw min=0.0000000000000000 max=88.0360937519793509 mean=31.3955357262588528 - us min=0.0043959913471787 max=0.0196710814807583 mean=0.0086932481123280 - chl min=-0.0000065299747394 max=4.6719899196170607 mean=0.1184785036795101 - biop min=0.0000000000000000 max=0.0000001868533390 mean=0.0000000065395176 - swh min=0.0000996535891318 max=6.7491955757141104 mean=1.0621526024768404 + sw min=-225.0946377620148837 max=0.0000000000000000 mean=-71.7382510638389448 + lhf min=-38.1375353584250192 max=256.5953403388396055 mean=42.0096785986080192 + shf min=-58.9492894488311876 max=201.3742572707894283 mean=6.0753270197181477 + lw min=0.0000000000000000 max=88.0360958910717102 mean=31.3955352012919775 + us min=0.0043961139459376 max=0.0196706712107377 mean=0.0086907044249661 + chl min=-0.0000132792405676 max=4.6719899196170607 mean=0.1184788251022223 + biop min=0.0000000000000000 max=0.0000001868533390 mean=0.0000000065395142 + swh min=0.0000996535891318 max=6.7491955757141104 mean=1.0621528146778920 mld min=2.2854716757984130 max=4593.1533423819937525 mean=192.4109073940401515 layer_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.5229536158392420 @@ -39,14 +39,14 @@ layer_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.522 -CostJb : Nonlinear Jb = 4.9584757277006792 -CostJo : Nonlinear Jo(CoolSkin) = 13493.3949875673024508, nobs = 172, Jo/n = 78.4499708579494381, err = 0.3624384586792724 -CostJo : Nonlinear Jo(SeaSurfaceTemp) = 867.0943480789622981, nobs = 144, Jo/n = 6.0214885283261275, err = 0.3624224154013386 -CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 5.7206157993305293, nobs = 28, Jo/n = 0.2043077071189475, err = 1.0000000000000000 -CostJo : Nonlinear Jo(ADT) = 150.9121479207821039, nobs = 91, Jo/n = 1.6583752518767265, err = 0.1000000014901161 -CostJo : Nonlinear Jo(InsituTS) = 626.0732481968689171, nobs = 419, Jo/n = 1.4942082295867993, err = 0.7573167963475671 -CostJo : Nonlinear Jo(SeaIceFraction) = 612.1750660535036559, nobs = 89, Jo/n = 6.8783715286910523, err = 0.1000000014901161 -CostJo : Nonlinear Jo(SeaSurfaceChlorophyll) = 1367.0869693444087716, nobs = 129, Jo/n = 10.5975734057706106, err = 0.0618650297734528 -CostJo : Nonlinear Jo(SeaSurfaceBiomassP) = 418.2213677666277363, nobs = 112, Jo/n = 3.7341193550591760, err = 0.0000000116926030 -CostJo : Nonlinear Jo(SeaSurfaceHS) = 1000.6654923521158480, nobs = 6, Jo/n = 166.7775820586859652, err = 0.1000000014901161 -CostFunction: Nonlinear J = 18546.3027188076011953 +CostJb : Nonlinear Jb = 3.7670299019236628 +CostJo : Nonlinear Jo(CoolSkin) = 13658.4011985073175310, nobs = 174, Jo/n = 78.4965586121110164, err = 0.3628035751527124 +CostJo : Nonlinear Jo(SeaSurfaceTemp) = 769.1790616041305384, nobs = 147, Jo/n = 5.2325106231573502, err = 0.3624651015648513 +CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 5.4427757940687362, nobs = 29, Jo/n = 0.1876819239334047, err = 1.0000000000000000 +CostJo : Nonlinear Jo(ADT) = 136.4791250306548704, nobs = 91, Jo/n = 1.4997706047324710, err = 0.1000000014901161 +CostJo : Nonlinear Jo(InsituTS) = 686.2398026360082213, nobs = 423, Jo/n = 1.6223163182884355, err = 0.7620880985778185 +CostJo : Nonlinear Jo(SeaIceFraction) = 580.4391688961409272, nobs = 88, Jo/n = 6.5958996465470561, err = 0.1000000014901161 +CostJo : Nonlinear Jo(SeaSurfaceChlorophyll) = 1459.9873566986807418, nobs = 129, Jo/n = 11.3177314472765946, err = 0.0618650277470013 +CostJo : Nonlinear Jo(SeaSurfaceBiomassP) = 409.2009282277246029, nobs = 112, Jo/n = 3.6535797163189696, err = 0.0000000116926030 +CostJo : Nonlinear Jo(SeaSurfaceHS) = 1086.9227398834236737, nobs = 6, Jo/n = 181.1537899805706218, err = 0.1000000014901161 +CostFunction: Nonlinear J = 18796.0591871800716035 diff --git a/test/testref/3dvarbump.test b/test/testref/3dvarbump.test index 88f3ab250..0365ecc87 100644 --- a/test/testref/3dvarbump.test +++ b/test/testref/3dvarbump.test @@ -1,19 +1,19 @@ CostJb : Nonlinear Jb = 0.0000000000000000e+00 -CostJo : Nonlinear Jo(SeaSurfaceTemp) = 8.3742894104293032e+02, nobs = 121, Jo/n = 6.9209003391977708e+00, err = 3.7212035756212658e-01 -CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 5.6586722760768907e+01, nobs = 49, Jo/n = 1.1548310767503858e+00, err = 1.0000000000000000e+00 -CostJo : Nonlinear Jo(ADT) = 1.7026744945828003e+02, nobs = 90, Jo/n = 1.8918605495364447e+00, err = 1.0000000149011612e-01 -CostJo : Nonlinear Jo(InsituTemperature) = 3.6206216745706564e+02, nobs = 204, Jo/n = 1.7748145463581648e+00, err = 8.9974887207115573e-01 -CostJo : Nonlinear Jo(InsituSalinity) = 2.8662102497790914e+02, nobs = 218, Jo/n = 1.3147753439353631e+00, err = 6.0819699619437717e-01 -CostFunction: Nonlinear J = 1.7129663056969541e+03 -RPCGMinimizer: reduction in residual norm = 1.8242220681109583e-01 +CostJo : Nonlinear Jo(SeaSurfaceTemp) = 7.2761517888788660e+02, nobs = 123, Jo/n = 5.9155705600641184e+00, err = 3.7062900658774245e-01 +CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 5.7834714574083208e+01, nobs = 50, Jo/n = 1.1566942914816642e+00, err = 1.0000000000000000e+00 +CostJo : Nonlinear Jo(ADT) = 1.7801726582342692e+02, nobs = 91, Jo/n = 1.9562336903673287e+00, err = 1.0000000149011612e-01 +CostJo : Nonlinear Jo(InsituTemperature) = 3.4603228199330812e+02, nobs = 203, Jo/n = 1.7045925221345228e+00, err = 9.0034813002045044e-01 +CostJo : Nonlinear Jo(InsituSalinity) = 3.1204770545775682e+02, nobs = 218, Jo/n = 1.4314114929254900e+00, err = 6.0819699619437717e-01 +CostFunction: Nonlinear J = 1.6215471467364616e+03 +RPCGMinimizer: reduction in residual norm = 2.0333584772030691e-01 CostFunction::addIncrement: Analysis: Valid time: 2018-04-15T00:00:00Z hocn min=0.0009999999999977 max=1345.6400000000003274 mean=132.2975966204909355 - socn min=21.6778874359345082 max=39.8774684135234310 mean=34.6199107449517527 - tocn min=-1.8883899372702533 max=32.9920977795653982 mean=6.4225662864401016 + socn min=21.6778874359345082 max=39.8774684135234310 mean=34.6285532534979836 + tocn min=-1.8883899372702533 max=33.0299466196283120 mean=6.3804420615446844 uocn min=-0.6975788196638589 max=0.4840625031242498 mean=0.0013055310445162 vocn min=-0.7661101215480253 max=0.9402890903466523 mean=0.0028998456865158 - ssh min=-2.0280406164008462 max=0.8850605010463943 mean=-0.2405642476366437 + ssh min=-2.0964116929684500 max=0.8417711551919234 mean=-0.2579245652977167 mld min=2.4370615877370523 max=4593.1523423819935488 mean=193.6208071648662212 layer_depth min=2.4370615877370523 max=5587.8978052886013757 mean=1243.8222388394297013 @@ -23,10 +23,10 @@ layer_depth min=2.4370615877370523 max=5587.8978052886013757 mean=1243.822 -CostJb : Nonlinear Jb = 68.2671259800791290 -CostJo : Nonlinear Jo(SeaSurfaceTemp) = 508.6123429180772177, nobs = 121, Jo/n = 4.2034077927113822, err = 0.3721203575621266 -CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 58.1877910015994004, nobs = 49, Jo/n = 1.1875059388081510, err = 1.0000000000000000 -CostJo : Nonlinear Jo(ADT) = 149.4820873907449084, nobs = 90, Jo/n = 1.6609120821193879, err = 0.1000000014901161 -CostJo : Nonlinear Jo(InsituTemperature) = 327.4846342480321368, nobs = 204, Jo/n = 1.6053168345491771, err = 0.8997488720711557 -CostJo : Nonlinear Jo(InsituSalinity) = 144.6194267356556793, nobs = 218, Jo/n = 0.6633918657598884, err = 0.6081969961943772 -CostFunction: Nonlinear J = 1256.6534082741884504 +CostJb : Nonlinear Jb = 59.4492415973704951 +CostJo : Nonlinear Jo(SeaSurfaceTemp) = 444.1238384078720856, nobs = 123, Jo/n = 3.6107629138851389, err = 0.3706290065877424 +CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 59.5333260200038552, nobs = 50, Jo/n = 1.1906665204000770, err = 1.0000000000000000 +CostJo : Nonlinear Jo(ADT) = 150.9104219724243023, nobs = 91, Jo/n = 1.6583562854112561, err = 0.1000000014901161 +CostJo : Nonlinear Jo(InsituTemperature) = 300.1571147651554270, nobs = 203, Jo/n = 1.4786064766756426, err = 0.9003481300204504 +CostJo : Nonlinear Jo(InsituSalinity) = 150.1629547995659095, nobs = 218, Jo/n = 0.6888208935759904, err = 0.6081969961943772 +CostFunction: Nonlinear J = 1164.3368975623920960 diff --git a/test/testref/3dvarfgat.test b/test/testref/3dvarfgat.test index 4e73c4576..c8fd9132a 100644 --- a/test/testref/3dvarfgat.test +++ b/test/testref/3dvarfgat.test @@ -1,23 +1,23 @@ CostJb : Nonlinear Jb = 0.0000000000000000e+00 -CostJo : Nonlinear Jo(CoolSkin) = 2.1763431423226597e+04, nobs = 48, Jo/n = 4.5340482131722075e+02, err = 3.8763170936361402e-01 -CostJo : Nonlinear Jo(SeaSurfaceTemp) = 3.3393856011141156e+02, nobs = 43, Jo/n = 7.7660130258467808e+00, err = 3.8581536591328441e-01 -CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 1.7511224050619130e+00, nobs = 15, Jo/n = 1.1674149367079420e-01, err = 1.0000000000000000e+00 -CostJo : Nonlinear Jo(ADT) = 7.9943052302124300e+01, nobs = 29, Jo/n = 2.7566569759353206e+00, err = 1.0000000149011612e-01 -CostJo : Nonlinear Jo(InsituTemperature) = 3.3968987169654760e+01, nobs = 30, Jo/n = 1.1322995723218254e+00, err = 9.1590378547213480e-01 -CostJo : Nonlinear Jo(InsituSalinity) = 1.5845797862881717e+01, nobs = 33, Jo/n = 4.8017569281459749e-01, err = 6.1042996877640276e-01 -CostJo : Nonlinear Jo(SeaIceFraction) = 2.3572786998945503e+02, nobs = 24, Jo/n = 9.8219945828939590e+00, err = 1.0000000149011612e-01 -CostJo : Nonlinear Jo(SurfaceU) = 2.0640750940226621e-01, nobs = 48, Jo/n = 4.3001564458805463e-03, err = 3.8763169345842458e-01 -CostFunction: Nonlinear J = 2.2464813220576591e+04 -RPCGMinimizer: reduction in residual norm = 1.0984405103572479e+00 +CostJo : Nonlinear Jo(CoolSkin) = 4.9634484023024434e+03, nobs = 47, Jo/n = 1.0560528515537113e+02, err = 3.8763170936361402e-01 +CostJo : Nonlinear Jo(SeaSurfaceTemp) = 3.1780648145945952e+02, nobs = 43, Jo/n = 7.3908484060339426e+00, err = 3.8581536591328441e-01 +CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 2.6167366978835638e+00, nobs = 17, Jo/n = 1.5392568811079788e-01, err = 1.0000000000000000e+00 +CostJo : Nonlinear Jo(ADT) = 8.7166288646666715e+01, nobs = 29, Jo/n = 3.0057340912643693e+00, err = 1.0000000149011612e-01 +CostJo : Nonlinear Jo(InsituTemperature) = 3.7309148937513228e+01, nobs = 31, Jo/n = 1.2035209334681687e+00, err = 9.0893990043753048e-01 +CostJo : Nonlinear Jo(InsituSalinity) = 1.6779698504915352e+01, nobs = 33, Jo/n = 5.0847571227016219e-01, err = 6.1042996877640276e-01 +CostJo : Nonlinear Jo(SeaIceFraction) = 1.9943705186059643e+02, nobs = 24, Jo/n = 8.3098771608581838e+00, err = 1.0000000149011612e-01 +CostJo : Nonlinear Jo(SurfaceU) = 4.6119926561840613e-01, nobs = 47, Jo/n = 9.8127503323065142e-03, err = 3.8763169345842458e-01 +CostFunction: Nonlinear J = 5.6250250076750963e+03 +RPCGMinimizer: reduction in residual norm = 5.2048506043922749e-01 CostFunction::addIncrement: Analysis: Valid time: 2018-04-15T00:00:00Z - cicen min=-0.0286938507175001 max=1.0484535733728246 mean=0.1201657883082741 + cicen min=-0.0036461410982119 max=1.0109931640227883 mean=0.1187047480311327 hicen min=0.0000000000000000 max=4.0326673084246947 mean=0.4712515705773916 - socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5456084508303150 - tocn min=-1.8883899372702533 max=65.1956742843954515 mean=6.0661716465521511 - uocn min=-0.8581688276801052 max=0.6999167046190556 mean=-0.0002591636654056 + socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5450531726743222 + tocn min=-1.8883899372702533 max=35.0183755472273646 mean=6.0354516565170089 + uocn min=-0.8581740826997210 max=0.7001342412896886 mean=-0.0002590794848360 vocn min=-0.7661101215480253 max=1.4377766409421606 mean=0.0021972630399530 - ssh min=-1.9193273124974539 max=0.9229452340606920 mean=-0.2765219196611397 + ssh min=-1.9226513153496561 max=0.9252938884592239 mean=-0.2768077098202168 hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 sw min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 lhf min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 @@ -36,13 +36,13 @@ layer_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.522 -CostJb : Nonlinear Jb = 4900.3526263040748745 -CostJo : Nonlinear Jo(CoolSkin) = 25202.6291327748804179, nobs = 48, Jo/n = 525.0547735994766754, err = 0.3876317093636140 -CostJo : Nonlinear Jo(SeaSurfaceTemp) = 3569.3964487326388735, nobs = 43, Jo/n = 83.0092197379683512, err = 0.3858153659132844 -CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 1.7434296462354593, nobs = 15, Jo/n = 0.1162286430823640, err = 1.0000000000000000 -CostJo : Nonlinear Jo(ADT) = 78.7542631352648357, nobs = 29, Jo/n = 2.7156642460436151, err = 0.1000000014901161 -CostJo : Nonlinear Jo(InsituTemperature) = 30.7322931173969067, nobs = 30, Jo/n = 1.0244097705798969, err = 0.9159037854721348 -CostJo : Nonlinear Jo(InsituSalinity) = 15.3470055045211904, nobs = 33, Jo/n = 0.4650607728642785, err = 0.6104299687764028 -CostJo : Nonlinear Jo(SeaIceFraction) = 200.2059396824618034, nobs = 24, Jo/n = 8.3419141534359085, err = 0.1000000014901161 -CostJo : Nonlinear Jo(SurfaceU) = 0.2048480866290061, nobs = 48, Jo/n = 0.0042676684714376, err = 0.3876316934584246 -CostFunction: Nonlinear J = 33999.3659869841067120 +CostJb : Nonlinear Jb = 495.8764189052791380 +CostJo : Nonlinear Jo(CoolSkin) = 3241.5673056968789751, nobs = 47, Jo/n = 68.9695171424867937, err = 0.3876317093636140 +CostJo : Nonlinear Jo(SeaSurfaceTemp) = 995.4286033827154370, nobs = 43, Jo/n = 23.1495024042491977, err = 0.3858153659132844 +CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 2.6093767205769982, nobs = 17, Jo/n = 0.1534927482692352, err = 1.0000000000000000 +CostJo : Nonlinear Jo(ADT) = 87.1276729159087751, nobs = 29, Jo/n = 3.0044025143416819, err = 0.1000000014901161 +CostJo : Nonlinear Jo(InsituTemperature) = 35.9880657312897370, nobs = 31, Jo/n = 1.1609053461706367, err = 0.9089399004375305 +CostJo : Nonlinear Jo(InsituSalinity) = 16.4009625219917794, nobs = 33, Jo/n = 0.4969988643027812, err = 0.6104299687764028 +CostJo : Nonlinear Jo(SeaIceFraction) = 185.7140989927694932, nobs = 24, Jo/n = 7.7380874580320622, err = 0.1000000014901161 +CostJo : Nonlinear Jo(SurfaceU) = 0.4659371855637282, nobs = 47, Jo/n = 0.0099135571396538, err = 0.3876316934584246 +CostFunction: Nonlinear J = 5061.1784420529738782 diff --git a/test/testref/3dvarfgat_pseudo.test b/test/testref/3dvarfgat_pseudo.test index e1f94a13e..6072de6f3 100644 --- a/test/testref/3dvarfgat_pseudo.test +++ b/test/testref/3dvarfgat_pseudo.test @@ -1,16 +1,16 @@ CostJb : Nonlinear Jb = 0.0000000000000000e+00 -CostJo : Nonlinear Jo(SeaSurfaceTemp) = 3.3393856011143509e+02, nobs = 43, Jo/n = 7.7660130258473279e+00, err = 3.8581536591328441e-01 -CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 1.7511224050620187e+00, nobs = 15, Jo/n = 1.1674149367080125e-01, err = 1.0000000000000000e+00 -CostJo : Nonlinear Jo(ADT) = 7.9943052275353736e+01, nobs = 29, Jo/n = 2.7566569750121976e+00, err = 1.0000000149011612e-01 -CostJo : Nonlinear Jo(InsituTemperature) = 3.3968987169654760e+01, nobs = 30, Jo/n = 1.1322995723218254e+00, err = 9.1590378547213480e-01 -CostJo : Nonlinear Jo(InsituSalinity) = 1.5845797862881909e+01, nobs = 33, Jo/n = 4.8017569281460332e-01, err = 6.1042996877640276e-01 -CostFunction: Nonlinear J = 4.6544751982438754e+02 -RPCGMinimizer: reduction in residual norm = 1.8894391616065778e-01 +CostJo : Nonlinear Jo(SeaSurfaceTemp) = 3.1780648145948271e+02, nobs = 43, Jo/n = 7.3908484060344817e+00, err = 3.8581536591328441e-01 +CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 2.6167366978836499e+00, nobs = 17, Jo/n = 1.5392568811080293e-01, err = 1.0000000000000000e+00 +CostJo : Nonlinear Jo(ADT) = 8.7166288554315003e+01, nobs = 29, Jo/n = 3.0057340880798278e+00, err = 1.0000000149011612e-01 +CostJo : Nonlinear Jo(InsituTemperature) = 3.7309148937513228e+01, nobs = 31, Jo/n = 1.2035209334681687e+00, err = 9.0893990043753048e-01 +CostJo : Nonlinear Jo(InsituSalinity) = 1.6779698504915352e+01, nobs = 33, Jo/n = 5.0847571227016219e-01, err = 6.1042996877640276e-01 +CostFunction: Nonlinear J = 4.6167835415410991e+02 +RPCGMinimizer: reduction in residual norm = 1.9186911231850326e-01 CostFunction::addIncrement: Analysis: Valid time: 2018-04-15T00:00:00Z - socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5487614919685413 - tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0123983690183875 - ssh min=-1.9289106777738321 max=0.8383521785895144 mean=-0.3092114544720755 + socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5541574810123393 + tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0075174667606959 + ssh min=-2.0865904226925553 max=0.9615468660413907 mean=-0.3503315653442778 hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 uocn min=-0.8581693992488438 max=0.7000954286848975 mean=-0.0002591771954069 vocn min=-0.7661101215480253 max=1.4377766409421606 mean=0.0021972630399530 @@ -23,10 +23,10 @@ layer_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.522 -CostJb : Nonlinear Jb = 849.1239972963485343 -CostJo : Nonlinear Jo(SeaSurfaceTemp) = 327.5678992217657424, nobs = 43, Jo/n = 7.6178581214364129, err = 0.3858153659132844 -CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 1.7511224050620187, nobs = 15, Jo/n = 0.1167414936708012, err = 1.0000000000000000 -CostJo : Nonlinear Jo(ADT) = 35.0856318503675766, nobs = 29, Jo/n = 1.2098493741506060, err = 0.1000000014901161 -CostJo : Nonlinear Jo(InsituTemperature) = 33.9689871696547598, nobs = 30, Jo/n = 1.1322995723218254, err = 0.9159037854721348 -CostJo : Nonlinear Jo(InsituSalinity) = 15.8457978628819092, nobs = 33, Jo/n = 0.4801756928146033, err = 0.6104299687764028 -CostFunction: Nonlinear J = 1263.3434358060806062 +CostJb : Nonlinear Jb = 931.2855866357992909 +CostJo : Nonlinear Jo(SeaSurfaceTemp) = 311.9961441522754626, nobs = 43, Jo/n = 7.2557242826110571, err = 0.3858153659132844 +CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 2.6167366978836499, nobs = 17, Jo/n = 0.1539256881108029, err = 1.0000000000000000 +CostJo : Nonlinear Jo(ADT) = 52.8891580740285505, nobs = 29, Jo/n = 1.8237640715182259, err = 0.1000000014901161 +CostJo : Nonlinear Jo(InsituTemperature) = 37.3091489375132284, nobs = 31, Jo/n = 1.2035209334681687, err = 0.9089399004375305 +CostJo : Nonlinear Jo(InsituSalinity) = 16.7796985049153520, nobs = 33, Jo/n = 0.5084757122701622, err = 0.6104299687764028 +CostFunction: Nonlinear J = 1352.8764730024154233 diff --git a/test/testref/3dvarlowres_soca.test b/test/testref/3dvarlowres_soca.test index 870d73907..f0416723d 100644 --- a/test/testref/3dvarlowres_soca.test +++ b/test/testref/3dvarlowres_soca.test @@ -1,16 +1,16 @@ CostJb : Nonlinear Jb = 0.0000000000000000e+00 -CostJo : Nonlinear Jo(SeaSurfaceTemp) = 8.5623789494364155e+02, nobs = 148, Jo/n = 5.7853911820516322e+00, err = 3.6134602983026659e-01 -CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 4.8805775287685364e+01, nobs = 49, Jo/n = 9.9603623036092581e-01, err = 1.0000000000000000e+00 -CostJo : Nonlinear Jo(ADT) = 1.4289835039600914e+02, nobs = 88, Jo/n = 1.6238448908637402e+00, err = 1.0000000149011612e-01 -CostJo : Nonlinear Jo(InsituTemperature) = 3.0207389049976359e+02, nobs = 201, Jo/n = 1.5028551766157392e+00, err = 8.9127767893751042e-01 -CostJo : Nonlinear Jo(InsituSalinity) = 3.2537388217310451e+02, nobs = 218, Jo/n = 1.4925407439133234e+00, err = 6.0819699619437717e-01 -CostFunction: Nonlinear J = 1.6753897933002040e+03 -RPCGMinimizer: reduction in residual norm = 9.0700304404395915e-02 +CostJo : Nonlinear Jo(SeaSurfaceTemp) = 7.8349292492913401e+02, nobs = 148, Jo/n = 5.2938711143860404e+00, err = 3.6139744797888412e-01 +CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 4.9679661574589510e+01, nobs = 51, Jo/n = 9.7411101126646094e-01, err = 1.0000000000000000e+00 +CostJo : Nonlinear Jo(ADT) = 1.2846395537995437e+02, nobs = 87, Jo/n = 1.4765971882753377e+00, err = 1.0000000149011612e-01 +CostJo : Nonlinear Jo(InsituTemperature) = 3.4357428588263724e+02, nobs = 206, Jo/n = 1.6678363392361031e+00, err = 8.9914415084947397e-01 +CostJo : Nonlinear Jo(InsituSalinity) = 3.4655706446545878e+02, nobs = 218, Jo/n = 1.5897113048874256e+00, err = 6.0819699619437717e-01 +CostFunction: Nonlinear J = 1.6517678922317739e+03 +RPCGMinimizer: reduction in residual norm = 9.7423095545183969e-02 CostFunction::addIncrement: Analysis: Valid time: 2018-04-15T00:00:00Z - socn min=10.7212831781034481 max=40.4416882865872509 mean=34.5449753282456911 - tocn min=-2.0970438088636754 max=31.9950043113366718 mean=6.0273190254761433 - ssh min=-1.9645786505882856 max=0.9035583005072521 mean=-0.2791131422853629 + socn min=10.7211454688298637 max=40.4416975635020464 mean=34.5451924330062425 + tocn min=-2.0250616941373800 max=31.9809449259507943 mean=6.0270858665869822 + ssh min=-2.0101584831178037 max=0.9059493873601913 mean=-0.2796082501025529 hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 mld min=2.2854716757984130 max=4593.1533423819937525 mean=192.4109073940401515 layer_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.5229536158392420 @@ -21,10 +21,10 @@ layer_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.522 -CostJb : Nonlinear Jb = 227.7974569933011537 -CostJo : Nonlinear Jo(SeaSurfaceTemp) = 297.2675621910284463, nobs = 148, Jo/n = 2.0085646093988410, err = 0.3613460298302666 -CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 48.8505460712182895, nobs = 49, Jo/n = 0.9969499198207814, err = 1.0000000000000000 -CostJo : Nonlinear Jo(ADT) = 106.3041406336327839, nobs = 88, Jo/n = 1.2080015981094634, err = 0.1000000014901161 -CostJo : Nonlinear Jo(InsituTemperature) = 129.4904605516068443, nobs = 201, Jo/n = 0.6442311470229196, err = 0.8912776789375104 -CostJo : Nonlinear Jo(InsituSalinity) = 274.9671651674387931, nobs = 218, Jo/n = 1.2613172714102696, err = 0.6081969961943772 -CostFunction: Nonlinear J = 1084.6773316082262681 +CostJb : Nonlinear Jb = 247.2970677811429141 +CostJo : Nonlinear Jo(SeaSurfaceTemp) = 304.8949002117833516, nobs = 148, Jo/n = 2.0601006771066444, err = 0.3613974479788841 +CostJo : Nonlinear Jo(SeaSurfaceSalinity) = 49.7228068394711613, nobs = 51, Jo/n = 0.9749569968523757, err = 1.0000000000000000 +CostJo : Nonlinear Jo(ADT) = 87.5069625402823306, nobs = 87, Jo/n = 1.0058271556354290, err = 0.1000000014901161 +CostJo : Nonlinear Jo(InsituTemperature) = 147.3995389675887111, nobs = 206, Jo/n = 0.7155317425611103, err = 0.8991441508494740 +CostJo : Nonlinear Jo(InsituSalinity) = 291.6384933375049968, nobs = 218, Jo/n = 1.3377912538417660, err = 0.6081969961943772 +CostFunction: Nonlinear J = 1128.4597696777734654 diff --git a/test/testref/addincrement.test b/test/testref/addincrement.test index 2e30a47af..f44a146e4 100644 --- a/test/testref/addincrement.test +++ b/test/testref/addincrement.test @@ -14,15 +14,15 @@ layer_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.522 Increment: Valid time: 2018-04-15T00:00:00Z hsnon min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 - socn min=-0.0001132105776647 max=0.0037003242219571 mean=0.0000026687904894 - tocn min=-0.1091883600172713 max=0.4337352128256223 mean=0.0010549917377577 + socn min=-0.0001052975794454 max=0.0036676711597962 mean=0.0000025948881890 + tocn min=-0.0937701759334219 max=0.0916147861820920 mean=0.0007499060728516 State plus increment: Valid time: 2018-04-15T00:00:00Z cicen min=0.0000000000000000 max=1.0000000000000000 mean=0.1175125761012928 hicen min=0.0000000000000000 max=4.0326673084246947 mean=0.4712515705773916 hsnon min=0.0000000000000000 max=1.2712833951042413 mean=0.0886865877527975 - socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5443923949429958 - tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0186199500911171 + socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5443923210406965 + tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0183148644262134 ssh min=-1.9244847628277935 max=0.9272826517867588 mean=-0.2767903423591662 hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 uocn min=-0.8581693992488438 max=0.7000954286848975 mean=-0.0002591771954069 diff --git a/test/testref/checkpointmodel.test b/test/testref/checkpointmodel.test index 0caa934ad..6dd58e410 100644 --- a/test/testref/checkpointmodel.test +++ b/test/testref/checkpointmodel.test @@ -7,12 +7,12 @@ input background: analysis: Valid time: 2018-04-15T00:00:00Z - socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5443924471389820 - tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0186193018510092 + socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5443923210406965 + tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0183148644262134 hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 output background: Valid time: 2018-04-15T00:00:00Z - socn min=10.7210460395083924 max=38.0000000000000000 mean=34.5397728582668080 - tocn min=-1.8000000000000000 max=31.7004645720658580 mean=6.0187576529037639 + socn min=10.7210460395083924 max=38.0000000000000000 mean=34.5397727321684940 + tocn min=-1.8000000000000000 max=31.7004645720658580 mean=6.0184532881230473 hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 diff --git a/test/testref/convertincrement.test b/test/testref/convertincrement.test index c8fe58233..b199b66fe 100644 --- a/test/testref/convertincrement.test +++ b/test/testref/convertincrement.test @@ -1,8 +1,8 @@ Input increment: Valid time: 2018-04-15T00:00:00Z - tocn min=-0.1091883600172713 max=0.4337352128256223 mean=0.0010549917377577 - socn min=-0.0001132105776647 max=0.0037003242219571 mean=0.0000026687904894 - ssh min=-0.0001214912739349 max=0.0011960692342096 mean=0.0000061601768314 + tocn min=-0.0937701759334219 max=0.0916147861820920 mean=0.0007499060728516 + socn min=-0.0001052975794454 max=0.0036676711597962 mean=0.0000025948881890 + ssh min=-0.0001334771319600 max=0.0005896992435650 mean=0.0000039179219967 hocn min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 Trajectory state: Valid time: 2018-04-15T00:00:00Z @@ -14,7 +14,7 @@ layer_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.522 mld min=2.2854716757984130 max=4593.1533423819937525 mean=192.4109073940401515 Output increment: Valid time: 2018-04-15T00:00:00Z - tocn min=-0.1091883600172713 max=0.4337352128256223 mean=0.0010549917377577 - socn min=-0.0001132105776647 max=0.0037003242219571 mean= -nan - ssh min=-0.0006600054957741 max=0.0032184780455245 mean=0.0000358588485590 + tocn min=-0.0937701759334219 max=0.0916147861820920 mean=0.0007499060728516 + socn min=-0.0001052975794454 max=0.0036676711597962 mean= -nan + ssh min=-0.0005644408490946 max=0.0015921913987081 mean=0.0000259244097400 hocn min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 diff --git a/test/testref/enshofx.test b/test/testref/enshofx.test index bc5807192..f02bfe4dc 100644 --- a/test/testref/enshofx.test +++ b/test/testref/enshofx.test @@ -25,18 +25,18 @@ Final state: lw min=0.0000000000000000 max=88.0360870361328125 mean=31.3955290035652546 us min=0.0000000000000000 max=0.0191600705253526 mean=0.0072022693699426 H(x): -CoolSkin nobs= 17 Min=6.0627772513802256, Max=23.1967691583962505, RMS=18.9885826924409606 +CoolSkin nobs= 17 Min=6.4184094597963508, Max=23.4360766842463590, RMS=19.0182532611639559 -SeaSurfaceTemp nobs= 17 Min=9.8921248027313027, Max=29.4997913294705185, RMS=24.0968618514646948 +SeaSurfaceTemp nobs= 17 Min=10.1567087107367886, Max=29.4153430541735794, RMS=24.1148183951793555 -SeaSurfaceSalinity nobs= 14 Min=32.7541650976392660, Max=35.2274929136403756, RMS=34.5825503686920825 +SeaSurfaceSalinity nobs= 14 Min=32.9830992724919838, Max=35.2276559738359438, RMS=34.6190493602502229 -ADT nobs= 11 Min=-0.9225752171031246, Max=1.0155897449527642, RMS=0.6997990398341890 +ADT nobs= 11 Min=-0.8910533633604826, Max=0.9569717890422335, RMS=0.6748116185944956 -InsituTemperature nobs= 10 Min=8.4050526862818629, Max=27.9887067647417176, RMS=19.4272242262714840 +InsituTemperature nobs= 10 Min=8.4022435712806338, Max=28.0575700626485336, RMS=19.2716793070919046 -InsituSalinity nobs= 10 Min=34.6621658591148574, Max=35.0705638951343985, RMS=34.9687957253685013 +InsituSalinity nobs= 10 Min=34.6597057206242027, Max=34.9860734270912346, RMS=34.8888690522911347 -SeaIceFraction nobs= 8 Min=0.0140515611908866, Max=0.9990190564788424, RMS=0.7155727989021692 +SeaIceFraction nobs= 8 Min=0.0000001155127090, Max=0.9989275648409216, RMS=0.7009249333914824 End H(x) diff --git a/test/testref/hofx_3d.test b/test/testref/hofx_3d.test index c4a309458..46f405069 100644 --- a/test/testref/hofx_3d.test +++ b/test/testref/hofx_3d.test @@ -16,28 +16,28 @@ State: us min=0.0043958698226386 max=0.0196578730801191 mean=0.0086443089692577 chl min=0.0000100000000000 max=4.6719899196170607 mean=0.1184829680403295 H(x): -CoolSkin nobs= 201 Min=-69.3563424501019199, Max=25.0855058578247281, RMS=21.1353667059005836 +CoolSkin nobs= 200 Min=-4.1785594844341176, Max=25.2197343303870412, RMS=20.1355481819576383 -SeaSurfaceTemp nobs= 201 Min=-0.7322313691851292, Max=30.6470963745313973, RMS=24.2024040632344999 +SeaSurfaceTemp nobs= 200 Min=-0.7441076047036211, Max=30.6558206487590255, RMS=24.2399178481423263 -SeaSurfaceSalinity nobs= 100 Min=32.0695712201999683, Max=37.0724958471873620, RMS=34.7607391541313504 +SeaSurfaceSalinity nobs= 100 Min=32.8836750765081902, Max=37.0801278476553193, RMS=34.7676006134783506 -ADT nobs= 100 Min=-1.2371595459773621, Max=1.4228027169739978, RMS=0.7544068851496681 +ADT nobs= 99 Min=-1.2334297014633941, Max=1.4139517986919645, RMS=0.7474487596218524 -InsituTS nobs= 436 Min=7.7564237967821423, Max=36.0324977569576888, RMS=28.9904084175918939 +InsituTS nobs= 436 Min=7.7995978223639364, Max=36.0186808894957267, RMS=28.9607495930119256 -InsituTemperature nobs= 218 Min=7.7564237967821423, Max=30.4315387295554807, RMS=21.2829112889100820 +InsituTemperature nobs= 218 Min=7.7995978223639364, Max=30.4001198685169918, RMS=21.2243712881254147 -InsituSalinity nobs= 218 Min=34.1714802930882513, Max=36.0324977569576888, RMS=35.0417643320930736 +InsituSalinity nobs= 218 Min=34.1391348515148039, Max=36.0186808894957267, RMS=35.0282185873344005 -SeaIceFraction nobs= 100 Min=0.0000000000000000, Max=1.0000000000000002, RMS=0.6946843513351695 +SeaIceFraction nobs= 96 Min=0.0000000000000000, Max=0.9999999999999999, RMS=0.6969513764074570 -SeaIceFreeboard nobs= 376 Min=-0.0713249319702559, Max=0.2571655810649418, RMS=0.0562449615932845 +SeaIceFreeboard nobs= 286 Min=-0.0696922177149834, Max=0.2750439383765838, RMS=0.0518468018186912 -Chlorophyll nobs= 137 Min=0.0028259846194569, Max=2.0376239051939695, RMS=0.3267578915293713 +Chlorophyll nobs= 137 Min=0.0029618509113541, Max=2.6146242767720782, RMS=0.3736317108789671 -SurfaceU nobs= 201 Min=-0.5867454298994841, Max=0.3557742003717158, RMS=0.1657753109748515 +SurfaceU nobs= 200 Min=-0.6389024077305796, Max=0.3885039618613573, RMS=0.1663702932634859 -SurfaceV nobs= 201 Min=-0.3466093113365661, Max=0.3615105183946977, RMS=0.1074586526896086 +SurfaceV nobs= 200 Min=-0.3381740415739801, Max=0.4480817217292362, RMS=0.1155115339081705 End H(x) diff --git a/test/testref/hofx_4d.test b/test/testref/hofx_4d.test index 33e945b02..0e8b20092 100644 --- a/test/testref/hofx_4d.test +++ b/test/testref/hofx_4d.test @@ -29,22 +29,22 @@ Final state: lw min=0.0000000000000000 max=88.0360870361328125 mean=31.3955290035652546 us min=0.0000000000000000 max=0.0191600705253526 mean=0.0072022693699425 H(x): -CoolSkin nobs= 21 Min=1.5082573522971074, Max=24.1800345643767400, RMS=19.5351780069578744 +CoolSkin nobs= 21 Min=1.4428948751562416, Max=24.1361555774724366, RMS=19.7711636669012556 -SeaSurfaceTemp nobs= 21 Min=5.8309704566891210, Max=29.7378185241803799, RMS=26.1577462571012092 +SeaSurfaceTemp nobs= 21 Min=5.8474277121364064, Max=29.7602622236446877, RMS=26.1545701582134633 -SeaSurfaceSalinity nobs= 9 Min=33.2743815533169496, Max=35.7410672128776667, RMS=34.4650987043532666 +SeaSurfaceSalinity nobs= 9 Min=33.2253035608204002, Max=35.5527553210047955, RMS=34.4334800605473461 -ADT nobs= 14 Min=-0.6625380750677173, Max=1.5203999028920610, RMS=1.0050261461602679 +ADT nobs= 14 Min=-0.7588416066076941, Max=1.5069285902191589, RMS=1.0234497296579281 -InsituTemperature nobs= 10 Min=8.0438979412893303, Max=30.2529092811966542, RMS=23.7282607098962366 +InsituTemperature nobs= 10 Min=8.0070271630434053, Max=30.4007245259000989, RMS=23.8358475396981540 -InsituSalinity nobs= 10 Min=34.1710542427590696, Max=35.7078148625386689, RMS=35.0567893961092523 +InsituSalinity nobs= 10 Min=34.1391616396567841, Max=35.6996397017128544, RMS=35.0158426602011090 -SeaIceFraction nobs= 14 Min=0.0000038782816089, Max=0.9999900311148553, RMS=0.6725446661640051 +SeaIceFraction nobs= 14 Min=0.0000030348019657, Max=0.9972442090213249, RMS=0.6886532456176404 -SurfaceU nobs= 21 Min=-0.5177690928672425, Max=0.0968241094776443, RMS=0.2735887483625490 +SurfaceU nobs= 21 Min=-0.5064808191553183, Max=0.0839417421563783, RMS=0.2906589228496731 -SurfaceV nobs= 21 Min=-0.3466093113365661, Max=0.1659012191841834, RMS=0.1426866284503965 +SurfaceV nobs= 21 Min=-0.2822470601936044, Max=0.2243200432575072, RMS=0.1317010425260674 End H(x) diff --git a/test/testref/hofx_4d_pseudo.test b/test/testref/hofx_4d_pseudo.test index 8f523e687..e788f2b50 100644 --- a/test/testref/hofx_4d_pseudo.test +++ b/test/testref/hofx_4d_pseudo.test @@ -15,14 +15,14 @@ Final state: uocn min=-0.8496117748396494 max=0.6890666856088563 mean=0.0000321916028576 vocn min=-0.9321576238931384 max=0.9467331169326910 mean=0.0016143192702768 H(x): -SeaSurfaceTemp nobs= 21 Min=5.8309704566891210, Max=29.7378185241803799, RMS=26.1577462571012092 +SeaSurfaceTemp nobs= 21 Min=5.8474277121364064, Max=29.7602622236446877, RMS=26.1545701582134633 -SeaSurfaceSalinity nobs= 9 Min=33.2743815533169496, Max=35.7410672128776667, RMS=34.4650987043532666 +SeaSurfaceSalinity nobs= 9 Min=33.2253035608204002, Max=35.5527553210047955, RMS=34.4334800605473461 -ADT nobs= 14 Min=-0.6625380750677173, Max=1.5203999028920610, RMS=1.0050261461602679 +ADT nobs= 14 Min=-0.7588416066076941, Max=1.5069285902191589, RMS=1.0234497296579281 -InsituTemperature nobs= 10 Min=8.0438979412893303, Max=30.2529092811966542, RMS=23.7282607098962366 +InsituTemperature nobs= 10 Min=8.0070271630434053, Max=30.4007245259000989, RMS=23.8358475396981540 -InsituSalinity nobs= 10 Min=34.1710542427590696, Max=35.7078148625386689, RMS=35.0567893961092523 +InsituSalinity nobs= 10 Min=34.1391616396567841, Max=35.6996397017128544, RMS=35.0158426602011090 End H(x) diff --git a/test/testref/letkf.test b/test/testref/letkf.test index 7ab0e5ff0..9d173ed28 100644 --- a/test/testref/letkf.test +++ b/test/testref/letkf.test @@ -43,39 +43,39 @@ Initial state for member 4: biop min=-0.0000000007072830 max=0.0000001876715923 mean=0.0000000065402892 H(x) for member 1: -SeaSurfaceTemp nobs= 201 Min=-0.7322313691851327, Max=30.3260310026576114, RMS=24.1353075851975873 +SeaSurfaceTemp nobs= 200 Min=-0.7441076047036211, Max=30.2955112206964401, RMS=24.1664837132353441 -ADT nobs= 100 Min=-1.2046244769532173, Max=1.3994643129512321, RMS=0.7584036840871872 +ADT nobs= 99 Min=-1.1923713065292145, Max=1.3916260008199295, RMS=0.7504264800238478 H(x) for member 2: -SeaSurfaceTemp nobs= 201 Min=-1.1982058720171285, Max=30.5126144254366558, RMS=24.1935934256280021 +SeaSurfaceTemp nobs= 200 Min=-1.2863446879039639, Max=30.4841785881009670, RMS=24.2312506827673673 -ADT nobs= 100 Min=-1.1890192698706874, Max=1.3812933118642943, RMS=0.7357651441484911 +ADT nobs= 99 Min=-1.1897933830438123, Max=1.3713086760738142, RMS=0.7276861479842313 H(x) for member 3: -SeaSurfaceTemp nobs= 201 Min=-0.7322313691851327, Max=30.2489153948527516, RMS=24.3135054537626196 +SeaSurfaceTemp nobs= 200 Min=-0.7441076047036211, Max=30.2952580792004262, RMS=24.3474545696390692 -ADT nobs= 100 Min=-1.3345054304899966, Max=1.4309566544834118, RMS=0.7549605478195652 +ADT nobs= 99 Min=-1.3099837851441407, Max=1.4204194886710029, RMS=0.7461543998221180 H(x) for member 4: -SeaSurfaceTemp nobs= 201 Min=-0.8031276849497528, Max=30.5292038354936750, RMS=24.1523956770570187 +SeaSurfaceTemp nobs= 200 Min=-0.8409264954611300, Max=30.6045092155533602, RMS=24.1878325277770436 -ADT nobs= 100 Min=-1.1449419954434752, Max=1.4297324793892008, RMS=0.7393490228355885 +ADT nobs= 99 Min=-1.1117642360155990, Max=1.4200699920384396, RMS=0.7328194094163875 H(x) ensemble background mean: -SeaSurfaceTemp nobs= 201 Min=-0.7322313691851327, Max=30.3847050663395493, RMS=24.1945792825144679 +SeaSurfaceTemp nobs= 200 Min=-0.7441076047036211, Max=30.3823358499043188, RMS=24.2290644633085890 -ADT nobs= 100 Min=-1.2064808621960137, Max=1.4103616896720348, RMS=0.7453618131010354 +ADT nobs= 99 Min=-1.2006910934514909, Max=1.4008560394007965, RMS=0.7375376522615416 background y - H(x): -SeaSurfaceTemp nobs= 201 Min=-5.9701626105867547, Max=3.4956076390451649, RMS=1.3551960507271437 +SeaSurfaceTemp nobs= 200 Min=-5.7729528751167436, Max=4.0109120120212314, RMS=1.3121091098438074 -ADT nobs= 100 Min=-0.5705662277698025, Max=1.0042623519065415, RMS=0.2144579595070073 +ADT nobs= 99 Min=-0.5287956883999732, Max=1.0899684904517966, RMS=0.2107554631800747 Background mean : @@ -91,25 +91,25 @@ Background mean : Analysis mean : Valid time: 2018-04-15T00:00:00Z - socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5462990177629123 - tocn min=-4.0612959509261515 max=39.0283567926667558 mean=6.0651233549222781 - ssh min=-1.9921227740814924 max=0.9362225632421921 mean=-0.2886326772569018 - uocn min=-0.8572887558230204 max=0.7002088648941898 mean=-0.0002588008045454 - vocn min=-0.7661871809999496 max=1.4343632906506869 mean=0.0022632716111829 + socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5460582533093188 + tocn min=-4.1420151042420219 max=39.0742940340608271 mean=6.0527804302216772 + ssh min=-1.9808850587334716 max=0.9356684587670925 mean=-0.2892739626094919 + uocn min=-0.8569747929971832 max=0.6992920028847295 mean=-0.0002609623525139 + vocn min=-0.7669710796528207 max=1.4343633775728784 mean=0.0022635735165409 hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 - chl min=-0.0223766113587092 max=4.6774058678598118 mean=0.1184397153921135 - biop min=-0.0000000006385478 max=0.0000001876708057 mean=0.0000000065372059 + chl min=-0.0298669042139454 max=4.6772024962675101 mean=0.1184346217818456 + biop min=-0.0000000009544849 max=0.0000001880204003 mean=0.0000000065358238 Analysis mean increment : Valid time: 2018-04-15T00:00:00Z - socn min=-2.2367513037643576 max=2.5434661174541802 mean=0.0203418488900606 - tocn min=-7.0518317040384719 max=10.9927053790990286 mean=0.0087792166147036 - ssh min=-0.6668061617900494 max=0.3145393942636492 mean=-0.0163035018168075 - uocn min=-0.0238265489747354 max=0.0351487905872322 mean=0.0000166300476507 - vocn min=-0.0146045155192009 max=0.0560508063319643 mean=0.0000569206648489 + socn min=-2.5111176119167560 max=2.0210914091274503 mean=0.0201010844364589 + tocn min=-6.9066492864987161 max=11.0386426204930999 mean=-0.0035637080858972 + ssh min=-0.7525950953079572 max=0.3561891477540637 mean=-0.0169447871693975 + uocn min=-0.0240690528881808 max=0.0350495637061460 mean=0.0000144684996823 + vocn min=-0.0146415870423201 max=0.0575333116935723 mean=0.0000572225702069 hocn min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 - chl min=-0.0860139302907283 max=0.0898769906790298 mean=-0.0000577863207671 - biop min=-0.0000000059812014 max=0.0000000051507168 mean=-0.0000000000022619 + chl min=-0.0858357518258490 max=0.0852125535358046 mean=-0.0000628799310351 + biop min=-0.0000000083973247 max=0.0000000059423443 mean=-0.0000000000036440 Forecast variance : Valid time: 2018-04-15T00:00:00Z socn min=0.0000000000000000 max=1.8239276341677120 mean=0.0465030040856202 @@ -122,49 +122,49 @@ Forecast variance : biop min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 Analysis variance : Valid time: 2018-04-15T00:00:00Z - socn min=0.0000000000000000 max=1.7379026709537388 mean=0.0413842464425387 - tocn min=0.0000000000000000 max=8.0763622852725163 mean=0.2321989586434825 - ssh min=0.0000000000000000 max=0.0538534029826315 mean=0.0029493310447659 - uocn min=0.0000000000000000 max=0.0001164438742400 mean=0.0000012905231603 - vocn min=0.0000000000000000 max=0.0001011759731031 mean=0.0000006251302101 + socn min=0.0000000000000000 max=1.7162477771883140 mean=0.0414300020489708 + tocn min=0.0000000000000000 max=8.1408342488048682 mean=0.2329541096542200 + ssh min=0.0000000000000000 max=0.0544573956569277 mean=0.0029605566333293 + uocn min=0.0000000000000000 max=0.0001168660285223 mean=0.0000012919697748 + vocn min=0.0000000000000000 max=0.0001011941501286 mean=0.0000006258398684 hocn min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 - chl min=0.0000000000071484 max=0.0043386895960810 mean=0.0000129974814784 + chl min=0.0000000000071484 max=0.0043382986032581 mean=0.0000130242093228 biop min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 H(x) for member 1: -SeaSurfaceTemp nobs= 201 Min=-1.1490034575226640, Max=30.1741689292511204, RMS=23.9669224092537227 +SeaSurfaceTemp nobs= 200 Min=-1.2017604877912396, Max=30.4622962082671478, RMS=24.0149394365831803 -ADT nobs= 100 Min=-1.2630887784337497, Max=1.4208208019671762, RMS=0.7699436270028067 +ADT nobs= 99 Min=-1.2514894507247609, Max=1.4076713991590450, RMS=0.7655671941924330 H(x) for member 2: -SeaSurfaceTemp nobs= 201 Min=-1.3068783970657549, Max=30.3495276288051947, RMS=24.0156067290526636 +SeaSurfaceTemp nobs= 200 Min=-1.3293539570723611, Max=30.8061036309186136, RMS=24.0698618459434712 -ADT nobs= 100 Min=-1.2727567158391646, Max=1.4055141948506078, RMS=0.7495843586165940 +ADT nobs= 99 Min=-1.2715243724648180, Max=1.3898582112779911, RMS=0.7452627490779942 H(x) for member 3: -SeaSurfaceTemp nobs= 201 Min=-1.5508736785484025, Max=30.3387803526481825, RMS=24.1195254641361814 +SeaSurfaceTemp nobs= 200 Min=-1.6065211291257153, Max=30.3285104733377082, RMS=24.1704608680599122 -ADT nobs= 100 Min=-1.4045232861954737, Max=1.4523638818367581, RMS=0.7675465183044230 +ADT nobs= 99 Min=-1.3753653310782692, Max=1.4360654938288577, RMS=0.7622439001356500 H(x) for member 4: -SeaSurfaceTemp nobs= 201 Min=-0.9460857418765851, Max=30.6718510895404286, RMS=23.9825887797950799 +SeaSurfaceTemp nobs= 200 Min=-0.9165133674704848, Max=30.6634693022188465, RMS=24.0341242343249810 -ADT nobs= 100 Min=-1.1985235337502176, Max=1.4527600554349576, RMS=0.7530033668059284 +ADT nobs= 99 Min=-1.1906839978389554, Max=1.4376260611915415, RMS=0.7495567552237363 H(x) ensemble analysis mean: -SeaSurfaceTemp nobs= 201 Min=-0.7322313691851327, Max=30.2866501348328718, RMS=24.0180727141697297 +SeaSurfaceTemp nobs= 200 Min=-0.7441076047036211, Max=30.2952436529921378, RMS=24.0692059834924414 -ADT nobs= 100 Min=-1.2847230785546513, Max=1.4328647335223750, RMS=0.7586221213004170 +ADT nobs= 99 Min=-1.2722657880267008, Max=1.4178052913643588, RMS=0.7542778104026348 analysis y - H(x): -SeaSurfaceTemp nobs= 201 Min=-3.7832731313512298, Max=2.7364113148408435, RMS=0.8067480419133459 +SeaSurfaceTemp nobs= 200 Min=-2.6781806478141661, Max=2.8028079747317669, RMS=0.7906203680435694 -ADT nobs= 100 Min=-0.5713462341327117, Max=0.9297004897249407, RMS=0.1947742469746562 +ADT nobs= 99 Min=-0.5178761356349733, Max=1.0300253402999773, RMS=0.1919918062649364 -ombg RMS: 1.1143089945812188 -oman RMS: 0.6687446059838700 +ombg RMS: 1.0799532875562872 +oman RMS: 0.6559869323956541 diff --git a/test/testref/letkf_split_observer.test b/test/testref/letkf_split_observer.test index 025d0498f..e1fa09b9e 100644 --- a/test/testref/letkf_split_observer.test +++ b/test/testref/letkf_split_observer.test @@ -43,38 +43,38 @@ Initial state for member 4: biop min=-0.0000000007072830 max=0.0000001876715923 mean=0.0000000065402892 H(x) for member 1: -SeaSurfaceTemp nobs= 201 Min=-0.7322313691851327, Max=30.3260310026576114, RMS=24.1353075851975838 +SeaSurfaceTemp nobs= 200 Min=-0.7441076047036211, Max=30.2955112206964401, RMS=24.1664837132353405 -ADT nobs= 100 Min=-1.2046244769532175, Max=1.3994643129512321, RMS=0.7584036840871871 +ADT nobs= 99 Min=-1.1923713065292147, Max=1.3916260008199293, RMS=0.7504264800238476 H(x) for member 2: -SeaSurfaceTemp nobs= 201 Min=-1.1982058720171285, Max=30.5126144254366558, RMS=24.1935934256280021 +SeaSurfaceTemp nobs= 200 Min=-1.2863446879039639, Max=30.4841785881009670, RMS=24.2312506827673708 -ADT nobs= 100 Min=-1.1890192698706872, Max=1.3812933118642947, RMS=0.7357651441484911 +ADT nobs= 99 Min=-1.1897933830438123, Max=1.3713086760738142, RMS=0.7276861479842313 H(x) for member 3: -SeaSurfaceTemp nobs= 201 Min=-0.7322313691851327, Max=30.2489153948527516, RMS=24.3135054537626161 +SeaSurfaceTemp nobs= 200 Min=-0.7441076047036211, Max=30.2952580792004262, RMS=24.3474545696390692 -ADT nobs= 100 Min=-1.3345054304899966, Max=1.4309566544834118, RMS=0.7549605478195652 +ADT nobs= 99 Min=-1.3099837851441407, Max=1.4204194886710029, RMS=0.7461543998221180 H(x) for member 4: -SeaSurfaceTemp nobs= 201 Min=-0.8031276849497528, Max=30.5292038354936750, RMS=24.1523956770570187 +SeaSurfaceTemp nobs= 200 Min=-0.8409264954611300, Max=30.6045092155533602, RMS=24.1878325277770436 -ADT nobs= 100 Min=-1.1449419954434752, Max=1.4297324793892008, RMS=0.7393490228355885 +ADT nobs= 99 Min=-1.1117642360155993, Max=1.4200699920384396, RMS=0.7328194094163875 H(x) ensemble background mean: -SeaSurfaceTemp nobs= 201 Min=-0.7322313691851327, Max=30.3847050663395493, RMS=24.1945792825144714 +SeaSurfaceTemp nobs= 200 Min=-0.7441076047036211, Max=30.3823358499043188, RMS=24.2290644633085961 -ADT nobs= 100 Min=-1.2064808621960137, Max=1.4103616896720348, RMS=0.7453618131010354 +ADT nobs= 99 Min=-1.2006910934514909, Max=1.4008560394007965, RMS=0.7375376522615414 background y - H(x): -SeaSurfaceTemp nobs= 201 Min=-5.9701626105867547, Max=3.4956076390451649, RMS=1.3551960507271437 +SeaSurfaceTemp nobs= 200 Min=-5.7729528751167436, Max=4.0109120120212314, RMS=1.3121091098438071 -ADT nobs= 100 Min=-0.5705662277698025, Max=1.0042623519065415, RMS=0.2144579595070073 +ADT nobs= 99 Min=-0.5287956883999732, Max=1.0899684904517966, RMS=0.2107554631800748 diff --git a/test/testref/letkf_split_solver.test b/test/testref/letkf_split_solver.test index 9f0328865..6ef7748f8 100644 --- a/test/testref/letkf_split_solver.test +++ b/test/testref/letkf_split_solver.test @@ -43,39 +43,39 @@ Initial state for member 4: biop min=-0.0000000007072830 max=0.0000001876715923 mean=0.0000000065402892 H(x) for member 1: -SeaSurfaceTemp nobs= 201 Min=-0.7322313785552979, Max=30.3260307312011719, RMS=24.1353076148479140 +SeaSurfaceTemp nobs= 200 Min=-0.7441076040267944, Max=30.2955112457275391, RMS=24.1664837135364508 -ADT nobs= 100 Min=-1.2046245336532593, Max=1.3994643688201904, RMS=0.7584036857125211 +ADT nobs= 99 Min=-1.1923712491989136, Max=1.3916260004043579, RMS=0.7504264789495512 H(x) for member 2: -SeaSurfaceTemp nobs= 201 Min=-1.1982058286666870, Max=30.5126152038574219, RMS=24.1935934570962736 +SeaSurfaceTemp nobs= 200 Min=-1.2863446474075317, Max=30.4841785430908203, RMS=24.2312506631285345 -ADT nobs= 100 Min=-1.1890193223953247, Max=1.3812932968139648, RMS=0.7357651475310275 +ADT nobs= 99 Min=-1.1897933483123779, Max=1.3713086843490601, RMS=0.7276861474621327 H(x) for member 3: -SeaSurfaceTemp nobs= 201 Min=-0.7322313785552979, Max=30.2489147186279297, RMS=24.3135054034296374 +SeaSurfaceTemp nobs= 200 Min=-0.7441076040267944, Max=30.2952575683593750, RMS=24.3474545828501725 -ADT nobs= 100 Min=-1.3345054388046265, Max=1.4309566020965576, RMS=0.7549605433041761 +ADT nobs= 99 Min=-1.3099837303161621, Max=1.4204194545745850, RMS=0.7461543998130861 H(x) for member 4: -SeaSurfaceTemp nobs= 201 Min=-0.8031277060508728, Max=30.5292034149169922, RMS=24.1523957591642144 +SeaSurfaceTemp nobs= 200 Min=-0.8409264683723450, Max=30.6045093536376953, RMS=24.1878325159965399 -ADT nobs= 100 Min=-1.1449420452117920, Max=1.4297324419021606, RMS=0.7393490172571218 +ADT nobs= 99 Min=-1.1117641925811768, Max=1.4200699329376221, RMS=0.7328194018518309 H(x) ensemble background mean: -SeaSurfaceTemp nobs= 201 Min=-0.7322313785552979, Max=30.3847050666809082, RMS=24.1945793056424669 +SeaSurfaceTemp nobs= 200 Min=-0.7441076040267944, Max=30.3823356628417969, RMS=24.2290644588743405 -ADT nobs= 100 Min=-1.2064808607101440, Max=1.4103616774082184, RMS=0.7453618118771068 +ADT nobs= 99 Min=-1.2006910443305969, Max=1.4008560180664062, RMS=0.7375376499812341 background y - H(x): -SeaSurfaceTemp nobs= 201 Min=-5.9701628684997559, Max=3.4956078529357910, RMS=1.3551960564536063 +SeaSurfaceTemp nobs= 200 Min=-5.7729525566101074, Max=4.0109121799468994, RMS=1.3121090797868757 -ADT nobs= 100 Min=-0.5705662369728088, Max=1.0042623430490494, RMS=0.2144579594656691 +ADT nobs= 99 Min=-0.5287956893444061, Max=1.0899684876203537, RMS=0.2107554632064487 Background mean : @@ -91,25 +91,25 @@ Background mean : Analysis mean : Valid time: 2018-04-15T00:00:00Z - socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5496991365441630 - tocn min=-4.0612959485438447 max=38.9525699452048642 mean=6.0616012095969651 - ssh min=-1.9921227727866839 max=0.9362031626369095 mean=-0.2894194780144964 - uocn min=-0.8590504879356297 max=0.7002100474771640 mean=-0.0002590536062207 - vocn min=-0.7665201813548866 max=1.4343632906495669 mean=0.0022624144739607 + socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5484994850473157 + tocn min=-4.1420150566263079 max=39.3342720079667814 mean=6.0647518510715024 + ssh min=-2.0240566313569937 max=0.9356684392545753 mean=-0.2895886675031061 + uocn min=-0.8585951774630758 max=0.6992919999268546 mean=-0.0002578079506054 + vocn min=-0.7653547567785886 max=1.4343633775731606 mean=0.0022673436078005 hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 - chl min=-0.0221769042359730 max=4.6774430607453397 mean=0.1184527896712705 - biop min=-0.0000000006293153 max=0.0000001879996563 mean=0.0000000065388180 + chl min=-0.0298668983694693 max=4.6772025002347997 mean=0.1184354336172894 + biop min=-0.0000000009550755 max=0.0000001880204011 mean=0.0000000065360569 Analysis mean increment : Valid time: 2018-04-15T00:00:00Z - socn min=-1.5295051961001036 max=2.5434660376219611 mean=0.0237419676713076 - tocn min=-6.6439611856288838 max=10.9169185316371369 mean=0.0052570712893902 - ssh min=-0.6671206925302553 max=0.1644419065108589 mean=-0.0170903025744022 - uocn min=-0.0239351752825036 max=0.0343940257426933 mean=0.0000163772459754 - vocn min=-0.0146202093983211 max=0.0570383155792779 mean=0.0000560635276266 + socn min=-2.5111177427918214 max=2.0408300100356769 mean=0.0225423161744710 + tocn min=-6.8391128160208972 max=11.2986205943990541 mean=0.0084077127639269 + ssh min=-0.7525951148575687 max=0.3561893016140887 mean=-0.0172594920630121 + uocn min=-0.0238958861412669 max=0.0351143113857929 mean=0.0000176229015907 + vocn min=-0.0162364960804651 max=0.0600637187967529 mean=0.0000609926614664 hocn min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 - chl min=-0.0736645317535350 max=0.0481300437996504 mean=-0.0000447120416101 - biop min=-0.0000000058900755 max=0.0000000034003699 mean=-0.0000000000006497 + chl min=-0.0858357451014435 max=0.0852127026306109 mean=-0.0000620680955912 + biop min=-0.0000000083973207 max=0.0000000059423499 mean=-0.0000000000034109 Forecast variance : Valid time: 2018-04-15T00:00:00Z socn min=0.0000000000000000 max=1.8239276341677120 mean=0.0465030040856202 @@ -122,11 +122,11 @@ Forecast variance : biop min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 Analysis variance : Valid time: 2018-04-15T00:00:00Z - socn min=0.0000000000000000 max=1.7379026850755086 mean=0.0414523764219787 - tocn min=0.0000000000000000 max=8.1207811351056733 mean=0.2329384830937615 - ssh min=0.0000000000000000 max=0.0538534027344015 mean=0.0029565286987699 - uocn min=0.0000000000000000 max=0.0001164441627227 mean=0.0000012956187092 - vocn min=0.0000000000000000 max=0.0001011759731667 mean=0.0000006273749329 + socn min=0.0000000000000000 max=1.7162477268253895 mean=0.0416665311260158 + tocn min=0.0000000000000000 max=8.1408331330837846 mean=0.2382693678773377 + ssh min=0.0000000000000000 max=0.0544573955250757 mean=0.0029741311300652 + uocn min=0.0000000000000000 max=0.0001168663061135 mean=0.0000013103497614 + vocn min=0.0000000000000000 max=0.0001011941501046 mean=0.0000006321304857 hocn min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 - chl min=0.0000000000071484 max=0.0043386893161841 mean=0.0000130402669630 + chl min=0.0000000000071484 max=0.0043382984520450 mean=0.0000130946992844 biop min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 diff --git a/test/testref/makeobs.test b/test/testref/makeobs.test index 0adc37e6b..94749c42a 100644 --- a/test/testref/makeobs.test +++ b/test/testref/makeobs.test @@ -25,6 +25,6 @@ Final state: lw min=0.0000000000000000 max=88.0360870361328125 mean=31.3955290035652546 us min=0.0000000000000000 max=0.0191600705253526 mean=0.0072022693699425 H(x): -InsituTemperature nobs= 10 Min=8.0438979412893303, Max=30.2529092811966542, RMS=23.7282607098962366 +InsituTemperature nobs= 10 Min=8.0070271630434053, Max=30.4007245259000989, RMS=23.8358475396981540 End H(x)