[Dart-dev] DART/branches Revision: 12213
dart at ucar.edu
dart at ucar.edu
Mon Dec 18 17:27:03 MST 2017
thoar at ucar.edu
2017-12-18 17:27:03 -0700 (Mon, 18 Dec 2017)
391
Reverting several of the io modules to be consistent with the rma_trunk.
Totally removing the lorenz_96 filter_ics.nnnn.nc files because we
cannot read them and advance the model. They also have an early
method of recording the model time that is not consistent with the read_model_time()
routine.
Fixing some mistakes in the input.nml files - as pertain the model_mod_check() program.
Modified: DART/branches/mmc/assimilation_code/modules/io/direct_netcdf_mod.f90
===================================================================
--- DART/branches/mmc/assimilation_code/modules/io/direct_netcdf_mod.f90 2017-12-18 23:44:33 UTC (rev 12212)
+++ DART/branches/mmc/assimilation_code/modules/io/direct_netcdf_mod.f90 2017-12-19 00:27:03 UTC (rev 12213)
@@ -602,7 +602,7 @@
!> Should probably do this in a block?
!start_rank = get_start_rank(start_var, domain)
- ! this is where we left off writting variables in the case of multiple tasks
+ ! this is where we left off writing variables in the case of multiple tasks
start_rank = get_start_rank(ivar, domain)
RECEIVING_PE_LOOP: do recv_pe = 0, task_count()-1
@@ -994,10 +994,7 @@
call get_ensemble_time(state_ens_handle, time_owner_index, dart_time)
ncfile_out = create_and_open_state_output(name_handle, domain, copy, &
dart_time, write_single_precision)
- !>@todo if multiple domains exist in the same file, only the variables
- !> from the first domain are created by create_and_open_state_output()
- !> and since the file exists, the variables for the additional domains
- !> never get defined in the netCDF file.
+
endif
endif
@@ -1552,10 +1549,10 @@
dims = get_io_dim_lengths(domain, i)
ret = nf90_inq_varid(ncid, trim(get_variable_name(domain, i)), var_id)
- call nc_check(ret, 'write_variables:', 'nf90_inq_varid "'//trim(get_variable_name(domain,i))//'"')
+ call nc_check(ret, 'write_variables:', 'getting variable "'//trim(get_variable_name(domain,i))//'"')
ret = nf90_put_var(ncid, var_id, var_block(istart:iend), count=dims)
- call nc_check(ret, 'write_variables:', 'nf90_put_var "'//trim(get_variable_name(domain,i))//'"')
+ call nc_check(ret, 'write_variables:', 'writing "'//trim(get_variable_name(domain,i))//'"')
deallocate(dims)
endif
@@ -1589,8 +1586,6 @@
logical, intent(in) :: single_precision_output
integer :: ncfile_out
-character(len=*), parameter :: routine = 'create_and_open_state_output'
-
integer :: ret !> netcdf return code
integer :: create_mode
integer :: i, j ! loop variables
@@ -1602,55 +1597,44 @@
character(len=256) :: filename
-character(len=NF90_MAX_NAME) :: varname, dimname
-
filename = get_restart_filename(name_handle, copy_number, dom_id)
write(msgstring,*) 'Creating output file ', trim(filename)
-call error_handler(E_ALLMSG, routine, msgstring)
+call error_handler(E_ALLMSG,'create_and_open_state_output:', msgstring)
! What file options do you want?
create_mode = ior(NF90_CLOBBER, NF90_64BIT_OFFSET)
ret = nf90_create(filename, create_mode, ncfile_out)
-call nc_check(ret, routine, 'nf90_create "'//trim(filename)//'"')
+call nc_check(ret, 'create_and_open_state_output: creating', trim(filename))
ret = nf90_enddef(ncfile_out)
-call nc_check(ret, routine, 'end define mode')
+call nc_check(ret, 'create_and_open_state_output', 'end define mode')
! write grid information
call nc_write_model_atts(ncfile_out, dom_id)
-call nc_check(nf90_Redef(ncfile_out), routine, 'redef ')
+call nc_check(nf90_Redef(ncfile_out),'create_and_open_state_output', 'redef ')
! filename discription
-call nc_write_file_information(ncfile_out, filename, &
- get_file_description(name_handle, copy_number, dom_id))
+call nc_write_file_information(ncfile_out, filename, get_file_description(name_handle, copy_number, dom_id))
+
! revision information
call nc_write_revision_info(ncfile_out)
! clamping information
-call nc_write_global_att_clamping(ncfile_out, copy_number, dom_id, &
- from_scratch=.true.)
+call nc_write_global_att_clamping(ncfile_out, copy_number, dom_id, from_scratch=.true.)
+
! define dimensions, loop around unique dimensions
do i = 1, get_io_num_unique_dims(dom_id)
-
- dimname = get_io_unique_dim_name(dom_id,i)
-
- write(msgstring,*)'dimension ',i,' name "',trim(dimname),'"'
-
- if ( dimname == 'time' ) then
- ret = nf90_def_dim(ncfile_out, dimname, NF90_UNLIMITED, new_dimid)
+ if ( trim(get_io_unique_dim_name(dom_id, i)) == 'time' ) then
+ ret = nf90_def_dim(ncfile_out, 'time', NF90_UNLIMITED, new_dimid)
else
More information about the Dart-dev
mailing list