Skip to content

NormalizeAuroraToHP = true by default - #122

Open
chenwucc wants to merge 1 commit into
developfrom
tmp
Open

chenwucc wants to merge 1 commit into
developfrom
tmp

Conversation

@chenwucc

Copy link
Copy Markdown

[BUG/FEAT/DOC/etc.] Description

Please review the contributing guidelines before continuing.

1-2 sentence summary of the change and (if applicable) which issue this relates to.

Justification

Often, the justification of bugs is that "they exist", so if your pull request fixes a single bug in a single commit, this is not necessary.

Feel free to create any sections necessary to fully describe the pull request.

Changes to GITM outputs

Detail if GITM outputs will be changed and, if so, how. For example, would all runs be changed or only those with specific settings enabled?


Notes

This section should be removed before submitting the pull request.

  • You must the changes made with this pull request. Please detail the configuration you tested with and whether this change affects the outputs of GITM.
  • All changes to code will be tested in the following order. If any step fails, the pull request cannot be accepted:
    1. Code is checked against the code standards. If fprettify recommends any changes the test fails, you you should run the format check before submitting.
    2. The GITM manual is built.
    3. GITM is compiled with gfortran10 and then run using the UAM.in files within srcTests/. This ensures no changes are made which unintentionally break something else.
  • Pull requests should be made against the develop branch of GITMCode/GITM, not main.

In summary, ensure you have:

  • Tested your changes & compared the outputs to the most recent version on the develop branch. Detail here if any outputs differ & why this is necessary.
  • Updated any relevant UAM.in files if you are adding an optional feature
  • Updated the documentation, if necessary
  • Commented you code in hard-to-understand areas
  • Clean up unnecessary comments, debugging steps, etc. within your code
  • Ensure your code is formatted correctly. Use the included Python script for assistance.
  • Pull requests should target the develop branch. Not main/master!

@abukowski21

Copy link
Copy Markdown
Collaborator

Ok so it looks like you uncovered a little bug! This is why the tests failed, and it's a design decision so I don't want to fix it without checking with you & Aaron R.

It comes down to theNormalizeAuroraToHP and doSeparateHPI flags. The doSeparateHPI allows the hemispheric power to be set individually in the north & south hemispheres. This is contained in the NOAA files or we use a 10% seasonal correction factor after the SME->HPI conversion (+/- 10% hemispheric power in the winter/summer, respectively, following https://doi.org/10.1029/2006GL028444)

Right now (north only):

[...]
    UseHpAeforFTA = (IEModel_%iAurora_ == iFTA_)   ! Check if we are using FTA model
[...]
    HPn = 0
    ! Calculate HP from (diffuse) e- flux, hemispheric integration
    call calculate_HP(HPn, HPs)
    avepower = (HPn + HPs)/2.0
    [...]
    if (DoSeparateHPI) then
      if (UseHpAeforFTA) then       ! Use FTA's (integrated) hemispheric power if the model is FTA
        if (IEModel_%isFtaLimit) then
          call project_hp_ae(Hpi_NH, HPn)        ! Hpi_NH = 0.085*(needAe - FtaAe) + HPn
        else
          Hpi_NH = HPn                           ! Raw integrated value if not limited
        endif
      else
        ! Use the indices to normalize (NOAA or SME-> HPI)
        call get_hpi_n(CurrentTime, hpi_NH, iError)
      endif
      [...]
      ratio_NH = Hpi_NH/HPn
    else
      if (UseHpAeforFTA) then
        if (IEModel_%isFtaLimit) then
          call project_hp_ae(HPi, avepower)
        else
          HPi = avepower
        endif
      else
        call get_hpi(CurrentTime, Hpi, iError)
      endif

      ratio_NH = Hpi/HPn
      ratio_SH = Hpi/HPs

    endif

So in the code now there is no way for FTA to use the indices to normalize. If you doSeparateHPI = .true. it normalizes to each hemisphere's (limiter-adjusted) power. if .false. it normalizes to the average of N & S hemispheres.


Questions are:

  1. Do we want to apply the 10% seasonal correction to FTA's hemispheric power when doSeparateHP is .true.?
  2. If yes, do we want to make this default?
  3. The 0.085 slope in project_hp_ae(), is listed as being from NOAA, but FTA's HP is ~1.5x NOAA HP (Wu et al 2021) and the AE->HP formula in read_sme uses 0.102. How certain are we of this value?
  4. NormalizeAuroraToHP functions differently when the model is FRE and FTA, FTA will either normalize north & south to be equal, project beyond the ae->hp conversion limit, and/or do the seasonal adjustment. FRE will set the integrated hemispheric power equal to what's stored in the indices. Is this what we want? (I think yes, but we should document this and make sure people don't try to normalize FTA to NOAA hemispheric power).
  5. Should we turn on NormalizeAuroraToHP by default and then turn it off when the model is not FTA or FRE? It seems like something that should always be enabled for both at this point.

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.

2 participants