Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@hkershaw-brown
Copy link
Member

Description:

Added logic to obs_seq_to_netcdf to keep track of whether a files has been created for an epoch during that run of obs_seq_to_netcdf. Previously if there were multiple obs_sequence files in an epoch, the epoch file was being created afresh for each obs_seq file. Thus, only obs from the last file in the list were present in obs_epoch.nc

Fixes issue

#12

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Documentation changes needed?

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.

Tests

Please describe any tests you ran to verify your changes.

Epochs set for 1 day long for the month of February:

&schedule_nml
   calendar             = 'Gregorian'
   first_bin_start      =  2012,  2,  1,  0,  0,  0
   first_bin_end        =  2012,  2,  2,  0,  0,  0
   last_bin_end         =  2012,  3,  1,  0,  0,  0
   bin_interval_days    = 1 
   bin_interval_seconds = 0 
   max_num_bins         = 31  
   print_table          = .true.
   /   

List of obs_sequence files with multiple obs sequences in epoch Feb 5th.

obs_seq.2012-02-05-21600
obs_seq.2012-02-05-43200
obs_seq.2012-02-05-64800
obs_seq.2012-02-13-21600
obs_seq.2012-02-29-64800

check number of obs in epoch files match sum from obs_seq files.
obs_epoch_005.nc
obs_epoch_013.nc
obs_epoch_029,nc

Checklist for merging

  • Updated changelog entry
  • Documentation updated
  • Version tag

Testing Datasets

  • Dataset needed for testing available upon request
  • Dataset download instructions included
  • No dataset needed

ncunit = InitNetCDF(ncName, iepoch)
else
if (.not. epoch_file_created(iepoch)) then
write(*,*) 'creating file ', ncName
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the logic looks great. for this output line i'd write it into a string (string1 or something) and then use the error_handler with E_MSG to output it. looking through the rest of the source here, only "if (verbose)" messages use print or write to *. other messages use the error_handler which writes both to stdout and to the log file.

Copy link
Collaborator

@nancycollins nancycollins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

Copy link
Contributor

@mgharamti mgharamti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me too. I just did small tests and things seem to be in order. Thanks Helen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants