Skip to content

Commit

Permalink
push several months of changes from the rma_trunk branch
Browse files Browse the repository at this point in the history
to the Manhattan release.   see the CHANGELOG file for
details.



git-svn-id: https://svn-dares-dart.cgd.ucar.edu/DART/releases/Manhattan@13137 dfa8782c-da17-4c45-ba5c-5625b50a00d6

Former-commit-id: 2952d3671e3f6516f2e98fb0a71b20b094788b64
  • Loading branch information
nancycollins committed Apr 30, 2019
1 parent c50bc48 commit 64b29b6
Show file tree
Hide file tree
Showing 589 changed files with 53,021 additions and 20,114 deletions.
82 changes: 82 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,88 @@ When using a distributed mean "convert_all_obs_verticals_first = .true." should
be set. If your observations will impact most of the model state, then
"convert_all_state_verticals_first = .true.' can also be set.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Apr 30 2019 :: cam-fv refactor, posteriors optional, QC 8 $Revision$
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

- The CAM Finite Volume (cam-fv) model_mod.f90 has undergone substantial
refactoring to improve simplicity and remove code for unsupported CAM variants
while also supporting WACCM and WACCM-X. Namelist changes will be required.

- CAM-FV setup and scripting support added for CESM 2.1, including advanced
archiving and compression

- fix for WRF's wind direction vectors when using the Polar Stereographic
map projection. Thanks to Kevin Manning for the fix.

- Add filter namelist option to avoid calling the posterior forward operators
and to not create those copies in the obs_seq.final file.

- Use less memory if writing ensemble member values into the obs_seq.final file.

- added a DART QC of 8 for failed vertical conversions

- updated Matlab scripts support QC=8 and no posterior in obs sequence files.

- sampling error correction table now has all ensemble sizes between 3 and 200

- closest_member_tool can be compiled with other MPI targets

- COSMIC_ELECTRON_DENSITY has been moved from obs_def_gps_mod.f90 to
obs_def_upper_atm_mod.f90, which has new quantities for
ION_O_MIXING_RATIO and ATOMIC_H_MIXING_RATIO

- obs_converters/gps/convert_cosmic_ionosphere.f90 has a test dataset

- support for NAG compiler

- fixed Intel compiler bug in lorenz_96 comparing long integers to integer loop indices

- get_maxdist() now a required routine all location modules

- Default routines now create a time variable as time(time) to allow multiple
files to be concatinated along the unlimited dimension more easily. Also
conforms to the netCDF convention for coordinate dimensions.

- obs_impact_tool handles a continuum of values, not just discrete 0 or 1.

- fill_inflation_restart now produces files with names consistent with filter defaults.

- expanded functionality in xyz_location_mod.f90

- Removed 'slow' sorting routines from sort_mod.f90

- replacing some repeated native netCDF library calls with routines from
the netcdf_utilities_mod.f90

- Updated dewpoint equation to avoid dividing by zero given a very unlikely
scenario (r12832)

- More efficient implementation of adaptive inflation

- Yongfei Zhang and Cecilia Bitz added improvements to the CICE model and
observation converters and forward operators. These changes also use the
locations of the 'new' glade filesystem. They used CESM tag: cesm2_0_alpha06n

- Worked with Yongfei Zhang to remove prototype codes and more completely
document observation converters and data sources for cice assimilation.

- removed 'allow_missing_in_clm' flag from the &assim_tools_nml namelist in
the CICE work directory. The flag moved to a different namelist and the
CICE model doesn't care about it.

- increased the maximum number of input files to obs_diag from 100 to 10000.

- Updated the developer_tests to include more cases.

- Updated oned/obs_diag.f90 to support 'obs_seq.out' files.

- Better error and informational messages in various routines.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ MMM DD YYYY :: summary of changes in Manhattan update $Revision$
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


# <next few lines under version control, do not edit>
# $URL$
Expand Down
14 changes: 13 additions & 1 deletion assimilation_code/location/annulus/location_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module location_mod
private

