Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scale H_to_m and m_to_H and check that model results are unchanged #189

Closed
nichannah opened this issue Jun 8, 2015 · 2 comments
Closed

Comments

@nichannah
Copy link
Collaborator

It should be possible to set H_to_m to any power of 2 and m_to_H = 1 / H_to_m (or vice-verse) and have the model checksums and output remain the same. I have experimented with this and found the following:

  1. with a Boussinesq configuration this does not work (e.g. I tried double-gyre), the timestats are very different. I did this by changing H_to_m (and m_to_H) in the code.
  2. with a non-Boussinesq configuration (I tried nonBous_global) this works for small powers of 2, e.g. 2, 4, 8. The timestats are identical. However with a large power of two 1e10 the results were similar but not bit-for-bit identical. I did this by setting the H_TO_KG_M2 parameter.

Todo: - investigate why this method does not work in the Boussinesq case. - investigate why the timestats are not bit-for-bit identical in the non-Boussinesq case.

@Hallberg-NOAA
Copy link
Collaborator

Hi Nic,

    Of your findings, (1) is a clear indication of a missing
  lengthscale conversion factor somewhere in the Boussinesq code. To
  track this down, add "#override DEBUG = True" to your input file.
  This will cause frequent checksums on a number of variables when
  you run, so save your output to a file, and then rerun with a
  different setting for H_to_m (really this should be made into a
  run-time parameter). The missing unit conversion factor will occur
  in the code that is called just before the first difference in the
  checksums.

    (2) is not a a bug. You should only be able to get identical
  answers when you change H_TO_KG_M2 by an exact power of 2, so that
  the answers only change by an integer shift in the exponent when
  the unit conversion factor is applied. In other words setting
  H_TO_KG_M2 to 0.5, 1, 2, 4, 8, 128, 1024, and 1048576 should all
  give identical answers, whereas 3, 5, 1000 or 1000000 should not.

    - Bob Hallberg

  On 06/08/2015 04:59 PM, Nic Hannah wrote:


  It should be possible to set H_to_m to any power of 2 and
    m_to_H = 1 / H_to_m (or vice-verse) and have the model checksums
    and output remain the same. I have experimented with this and
    found the following:

    with a Boussinesq configuration this does not work (e.g. I
      tried double-gyre), the timestats are very different. I did
      this by changing H_to_m (and m_to_H) in the code. 
    with a non-Boussinesq configuration (I tried nonBous_global)
      this works for small powers of 2, e.g. 2, 4, 8. The timestats
      are identical. However with a large power of two 1e10 the
      results were similar but not bit-for-bit identical. I did this
      by setting the H_TO_KG_M2 parameter. 

  Todo: - investigate why this method does not work in the
    Boussinesq case. - investigate why the timestats are not
    bit-for-bit identical in the non-Boussinesq case.
  —
    Reply to this email directly or view it on
      GitHub.

@nichannah
Copy link
Collaborator Author

The ALE remapping gives the following error when passing in a H with units 2^20 * m:

k,h0(k),hNew,dx(+1),dx(0)= 1 1.0000000000000000E-003 -2.3927273881554356E-003 -0.0000000000000000
k,h0(k),hNew,dx(+1),dx(0)= 1 1.0000000000000000E-003 -1.6823386112264416E-002 -0.0000000000000000
k,h0(k),hNew,dx(+1),dx(0)= 1 1.0000000000000000E-003 -1.5054795516334707E-002 -0.0000000000000000

FATAL from PE 20: MOM_remapping, remapping_core: negative h implied by fluxes

nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 9, 2015
nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 9, 2015
nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 9, 2015
nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 9, 2015
nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 9, 2015
nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 9, 2015
nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 9, 2015
  - show ranks when doing vector multiplies,
  - replace G%Angstrom_z with G%Angstrom in various places,
  - fix units of eta_bt,
  - improve comments
nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 22, 2015
arbitrary H units - no need to convert to m before calling it. mom-ocean#189
nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 22, 2015
nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 22, 2015
nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 22, 2015
nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 22, 2015
  - show ranks when doing vector multiplies,
  - replace G%Angstrom_z with G%Angstrom in various places,
  - fix units of eta_bt,
  - improve comments
nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 22, 2015
arbitrary H units - no need to convert to m before calling it. mom-ocean#189
nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 22, 2015
nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 22, 2015
nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 22, 2015
  - show ranks when doing vector multiplies,
  - replace G%Angstrom_z with G%Angstrom in various places,
  - fix units of eta_bt,
  - improve comments
nichannah added a commit to nichannah/MOM6 that referenced this issue Jul 22, 2015
arbitrary H units - no need to convert to m before calling it. mom-ocean#189
nikizadehgfdl pushed a commit to nikizadehgfdl/MOM6 that referenced this issue Oct 9, 2017
- NOAA-GFDL/MOM6@6b4a320 Merge branch 'nicjhan-62-z-remapping-uv-grids' into dev/master
- NOAA-GFDL/MOM6@d0e99df Don't build diagnostic Z remapping grids if grid definition param not provided. mom-ocean#62
- NOAA-GFDL/MOM6@604681e Fix dummy argument intent. Does not compile on Gaea. mom-ocean#62
- NOAA-GFDL/MOM6@e35830a Merge branch 'angus-g-diag-eta-preale' into dev/master
- NOAA-GFDL/MOM6@e39aa4b Merge branch 'diag-eta-preale' of https://github.com/angus-g/MOM6 into angus-g-diag-eta-preale
- NOAA-GFDL/MOM6@b10de2d Merge branch 'nicjhan-189-H_to_m' into dev/master
- NOAA-GFDL/MOM6@6289604 Merge branch '189-H_to_m' of https://github.com/nicjhan/MOM6 into nicjhan-189-H_to_m
- NOAA-GFDL/MOM6@2e51382 Fixed G%gridLoaTn and G%girdLonB in "spherical" model
- NOAA-GFDL/MOM6@8008eea Move calls to update grid for z remapping of diagnostics out of continuity(). It is not necessary to pass the diag mediator structure into calls to continuity(). mom-ocean#62
- NOAA-GFDL/MOM6@0b08d8c Do m_to_H conversion within ALE regridding. ALE_main() now handles arbitrary H units - no need to convert to m before calling it. mom-ocean#189
- NOAA-GFDL/MOM6@5923919 Changes to meet review comments mom-ocean#189:   - show ranks when doing vector multiplies,   - replace G%Angstrom_z with G%Angstrom in various places,   - fix units of eta_bt,   - improve comments
- NOAA-GFDL/MOM6@d701204 Unit conversions to support H vertical unit independant of m. No results change. Closes mom-ocean#189
- NOAA-GFDL/MOM6@bf06b59 Remove unused variables. mom-ocean#189
- NOAA-GFDL/MOM6@19bed14 Add additional checksums, do H unit conversion on checksum arrays. mom-ocean#189
- NOAA-GFDL/MOM6@032a76d Comment and whitespace fixes. mom-ocean#189
- NOAA-GFDL/MOM6@f629970 Add e_preale diagnostic
- No answer changes.
jskenigson pushed a commit to jskenigson/MOM6 that referenced this issue Jul 2, 2021
…mentation

* Implements a module to simulate CFCs via NUOPC cap
MJHarrison-GFDL pushed a commit to MJHarrison-GFDL/MOM6 that referenced this issue Aug 16, 2022
Fix parameter out of range setting for mixed-mode compiles
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

No branches or pull requests

2 participants