[Dart-dev] DART/branches Revision: 12068
dart at ucar.edu
dart at ucar.edu
Wed Nov 8 16:20:09 MST 2017
thoar at ucar.edu
2017-11-08 16:20:07 -0700 (Wed, 08 Nov 2017)
446
Removing byteswap.c from the world because the hdf and netcdf libraries
remove the need for it.
Replacing some variables that were oscuring some Fortran intrinsics: count, index, loc, time
are all BAD variable names. suggested replacement: mycount, myindex, location and
[mytime, dart_time, model_time, timeindex] There are many more files that need work,
and some of the variables that need to be renamed are variables in routine arguments.
Modified: DART/branches/coamps/assimilation_code/location/threed_sphere/location_mod.f90
===================================================================
--- DART/branches/coamps/assimilation_code/location/threed_sphere/location_mod.f90 2017-11-08 22:57:02 UTC (rev 12067)
+++ DART/branches/coamps/assimilation_code/location/threed_sphere/location_mod.f90 2017-11-08 23:20:07 UTC (rev 12068)
@@ -601,19 +601,19 @@
!---------------------------------------------------------------------------
-function get_location(loc)
+function get_location(location)
! Given a location type (in radians),
! return the longitude, latitude (in degrees) and vertical value
-type(location_type), intent(in) :: loc
+type(location_type), intent(in) :: location
real(r8), dimension(3) :: get_location
if ( .not. module_initialized ) call initialize_module()
-get_location(1) = loc%lon * RAD2DEG
-get_location(2) = loc%lat * RAD2DEG
-get_location(3) = loc%vloc
+get_location(1) = location%lon * RAD2DEG
+get_location(2) = location%lat * RAD2DEG
+get_location(3) = location%vloc
end function get_location
@@ -695,11 +695,11 @@
!---------------------------------------------------------------------------
-function query_location(loc, attr)
+function query_location(location, attr)
! Returns the value of the attribute
-type(location_type), intent(in) :: loc
+type(location_type), intent(in) :: location
character(len=*), optional, intent(in) :: attr
real(r8) :: query_location
@@ -722,17 +722,17 @@
! set the default here, and then only overwrite it if we
! recognize one of the other valid queries.
-query_location = real(loc%which_vert, r8) ! this is really an int
+query_location = real(location%which_vert, r8) ! this is really an int
if (.not. present(attr)) return
select case(attr)
case ('lat','LAT')
- query_location = loc%lat
+ query_location = location%lat
case ('lon','LON')
- query_location = loc%lon
+ query_location = location%lon
case ('vloc','VLOC')
- query_location = loc%vloc
+ query_location = location%vloc
case ('which_vert','WHICH_VERT')
! already set
case default
@@ -745,7 +745,7 @@
!----------------------------------------------------------------------------
-subroutine write_location(locfile, loc, fform, charstring)
+subroutine write_location(locfile, location, fform, charstring)
! Writes a location to a file.
! most recent change: adding the optional charstring option. if present,
@@ -754,7 +754,7 @@
! common units (e.g. hPa, km, etc)
integer, intent(in) :: locfile
-type(location_type), intent(in) :: loc
+type(location_type), intent(in) :: location
character(len = *), intent(in), optional :: fform
character(len = *), intent(out), optional :: charstring
@@ -774,9 +774,9 @@
if (.not. writebuf) then
if (ascii_file_format(fform)) then
write(locfile, '(''loc3d'')' )
- write(locfile, 10) loc%lon, loc%lat, loc%vloc, loc%which_vert
+ write(locfile, 10) location%lon, location%lat, location%vloc, location%which_vert
else
- write(locfile) loc%lon, loc%lat, loc%vloc, loc%which_vert
+ write(locfile) location%lon, location%lat, location%vloc, location%which_vert
endif
return
endif
@@ -802,28 +802,28 @@
endif
! format the horizontal into a temp string
-write(string1, '(A,F12.8,1X,F12.8,1X,A)') 'Lon/Lat(deg): ', loc%lon*RAD2DEG, &
- loc%lat*RAD2DEG, ' Vert:'
More information about the Dart-dev
mailing list