public :: location_type, get_location, set_location, &
set_location_missing, is_location_in_region, &
set_location_missing, is_location_in_region, get_maxdist, &
write_location, read_location, interactive_location, query_location, &
LocationDims, LocationName, LocationLName, LocationStorageOrder, LocationUnits, &
get_close_type, get_close_init, get_close, get_close_destroy, &
Expand Down Expand Up @@ -633,6 +633,17 @@ subroutine get_close(gc, base_loc, base_type, locs, loc_quantities, &

end subroutine get_close

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

function get_maxdist(gc, obs_type)
type(get_close_type), intent(in) :: gc
integer, optional, intent(in) :: obs_type
real(r8) :: get_maxdist

get_maxdist = gc%maxdist

end function get_maxdist

!----------------------------------------------------------------------------
!> Returns true if the given location is between the other two.

Expand Down Expand Up @@ -749,6 +760,7 @@ function get_vertical_localization_coordinate()

end function get_vertical_localization_coordinate


!----------------------------------------------------------------------------
! end of location/annulus/location_mod.f90
!----------------------------------------------------------------------------
Expand Down
140 changes: 14 additions & 126 deletions assimilation_code/location/channel/location_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module location_mod

use types_mod, only : r8, i8, MISSING_R8, MISSING_I, PI, RAD2DEG, DEG2RAD
use utilities_mod, only : register_module, error_handler, E_ERR, ascii_file_format, &
nc_check, E_MSG, open_file, close_file, set_output, &
E_MSG, open_file, close_file, set_output, &
logfileunit, nmlfileunit, find_namelist_in_file, &
check_namelist_read, do_output, do_nml_file, &
do_nml_term, is_longitude_between
Expand All @@ -30,7 +30,7 @@ module location_mod
private

public :: location_type, get_location, set_location, &
set_location_missing, is_location_in_region, &
set_location_missing, is_location_in_region, get_maxdist, &
write_location, read_location, interactive_location, query_location, &
LocationDims, LocationName, LocationLName, LocationStorageOrder, LocationUnits, &
get_close_type, get_close_init, get_close_obs, get_close_state, get_close_destroy, &
Expand Down Expand Up @@ -77,11 +77,6 @@ module location_mod

character(len = 512) :: errstring

real(r8) :: radius ! used only for converting points on a sphere into x,y,z and back

! If maxdist stays the same, don't need to do box distance calculations
integer :: last_maxdist = -1.0

integer :: nx = 10
integer :: ny = 10
integer :: nz = 10
Expand Down Expand Up @@ -119,7 +114,7 @@ subroutine initialize_module

! things which need doing exactly once.

integer :: iunit, io, i
integer :: iunit, io

if (module_initialized) return

Expand Down Expand Up @@ -331,7 +326,6 @@ subroutine write_location(locfile, loc, fform, charstring)

integer :: charlength
logical :: writebuf
character(len=129) :: string1

10 format(1X,3(G25.16,1X))

Expand Down Expand Up @@ -484,108 +478,6 @@ end subroutine interactive_location

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

function nc_write_location_atts( ncFileID, fname, ObsNumDimID ) result (ierr)

! Writes the "location module" -specific attributes to a netCDF file.

use typeSizes
use netcdf

integer, intent(in) :: ncFileID ! handle to the netcdf file
character(len=*), intent(in) :: fname ! file name (for printing purposes)
integer, intent(in) :: ObsNumDimID ! handle to the dimension that grows
integer :: ierr

integer :: LocDimID
integer :: VarID

if ( .not. module_initialized ) call initialize_module

ierr = -1 ! assume things will fail ...

! define the rank/dimension of the location information
call nc_check(nf90_def_dim(ncid=ncFileID, name='location', len=LocationDims, &
dimid = LocDimID), 'nc_write_location_atts', 'def_dim:location '//trim(fname))

! Define the location variable and attributes

call nc_check(nf90_def_var(ncid=ncFileID, name='location', xtype=nf90_double, &
dimids=(/ LocDimID, ObsNumDimID /), varid=VarID), &
'nc_write_location_atts', 'location:def_var')

call nc_check(nf90_put_att(ncFileID, VarID, 'description', &
'location coordinates'), 'nc_write_location_atts', 'location:description')
call nc_check(nf90_put_att(ncFileID, VarID, 'location_type', &
trim(LocationName)), 'nc_write_location_atts', 'location:location_type')
call nc_check(nf90_put_att(ncFileID, VarID, 'long_name', &
trim(LocationLName)), 'nc_write_location_atts', 'location:long_name')
call nc_check(nf90_put_att(ncFileID, VarID, 'storage_order', &
'X Y Z'), 'nc_write_location_atts', 'location:storage_order')
call nc_check(nf90_put_att(ncFileID, VarID, 'units', &
'X Y Z'), 'nc_write_location_atts', 'location:units')

ierr = 0

end function nc_write_location_atts

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

subroutine nc_get_location_varids( ncFileID, fname, LocationVarID, WhichVertVarID )

! Return the LocationVarID and WhichVertVarID variables from a given netCDF file.
!
! ncFileId the netcdf file descriptor
! fname the name of the netcdf file (for error messages only)
! LocationVarID the integer ID of the 'location' variable in the netCDF file
! WhichVertVarID the integer ID of the 'which_vert' variable in the netCDF file

use typeSizes
use netcdf

integer, intent(in) :: ncFileID ! handle to the netcdf file
character(len=*), intent(in) :: fname ! file name (for printing purposes)
integer, intent(out) :: LocationVarID, WhichVertVarID

if ( .not. module_initialized ) call initialize_module

call nc_check(nf90_inq_varid(ncFileID, 'location', varid=LocationVarID), &
'nc_get_location_varids', 'inq_varid:location '//trim(fname))

WhichVertVarID = -1

end subroutine nc_get_location_varids

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

subroutine nc_write_location(ncFileID, LocationVarID, loc, obsindex, WhichVertVarID)

! Writes a SINGLE location to the specified netCDF variable and file.
! The LocationVarID and WhichVertVarID must be the values returned from
! the nc_get_location_varids call.

use typeSizes
use netcdf

integer, intent(in) :: ncFileID, LocationVarID
type(location_type), intent(in) :: loc
integer, intent(in) :: obsindex
integer, intent(in) :: WhichVertVarID

real(r8), dimension(LocationDims) :: locations
integer, dimension(1) :: intval

if ( .not. module_initialized ) call initialize_module

locations = get_location( loc )

call nc_check(nf90_put_var(ncFileID, LocationVarId, locations, &
start=(/ 1, obsindex /), count=(/ LocationDims, 1 /) ), &
'nc_write_location', 'put_var:location')

end subroutine nc_write_location

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

subroutine get_close_init(gc, num, maxdist, locs, maxdist_list)

! Initializes part of get_close accelerator that depends on the particular obs
Expand Down Expand Up @@ -912,8 +804,6 @@ subroutine find_box_ranges(gc, locs, num)
integer, intent(in) :: num
type(location_type), intent(in) :: locs(num)

logical :: old_out


! FIXME: this space could be very sparse

Expand All @@ -935,19 +825,6 @@ subroutine find_box_ranges(gc, locs, num)
gc%nboxes_y = aint((gc%maxdist + (gc%y_width-1)) / gc%y_width)
gc%nboxes_z = aint((gc%maxdist + (gc%z_width-1)) / gc%z_width)


!if(compare_to_correct) then
! old_out = do_output()
! call set_output(.true.)
! write(errstring, *) 'x bot, top, width, nboxes ', gc%bot_x, gc%top_x, gc%x_width, gc%nboxes_x
! call error_handler(E_MSG, 'find_box_ranges', errstring)
! write(errstring, *) 'y bot, top, width, nboxes ', gc%bot_y, gc%top_y, gc%y_width, gc%nboxes_y
! call error_handler(E_MSG, 'find_box_ranges', errstring)
! write(errstring, *) 'z bot, top, width, nboxes ', gc%bot_z, gc%top_z, gc%z_width, gc%nboxes_z
! call error_handler(E_MSG, 'find_box_ranges', errstring)
! call set_output(old_out)
!endif

end subroutine find_box_ranges

!----------------------------------------------------------------------------
Expand Down Expand Up @@ -1052,6 +929,17 @@ subroutine find_nearest(gc, base_loc, loc_list, nearest, rc)

end subroutine find_nearest

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

function get_maxdist(gc, obs_type)
type(get_close_type), intent(in) :: gc
integer, optional, intent(in) :: obs_type
real(r8) :: get_maxdist

get_maxdist = gc%maxdist

end function get_maxdist

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

subroutine print_get_close_type(gc, amount)
Expand Down
19 changes: 14 additions & 5 deletions assimilation_code/location/column/location_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ module location_mod

use types_mod, only : i8, r8, MISSING_R8, MISSING_I
use ensemble_manager_mod, only : ensemble_type
use utilities_mod, only : register_module, error_handler, E_ERR, ascii_file_format, &
nc_check
use utilities_mod, only : register_module, error_handler, E_ERR, ascii_file_format

implicit none
private

public :: location_type, get_location, set_location, &
set_location_missing, is_location_in_region, &
set_location_missing, is_location_in_region, get_maxdist, &
write_location, read_location, interactive_location, query_location, &
LocationDims, LocationName, LocationLName, LocationStorageOrder, LocationUnits, &
get_close_type, get_close_init, get_close_obs, get_close_state, get_close_destroy, &
Expand Down Expand Up @@ -379,8 +378,6 @@ subroutine interactive_location(location, set_to_default)
type(location_type), intent(out) :: location
logical, intent(in), optional :: set_to_default

real(r8) :: x

if ( .not. module_initialized ) call initialize_module

! If set_to_default is true, then just zero out and return
Expand Down Expand Up @@ -532,6 +529,17 @@ subroutine get_close(gc, base_loc, base_type, locs, loc_qtys, &

end subroutine get_close

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

function get_maxdist(gc, obs_type)
type(get_close_type), intent(in) :: gc
integer, optional, intent(in) :: obs_type
real(r8) :: get_maxdist

get_maxdist = gc%maxdist

end function get_maxdist

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

function is_location_in_region(loc, minl, maxl)
Expand Down Expand Up @@ -686,6 +694,7 @@ subroutine convert_vertical_state(ens_handle, num, locs, loc_qtys, loc_indx, &

end subroutine convert_vertical_state


!----------------------------------------------------------------------------
! end of location/column/location_mod.f90
!----------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 64b29b6

Please sign in to comment.