[Dart-dev] DART/branches Revision: 12199
dart at ucar.edu
dart at ucar.edu
Thu Dec 14 12:01:59 MST 2017
thoar at ucar.edu
2017-12-14 12:01:58 -0700 (Thu, 14 Dec 2017)
384
Improved scripting - not done yet.
Implemented some changes to satisfy the NAG compiler (Nancy identified these on a CGD machine)
pertaining to the use of the cray windows and some missing deallocates.
Renamed some variables to resolve conflicts with Fortran instrinsics.
Still working on the way the CDTG and model_time are created/used/written.
model_mod_check now works on eddy.
Modified: DART/branches/coamps/assimilation_code/location/utilities/location_io_mod.f90
===================================================================
--- DART/branches/coamps/assimilation_code/location/utilities/location_io_mod.f90 2017-12-14 16:40:03 UTC (rev 12198)
+++ DART/branches/coamps/assimilation_code/location/utilities/location_io_mod.f90 2017-12-14 19:01:58 UTC (rev 12199)
@@ -7,6 +7,8 @@
!> common routines which can write netcdf arrays no matter which
!> location module is compiled in.
+!>@todo FIXME there is no documentation for this module.
+
!>@todo FIXME define ALL the VERTISXXX here, add a call to has_vertical_choice
!>to the xxx/location_mod, and if no, return without needing routines
!>in each of the specific location routines. if yes, call query and
@@ -257,10 +259,10 @@
!> The LocationVarID and WhichVertVarID must be the values returned from
!> the nc_get_location_varids call.
-subroutine nc_write_single_location(ncFileID, loc, locindex, do_vert, fname)
+subroutine nc_write_single_location(ncFileID, location, locindex, do_vert, fname)
integer, intent(in) :: ncFileID
-type(location_type), intent(in) :: loc
+type(location_type), intent(in) :: location
integer, intent(in) :: locindex
logical, optional, intent(in) :: do_vert
character(len=*), optional, intent(in) :: fname ! file name (for error printing purposes)
@@ -267,7 +269,7 @@
integer :: LocationVarID
integer :: WhichVertVarID
-real(r8), dimension(LocationDims) :: locations
+real(r8), dimension(LocationDims) :: location_array
integer, dimension(1) :: intval
logical :: write_vert
integer :: rc
@@ -283,13 +285,13 @@
rc = nf90_inq_varid(ncFileID, 'location', varid=LocationVarID)
call nc_check(rc, context, 'location', fname)
-locations = get_location( loc )
+location_array = get_location( location )
if (LocationDims > 1) then
- rc = nf90_put_var(ncFileID, LocationVarId, locations, &
+ rc = nf90_put_var(ncFileID, LocationVarId, location_array, &
start=(/ 1, locindex /), count=(/ LocationDims, 1 /) )
else
- rc = nf90_put_var(ncFileID, LocationVarId, locations, &
+ rc = nf90_put_var(ncFileID, LocationVarId, location_array, &
start=(/ locindex /), count=(/ 1 /) )
endif
call nc_check(rc, context, 'put_var:location', fname)
@@ -298,7 +300,7 @@
rc = nf90_inq_varid(ncFileID, 'which_vert', varid=WhichVertVarID)
call nc_check(rc, context, 'inq_varid:which_vert', fname)
- intval = query_location(loc, 'WHICH_VERT')
+ intval = query_location(location, 'WHICH_VERT')
rc = nf90_put_var(ncFileID, WhichVertVarID, intval, &
start=(/ locindex /), count=(/ 1 /) )
call nc_check(rc, context, 'put_var:which_vert', fname)
@@ -311,10 +313,10 @@
!> The LocationVarID and WhichVertVarID must be the values returned from
!> the nc_get_location_varids call.
-subroutine nc_write_multiple_locations(ncFileID, loc, loccount, startlocindex, do_vert, fname)
+subroutine nc_write_multiple_locations(ncFileID, locations, loccount, startlocindex, do_vert, fname)
integer, intent(in) :: ncFileID
-type(location_type), intent(in) :: loc(:)
+type(location_type), intent(in) :: locations(:)
integer, intent(in) :: loccount
integer, optional, intent(in) :: startlocindex
logical, optional, intent(in) :: do_vert
@@ -322,7 +324,7 @@
integer :: LocationVarID
integer :: WhichVertVarID
-real(r8), allocatable :: locations(:,:)
+real(r8), allocatable :: location_array(:,:)
integer, allocatable :: intvals(:)
logical :: write_vert
integer :: rc, i, starthere
@@ -341,19 +343,19 @@
rc = nf90_inq_varid(ncFileID, 'location', varid=LocationVarID)
call nc_check(rc, context, 'location', fname)
-allocate(locations(LocationDims,loccount))
+allocate(location_array(LocationDims,loccount))
if (write_vert) allocate(intvals(loccount))
do i=1, loccount
- locations(:,i) = get_location( loc(i) )
- if (write_vert) intvals(i) = query_location(loc(i), 'WHICH_VERT')
+ location_array(:,i) = get_location( locations(i) )
+ if (write_vert) intvals(i) = query_location(locations(i), 'WHICH_VERT')
enddo
if (LocationDims > 1) then
- rc = nf90_put_var(ncFileID, LocationVarId, locations, &
+ rc = nf90_put_var(ncFileID, LocationVarId, location_array, &
More information about the Dart-dev
mailing list