Opened 10 years ago

Closed 3 years ago

#426 closed enhancement (wontfix)

Rearrange calls to ropp_fm_refrac_1d

Reported by: Ian Culverwell Owned by: Ian Culverwell
Priority: normal Milestone: 11.0
Component: ROPP (all) Version: 8.0
Keywords: Cc:

Description

I don't think we should be doing all the following in the high level routine ropp_fm_bg2ro_1d:

        IF (state%new_ref_op) THEN
          CALL ropp_fm_refrac_1d_new(state, obs_refrac)
        ELSE
          CALL ropp_fm_refrac_1d(state, obs_refrac)
        END IF

Since state%new_ref_op is clearly an element of state, I think we should just

          CALL ropp_fm_refrac_1d(state, obs_refrac)

where ropp_fm_refrac_1d is a very simple subroutine that just says something like

        IF (state%new_ref_op) THEN
          CALL ropp_fm_refrac_1d_new(state, obs_refrac)
        ELSE
          CALL ropp_fm_refrac_1d_old(state, obs_refrac)
        END IF

These two routines would be held in separate files. (ropp_fm_refrac_1d_new already is.)

Check with Chris and Sean before doing this.

Change history (4)

comment:1 by Ian Culverwell, 9 years ago

Note that, following the introduction of the config%sf_method for the searching and fitting of climatological bending angles in the statistical optimisation part of ROPP, we have analogous choices in ropp_pp_invert_tool and ropp_pp_occ_tool:

              IF (INDEX(config%sf_method, "regular" ) == 1) THEN
                CALL ropp_pp_search_model_refraction_new( config%mfile, &
                                                 ro_data%dtocc%month,   &
                                                 ro_data%georef%lat,    &
                                                 ro_data%georef%lon,    &
                                                 smt_ba%impact,         &
                                                 smt_ba%bangle,         &
                                                 out_ba%impact_L1,      &
                                                 mod_ba%bangle,         &
                                                 config )
              ELSE IF (INDEX(config%sf_method, "convoluted" ) == 1) THEN
                CALL ropp_pp_search_model_refraction( config%mfile, &
                                             ro_data%dtocc%month,   &
                                             ro_data%georef%lat,    &
                                             ro_data%georef%lon,    &
                                             smt_ba%impact,         &
                                             smt_ba%bangle,         &
                                             out_ba%impact_L1,      &
                                             mod_ba%bangle,         &
                                             config )
              ELSE
                CALL message(msg_fatal, "Search and fit method " // &
                                  config%sf_method // " not supported")
                EXIT
              ENDIF

These could/should be handled in the same way, because config%sf_method is (obviously) an element of the subroutine argument config.

comment:2 by Ian Culverwell, 8 years ago

Milestone: 9.010.0

Postpone to ROPP10.0.

comment:3 by Ian Culverwell, 5 years ago

Milestone: 10.011.0

comment:4 by Ian Culverwell, 3 years ago

Resolution: wontfix
Status: newclosed

Nice idea, but no-one will ever have time to do it. Won't fix.

Note: See TracTickets for help on using tickets.