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

Update site_info.json to add TCCON sites info #36

Closed
wants to merge 17 commits into from
Closed

Conversation

alexdanjou
Copy link
Contributor

Addition of TCCON site details

Addition of TCCON site details
@alexdanjou alexdanjou requested a review from ag12733 October 22, 2024 12:54
@alexdanjou alexdanjou requested a review from rt17603 November 12, 2024 11:17
typo correction
Copy link
Contributor

@rt17603 rt17603 left a comment

Choose a reason for hiding this comment

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

I have a question around this - up until now we've generally included 3-letter site codes for each of our in-situ measurement sites. Was there a reason this included the 2-letter site code (e.g. was this specified somewhere else)? Or did we want to try and stick to the 3-letter codes?

@alexdanjou alexdanjou changed the title Update site_info.json Update site_info.json to add TCCON sites info Nov 12, 2024
@alexdanjou
Copy link
Contributor Author

The reason is that they are referred to with a 2-letter site code in the TCCON data. But I agree that it is not really good given the amount of other sites that we have. I can put a 3-letter code, no pb on this

Add a "T" after all TCCON 2-letter site codes to make them 3-letter, except for `heifei` for which the code his now `"HFE"` (`"HFT"` alredy taken).
@alexdanjou alexdanjou requested a review from rt17603 November 12, 2024 11:41
@rt17603
Copy link
Contributor

rt17603 commented Nov 12, 2024

The reason is that they are referred to with a 2-letter site code in the TCCON data. But I agree that it is not really good given the amount of other sites that we have. I can put a 3-letter code, no pb on this

Yes, that makes sense - 3-letter codes look good though.

Copy link
Contributor

@rt17603 rt17603 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 but a few suggested updates:

  • For these specific cases, could we include a tccon_name variable so we still have a record of the original name this has in TCCON?
  • Would we be able to include the new sites alphabetically? Hopefully it doesn't make it less practical to not have the TCCON sites grouped, but in the rest of the file the sites are alphabetical so its easy to locate them.

@alexdanjou
Copy link
Contributor Author

Localisations seems to be completely wrong, I will double check the script to create them

@alexdanjou alexdanjou marked this pull request as draft November 28, 2024 17:32
@alexdanjou
Copy link
Contributor Author

Should be good now. Some sites have a changing latitude/longitude (change of a few cents of degrees). Put them in an array style but not sure this is the right things to do.
Also, ordering the keys and formatting with an indent of 2 before storing changed the display of the other sites. Is it ok?

@alexdanjou alexdanjou requested a review from rt17603 November 28, 2024 18:57
@alexdanjou alexdanjou marked this pull request as ready for review November 28, 2024 18:57
@rt17603
Copy link
Contributor

rt17603 commented Nov 29, 2024

Can I just check - has is been reformatted because you ran black (or something else) over it?

@alexdanjou
Copy link
Contributor Author

alexdanjou commented Nov 29, 2024

It's because I converted my dict to json with json.dumps(d, indent=2, sort_keys=True).

@alexdanjou
Copy link
Contributor Author

alexdanjou commented Dec 2, 2024

Are we good to merge or should I format this differently?

@rt17603
Copy link
Contributor

rt17603 commented Dec 2, 2024

Are we good to merge or should I format this differently?

I am a little concerned about the reformatting across the whole file - just in case anyone else has been using a derivative of this file they'd like to be able to merge back in at some point. Would be it be possible to ensure the updates only impact the added lines or would that be difficult to do?

@alexdanjou
Copy link
Contributor Author

alexdanjou commented Dec 3, 2024

I've done as much as I could to keep the old formattimg. But the identation was not homogeneous and some sites where not stored at their place (in terms of allphabetical order). Reordering just the sites and not the keys inside (i.e. "height", "latitude",..) would have been too much of a pain, so I there is some changes there too.

I think we should go with this as it is. It will anyway be easier to add stuff in the future in an homogeneous format. Tell me if you're not ok @rt17603

openghg_defs/data/site_info.json Outdated Show resolved Hide resolved
openghg_defs/data/site_info.json Outdated Show resolved Hide resolved
openghg_defs/data/site_info.json Outdated Show resolved Hide resolved
openghg_defs/data/site_info.json Outdated Show resolved Hide resolved
openghg_defs/data/site_info.json Outdated Show resolved Hide resolved
openghg_defs/data/site_info.json Outdated Show resolved Hide resolved
openghg_defs/data/site_info.json Outdated Show resolved Hide resolved
@rt17603
Copy link
Contributor

rt17603 commented Dec 5, 2024

By the way, I'm not saying this was done perfectly but there was originally a logic to the order of the inlets, with the first generally being the default used. So I think we may need to a bit cautious with reordering the heights lists even if it seems logical to order with largest inlet first.

@alexdanjou
Copy link
Contributor Author

alexdanjou commented Dec 5, 2024

The heights are strictly speaking not reordered as they are not keys to the json files. But the network order is changed some times, this changes the first inlet when all networks have not the same first inlet. (hope this is clear)
Anyhow I'm planning to delete this PR and go for yours

@alexdanjou alexdanjou closed this Dec 5, 2024
@alexdanjou alexdanjou deleted the tccon_sites branch December 5, 2024 17:56
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.

2 participants