Skip to content

Write H(x) into CX for sonde data in JADA - #185

Merged
Chris Thomas (ctgh) merged 1 commit into
developfrom
feature/cx_from_hofx
Oct 19, 2023
Merged

Write H(x) into CX for sonde data in JADA#185
Chris Thomas (ctgh) merged 1 commit into
developfrom
feature/cx_from_hofx

Conversation

@ctgh

Copy link
Copy Markdown
Collaborator

Radiosonde data are processed as follows:

  • JOPA + VAR: ProfileAverage operator, write GeoVaLs into CX for assimilation.
  • JOPA + JADA: VertInterp operator, send H(x) file to JADA.

In the JOPA + VAR configuration, the GeoVaLs written to CX correspond to the model column associated with the lowest-altitude observation in a radiosonde profile. This matches closely what is done in OPS + VAR. Due to the reduced resolution of VAR, horizontal drift is discarded, which is why using a single model column works. Furthermore VAR assigns the CX to H(x) without performing any vertical interpolation.

In order to compare JADA and VAR it is necessary to run JOPA in an identical configuration and then send the same information to the assimilation. At present, the observation operator and the information sent are both different, making a precise comparison difficult. The observation operator must be changed to VertInterp when using JADA due to an unfixable issue in the TL/AD code for the ProfileAverage operator. However, when VertInterp is used, the values of H(x) sent to JADA are different.

This PR adds another option to opsinputs (write_hofx_into_cx) which writes H(x) values into CX rather than GeoVaLs. That makes it possible to run the VertInterp operator in JOPA and send a consistent H(x) to JADA. In other words this can be thought of as a 'JADA compatibility mode'. By default write_hofx_into_cx is false so it will not alter the behaviour of sith, etc.

The PR actually restores code that was removed in #110. At that point this functionality was not needed. However Michael Cooke (@mikecooke77) asked the prescient question "Is this work going to be revisited before JADA?". The answer is yes!

self % GeoVals, self % GeoVaLsAreTopToBottom, opsinputs_cxfields_theta, &
self % JediToOpsLayoutMapping, self % hofx, self % varnames)
self % JediToOpsLayoutMapping, self % hofx, self % varnames, &
"potentialTemperature", self % WriteHofXIntoCX)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Note the extra options provided to theta, T, u, v and RH. These options are not needed otherwise.

!> The HofX vector to use.
!> \param[in] GeoVals
!> A container holding the specified GeoVaL.
subroutine opsinputs_fill_fillreal2dfromhofx( &

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This subroutine was removed in #110 and has been restored.

!> List of simulated variables.
subroutine opsinputs_fill_fillreal2dfromgeoval( &
Hdr, OpsVarName, Real2, GeoVals, GeoVaLsAreTopToBottom, JediVarName, JediToOpsLayoutMapping, hofx, varnames)
subroutine opsinputs_fill_fillreal2dfromgeovalorhofx( &

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This subroutine was removed in #110 and has been restored.

! Index of variable in hofx array.
hofxIndex = 0
do i = 1, size(hofx, 1)
if (present(JediObsName)) then

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The use of JediObsName reproduces the name mapping between GeoVaL and observation names (e.g. relative_humidity -> relativeHumidity). This wasn't needed in the code removed by #110.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi Chris Thomas (@ctgh), I have compared these changes with what was removed in #110 and it all appears consistent, plus the addition of the new parameter option. Looks fine to be merged.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The change looks good to me. I can't fault the code. If you are ready for this to be merged then please change the flag.

@ctgh

Copy link
Copy Markdown
Collaborator Author

Thanks for your reviews! I have updated the label.

@ctgh
Chris Thomas (ctgh) merged commit 0768b79 into develop Oct 19, 2023
@ctgh
Chris Thomas (ctgh) deleted the feature/cx_from_hofx branch October 19, 2023 13:42
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.

4 participants