[Dart-dev] DART/branches Revision: 11564
dart at ucar.edu
dart at ucar.edu
Mon May 1 14:28:35 MDT 2017
hendric at ucar.edu
2017-05-01 14:28:31 -0600 (Mon, 01 May 2017)
224
changing the interface to nc_write_model_atts to use domain
instead of model_will_write_variables, so that in the future
we can write out grid information for multiple domains.
DART library will write the model variables.
Modified: DART/branches/model_mod_changes/assimilation_code/modules/io/direct_netcdf_mod.f90
===================================================================
--- DART/branches/model_mod_changes/assimilation_code/modules/io/direct_netcdf_mod.f90 2017-05-01 17:21:36 UTC (rev 11563)
+++ DART/branches/model_mod_changes/assimilation_code/modules/io/direct_netcdf_mod.f90 2017-05-01 20:28:31 UTC (rev 11564)
@@ -927,7 +927,6 @@
integer :: ndims
integer :: xtype ! precision for netcdf file
integer :: dimids(NF90_MAX_VAR_DIMS)
-logical :: model_writes_atts
character(len=NF90_MAX_NAME) :: filename
@@ -945,7 +944,7 @@
call nc_check(ret, 'create_and_open_state_output', 'end define mode')
! write grid information
-call nc_write_model_atts(ncfile_out, model_writes_atts)
+call nc_write_model_atts(ncfile_out, dom_id)
call nc_check(nf90_Redef(ncfile_out),'create_and_open_state_output', 'redef ')
! filename discription
Modified: DART/branches/model_mod_changes/assimilation_code/modules/io/single_file_io_mod.f90
===================================================================
--- DART/branches/model_mod_changes/assimilation_code/modules/io/single_file_io_mod.f90 2017-05-01 17:21:36 UTC (rev 11563)
+++ DART/branches/model_mod_changes/assimilation_code/modules/io/single_file_io_mod.f90 2017-05-01 20:28:31 UTC (rev 11564)
@@ -110,6 +110,8 @@
!-------------------------------------------------------------------------------
+!@todo FIXME : need to have this work for multiple domains
+
contains
@@ -166,7 +168,7 @@
! Local variables including counters and storing names
character(len=256) :: fname, copyname
-integer :: icopy, ivar, ret, ens_size, num_output_ens
+integer :: icopy, ivar, ret, ens_size, num_output_ens, domain
if (my_task_id() == 0) then
if(.not. byteSizesOK()) then
@@ -286,8 +288,12 @@
!----------------------------------------------------------------------------
! Define the model-specific components
!----------------------------------------------------------------------------
- call nc_write_model_atts( ncFileID%ncid, local_model_mod_will_write_state_variables)
+ ! for single file io, we are assuming a single domain, no lower order models
+ ! have multiple domains.
+ domain = 1
+ call nc_write_model_atts( ncFileID%ncid, domain)
+
if ( .not. local_model_mod_will_write_state_variables ) then
call write_model_attributes(ncFileID, MemberDimID, TimeDimID)
endif
Modified: DART/branches/model_mod_changes/models/9var/model_mod.f90
===================================================================
--- DART/branches/model_mod_changes/models/9var/model_mod.f90 2017-05-01 17:21:36 UTC (rev 11563)
+++ DART/branches/model_mod_changes/models/9var/model_mod.f90 2017-05-01 20:28:31 UTC (rev 11564)
@@ -452,10 +452,10 @@
!------------------------------------------------------------------
!> Writes the model-specific attributes to a netCDF file
-subroutine nc_write_model_atts(ncid, model_mod_writes_state_variables)
+subroutine nc_write_model_atts(ncid, domain_id)
-integer, intent(in) :: ncid ! netCDF file identifier
-logical, intent(out) :: model_mod_writes_state_variables
+integer, intent(in) :: ncid ! netCDF file identifier
+integer, intent(in) :: domain_id
integer :: msize, i
@@ -463,7 +463,6 @@
! so this routine just needs to write any model-specific
! attributes it wants to record.
-model_mod_writes_state_variables = .false.
msize = int(model_size, i4)
! Write Global Attributes
Modified: DART/branches/model_mod_changes/models/POP/model_mod.f90
===================================================================
--- DART/branches/model_mod_changes/models/POP/model_mod.f90 2017-05-01 17:21:36 UTC (rev 11563)
+++ DART/branches/model_mod_changes/models/POP/model_mod.f90 2017-05-01 20:28:31 UTC (rev 11564)
@@ -1873,10 +1873,10 @@
!> the model state vector.
-subroutine nc_write_model_atts( ncid, model_mod_writes_state_variables )
+subroutine nc_write_model_atts( ncid, domain_id )
integer, intent(in) :: ncid ! netCDF file identifier
-logical, intent(out) :: model_mod_writes_state_variables
+integer, intent(in) :: domain_id
More information about the Dart-dev
mailing list