Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PULL REQUEST] ObsPack Bug Fix, Update for Instantaneous Sampling #204

Closed
wants to merge 1 commit into from

Conversation

chfite
Copy link
Contributor

@chfite chfite commented Jan 23, 2020

There are multiple proposed changes/fixes to obspack_mod.F90.

  1. There was a bug in the Seconds_Since_1970 function where the time conversion factor for fractional minutes of the day was 3600s instead of what should actually be 1440s (applied here). This means that ObsPack has been using the incorrect time steps for computing averages for users up until this point.

  2. In the ObsPack wiki http://wiki.seas.harvard.edu/geos-chem/index.php/ObsPack_diagnostic there was mention of defining a CT_sampling_strategy of "4", meaning instantaneous sampling. However, the current obspack_mod.F90 does not include an option for instantaneous sampling. Here I provide the changes that allow for ObsPack to do instantaneous sampling.

    • In the ObsPack_Read_Input function a CASE 4 is added for instantaneous sampling
    • In the ObsPack_Sample function cases are used for the sampling strategy, in which, CASE 4 finds the closest model time step to
      the observational time step samples at that time.

This has been tested and does now sample instantaneously at the closest model time step, REGARDLESS of what the dynamic time steps are for a given simulation.

There are multiple proposed changes/fixes to obspack_mod.F90. 

1) There was a bug in the Seconds_Since_1970 function where the time conversion factor for fractional minutes of the day was 3600s instead of what should actually be 1440s (applied here). This means that ObsPack has been using the incorrect time steps for computing averages for users up until this point. 

2) In the ObsPack wiki http://wiki.seas.harvard.edu/geos-chem/index.php/ObsPack_diagnostic there was mention of defining a CT_sampling_strategy of "4", meaning instantaneous sampling. However, the current obspack_mod.F90 does not include an option for instantaneous sampling. Here I provide the changes that allow for ObsPack to do instantaneous sampling.
      - In the ObsPack_Read_Input function a CASE 4 is added for instantaneous sampling
      - In the ObsPack_Sample function cases are used for the sampling strategy, in which, CASE 4 finds the closest model time step to 
        the observational time step samples at that time. 

This has been tested and does now sample instantaneously at the closest model time step, REGARDLESS of what the dynamic time steps are for a given simulation.
@chfite chfite changed the title Update/Bug Fix obspack_mod.F90 ObsPack Update/Bug Fix obspack_mod.F90 Jan 23, 2020
@chfite chfite changed the title ObsPack Update/Bug Fix obspack_mod.F90 ObsPack Update/Bug Fix: obspack_mod.F90 Jan 23, 2020
@chfite chfite changed the title ObsPack Update/Bug Fix: obspack_mod.F90 ObsPack Bug Fix, Update for Instantaneous Sampling Jan 23, 2020
@chfite chfite requested a review from yantosca January 23, 2020 22:44
@yantosca
Copy link
Contributor

Thanks Charley. We will probably be able to get this into the code soon (after 12.7.0 benchmarking clears).

@yantosca yantosca added this to the 12.7.1 milestone Jan 24, 2020
@yantosca yantosca self-assigned this Jan 24, 2020
@yantosca yantosca added the category: Bug Something isn't working label Jan 24, 2020
@yantosca
Copy link
Contributor

This update has now passed unit tests. It has now been added to dev/12.7.1, and will ship with the 12.7.1 version (soon after 12.7.0 passes benchmarking).

@yantosca yantosca closed this Jan 27, 2020
@yantosca yantosca changed the title ObsPack Bug Fix, Update for Instantaneous Sampling [PULL REQUEST] ObsPack Bug Fix, Update for Instantaneous Sampling Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants