From nancy at ucar.edu Tue Mar 11 15:51:32 2014 From: nancy at ucar.edu (nancy at ucar.edu) Date: Tue, 11 Mar 2014 15:51:32 -0600 Subject: [Dart-dev] [6849] DART/trunk/models/wrf: remove the 4 obsolete namelist items ( which have been Message-ID: Revision: 6849 Author: nancy Date: 2014-03-11 15:51:32 -0600 (Tue, 11 Mar 2014) Log Message: ----------- remove the 4 obsolete namelist items (which have been ignored forever), and update the namelists and docs to match. Modified Paths: -------------- DART/trunk/models/wrf/model_mod.f90 DART/trunk/models/wrf/model_mod.html DART/trunk/models/wrf/model_mod.nml -------------- next part -------------- Modified: DART/trunk/models/wrf/model_mod.f90 =================================================================== --- DART/trunk/models/wrf/model_mod.f90 2014-03-10 15:01:49 UTC (rev 6848) +++ DART/trunk/models/wrf/model_mod.f90 2014-03-11 21:51:32 UTC (rev 6849) @@ -194,24 +194,12 @@ !JPH -- single column model flag logical :: scm = .false. ! using the single column model -! obsolete items; ignored by this code. -! non-backwards-compatible change. should be removed, -! but see note below about namelist. -integer :: num_moist_vars -logical :: surf_obs, soil_data, h_diab - -! adv_mod_command moved to dart_to_wrf namelist; ignored here. -character(len = 72) :: adv_mod_command = '' - ! num_moist_vars, surf_obs, soil_data, h_diab, and adv_mod_command -! are IGNORED no matter what their settings in the namelist are. -! they are obsolete, but removing them here will cause a fatal error -! until users remove them from their input.nml files as well. -namelist /model_nml/ output_state_vector, num_moist_vars, & - num_domains, calendar_type, surf_obs, soil_data, h_diab, & +! were removed from the namelist after being deprecated for a long time. +namelist /model_nml/ output_state_vector, num_domains, calendar_type, & default_state_variables, wrf_state_variables, & wrf_state_bounds, sfc_elev_max_diff, & - adv_mod_command, assimilation_period_seconds, & + assimilation_period_seconds, & allow_obs_below_vol, vert_localization_coord, & center_search_half_length, center_spline_grid_scale, & circulation_pres_level, circulation_radius, polar, & @@ -351,14 +339,6 @@ if (do_nml_file()) write(nmlfileunit, nml=model_nml) if (do_nml_term()) write( * , nml=model_nml) -! Temporary warning until this namelist item is removed. -if (adv_mod_command /= '') then - msgstring2 = "Set the model advance command in the &dart_to_wrf_nml namelist" - call error_handler(E_MSG, 'static_init_model:', & - "WARNING: adv_mod_command ignored in &model_mod namelist", & - text2=msgstring2) -endif - allocate(wrf%dom(num_domains)) ! get default state variable table if asked Modified: DART/trunk/models/wrf/model_mod.html =================================================================== --- DART/trunk/models/wrf/model_mod.html 2014-03-10 15:01:49 UTC (rev 6848) +++ DART/trunk/models/wrf/model_mod.html 2014-03-11 21:51:32 UTC (rev 6849) @@ -121,12 +121,7 @@ num_domains = 1, output_state_vector = .false., calendar_type = 3, - num_moist_vars = 3, - surf_obs = .true., - soil_data = .true., - h_diab = .false., assimilation_period_seconds = 21600, - adv_mod_command = './wrf.exe', allow_obs_below_vol = .false., vert_localization_coord = 3, center_search_half_length = 500000., @@ -374,32 +369,56 @@ + + + + +

The following items used to be in the WRF namelist +but have been removed. The first 4 are no longer needed, +and the last one was moved to +&dart_to_wrf_nml +in 2010. +In the Lanai release having these values in the namelist +does not cause a fatal error, but more recent versions of +the code will fail if any of these values are specified. +Remove them from your namelist to avoid errors. +

+ +
+ + + + + + + + + - - - - - Modified: DART/trunk/models/wrf/model_mod.nml =================================================================== --- DART/trunk/models/wrf/model_mod.nml 2014-03-10 15:01:49 UTC (rev 6848) +++ DART/trunk/models/wrf/model_mod.nml 2014-03-11 21:51:32 UTC (rev 6849) @@ -49,12 +49,7 @@ num_domains = 1, output_state_vector = .false., calendar_type = 3, - num_moist_vars = 3, - surf_obs = .true., - soil_data = .true., - h_diab = .false., assimilation_period_seconds = 21600, - adv_mod_command = './wrf.exe', allow_obs_below_vol = .false., vert_localization_coord = 3, center_search_half_length = 500000., From nancy at ucar.edu Fri Mar 14 11:11:55 2014 From: nancy at ucar.edu (nancy at ucar.edu) Date: Fri, 14 Mar 2014 11:11:55 -0600 Subject: [Dart-dev] [6851] DART/trunk/models/pe2lyr/work: add the build files to make obs_seq_to_netcdf for this model. Message-ID: Revision: 6851 Author: nancy Date: 2014-03-14 11:11:53 -0600 (Fri, 14 Mar 2014) Log Message: ----------- add the build files to make obs_seq_to_netcdf for this model. update the input.nml to add the namelists needed for obs_seq_to_netcdf, and make some of the defaults better for actually running the model (e.g. outlier_threshold, cutoff). also note where our tools need minor tweaks for running with a model that isn't using a calendar. Modified Paths: -------------- DART/trunk/models/pe2lyr/work/input.nml Added Paths: ----------- DART/trunk/models/pe2lyr/work/mkmf_obs_seq_to_netcdf DART/trunk/models/pe2lyr/work/path_names_obs_seq_to_netcdf -------------- next part -------------- Modified: DART/trunk/models/pe2lyr/work/input.nml =================================================================== --- DART/trunk/models/pe2lyr/work/input.nml 2014-03-13 17:20:22 UTC (rev 6850) +++ DART/trunk/models/pe2lyr/work/input.nml 2014-03-14 17:11:53 UTC (rev 6851) @@ -42,7 +42,7 @@ output_interval = 1, num_groups = 1, input_qc_threshold = 3.0, - outlier_threshold = -1.0, + outlier_threshold = 4.0, output_forward_op_errors = .true., output_timestamps = .false., output_inflation = .true., @@ -79,7 +79,7 @@ &assim_tools_nml filter_kind = 1, - cutoff = 100000.0, + cutoff = 0.02, sort_obs_inc = .false., spread_restoration = .false., sampling_error_correction = .false., @@ -119,6 +119,7 @@ approximate_distance = .false., nlon = 71, nlat = 36, + print_box_level = 0, output_box_info = .false. / &preprocess_nml @@ -136,8 +137,7 @@ write_nml = 'file' / &obs_sequence_tool_nml - num_input_files = 2, - filename_seq = 'obs_seq.one', 'obs_seq.two', + filename_seq = 'obs_seq.out', filename_out = 'obs_seq.processed', first_obs_days = -1, first_obs_seconds = -1, @@ -194,6 +194,10 @@ gregorian_cal = .false. / +# again - this model doesn't use a calendar. it starts at +# day 0, seconds 0. that's equiv to year 1601 in gregorian, +# so use that for now. but it should allow a no_calendar option. +# # The times in the namelist for the obs_diag program are vectors # that follow the following sequence: # year month day hour minute second @@ -202,23 +206,29 @@ # # Acceptable latitudes range from [-90, 90] # Acceptable longitudes range from [ 0, Inf] +# +# currently this fails anyway because the observations are called +# U_WIND_COMPONENT and V_WIND_COMPONENT and in trying to match up +# corresponding wind observations into a single vector, the obs_diag +# program expects a platform name at the start of the obs type and +# fails without one. &obs_diag_nml obs_sequence_name = 'obs_seq.final', obs_sequence_list = '', - first_bin_center = 2003, 1, 1, 0, 0, 0 , - last_bin_center = 2003, 1, 7, 0, 0, 0 , - bin_separation = 0, 0, 0, 6, 0, 0 , - bin_width = 0, 0, 0, 6, 0, 0 , - time_to_skip = 0, 0, 1, 0, 0, 0 , + first_bin_center = 1601, 1, 1, 0, 0, 0 , + last_bin_center = 9999, 1, 1, 0, 0, 0 , + bin_separation = 0, 0, 0, 0, 0, 0 , + bin_width = 0, 0, 1, 0, 0, 0 , + time_to_skip = 0, 0, 0, 0, 0, 0 , max_num_bins = 1000, trusted_obs = 'null', - Nregions = 4, - lonlim1 = 0.0, 0.0, 0.0, 235.0, - lonlim2 = 360.0, 360.0, 360.0, 295.0, - latlim1 = 20.0, -80.0, -20.0, 25.0, - latlim2 = 80.0, -20.0, 20.0, 55.0, - reg_names = 'Northern Hemisphere', 'Southern Hemisphere', 'Tropics', 'North America', + Nregions = 3, + lonlim1 = 0.0, 0.0, 0.0, + lonlim2 = 360.0, 360.0, 360.0, + latlim1 = 20.0, -80.0, -20.0, + latlim2 = 80.0, -20.0, 20.0, + reg_names = 'Northern Hemisphere', 'Southern Hemisphere', 'Tropics', print_mismatched_locs = .false., create_rank_histogram = .true., outliers_in_histogram = .true., @@ -226,3 +236,42 @@ verbose = .true. / +# this is what the namelist should probably look like, because +# this model doesn't really have a calendar. it just increments +# days and seconds. but the schedule module currently only +# understands models with calendars, so lie to it about using +# a gregorian calendar. it works just fine - day 0 is year 1601. +#&schedule_nml +# calendar = 'no_calendar', +# first_bin_start = 0, 0, +# first_bin_end = 9999, 0, +# last_bin_end = 9999, 0, +# bin_interval_days = 1000000, +# bin_interval_seconds = 0, +# max_num_bins = 1000, +# print_table = .true. +# / + +&schedule_nml + calendar = 'Gregorian', + first_bin_start = 1601, 1, 1, 0, 0, 0, + first_bin_end = 2999, 1, 1, 0, 0, 0, + last_bin_end = 2999, 1, 1, 0, 0, 0, + bin_interval_days = 1000000, + bin_interval_seconds = 0, + max_num_bins = 1000, + print_table = .true. + / + + +&obs_seq_to_netcdf_nml + obs_sequence_name = 'obs_seq.final', + obs_sequence_list = '', + append_to_netcdf = .false., + lonlim1 = 0.0, + lonlim2 = 360.0, + latlim1 = -90.0, + latlim2 = 90.0, + verbose = .false. + / + Added: DART/trunk/models/pe2lyr/work/mkmf_obs_seq_to_netcdf =================================================================== --- DART/trunk/models/pe2lyr/work/mkmf_obs_seq_to_netcdf (rev 0) +++ DART/trunk/models/pe2lyr/work/mkmf_obs_seq_to_netcdf 2014-03-14 17:11:53 UTC (rev 6851) @@ -0,0 +1,18 @@ +#!/bin/csh +# +# DART software - Copyright 2004 - 2013 UCAR. This open source software is +# provided by UCAR, "as is", without charge, subject to all terms of use at +# http://www.image.ucar.edu/DAReS/DART/DART_download +# +# DART $Id$ + +../../../mkmf/mkmf -p obs_seq_to_netcdf -t ../../../mkmf/mkmf.template \ + -a "../../.." path_names_obs_seq_to_netcdf + +exit $status + +# +# $URL$ +# $Revision$ +# $Date$ + Property changes on: DART/trunk/models/pe2lyr/work/mkmf_obs_seq_to_netcdf ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + text/plain Added: svn:keywords + Date Rev Author HeadURL Id Added: svn:eol-style + native Added: DART/trunk/models/pe2lyr/work/path_names_obs_seq_to_netcdf =================================================================== --- DART/trunk/models/pe2lyr/work/path_names_obs_seq_to_netcdf (rev 0) +++ DART/trunk/models/pe2lyr/work/path_names_obs_seq_to_netcdf 2014-03-14 17:11:53 UTC (rev 6851) @@ -0,0 +1,15 @@ +assim_model/assim_model_mod.f90 +common/types_mod.f90 +location/threed_sphere/location_mod.f90 +models/pe2lyr/model_mod.f90 +models/pe2lyr/pe2lyr_mod.f90 +models/pe2lyr/spharmt_mod.f90 +mpi_utilities/null_mpi_utilities_mod.f90 +obs_def/obs_def_mod.f90 +obs_kind/obs_kind_mod.f90 +obs_sequence/obs_seq_to_netcdf.f90 +obs_sequence/obs_sequence_mod.f90 +random_seq/random_seq_mod.f90 +time_manager/schedule_mod.f90 +time_manager/time_manager_mod.f90 +utilities/utilities_mod.f90 From nancy at ucar.edu Fri Mar 21 17:02:05 2014 From: nancy at ucar.edu (nancy at ucar.edu) Date: Fri, 21 Mar 2014 17:02:05 -0600 Subject: [Dart-dev] [6856] DART/trunk/models/clm/model_mod.f90: Changed an automatic array to an allocatable array because the Message-ID: Revision: 6856 Author: thoar Date: 2014-03-21 17:02:05 -0600 (Fri, 21 Mar 2014) Log Message: ----------- Changed an automatic array to an allocatable array because the routine is public and the dimensions _may_ not be known until static_init_model() has been called. Since it was a public routine, it _could_ be called before static_init_model. Modified Paths: -------------- DART/trunk/models/clm/model_mod.f90 -------------- next part -------------- Modified: DART/trunk/models/clm/model_mod.f90 =================================================================== --- DART/trunk/models/clm/model_mod.f90 2014-03-20 21:51:36 UTC (rev 6855) +++ DART/trunk/models/clm/model_mod.f90 2014-03-21 23:02:05 UTC (rev 6856) @@ -3633,11 +3633,12 @@ ! Local storage -integer :: ivar, indexi, i, j -integer, dimension(nlon,nlat) :: countmat +integer :: ivar, indexi, i, j +integer, allocatable, dimension(:,:) :: countmat if ( .not. module_initialized ) call static_init_model +allocate(countmat(nlon,nlat)) countmat = 0 VARTYPES : do ivar = 1,nfields @@ -3667,6 +3668,8 @@ enddo enddo +deallocate(countmat) + end subroutine find_gridcell_Npft From nancy at ucar.edu Fri Mar 21 17:03:23 2014 From: nancy at ucar.edu (nancy at ucar.edu) Date: Fri, 21 Mar 2014 17:03:23 -0600 Subject: [Dart-dev] [6857] DART/trunk/models/clm/work/input.nml.template: strings used by 'sed' in makedaily.sh now match those Message-ID: Revision: 6857 Author: thoar Date: 2014-03-21 17:03:23 -0600 (Fri, 21 Mar 2014) Log Message: ----------- strings used by 'sed' in makedaily.sh now match those in this template. Modified Paths: -------------- DART/trunk/models/clm/work/input.nml.template -------------- next part -------------- Modified: DART/trunk/models/clm/work/input.nml.template =================================================================== --- DART/trunk/models/clm/work/input.nml.template 2014-03-21 23:02:05 UTC (rev 6856) +++ DART/trunk/models/clm/work/input.nml.template 2014-03-21 23:03:23 UTC (rev 6857) @@ -287,8 +287,8 @@ gregorian_cal = .true., first_obs_days = DART1D, first_obs_seconds = DART1S, - last_obs_days = DART2D, - last_obs_seconds = DART2S, + last_obs_days = DARTND, + last_obs_seconds = DARTNS, edit_qc_metadata = .true., new_qc_metadata = 'Original QC', / From nancy at ucar.edu Tue Mar 25 16:49:41 2014 From: nancy at ucar.edu (nancy at ucar.edu) Date: Tue, 25 Mar 2014 16:49:41 -0600 Subject: [Dart-dev] [6861] DART/trunk: Extended support for filenames to 256 characters. Message-ID: Revision: 6861 Author: thoar Date: 2014-03-25 16:49:41 -0600 (Tue, 25 Mar 2014) Log Message: ----------- Extended support for filenames to 256 characters. The error message strings are then 512 characters. tested with filenames about 160 characters long - works. By 'filenames', I mean namelist variables that point to files, as well as the obs sequence filenames themselves. Modified Paths: -------------- DART/trunk/diagnostics/threed_sphere/obs_diag.f90 DART/trunk/obs_sequence/obs_seq_to_netcdf.f90 DART/trunk/obs_sequence/obs_sequence_mod.f90 DART/trunk/utilities/utilities_mod.f90 -------------- next part -------------- Modified: DART/trunk/diagnostics/threed_sphere/obs_diag.f90 =================================================================== --- DART/trunk/diagnostics/threed_sphere/obs_diag.f90 2014-03-25 22:32:39 UTC (rev 6860) +++ DART/trunk/diagnostics/threed_sphere/obs_diag.f90 2014-03-25 22:49:41 UTC (rev 6861) @@ -86,9 +86,9 @@ type(obs_def_type) :: obs_def type(location_type) :: obs_loc -character(len = 129) :: obs_seq_in_file_name -character(len = 129), allocatable, dimension(:) :: obs_seq_filenames -character(len = stringlength), dimension(MaxTrusted) :: trusted_list = 'null' +character(len=256) :: obs_seq_in_file_name +character(len=256), allocatable, dimension(:) :: obs_seq_filenames +character(len=stringlength), dimension(MaxTrusted) :: trusted_list = 'null' ! Storage with fixed size for observation space diagnostics real(r8), dimension(1) :: prior_mean, posterior_mean, prior_spread, posterior_spread @@ -121,7 +121,7 @@ type(random_seq_type) :: ran_seq real(r8) :: obs_error_variance -character(len=129) :: obs_seq_read_format +character(len=stringlength) :: obs_seq_read_format logical :: pre_I_format integer, dimension(2) :: key_bounds @@ -171,8 +171,8 @@ ! Namelist with (some scalar) default values !----------------------------------------------------------------------- -character(len = 129) :: obs_sequence_name = 'obs_seq.final' -character(len = 129) :: obs_sequence_list = '' +character(len=256) :: obs_sequence_name = 'obs_seq.final' +character(len=256) :: obs_sequence_list = '' integer, dimension(6) :: first_bin_center = (/ 2003, 1, 1, 0, 0, 0 /) integer, dimension(6) :: last_bin_center = (/ 2003, 1, 2, 0, 0, 0 /) integer, dimension(6) :: bin_separation = (/ 0, 0, 0, 6, 0, 0 /) @@ -190,10 +190,10 @@ integer :: Nregions = 0 real(r8), dimension(MaxRegions) :: lonlim1= MISSING_R8, lonlim2= MISSING_R8 real(r8), dimension(MaxRegions) :: latlim1= MISSING_R8, latlim2= MISSING_R8 -character(len = stringlength), dimension(MaxRegions) :: reg_names = 'null' +character(len=stringlength), dimension(MaxRegions) :: reg_names = 'null' type(location_type), dimension(MaxRegions) :: min_loc, max_loc -character(len = stringlength), dimension(MaxTrusted) :: trusted_obs = 'null' +character(len=stringlength), dimension(MaxTrusted) :: trusted_obs = 'null' real(r8):: rat_cri = 5000.0_r8 ! QC ratio real(r8):: input_qc_threshold = 3.0_r8 ! maximum NCEP QC factor @@ -219,7 +219,7 @@ !----------------------------------------------------------------------- integer, parameter :: Ncopies = 22 -character(len = stringlength), dimension(Ncopies) :: copy_names = & +character(len=stringlength), dimension(Ncopies) :: copy_names = & (/ 'Nposs ', 'Nused ', 'NbigQC ', 'NbadIZ ', 'NbadUV ', & 'NbadLV ', 'rmse ', 'bias ', 'spread ', 'totalspread', & 'NbadDARTQC ', 'observation', 'ens_mean ', & @@ -298,7 +298,7 @@ ! List of observations types augmented with 'WIND' types if need be. ! Replace calls to 'get_obs_kind_name' ---> index into 'obs_type_strings' -character(len = stringlength), pointer, dimension(:) :: obs_type_strings +character(len=stringlength), pointer, dimension(:) :: obs_type_strings ! These pairs of variables are used when we diagnose which observations ! are far from the background. @@ -315,8 +315,8 @@ type(time_type) :: AllseqT1, AllseqTN ! first,last time in ALL observation sequences type(time_type) :: obs_time, skip_time -character(len = 256) :: ncName, string1, string2, string3 -character(len = stringlength) :: obsname +character(len=512) :: string1, string2, string3 +character(len=stringlength) :: obsname, ncName integer :: Nidentity = 0 ! identity observations @@ -1846,7 +1846,7 @@ integer :: i logical :: matched -character(len = stringlength) :: possible_obs_type +character(len=stringlength) :: possible_obs_type ! Loop over all user input candidates for 'trusted' observations. ! Check each candidate against list of known observation names. @@ -1935,7 +1935,7 @@ ! the scale_factor should be defined to reflect the type, which are not ! guaranteed to be numbered sequentially ... vortices 81, for example -character(len = stringlength) :: obs_string +character(len=stringlength) :: obs_string integer :: ivar scale_factor = 1.0_r8 @@ -3490,7 +3490,7 @@ Subroutine WriteNetCDF(fname) -character(len=129), intent(in) :: fname +character(len=*), intent(in) :: fname integer :: ncid, i, indx1, nobs, typesdimlen integer :: RegionDimID, RegionVarID Modified: DART/trunk/obs_sequence/obs_seq_to_netcdf.f90 =================================================================== --- DART/trunk/obs_sequence/obs_seq_to_netcdf.f90 2014-03-25 22:32:39 UTC (rev 6860) +++ DART/trunk/obs_sequence/obs_seq_to_netcdf.f90 2014-03-25 22:49:41 UTC (rev 6861) @@ -68,8 +68,8 @@ type(obs_def_type) :: obs_def type(location_type) :: obs_loc, minl, maxl -character(len = 129) :: obs_seq_in_file_name -character(len = 129), allocatable, dimension(:) :: obs_seq_filenames +character(len=256) :: obs_seq_in_file_name +character(len=256), allocatable, dimension(:) :: obs_seq_filenames real(r8) :: obs_err_var @@ -78,7 +78,7 @@ integer :: num_obs_kinds -character(len=129) :: obs_seq_read_format +character(len=stringlength) :: obs_seq_read_format logical :: pre_I_format logical :: out_of_range, is_there_one, keeper @@ -87,8 +87,8 @@ ! Namelist with (some scalar) default values !----------------------------------------------------------------------- -character(len = 129) :: obs_sequence_name = 'obs_seq.final' -character(len = 129) :: obs_sequence_list = '' +character(len=256) :: obs_sequence_name = 'obs_seq.final' +character(len=256) :: obs_sequence_list = '' real(r8) :: lonlim1= MISSING_R8, lonlim2= MISSING_R8 real(r8) :: latlim1= MISSING_R8, latlim2= MISSING_R8 @@ -146,8 +146,8 @@ real(digits12) :: mytime integer :: seconds, days -character(len = 129) :: ncName, calendarstring -character(len = 129) :: string1, string2, string3 +character(len=stringlength) :: ncName, calendarstring +character(len=512) :: string1, string2, string3 !======================================================================= ! Get the party started Modified: DART/trunk/obs_sequence/obs_sequence_mod.f90 =================================================================== --- DART/trunk/obs_sequence/obs_sequence_mod.f90 2014-03-25 22:32:39 UTC (rev 6860) +++ DART/trunk/obs_sequence/obs_sequence_mod.f90 2014-03-25 22:49:41 UTC (rev 6861) @@ -80,8 +80,8 @@ ! F95 allows pointers to be initialized to a known value. ! However, if you get an error on the following lines from your ! compiler, remove the => NULL() from the end of the 5 lines below. - character(len = metadatalength), pointer :: copy_meta_data(:) => NULL() - character(len = metadatalength), pointer :: qc_meta_data(:) => NULL() + character(len=metadatalength), pointer :: copy_meta_data(:) => NULL() + character(len=metadatalength), pointer :: qc_meta_data(:) => NULL() integer :: first_time integer :: last_time ! integer :: first_avail_time, last_avail_time @@ -105,7 +105,6 @@ type obs_cov_type private integer :: num_cov_groups -! ?????? end type obs_cov_type ! for errors @@ -926,13 +925,14 @@ end subroutine delete_obs_from_seq !------------------------------------------------- + subroutine set_copy_meta_data(seq, copy_num, meta_data) ! Need all sorts of error checking to avoid silly stuff eventually type(obs_sequence_type), intent(inout) :: seq integer, intent(in) :: copy_num -character(len = *), intent(in) :: meta_data +character(len=*), intent(in) :: meta_data character(len=len(meta_data)) :: lj_meta_data ! left justified version @@ -962,7 +962,7 @@ ! Need error checks type(obs_sequence_type), intent(inout) :: seq integer, intent(in) :: qc_num -character(len = *), intent(in) :: meta_data +character(len=*), intent(in) :: meta_data character(len=len(meta_data)) :: lj_meta_data ! left justified version @@ -1033,7 +1033,7 @@ type(obs_sequence_type), intent(inout) :: seq integer, intent(in) :: num_to_add -character(len = metadatalength) :: meta_temp(seq%num_copies) +character(len=metadatalength) :: meta_temp(seq%num_copies) real(r8) :: values_temp(seq%num_copies) integer :: i, old_num @@ -1080,7 +1080,7 @@ type(obs_sequence_type), intent(inout) :: seq integer, intent(in) :: num_to_add -character(len = metadatalength) :: qc_temp(seq%num_qc) +character(len=metadatalength) :: qc_temp(seq%num_qc) real(r8) :: values_temp(seq%num_qc) integer :: i, old_num @@ -1119,7 +1119,7 @@ subroutine write_obs_seq(seq, file_name) type(obs_sequence_type), intent(in) :: seq -character(len = *), intent(in) :: file_name +character(len=*), intent(in) :: file_name integer :: i, file_id, rc integer :: have(max_obs_kinds) @@ -1209,14 +1209,14 @@ ! Be able to increase size at read in time for efficiency -character(len = *), intent(in) :: file_name +character(len=*), intent(in) :: file_name integer, intent(in) :: add_copies, add_qc, add_obs type(obs_sequence_type), intent(out) :: seq integer :: i, num_copies, num_qc, num_obs, max_num_obs, file_id, io -character(len = 16) :: label(2) +character(len=16) :: label(2) logical :: pre_I_format -character(len = 129) :: read_format +character(len=32) :: read_format ! Use read_obs_seq_header to get file format and header info call read_obs_seq_header(file_name, num_copies, num_qc, num_obs, & @@ -1307,14 +1307,14 @@ ! Be able to increase size at read in time for efficiency -character(len = *), intent(in) :: file_name -integer, intent(out) :: num_copies, num_qc, num_obs, max_num_obs, file_id -character(len = *), intent(out) :: read_format -logical, intent(out) :: pre_I_format -logical, intent(in), optional :: close_the_file +character(len=*), intent(in) :: file_name +integer, intent(out) :: num_copies, num_qc, num_obs, max_num_obs, file_id +character(len=*), intent(out) :: read_format +logical, intent(out) :: pre_I_format +logical, optional, intent(in) :: close_the_file -character(len = 16) label(2) -character(len = 12) header +character(len=16) :: label(2) +character(len=12) :: header integer :: ios ! Determine the format for an obs_sequence file to be read. Options are: @@ -2473,11 +2473,11 @@ ! Are the checks for num_copies == 0 or <0 necessary? ! Yes, they happen in create_fixed_network_sequence -integer, intent(in) :: file_id, num_copies, add_copies -integer, intent(in) :: num_qc, add_qc, key -character(len = *), intent(in) :: read_format -type(obs_type), intent(inout) :: obs -integer, optional, intent(in) :: max_obs +integer, intent(in) :: file_id, num_copies, add_copies +integer, intent(in) :: num_qc, add_qc, key +character(len=*), intent(in) :: read_format +type(obs_type), intent(inout) :: obs +integer, optional, intent(in) :: max_obs integer :: i, io real(r8) :: temp_val Modified: DART/trunk/utilities/utilities_mod.f90 =================================================================== --- DART/trunk/utilities/utilities_mod.f90 2014-03-25 22:32:39 UTC (rev 6860) +++ DART/trunk/utilities/utilities_mod.f90 2014-03-25 22:49:41 UTC (rev 6861) @@ -186,7 +186,7 @@ character(len=32 ), parameter :: revision = "$Revision$" character(len=128), parameter :: revdate = "$Date$" -character(len = 169) :: msgstring +character(len=512) :: msgstring !---------------------------------------------------------------- ! Namelist input with default values @@ -195,8 +195,8 @@ integer :: TERMLEVEL = E_ERR ! default log and namelist output filenames -character(len=129) :: logfilename = 'dart_log.out' -character(len=129) :: nmlfilename = 'dart_log.nml' +character(len=256) :: logfilename = 'dart_log.out' +character(len=256) :: nmlfilename = 'dart_log.nml' ! output each module subversion details logical :: module_details = .true. @@ -222,8 +222,8 @@ ! integer :: logfileunit -- public module variable integer :: iunit, io - character(len=129) :: lname - character(len=169) :: string1,string2,string3 + character(len=256) :: lname + character(len=512) :: string1,string2,string3 if ( module_initialized ) then ! nothing to do @@ -411,6 +411,9 @@ end subroutine initialize_utilities +!####################################################################### + + subroutine finalize_utilities(progname) character(len=*), intent(in), optional :: progname ! integer :: logfileunit -- private module variable @@ -450,6 +453,7 @@ !####################################################################### + subroutine register_module(src, rev, rdate) character(len=*), intent(in) :: src, rev, rdate @@ -476,8 +480,10 @@ end subroutine register_module + !####################################################################### + subroutine timestamp(string1,string2,string3,pos) character(len=*), optional, intent(in) :: string1 @@ -505,8 +511,10 @@ end subroutine timestamp + !####################################################################### + function file_exist (file_name) character(len=*), intent(in) :: file_name @@ -521,8 +529,10 @@ end function file_exist + !####################################################################### + function get_unit () result (iunit) integer :: i, iunit @@ -546,8 +556,10 @@ end function get_unit + !####################################################################### + subroutine dump_unit_attributes(iunit) !-------------------------------------------------------------------------------- ! subroutine dump_unit_attributes(iunit) @@ -558,7 +570,9 @@ integer, intent(in) :: iunit logical :: exists, connected, named_file - character(len=129) :: file_name, srname, str1 + character(len=256) :: file_name + character(len=512) :: str1 + character(len=32) :: srname character(len=32) :: ynu ! YES, NO, UNDEFINED ... among others integer :: ios, reclen, nextrecnum @@ -675,8 +689,10 @@ end subroutine dump_unit_attributes + !####################################################################### + subroutine error_mesg (routine, message, level) ! ------------------------------------ @@ -711,8 +727,10 @@ end subroutine error_mesg + !####################################################################### + subroutine error_handler(level, routine, text, src, rev, rdate, aut, text2, text3 ) !---------------------------------------------------------------------- ! subroutine error_handler(level, routine, text, src, rev, rdate, aut , text2, text3) @@ -721,10 +739,10 @@ implicit none integer, intent(in) :: level -character(len = *), intent(in) :: routine, text -character(len = *), intent(in), optional :: src, rev, rdate, aut, text2, text3 +character(len=*), intent(in) :: routine, text +character(len=*), intent(in), optional :: src, rev, rdate, aut, text2, text3 -character(len = 8) :: taskstr +character(len=8) :: taskstr if ( .not. module_initialized ) call initialize_utilities @@ -877,8 +895,10 @@ end subroutine error_handler + !####################################################################### + function open_file (fname, form, action) result (iunit) character(len=*), intent(in) :: fname @@ -985,33 +1005,35 @@ end function open_file + !####################################################################### + subroutine print_version_number (iunit, routine, version) ! *** prints routine name and version number to a log file *** ! ! in: iunit = unit number to direct output -! routine = routine name (character, max len = 20) -! version = version name or number (character, max len = 8) +! routine = routine name (character, max len=20) +! version = version name or number (character, max len=8) integer, intent(in) :: iunit character(len=*), intent(in) :: routine, version integer :: n - character(len=20) :: name + character(len=20) :: myname character(len=8) :: vers if ( .not. module_initialized ) call initialize_utilities if ( .not. do_output_flag) return - n = min(len(routine),20); name = adjustl(routine(1:n)) - n = min(len(version), 8); vers = adjustl(version(1:n)) + n = min(len(routine),20); myname = adjustl(routine(1:n)) + n = min(len(version), 8); vers = adjustl(version(1:n)) if (iunit > 0) then - write (iunit,10) name, vers + write (iunit,10) myname, vers else - write (*,10) name, vers + write (*,10) myname, vers endif 10 format (/,60('-'), & @@ -1023,8 +1045,10 @@ end subroutine print_version_number + !####################################################################### + subroutine write_time (unit, label, string1, string2, string3, tz, brief) ! *** Write the current time to a log file or standard output *** @@ -1105,8 +1129,10 @@ end subroutine write_time + !####################################################################### + subroutine set_output (doflag) ! *** set whether output is written to a log file or simply ignored *** @@ -1128,6 +1154,7 @@ !####################################################################### + function do_output () ! *** return whether output should be written from this task *** @@ -1141,8 +1168,10 @@ end function do_output + !####################################################################### + subroutine set_nml_output (nmlstring) ! *** set whether nml output is written to stdout file or only nml file @@ -1186,6 +1215,7 @@ !####################################################################### + function do_nml_file () ! *** return whether nml should be written to nml file @@ -1203,8 +1233,10 @@ end function do_nml_file + !####################################################################### + function do_nml_term () ! *** return whether nml should be written to terminal @@ -1222,6 +1254,7 @@ end function do_nml_term + !####################################################################### @@ -1269,10 +1302,10 @@ end subroutine close_file + !####################################################################### - subroutine find_namelist_in_file(namelist_file_name, nml_name, iunit, & write_to_logfile_in) !----------------------------------------------------------------------- @@ -1284,14 +1317,14 @@ ! returns true. Otherwise, error message and terminates ! -character(len = *), intent(in) :: namelist_file_name -character(len = *), intent(in) :: nml_name +character(len=*), intent(in) :: namelist_file_name +character(len=*), intent(in) :: nml_name integer, intent(out) :: iunit logical, intent(in), optional :: write_to_logfile_in -character(len = 169) :: nml_string, test_string, string1 -integer :: io -logical :: write_to_logfile +character(len=256) :: nml_string, test_string, string1 +integer :: io +logical :: write_to_logfile ! Decide if there is a logfile or not @@ -1365,7 +1398,6 @@ !####################################################################### - subroutine check_namelist_read(iunit, iostat_in, nml_name, & write_to_logfile_in) !----------------------------------------------------------------------- @@ -1375,10 +1407,10 @@ ! integer, intent(in) :: iunit, iostat_in -character(len = *), intent(in) :: nml_name +character(len=*), intent(in) :: nml_name logical, intent(in), optional :: write_to_logfile_in -character(len=159) :: nml_string +character(len=256) :: nml_string integer :: io logical :: write_to_logfile @@ -1438,14 +1470,16 @@ end subroutine check_namelist_read + !####################################################################### + subroutine nc_check(istatus, subr_name, context) integer, intent (in) :: istatus character(len=*), intent(in) :: subr_name character(len=*), intent(in), optional :: context - character(len=129) :: error_msg + character(len=512) :: error_msg ! if no error, nothing to do here. we are done. if( istatus == nf90_noerr) return @@ -1470,6 +1504,7 @@ !####################################################################### + subroutine to_upper( string ) ! Converts 'string' to uppercase character(len=*), intent(INOUT) :: string @@ -1486,8 +1521,10 @@ end subroutine to_upper + !####################################################################### + subroutine find_textfile_dims( fname, nlines, linelen ) ! Determines the number of lines and maximum line length ! of the file. Sometimes you need to know this stuff. @@ -1498,7 +1535,7 @@ integer :: i, maxlen, mylen, ios, funit character(len=1024) :: oneline -character(len=129) :: error_msg +character(len=512) :: error_msg ! if there is no file, return -1 for both counts if (.not. file_exist(fname)) then @@ -1535,8 +1572,10 @@ end subroutine find_textfile_dims + !####################################################################### + subroutine file_to_text( fname, textblock ) ! ! Reads a text file into a character variable. @@ -1588,8 +1627,10 @@ end subroutine file_to_text + !####################################################################### + function get_next_filename( listname, index ) ! Arguments are the name of a file which contains a list of filenames. @@ -1597,7 +1638,7 @@ ! character(len=*), intent(in) :: listname integer, intent(in) :: index -character(len=128) :: get_next_filename +character(len=256) :: get_next_filename integer :: i, ios, funit @@ -1621,7 +1662,7 @@ ! check for length problems if (len_trim(string) > len(get_next_filename)) then call error_handler(E_ERR, 'get_next_filename', & - 'maximum filename length of 128 exceeded', & + 'maximum filename length of 256 exceeded', & source, revision, revdate) endif @@ -1630,8 +1671,10 @@ end function get_next_filename + !####################################################################### + function is_longitude_between (lon, minlon, maxlon, doradians, newlon) ! uniform way to treat longitude ranges, in degrees, on a globe. @@ -1711,6 +1754,7 @@ !####################################################################### + function next_file(fname,ifile) !---------------------------------------------------------------------- ! The file name can take one of three forms: @@ -1734,8 +1778,8 @@ integer, SAVE :: filenum = 0 integer, SAVE :: dir_prec = 0 -character(len=129), SAVE :: dir_base -character(len=129), SAVE :: filename +character(len=256), SAVE :: dir_base +character(len=256), SAVE :: filename character(len=129), SAVE :: dir_ext integer :: slashindex, splitindex, i, strlen, ios @@ -1834,6 +1878,7 @@ end function next_file + !####################################################################### @@ -1845,7 +1890,7 @@ character(len=*), intent(in), optional :: fform logical :: ascii_file_format -character(len=129) :: lj_fform ! Left Justified version of optional argument +character(len=len(fform)) :: lj_fform ! Left Justified version of optional argument ! Returns .true. for formatted/ascii file, .false. is unformatted/binary ! Defaults (if fform not specified) to formatted/ascii.
Item Type Description
surf_obs logical DEPRECATED -- has no effect on the code and will be removed. + OBSOLETE -- now an error to specify this.
soil_data logical DEPRECATED -- has no effect on the code and will be removed. + OBSOLETE -- now an error to specify this.
h_diab logical DEPRECATED -- has no effect on the code and will be removed. + OBSOLETE -- now an error to specify this.
num_moist_vars integer DEPRECATED -- has no effect on the code and will be removed. + OBSOLETE -- now an error to specify this.
adv_mod_command character(len=32) DEPRECATED -- A variable with the same name has moved to the -&dart_to_wrf -namelist and does the same function from there. This one has no effect on -the code and will be removed soon. + OBSOLETE -- This variable was moved to the +&dart_to_wrf_nml +namelist. Now an error to specify this here.