[Dart-dev] DART/branches Revision: 10865

dart at ucar.edu dart at ucar.edu
Wed Jan 4 11:16:16 MST 2017


thoar at ucar.edu
2017-01-04 11:16:16 -0700 (Wed, 04 Jan 2017)
704
No longer using the obs_type variable as the basis for interpreting the 
obs_provenance strings. This is at Andy's request and OK'd by Chris.

I also made it an error to use the 'IJK' locations since this is not working 
correctly, as far as I can tell. When converting the observations using IJK,
one does not get the same locations as when the lat,lon,depth locations
are used that come native from ROMS. The default was to not use the IJK locations,
and I removed the namelist variable that would enable it. That variable had already
been removed from the models/ROMS/work namelist and examples that Andy has
been using - so there is no expected impact.

Updated documentation and example namelists.




Modified: DART/branches/rma_trunk/models/ROMS/model_mod.f90
===================================================================
--- DART/branches/rma_trunk/models/ROMS/model_mod.f90	2017-01-04 18:09:24 UTC (rev 10864)
+++ DART/branches/rma_trunk/models/ROMS/model_mod.f90	2017-01-04 18:16:16 UTC (rev 10865)
@@ -118,7 +118,7 @@
           get_close_obs
 
 public :: get_time_information,          &
-          get_dart_location_from_kind
+          get_location_from_ijk
 
 ! version controlled file description for error handling, do not edit
 character(len=256), parameter :: source   = &
@@ -1800,7 +1800,7 @@
 
 !-----------------------------------------------------------------------
 !>
-!> Returns the DART location given a fractional i, j, k and a specified kind
+!> Returns the lat,lon,depth given a fractional i,j,k and a specified kind
 !>
 !> @param filoc fractional x index
 !> @param fjloc fractional y index
@@ -1834,7 +1834,7 @@
 !>    ISTATUS : 14 - filoc or fjloc out of range for rho grid
 !>    ISTATUS : 99 - initalized istatus, this should not happen
 
-function get_dart_location_from_kind(filoc, fjloc, fkloc, dart_kind, location) result(istatus)
+function get_location_from_ijk(filoc, fjloc, fkloc, dart_kind, location) result(istatus)
 real(r8),            intent(in)  :: filoc
 real(r8),            intent(in)  :: fjloc
 real(r8),            intent(in)  :: fkloc
@@ -1849,6 +1849,11 @@
 real(r8), pointer :: mylon(:,:), mylat(:,:), mydep(:,:,:)
 logical, save :: first_time = .true.
 
+
+write(string1,*)'Routine not finished.'
+call error_handler(E_ERR, 'get_location_from_ijk:', string1, &
+                      source, revision, revdate)
+
 ! start out assuming bad istatus
 istatus  = 99
 
@@ -1883,7 +1888,7 @@
 if (my_kind==KIND_U_CURRENT_COMPONENT) then
    write(string1,*)'Not interpolating ', get_raw_obs_kind_name(my_kind), ' at the moment.'
    write(string2,*)'Need to check that we are using the right grid for location interpolation'
-   call error_handler(E_ERR, 'get_dart_location_from_kind:', string1, &
+   call error_handler(E_ERR, 'get_location_from_ijk:', string1, &
                       source, revision, revdate, text2=string2)
    if (filoc < 1 .or. filoc > Nxi_u-1 .or. &
        fjloc < 1 .or. fjloc > Neta_u-1 ) then
@@ -1897,7 +1902,7 @@
 elseif (my_kind==KIND_V_CURRENT_COMPONENT) then
    write(string1,*)'Not interpolating ', get_raw_obs_kind_name(my_kind), ' at the moment.'
    write(string2,*)'Need to check that we are using the right grid for location interpolation'
-   call error_handler(E_ERR, 'get_dart_location_from_kind:', string1, &
+   call error_handler(E_ERR, 'get_location_from_ijk:', string1, &
                       source, revision, revdate, text2=string2)
    if (filoc < 1 .or. filoc > Nxi_v-1 .or. &
        fjloc < 1 .or. fjloc > Neta_v-1 ) then
@@ -1911,6 +1916,17 @@
 else  ! Everything else is assumed to be on the rho points
    if (filoc < 1 .or. filoc > Nxi_rho-1 .or. &
        fjloc < 1 .or. fjloc > Neta_rho-1 ) then
+
+     write(*,*)
+     write(*,*)'filoc, Nxi_rho-1       = ',filoc, Nxi_rho-1
+     write(*,*)'fjloc, Neta_rho-1      = ',fjloc, Neta_rho-1
+     write(*,*)'fkloc, vloc, hgt_fract = ',fkloc,vloc,hgt_fract
+
+     write(logfileunit,*)
+     write(logfileunit,*)'filoc, Nxi_rho-1     = ',filoc, Nxi_rho-1
+     write(logfileunit,*)'fjloc, Neta_rho-1    = ',fjloc, Neta_rho-1
+     write(logfileunit,*)'fkloc,vloc,hgt_fract = ',fkloc,vloc,hgt_fract
+
      istatus = 14
      location = set_location_missing()
      return
@@ -1987,7 +2003,7 @@
    print*,' WDEP(i+1, j  , k+1)', WDEP(iloc+1, jloc  , vloc+1)
 endif
 
-end function get_dart_location_from_kind
+end function get_location_from_ijk
 
 
 !===================================================================

Modified: DART/branches/rma_trunk/models/ROMS/test_roms_interpolate.f90
===================================================================
--- DART/branches/rma_trunk/models/ROMS/test_roms_interpolate.f90	2017-01-04 18:09:24 UTC (rev 10864)
+++ DART/branches/rma_trunk/models/ROMS/test_roms_interpolate.f90	2017-01-04 18:16:16 UTC (rev 10865)
@@ -27,7 +27,7 @@
 
 use  ensemble_manager_mod, only : ensemble_type
 
-use             model_mod, only : model_interpolate, get_dart_location_from_kind
+use             model_mod, only : model_interpolate, get_location_from_ijk
 
 use netcdf


More information about the Dart-dev mailing list