Changes between Version 2 and Version 3 of OMI_search_local_observations


Ignore:
Timestamp:
Sep 8, 2024, 7:39:41 PM (5 weeks ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OMI_search_local_observations

    v2 v3  
    4444       ... Initialize local observation arrays ...
    4545
    46            thisobs_l%id_obs_l(cnt_obs_l) = i                        ! index of local obs. in full obs. vector
    47            thisobs_l%distance_l(cnt_obs_l) = SQRT(distance2)        ! distance
    48            thisobs_l%cradius_l(cnt_obs_l) = thisobs_l%cradius(1)    ! cut-off radius
    49            thisobs_l%sradius_l(cnt_obs_l) = thisobs_l%sradius(1)    ! support radius
     46           thisobs_l%id_obs_l(cnt_l) = i                        ! index of local obs. in full obs. vector
     47           thisobs_l%distance_l(cnt_l) = SQRT(distance2)        ! distance
     48           thisobs_l%cradius_l(cnt_l) = thisobs_l%cradius(1)    ! cut-off radius
     49           thisobs_l%sradius_l(cnt_l) = thisobs_l%sradius(1)    ! support radius
    5050
    5151    ENDIF
     
    5454**Notes:**
    5555 * The check `thisobs%doassim==1` is mandatory because init_dim_obs_l_OBSTYPE is called for all observations.
    56  * `cnt_obs_l` is the counter of the valid local observations inside the loop, while `i` is the index of a local observation on the full observation vector
     56 * `cnt_l` is the counter of the valid local observations inside the loop, while `i` is the index of a local observation on the full observation vector
    5757 * The initialization of the local observation arrays of `thisobs_l` can be done by the routine `PDAFomi_store_obs_l_index` provided by PDAF-OMI (see below). However, in our tests this always led to a slower program. Thus, for performance reasons we recommend to use the direct initialization if possible.
    5858 * In the tutorial example routine we use a module to enclose the user routine. This allows for syntax checking, but is not mandatory.
     
    108108=== PDAFomi_store_obs_l_index ===
    109109
    110 This routine takes the index 'cnt_obs_l' in the example above (`idx` below), the distance as well as the local cut-off radius (`cradius_l`) and support radius (`sradius_l`) and stores the values in the vectors of `thisobs_l`.
     110This routine takes the index 'cnt_l' in the example above, the distance as well as the local cut-off radius (`cradius_l`) and support radius (`sradius_l`) and stores the values in the vectors of `thisobs_l`.
    111111
    112112{{{
    113   SUBROUTINE PDAFomi_store_obs_l_index(thisobs_l, idx, id_obs_l, distance, &
     113  SUBROUTINE PDAFomi_store_obs_l_index(thisobs_l, cnt_l, id_obs_l, distance, &
    114114       cradius_l, sradius_l)
    115115
    116116    TYPE(obs_l), INTENT(inout) :: thisobs_l  ! Data type with local observation
    117     INTEGER, INTENT(in) :: idx               ! Element of local observation array to be filled
     117    INTEGER, INTENT(in) :: cnt_l             ! Element of local observation array to be filled
    118118    INTEGER, INTENT(in) :: id_obs_l          ! Index of local observation in full observation array
    119119    REAL, INTENT(in) :: distance             ! Distance between local analysis domain and observation
     
    129129
    130130{{{
    131   SUBROUTINE PDAFomi_store_obs_l_index_vdist(thisobs_l, idx, id_obs_l, distance, &
     131  SUBROUTINE PDAFomi_store_obs_l_index_vdist(thisobs_l, cnt_l, id_obs_l, distance, &
    132132       cradius_l, sradius_l, vdist)
    133133
    134134    TYPE(obs_l), INTENT(inout) :: thisobs_l  ! Data type with local observation
    135     INTEGER, INTENT(in) :: idx               ! Element of local observation array to be filled
     135    INTEGER, INTENT(in) :: cnt_l             ! Element of local observation array to be filled
    136136    INTEGER, INTENT(in) :: id_obs_l          ! Index of local observation in full observation array
    137137    REAL, INTENT(in) :: distance             ! Distance between local analysis domain and observation