Opened 11 years ago

Closed 10 years ago

#355 closed defect (fixed)

Observations below the model surface in refractivity forward operator

Reported by: sti Owned by: cburrows
Priority: normal Milestone: 8.0
Component: ropp_fm Version: 7.0
Keywords: Cc:

Description

In

ropp_fm_refrac_1d

we forward model refractivity observations below the model surface by extrapolation.

I think it would be safer to set to missing. We should consider this simplification.

Change history (6)

comment:1 by cburrows, 11 years ago

Milestone: 7.18.0

comment:2 by cburrows, 11 years ago

This would be a good opportunity to streamline the refrac1d (and bangle?) code, particularly the adjoint.

Possibly:

1) Split default and -new_op processing into separate subroutines.

2) Use local arrays for frequently used variables.

3) Consider separate variables for each partial derivative in TL/AD code? Would mean many more variables, but neater code.

comment:3 by Ian Culverwell, 11 years ago

Owner: set to cburrows
Status: newassigned

comment:4 by cburrows, 11 years ago

Comment blocks should be added where necessary (incl. robodoc headers).

comment:5 by cburrows, 10 years ago

This work has been carried out on this branch.

1) In the case of observations below the model surface, previously the refractivity was extrapolated exponentially. This was originally chosen because of issues extrapolating T,P and q independently with the 'new' forward model options. Now, if either the new or old operator is called, the observation values corresponding to heights below the model surface are set to ropp_MDFV, the tangent linear quantities are set to zero, and y%weights is set to zero. y%weights is important as this is used prior to calling the adjoint routines.

2) The new refractivity operator has been put into a new subroutine (as has the corresponding TL and AD). This should make the code more maintainable. The same thing was not done for the bending angle operator as the majority of the code would be duplicated, potentially leading to inconsistencies when future modifications are made.

3) A comment block was added to ropp_fm_compress_single_ad.f90

4) Above it was suggested that using separate variables for each partial derivative could make the adjoint code neater. This is possibly true, but would need to be done consistently throughout and would hence be a major change in code structure, and even then it would not necessarily be according to all developers' preferences, so it has not been carried out here.

comment:6 by Ian Culverwell, 10 years ago

Resolution: fixed
Status: assignedclosed

Works OK in practice (though note the gotcha in #314, r4367), so closing ticket.

Note: See TracTickets for help on using tickets.