Skip to content

Commit

Permalink
Merge pull request #1 from NCAR/master
Browse files Browse the repository at this point in the history
Merging NCAR/DART_dev onto jlsucar/DART_dev
  • Loading branch information
jlsucar authored Nov 8, 2019
2 parents d09a113 + dc58e66 commit 2f191c4
Show file tree
Hide file tree
Showing 130 changed files with 13,514 additions and 4,452 deletions.
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
.DS_Store
Gemfile.lock
_site/
.cppdefs

# Nuisance files

Makefile
# Makefile
dart_log.*
input.nml.*default
filter_ics
Expand All @@ -20,6 +21,7 @@ obs_kind_mod.f90
using_mpi_for_*
check_me.nc
check_me_interptest.*
*.orig

# Executables

Expand Down Expand Up @@ -52,8 +54,6 @@ perturb_single_instance
preprocess
restart_file_tool
system_simulation
wakeup_filter
FeoM_time

# Directories to NOT IGNORE ... same as executable names
# as far as I know, these must be listed after the executables
Expand Down Expand Up @@ -88,3 +88,4 @@ FeoM_time
!restart_file_tool/
!system_simulation/
!wakeup_filter/

9 changes: 8 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -889,4 +889,11 @@ and assim_tools_mod.pf.f90 in sync with assim_tools_mod.f90.
- added an example of how to use a namelist to the text_to_obs.f90 observation
converter program.


- Removing the clamping messages in 'clamp_variable()' of clamped values

- changed argument names using reserved keywords.
state_vector_io_mod:read_state() 'time' to 'model_time'
random_seq_mod:random_gamma() 'shape' to 'rshape', 'scale' to 'rscale'.
random_seq_mod:random_inverse_gamma() 'shape' to 'rshape', 'scale' to 'rscale'.
obs_def_mod:init_obs_def() 'kind' to 'obkind', 'time' to 'obtime'
obs_utilities_mod: 'start' to 'varstart', 'count' to 'varcount'
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
[quick-start instructions for the impatient](#QuickStart)

Extensive on-line documentation is available at the GitHub project web pages:
[https://ncar.github.io/DART](https://ncar.github.io/DART)
[https://dart.ucar.edu/](https://dart.ucar.edu/)
or in the repository at [docs/index.md](docs/index.md). It's probably a good idea
to be familiar with the [GitHub workflow](https://guides.github.com/introduction/flow/).
to be familiar with the [GitHub flow](https://guides.github.com/introduction/flow/).

<table><tr>
<td><img height=250, src="./docs/images/DARTspaghettiSquare.gif"></td>
Expand Down
8 changes: 4 additions & 4 deletions assimilation_code/location/threed_sphere/location_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2028,7 +2028,7 @@ end function get_maxdist

!----------------------------------------------------------------------------

subroutine distinct_values(in_list, count, values, map)
subroutine distinct_values(in_list, mycount, values, map)

!> parse an input list of values and return:
!> 1) the count of distinct values
Expand All @@ -2038,7 +2038,7 @@ subroutine distinct_values(in_list, count, values, map)
!> length as the incoming list length.

real(r8), intent(in) :: in_list(:) !< incoming list of all values
integer, intent(out) :: count !< count of distinct values
integer, intent(out) :: mycount !< count of distinct values
real(r8), intent(inout) :: values(:) !< list of distinct values
integer, intent(inout) :: map(:) !< mapping of in_list to values

Expand All @@ -2048,7 +2048,7 @@ subroutine distinct_values(in_list, count, values, map)

! set return values now; if we error out then we can
! just return.
count = 0
mycount = 0
values(:) = -1.0_r8
map(:) = -1

Expand All @@ -2075,7 +2075,7 @@ subroutine distinct_values(in_list, count, values, map)
if (foundnew) then
values(nextslot) = newval
map(i) = nextslot
count = nextslot
mycount = nextslot
endif
enddo OUTER

Expand Down
34 changes: 18 additions & 16 deletions assimilation_code/location/utilities/location_io_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -259,17 +261,17 @@ end subroutine nc_get_location_varids
!> 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)

integer :: LocationVarID
integer :: WhichVertVarID
real(r8), dimension(LocationDims) :: locations
real(r8), dimension(LocationDims) :: location_array
integer, dimension(1) :: intval
logical :: write_vert
integer :: rc
Expand All @@ -285,13 +287,13 @@ subroutine nc_write_single_location(ncFileID, loc, locindex, do_vert, fname)
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)
Expand All @@ -300,7 +302,7 @@ subroutine nc_write_single_location(ncFileID, loc, locindex, do_vert, fname)
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)
Expand All @@ -313,18 +315,18 @@ end subroutine nc_write_single_location
!> 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
character(len=*), optional, intent(in) :: fname ! file name (for error printing purposes)

integer :: LocationVarID
integer :: WhichVertVarID
real(r8), allocatable :: locations(:,:)
real(r8), allocatable :: location_array(:,:)
integer, allocatable :: intvals(:)
logical :: write_vert
integer :: rc, i, starthere
Expand All @@ -343,19 +345,19 @@ subroutine nc_write_multiple_locations(ncFileID, loc, loccount, startlocindex, d
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, &
start=(/ 1, starthere /), count=(/ LocationDims, loccount /) )
else
rc = nf90_put_var(ncFileID, LocationVarId, locations, &
rc = nf90_put_var(ncFileID, LocationVarId, location_array, &
start=(/ starthere /), count=(/ loccount /) )
endif
call nc_check(rc, context, 'put_var:location', fname)
Expand All @@ -369,7 +371,7 @@ subroutine nc_write_multiple_locations(ncFileID, loc, loccount, startlocindex, d
call nc_check(rc, context, 'put_var:which_vert', fname)
endif

deallocate(locations)
deallocate(location_array)
if (write_vert) deallocate(intvals)

end subroutine nc_write_multiple_locations
Expand Down
Loading

0 comments on commit 2f191c4

Please sign in to comment.