[Dart-dev] DART/branches Revision: 11658
dart at ucar.edu
dart at ucar.edu
Wed May 24 09:37:54 MDT 2017
nancy at ucar.edu
2017-05-24 09:37:53 -0600 (Wed, 24 May 2017)
35
updates to make L96 2-scale work.
Modified: DART/branches/rma_updates_nancy/assimilation_code/location/utilities/location_io_mod.f90
===================================================================
--- DART/branches/rma_updates_nancy/assimilation_code/location/utilities/location_io_mod.f90 2017-05-24 15:37:09 UTC (rev 11657)
+++ DART/branches/rma_updates_nancy/assimilation_code/location/utilities/location_io_mod.f90 2017-05-24 15:37:53 UTC (rev 11658)
@@ -34,7 +34,8 @@
private
public :: nc_write_location_atts, nc_get_location_varids, &
- nc_write_location, nc_write_location_vert
+ nc_write_location, nc_write_location_vert, &
+ nc_add_location_atts
! version controlled file description for error handling, do not edit
character(len=256), parameter :: source = &
@@ -76,7 +77,7 @@
integer :: rc
character(len=32) :: context = 'nc_write_location_atts'
-! get an id for the locations dimension:
+! get an id for the location dimension:
! if the user passes us in a dimension id,
! assume it is already created and use it.
! if they pass in a valid length, create a 'location' dimension.
@@ -113,6 +114,28 @@
call nc_check(rc, context, 'def_var4:location', fname)
endif
+call nc_add_location_atts(ncFileID, 'location', fname)
+
+end subroutine nc_write_location_atts
+
+!----------------------------------------------------------------------------
+!> Add location-related attributes to the given variable.
+!> (assumes that this variable will contain location info)
+
+subroutine nc_add_location_atts(ncFileID, varname, fname)
+
+integer, intent(in) :: ncFileID ! handle to the netcdf file
+character(len=*), intent(in) :: varname ! name of location variable
+character(len=*), optional, intent(in) :: fname ! file name (for error printing purposes)
+
+integer :: VarID
+integer :: rc
+character(len=32) :: context = 'nc_add_location_atts'
+
+! find the id of the given variable name
+rc = nf90_inq_varid(ncFileID, varname, varid=VarID)
+call nc_check(rc, context, 'inq_varid:'//trim(varname), fname)
+
rc = nf90_put_att(ncFileID, VarID, 'description', 'location coordinates')
call nc_check(rc, context, 'put_att:description', fname)
@@ -132,10 +155,10 @@
! create a variable to store the vert choice
if (has_vertical_choice()) then
- call nc_write_location_vert(ncFileID, LocDimID, fname)
+ call nc_write_location_vert(ncFileID, VarID, fname)
endif
-end subroutine nc_write_location_atts
+end subroutine nc_add_location_atts
!----------------------------------------------------------------------------
!> Define the ancillary vertical array and attributes
Modified: DART/branches/rma_updates_nancy/assimilation_code/modules/observations/DEFAULT_obs_kind_mod.F90
===================================================================
--- DART/branches/rma_updates_nancy/assimilation_code/modules/observations/DEFAULT_obs_kind_mod.F90 2017-05-24 15:37:09 UTC (rev 11657)
+++ DART/branches/rma_updates_nancy/assimilation_code/modules/observations/DEFAULT_obs_kind_mod.F90 2017-05-24 15:37:53 UTC (rev 11658)
@@ -406,10 +406,14 @@
integer, parameter, public :: &
QTY_SEA_SURFACE_ANOMALY = 356
+integer, parameter, public :: &
+ QTY_LARGE_SCALE_STATE = 357, &
+ QTY_SMALL_SCALE_STATE = 358
+
! max_defined_quantities is private to this module. see comment below near the max_obs_specific
! declaration for more info about publics and private values.
-integer, parameter :: max_defined_quantities = 356
+integer, parameter :: max_defined_quantities = 358
!----------------------------------------------------------------------------
! This list is autogenerated by the 'preprocess' program. To add new
@@ -781,6 +785,8 @@
obs_kind_names(354) = obs_kind_type(QTY_SEAICE_FY, 'QTY_SEAICE_FY')
obs_kind_names(355) = obs_kind_type(QTY_SEAICE_AGREG_FY, 'QTY_SEAICE_AGREG_FY')
obs_kind_names(356) = obs_kind_type(QTY_SEA_SURFACE_ANOMALY, 'QTY_SEA_SURFACE_ANOMALY')
+obs_kind_names(357) = obs_kind_type(QTY_LARGE_SCALE_STATE, 'QTY_LARGE_SCALE_STATE')
+obs_kind_names(358) = obs_kind_type(QTY_SMALL_SCALE_STATE, 'QTY_SMALL_SCALE_STATE')
! count here, then output below
Modified: DART/branches/rma_updates_nancy/assimilation_code/modules/utilities/mpi_utilities_mod.f90
===================================================================
--- DART/branches/rma_updates_nancy/assimilation_code/modules/utilities/mpi_utilities_mod.f90 2017-05-24 15:37:09 UTC (rev 11657)
+++ DART/branches/rma_updates_nancy/assimilation_code/modules/utilities/mpi_utilities_mod.f90 2017-05-24 15:37:53 UTC (rev 11658)
@@ -72,16 +72,16 @@
More information about the Dart-dev
mailing list