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

major variables add (GradientFeatures) #86

Merged
merged 22 commits into from
Dec 2, 2024

Conversation

vincelhx
Copy link
Collaborator

@vincelhx vincelhx commented Nov 11, 2024

  • gradientFeatures.py
    => added heterogeneity mask (owiWindFilter) + 400VV & 800VH masks in xr_dataset
    (Yuan Zhao 2021)
    => added work on streaks from gradients (Koch 2004) with mulitple polarisation/windows_size/resolutions results
    => added a documentation to plot streaks

  • inversion.py
    => started a work to have a logger
    => deleted some useless .compute() ?! maybe less time for computation
    => added owiAncillaryNrcs and owiAncillaryNrcs_cross to simulate NRCS from ancillary wind using gmf

  • config
    => small changes in the config file :

add_gradientsfeatures: True
add_nrcs_model: False ( do not use yet ) 

if not specified both are set to false

  • results saving
    owiWindFilter (mask) + 4 temporar variables are added in the main group
    a group is created for directions results : owiWindStreaks

  • I also had to change RCM output format

  • changed RCM sensor_longname to fix Add full RCM mission to attributes #89

formatter = logging.Formatter(
'%(asctime)s - %(name)s - %(levelname)s - %(message)s')
console_handler.setFormatter(formatter)
logger.addHandler(console_handler)
Copy link
Member

Choose a reason for hiding this comment

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

What is the rational of having 2 handlers rather than one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

also changed in xsarsea to

logging.basicConfig(level=logging.INFO,
                    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger('xsarsea')

@agrouaze agrouaze added the enhancement New feature or request label Nov 12, 2024
@vincelhx
Copy link
Collaborator Author

we thought that inversion time was too long : sometimes 10 minutes for a EW

I added a xr_dataset.load() at the begining of the use of xr_dataset. It looks to be 5x faster than without it.
It forces the load of data in memory and executes differ operations before inversion and streaks operations

@Skealz
Copy link
Collaborator

Skealz commented Nov 25, 2024

The test fails because the meta.yaml forces to xarray 2024.2.0. See the PR I just merged a few hours ago. To make this PR pass, you must reproduce these changes, by merge master or else

@vincelhx vincelhx requested a review from agrouaze November 29, 2024 13:33
Copy link
Member

@agrouaze agrouaze left a comment

Choose a reason for hiding this comment

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

For such large addition (heterogeneity mask) it would be good to have some unit tests, or at least one if it gives a large coverage for added methods.
unit tests associated will be added in another PR, #90

grdwindinversion/gradientFeatures.py Show resolved Hide resolved
grdwindinversion/gradientFeatures.py Show resolved Hide resolved
@vincelhx vincelhx merged commit 080179d into umr-lops:main Dec 2, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add full RCM mission to attributes
3 participants