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

Add fapar-lai dataset #40

Merged
merged 6 commits into from
Nov 17, 2023
Merged

Add fapar-lai dataset #40

merged 6 commits into from
Nov 17, 2023

Conversation

BSchilperoort
Copy link
Contributor

@BSchilperoort BSchilperoort commented Nov 15, 2023

test recipe:

# config (folder, login info etc goes to a ~/.config/zampy file)
name: "lai-recipe"

download:
  time: ["2019-01-01", "2019-01-31"]
  bbox: [54, 6, 53, 5] # NESW

  datasets:
    era5:
      variables:
        - surface_pressure
    fapar_lai:
      variables:
        - leaf_area_index

convert:
  convention: ALMA
  frequency: 1H  # outputs at 1 hour frequency. Pandas-like freq-keyword.
  resolution: 0.05  # output resolution in degrees.

TODO:

Copy link

sonarcloud bot commented Nov 15, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

88.2% 88.2% Coverage
0.0% 0.0% Duplication

Copy link
Member

@geek-yang geek-yang left a comment

Choose a reason for hiding this comment

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

Good job! It works well.

There is one small concern. In the test, we save a sample file in the download folder and an unzipped copy of the file. Since the file is slightly large (~15MB), it would be nice to unzip the zip file on the fly when running the test for load function. We can optimize it later in another PR.

Comment on lines +105 to +112
ds = lai_dataset.load(
ingest_dir=data_folder / "fapar-lai" / "ingest",
time_bounds=times,
spatial_bounds=bbox,
variable_names=variable,
resolution=1.0,
regrid_method="flox",
)
Copy link
Member

Choose a reason for hiding this comment

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

A copy of unzipped data is kept for this test. We can reuse the zip file in the download folder and unzip it on the fly. This way we can avoid these three nc files which adds up to 15MB in total.

Copy link
Member

Choose a reason for hiding this comment

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

An issue is created for it #44.

@BSchilperoort
Copy link
Contributor Author

Thanks for the review Yang! 😄

@BSchilperoort BSchilperoort merged commit 24781ea into main Nov 17, 2023
12 checks passed
@BSchilperoort BSchilperoort deleted the fapar-lai branch November 17, 2023 11:35
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