[Dart-dev] [9994] DART/trunk/assim_model/assim_model_mod.f90: removing nuisance trailing whitespaces ...
nancy at ucar.edu
nancy at ucar.edu
Fri Mar 25 10:34:09 MDT 2016
Revision: 9994
Author: thoar
Date: 2016-03-25 10:34:09 -0600 (Fri, 25 Mar 2016)
Log Message:
-----------
removing nuisance trailing whitespaces ... different across many branches
Modified Paths:
--------------
DART/trunk/assim_model/assim_model_mod.f90
-------------- next part --------------
Modified: DART/trunk/assim_model/assim_model_mod.f90
===================================================================
--- DART/trunk/assim_model/assim_model_mod.f90 2016-03-25 14:12:54 UTC (rev 9993)
+++ DART/trunk/assim_model/assim_model_mod.f90 2016-03-25 16:34:09 UTC (rev 9994)
@@ -92,7 +92,7 @@
!-------------------------------------------------------------
! Namelist with default values
-! write_binary_restart_files == .true. -> use unformatted file format.
+! write_binary_restart_files == .true. -> use unformatted file format.
! Full precision, faster, smaller,
! but not as portable.
@@ -113,7 +113,7 @@
!
! Allocates storage for an instance of an assim_model_type. With this
! implementation, need to be VERY careful about assigment and maintaining
-! permanent storage locations. Need to revisit the best way to do
+! permanent storage locations. Need to revisit the best way to do
! assim_model_copy below.
implicit none
@@ -136,7 +136,7 @@
! subroutine static_init_assim_model()
!
! Initializes class data for the assim_model. Also calls the static
-! initialization for the underlying model. So far, this simply
+! initialization for the underlying model. So far, this simply
! is initializing the position of the state variables as location types.
implicit none
@@ -146,7 +146,7 @@
! only execute this code once, even if called multiple times.
if (module_initialized) return
-! First thing to do is echo info to logfile ...
+! First thing to do is echo info to logfile ...
call register_module(source, revision, revdate)
module_initialized = .true.
@@ -155,7 +155,7 @@
read(iunit, nml = assim_model_nml, iostat = io)
call check_namelist_read(iunit, io, "assim_model_nml")
-! Record the namelist values used for the run ...
+! Record the namelist values used for the run ...
if (do_nml_file()) write(nmlfileunit, nml=assim_model_nml)
if (do_nml_term()) write( * , nml=assim_model_nml)
@@ -186,16 +186,16 @@
! NF90_put_var ! provide values for variable
! NF90_CLOSE ! close: save updated netCDF dataset
!
-! Time is a funny beast ...
+! Time is a funny beast ...
! Many packages decode the time:units attribute to convert the offset to a calendar
! date/time format. Using an offset simplifies many operations, but is not the
! way we like to see stuff plotted. The "approved" calendars are:
-! gregorian or standard
-! Mixed Gregorian/Julian calendar as defined by Udunits. This is the default.
-! noleap Modern calendar without leap years, i.e., all years are 365 days long.
-! 360_day All years are 360 days divided into 30 day months.
-! julian Julian calendar.
-! none No calendar.
+! gregorian or standard
+! Mixed Gregorian/Julian calendar as defined by Udunits. This is the default.
+! noleap Modern calendar without leap years, i.e., all years are 365 days long.
+! 360_day All years are 360 days divided into 30 day months.
+! julian Julian calendar.
+! none No calendar.
!
! location is another one ...
!
@@ -224,7 +224,7 @@
if(.not. byteSizesOK()) then
call error_handler(E_ERR,'init_diag_output', &
- 'Compiler does not support required kinds of variables.',source,revision,revdate)
+ 'Compiler does not support required kinds of variables.',source,revision,revdate)
end if
metadata_length = LEN(meta_data_per_copy(1))
@@ -285,7 +285,7 @@
'init_diag_output', 'def_dim NMLnlines '//trim(ncFileID%fname))
!-------------------------------------------------------------------------------
-! Write Global Attributes
+! Write Global Attributes
!-------------------------------------------------------------------------------
call nc_check(nf90_put_att(ncFileID%ncid, NF90_GLOBAL, "title", global_meta_data), &
@@ -308,7 +308,7 @@
write(*,*)'init_diag_output detected Lag is present'
-endif
+endif
!-------------------------------------------------------------------------------
! Create variables and attributes.
@@ -333,7 +333,7 @@
call nc_check(nf90_put_att(ncFileID%ncid, metadataVarID, "long_name", &
"Metadata for each copy/member"), 'init_diag_output', 'put_att long_name')
-! input namelist
+! input namelist
call nc_check(nf90_def_var(ncid=ncFileID%ncid,name="inputnml", xtype=nf90_char, &
dimids = (/ linelenDimID, nlinesDimID /), varid=nmlVarID), &
'init_diag_output', 'def_var inputnml')
@@ -375,7 +375,7 @@
'init_diag_output', 'put_var MemberVarID')
call nc_check(nf90_put_var(ncFileID%ncid, metadataVarID, meta_data_per_copy ), &
'init_diag_output', 'put_var metadataVarID')
-
+
call file_to_text("input.nml", textblock)
call nc_check(nf90_put_var(ncFileID%ncid, nmlVarID, textblock ), &
@@ -387,7 +387,7 @@
! sync to disk, but leave open
!-------------------------------------------------------------------------------
-call nc_check(nf90_sync(ncFileID%ncid), 'init_diag_output', 'sync '//trim(ncFileID%fname))
+call nc_check(nf90_sync(ncFileID%ncid), 'init_diag_output', 'sync '//trim(ncFileID%fname))
!-------------------------------------------------------------------------------
! Define the model-specific components
!-------------------------------------------------------------------------------
@@ -402,7 +402,7 @@
! sync again, but still leave open
!-------------------------------------------------------------------------------
-call nc_check(nf90_sync(ncFileID%ncid), 'init_diag_output', 'sync '//trim(ncFileID%fname))
+call nc_check(nf90_sync(ncFileID%ncid), 'init_diag_output', 'sync '//trim(ncFileID%fname))
!-------------------------------------------------------------------------------
end function init_diag_output
@@ -486,7 +486,7 @@
!-------------------------------------------------------------------------
!
! Returns the meta data associated with each copy of data in
-! a diagnostic input file. Should be called immediately after
+! a diagnostic input file. Should be called immediately after
! function init_diag_input.
implicit none
@@ -595,8 +595,8 @@
! function get_initial_condition()
!
! Initial conditions. This returns an initial assim_model_type
-! which includes both a state vector and a time. Design of exactly where this
-! stuff should come from is still evolving (12 July, 2002) but for now can
+! which includes both a state vector and a time. Design of exactly where this
+! stuff should come from is still evolving (12 July, 2002) but for now can
! start at time offset 0 with the initial state.
! Need to carefully coordinate this with the times for observations.
@@ -615,8 +615,8 @@
! function get_initial_condition()
!
! Initial conditions. This returns an initial state vector and a time
-! for use in an assim_model_type. Design of exactly where this
-! stuff should come from is still evolving (12 July, 2002) but for now can
+! for use in an assim_model_type. Design of exactly where this
+! stuff should come from is still evolving (12 July, 2002) but for now can
! start at time offset 0 with the initial state.
! Need to carefully coordinate this with the times for observations.
@@ -686,7 +686,7 @@
! location. Will need to be generalized for more complex state vector
! types. It might be better to be passing an assim_model_type with
! the associated time through here, but that requires changing the
-! entire observation side of the class tree. Reconsider this at a
+! entire observation side of the class tree. Reconsider this at a
! later date (JLA, 15 July, 2002). loctype for now is an integer that
! specifies what sort of variable from the model should be interpolated.
@@ -696,7 +696,7 @@
type(location_type), intent(in) :: location
integer, intent(in) :: loctype
real(r8), intent(out) :: obs_vals
-integer, intent(out) :: istatus
+integer, intent(out) :: istatus
istatus = 0
@@ -748,8 +748,8 @@
subroutine write_state_restart(assim_model, funit, target_time)
!----------------------------------------------------------------------
!
-! Write a restart file given a model extended state and a unit number
-! opened to the restart file. (Need to reconsider what is passed to
+! Write a restart file given a model extended state and a unit number
+! opened to the restart file. (Need to reconsider what is passed to
! identify file or if file can even be opened within this routine).
implicit none
@@ -772,8 +772,8 @@
subroutine awrite_state_restart(model_time, model_state, funit, target_time)
!----------------------------------------------------------------------
!
-! Write a restart file given a model extended state and a unit number
-! opened to the restart file. (Need to reconsider what is passed to
+! Write a restart file given a model extended state and a unit number
+! opened to the restart file. (Need to reconsider what is passed to
! identify file or if file can even be opened within this routine).
implicit none
@@ -815,7 +815,7 @@
if (io /= 0) goto 10
endif
-! come directly here on error.
+! come directly here on error.
10 continue
! if error, use inquire function to extract filename associated with
@@ -983,13 +983,13 @@
!call error_handler(E_MSG,'open_restart_read',msgstring,source,revision,revdate)
! WARNING: Absoft Pro Fortran 9.0, on a power-pc mac, is convinced
-! that certain binary files are, in fact, ascii, because the read_time
+! that certain binary files are, in fact, ascii, because the read_time
! call is returning what seems like a good time even though it should
! be garbage. This code works fine on all other platforms/compilers
! we've tried, so we're leaving it as-is. Best solution if you're
! using absoft on a mac is to set all files to be non-binary in the
-! namelist. You may also have to set the format in both obs_model_mod.f90
-! and interpolate_model.f90 to 'formatted' instead of the hardcoded
+! namelist. You may also have to set the format in both obs_model_mod.f90
+! and interpolate_model.f90 to 'formatted' instead of the hardcoded
! 'unformatted' for async 2/4 model advance temp_ic and temp_ud files.
! Autodetect format of restart file when opening
@@ -1006,7 +1006,7 @@
! An opening error means something is wrong with the file, error and stop
if(ios /= 0) goto 11
temp_time = read_time(open_restart_read, read_format, ios_out)
-if(ios_out == 0) then
+if(ios_out == 0) then
! It appears to be formatted, proceed
rewind open_restart_read
return
@@ -1027,7 +1027,7 @@
if(ios /= 0) goto 11
rewind open_restart_read
temp_time = read_time(open_restart_read, read_format, ios_out)
-if(ios_out == 0) then
+if(ios_out == 0) then
! It appears to be unformatted, proceed
rewind open_restart_read
return
@@ -1062,7 +1062,7 @@
subroutine output_diagnostics(ncFileID, state, copy_index)
!-------------------------------------------------------------------
-! Outputs the "state" to the supplied netCDF file.
+! Outputs the "state" to the supplied netCDF file.
!
! the time, and an optional index saying which
! copy of the metadata this state is associated with.
@@ -1071,8 +1071,8 @@
! state the copy of the state vector
! copy_index which copy of the state vector (ensemble member ID)
!
-! TJH 28 Aug 2002 original netCDF implementation
-! TJH 7 Feb 2003 [created time_manager_mod:nc_get_tindex]
+! TJH 28 Aug 2002 original netCDF implementation
+! TJH 7 Feb 2003 [created time_manager_mod:nc_get_tindex]
! substantially modified to handle time in a much better manner
! TJH 24 Jun 2003 made model_mod do all the netCDF writing.
! Still need an error handler for nc_write_model_vars
@@ -1099,7 +1099,7 @@
subroutine aoutput_diagnostics(ncFileID, model_time, model_state, copy_index)
!-------------------------------------------------------------------
-! Outputs the "state" to the supplied netCDF file.
+! Outputs the "state" to the supplied netCDF file.
!
! the time, and an optional index saying which
! copy of the metadata this state is associated with.
@@ -1109,12 +1109,12 @@
! model_state the copy of the state vector
! copy_index which copy of the state vector (ensemble member ID)
!
-! TJH 28 Aug 2002 original netCDF implementation
-! TJH 7 Feb 2003 [created time_manager_mod:nc_get_tindex]
+! TJH 28 Aug 2002 original netCDF implementation
+! TJH 7 Feb 2003 [created time_manager_mod:nc_get_tindex]
! substantially modified to handle time in a much better manner
! TJH 24 Jun 2003 made model_mod do all the netCDF writing.
! Still need an error handler for nc_write_model_vars
-!
+!
! Note -- ncFileId may be modified -- the time mirror needs to
! track the state of the netCDF file. This must be "inout".
@@ -1153,7 +1153,7 @@
! model_mod:nc_write_model_vars knows nothing about assim_model_types,
! so we must pass the components.
-i = nc_write_model_vars(ncFileID%ncid, model_state, copyindex, timeindex)
+i = nc_write_model_vars(ncFileID%ncid, model_state, copyindex, timeindex)
end subroutine aoutput_diagnostics
@@ -1247,7 +1247,7 @@
!------------------------------------------------------------------------
! The current time is appended to the "time" coordinate variable.
! The new length of the "time" variable is returned.
-!
+!
! This REQUIRES that "time" is a coordinate variable AND it is the
! unlimited dimension. If not ... bad things happen.
!
@@ -1302,12 +1302,12 @@
endif
! make sure the time mirror can handle another entry.
-if ( lngth == ncFileID%NtimesMAX ) then
+if ( lngth == ncFileID%NtimesMAX ) then
write(msgstring,*)'doubling mirror length of ',lngth,' of ',ncFileID%fname
call error_handler(E_DBG,'nc_append_time',msgstring,source,revision,revdate)
- allocate(temptime(ncFileID%NtimesMAX), tempRtime(ncFileID%NtimesMAX))
+ allocate(temptime(ncFileID%NtimesMAX), tempRtime(ncFileID%NtimesMAX))
temptime = ncFileID%times ! preserve
tempRtime = ncFileID%rtimes ! preserve
@@ -1326,7 +1326,7 @@
call get_time(time, secs, days) ! get time components to append
realtime = days + secs/86400.0_digits12 ! time base is "days since ..."
-lngth = lngth + 1 ! index of new time
+lngth = lngth + 1 ! index of new time
ncFileID%Ntimes = lngth ! new working length of time mirror
call nc_check(nf90_put_var(ncid, TimeVarID, realtime, start=(/ lngth /) ), &
@@ -1345,15 +1345,15 @@
function nc_get_tindex(ncFileID, statetime) result(timeindex)
!------------------------------------------------------------------------
-!
-! We need to compare the time of the current assim_model to the
+!
+! We need to compare the time of the current assim_model to the
! netcdf time coordinate variable (the unlimited dimension).
! If they are the same, no problem ...
! If it is earlier, we need to find the right index and insert ...
! If it is the "future", we need to add another one ...
! If it is in the past but does not match any we have, we're in trouble.
! The new length of the "time" variable is returned.
-!
+!
! This REQUIRES that "time" is a coordinate variable AND it is the
! unlimited dimension. If not ... bad things happen.
!
@@ -1363,13 +1363,13 @@
! A new array "times" has been added to mirror the times that are stored
! in the netcdf time coordinate variable. While somewhat unpleasant, it
! is SUBSTANTIALLY faster than reading the netcdf time variable at every
-! turn -- which caused a geometric or exponential increase in overall
+! turn -- which caused a geometric or exponential increase in overall
! netcdf I/O. (i.e. this was really bad)
!
! The time mirror is maintained as a time_type, so the comparison with
! the state time uses the operators for the time_type. The netCDF file,
! however, has time units of a different convention. The times are
-! converted only when appending to the time coordinate variable.
+! converted only when appending to the time coordinate variable.
!
! Revision by TJH 4 June 2004:
! Implementing a "file type" for output that contains a unique time
@@ -1396,14 +1396,14 @@
ncid = ncFileID%ncid
! Make sure we're looking at the most current version of the netCDF file.
-! Get the length of the (unlimited) Time Dimension
+! Get the length of the (unlimited) Time Dimension
! If there is no length -- simply append a time to the dimension and return ...
-! Else get the existing times ["days since ..."] and convert to time_type
+! Else get the existing times ["days since ..."] and convert to time_type
! if the statetime < earliest netcdf time ... we're in trouble
! if the statetime does not match any netcdf time ... we're in trouble
-! if the statetime > last netcdf time ... append a time ...
+! if the statetime > last netcdf time ... append a time ...
-call nc_check(NF90_Sync(ncid), 'nc_get_tindex', 'sync '//trim(ncFileID%fname))
+call nc_check(NF90_Sync(ncid), 'nc_get_tindex', 'sync '//trim(ncFileID%fname))
call nc_check(NF90_Inquire(ncid, nDimensions, nVariables, nAttributes, unlimitedDimID), &
'nc_get_tindex', 'inquire '//trim(ncFileID%fname))
call nc_check(NF90_Inq_Varid(ncid, "time", TimeVarID), &
@@ -1416,7 +1416,7 @@
! Sanity check all cases first.
if ( ndims /= 1 ) then
- write(msgstring,*)'"time" expected to be rank-1'
+ write(msgstring,*)'"time" expected to be rank-1'
call error_handler(E_WARN,'nc_get_tindex',msgstring,source,revision,revdate)
timeindex = timeindex - 1
endif
@@ -1462,8 +1462,8 @@
if ( timeindex <= 0 ) then ! There was no match. Either the model
- ! time precedes the earliest file time - or -
- ! model time is somewhere in the middle - or -
+ ! time precedes the earliest file time - or -
+ ! model time is somewhere in the middle - or -
! model time needs to be appended.
if (statetime < ncFileID%times(1) ) then
@@ -1482,7 +1482,7 @@
'Model time precedes earliest netCDF time.', source,revision,revdate)
timeindex = -2
- else if ( statetime < ncFileID%times(ncFileID%Ntimes) ) then
+ else if ( statetime < ncFileID%times(ncFileID%Ntimes) ) then
! It is somewhere in the middle without actually matching an existing time.
! This is very bad.
@@ -1508,7 +1508,7 @@
enddo BadLoop
- else ! we must need to append ...
+ else ! we must need to append ...
timeindex = nc_append_time(ncFileID, statetime)
@@ -1517,7 +1517,7 @@
call error_handler(E_DBG,'nc_get_tindex',msgstring,source,revision,revdate)
endif
-
+
endif
end function nc_get_tindex
@@ -1546,7 +1546,7 @@
ncid = ncFileID%ncid
-!call check(NF90_Sync(ncid))
+!call check(NF90_Sync(ncid))
!call check(NF90_Inquire_Dimension(ncid, unlimitedDimID, varname, length))
!
!if ( TimeVarID /= unlimitedDimID ) then
More information about the Dart-dev
mailing list