Skip to content

A few fixes to the Model to Analysis variable change#847

Merged
travissluka merged 12 commits intodevelopfrom
feature/colocate
May 12, 2023
Merged

A few fixes to the Model to Analysis variable change#847
travissluka merged 12 commits intodevelopfrom
feature/colocate

Conversation

@guillaumevernieres
Copy link
Contributor

Description

This was supposed to be straight forward, but then it wasn't.

Stuff fixed/added:

  • State method added/implemented: tohgrid (tocgrid doesn't do anything yet)
  • Renamed Ana2Model to Model2Ana to make it less confusing. The variable change under cost function is expecting a change of variable from the model to the analysis ... Which we coded backward, or maybe we dropped the inverse switch at some point ... I don't know, but it should be fixed now
  • I was hopping to just turn on the interp from uv-points to h-points, but it turned out that thing wasn't working. I added a simple interp based on the 6 neighbors of a point. Simple and a lot faster than a kdtree.

Notes

  • I'm backtracking whatever schematics I added to issue Co location is not implemented/commented out: #842 , h(x) should be done on the native grid!
  • (u,v) increment on the h-grid and interpolated back to the c-grid then added to the background, or fed to mom6 through iau is fine
  • (u, v) state interpolated from h-grid back to c-grid and directly inserted in the restarts at every cycle is a bad idea (interp=diffusion).
  • I'll add the tocgrid method later. We plan to use this work to construct our static-B and we only need tohgrid to do that work.

Issue(s) addressed

Testing

  • Added the interp switch ito the convertstate_changevar test
  • Tested at 5deg and 0.25deg.

@guillaumevernieres guillaumevernieres changed the title Feature/colocate A few fixes to the Model to Analysis variable change Feb 28, 2023
@guillaumevernieres guillaumevernieres marked this pull request as ready for review March 1, 2023 18:57
@kbhargava
Copy link
Contributor

Builds fine and the related tests pass on orion. I am going to have a deeper look tomorrow at the files.

Copy link
Contributor

@kbhargava kbhargava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. This is what the interpolation does in this test case, thought will just put it here.
image

Copy link
Contributor

@kbhargava kbhargava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accidentally clicked on "request changes" PR oops!

@guillaumevernieres
Copy link
Contributor Author

Should I just merge this once I resolve the conflicts or do you want to review @travissluka ?

@travissluka
Copy link
Contributor

I'll look at it today, I promise


! ------------------------------------------------------------------------------
!> idw interpolation given known neighbors
subroutine soca_stencil_interp(lon_src, lat_src, lon_dst, lat_dst, data, data_out, nn)
Copy link
Contributor

@travissluka travissluka May 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine for now, but I have big dreams of someday removing all our interp code and using what is available from oops.... someday

@travissluka travissluka merged commit 947737f into develop May 12, 2023
@travissluka travissluka deleted the feature/colocate branch May 12, 2023 19:04
climbfuji added a commit that referenced this pull request Jul 17, 2023
* Use SABER blocks chaining for training (#852)

* Adapt to name changes in ufo (#867)

* Use VertInterp instead of MarineVertInterp (#874)

* remove linear var change from ensevariance ctest (#881)

* Bugfixes for BUMP (#869)

* A few fixes to the Model to Analysis variable change (#847)

* Remove discontinuities in the balance op  (#885)

* set to min/max instead of 0

* ...

* vanilla vert conv

* tidy sign

* removed jac_mask

* tanh filt

* updated yamls and test refs

* merge develop and update answers after the develop history MESS i created

* code tidy/removed vanilla

---------

Co-authored-by: Travis Sluka <tsluka@ucar.edu>

* default plots (#888)

Co-authored-by: Travis Sluka <tsluka@ucar.edu>

* add VADER to SOCA (#887)

* add vader to build, but dont use it

* add State::fromFieldSet

* variablechange "uses" vader

* switched to ens. templ. (#894)

* Implementation of EnsMeanAndVariance (#892)

* added the ensmeanandvariance app

* ...

---------

Co-authored-by: Travis Sluka <tsluka@ucar.edu>

* Read the std. dev. instead of the variance (#896)

* skip sqrt, saving optional

* forgot test yaml

* Update test/testinput/varchange_bkgerrsoca_stddev.yml

Co-authored-by: Travis Sluka <tsluka@ucar.edu>

---------

Co-authored-by: Travis Sluka <tsluka@ucar.edu>

* Use the generic oops interpolator (#898)

* use oops interpolation

* to_fieldset_ad

* forgot some halo masks

* fix horizfilt

* fix some test answers

* letkf workaround for missing val bug

* work around for getvalues test

* change obs input to have 1 guaranteed land point

* Update version (#899)

* remove ewok repo (#889)

Co-authored-by: Yannick Trémolet <30638944+ytremolet@users.noreply.github.com>

* Merge B matrix-related applications (#890)

* Merge B matrix-related applications

* Trigger tests

---------

Co-authored-by: Benjamin Menetrier <benjamin.menetrier@irit.fr>
Co-authored-by: Travis Sluka <tsluka@ucar.edu>

* update for VADER PR#586 (#902)

* add ModelData

* fix coding norms

* Update CMakeLists.txt

* Fix vertical gradient (#914)

* a fix dvdz

* Updating test references

---------

Co-authored-by: Hyun-Chul.Lee <Hyun-Chul.Lee@noaa.gov>

* libs in soca

* Commend out dirac.x test and disable ecbuild_install_project as we did for fv3-jedi prevent the following error:

-- Configuring done
CMake Error in soca/src/soca/CMakeLists.txt:
  Target "soca" INTERFACE_LINK_DIRECTORIES property contains path:

    "/Users/heinzell/work/ufs-bundle/20230714/ufs-bundle-use-jedi-develop/soca/src/soca/."

  which is prefixed in the source directory.

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

* Apply same bug fix as for fv3-jedi to fix missing linker path for MPI libraries due to ESMF bug

---------

Co-authored-by: Benjamin Menetrier <benjamin.menetrier@irit.fr>
Co-authored-by: Wojciech Śmigaj <w.smigaj@gmail.com>
Co-authored-by: Travis Sluka <tsluka@ucar.edu>
Co-authored-by: Guillaume Vernieres <guillaume.vernieres@noaa.gov>
Co-authored-by: Yannick Trémolet <30638944+ytremolet@users.noreply.github.com>
Co-authored-by: Benjamin Menetrier <30638301+benjaminmenetrier@users.noreply.github.com>
Co-authored-by: Kriti Bhargava <kritib@ucar.edu>
Co-authored-by: Hyun-Chul.Lee <Hyun-Chul.Lee@noaa.gov>
Co-authored-by: Dom Heinzeller <dom.heinzeller@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Co location is not implemented/commented out:

3 participants