Git Product home page Git Product logo

Comments (4)

bradyrx avatar bradyrx commented on September 22, 2024

As the code currently stands, it downsamples first (at the stage when it creates particles on cell centers), then adds passive floats. Perhaps these steps need to be flipped? However, I don't see why the seeding would get so messed up in the current format. It should be able to coarsen horizontal cell centers, and then apply the vertical weights when seeding.

from mpas-model.

bradyrx avatar bradyrx commented on September 22, 2024

@pwolfram , here's a simple first solution attempt: https://gist.github.com/bradyrx/ddb6c944e425ac5e63b8e8e7361809dd

This accepts a stride argument and simply strides through the lat and lon list removing columns. This doesn't produce a uniform coarsening, but does retain full vertical columns. Perhaps it could be improved by randomly selecting a subset of the lat and lon list, rather than striding through the ordered list. Current runtime is ~1 minute for 60to30.

from mpas-model.

pwolfram avatar pwolfram commented on September 22, 2024

@bradyrx, there is an obvious bug here if the coarsening is in 3D, but as I looked back through the code I don't think the coarsening is in 3D. It should have only been in 2D; but if it is in 3D this explains the extreme slowdown. I'm currently in progress on the horizontal interpolation and am going to focus on that now but agree this needs some revisiting. It isn't obvious why this is the case-- the downsampling looks like it should only be applied in 2D:

You are just doing the building step (no remapping), correct?

from mpas-model.

bradyrx avatar bradyrx commented on September 22, 2024

but if it is in 3D this explains the extreme slowdown

Yes, this would be encouraging in terms of the runtime (#19).

You're right on what it should be doing. I didn't notice that this was being called just from the cell_centers stage.

You are just doing the building step (no remapping), correct?

Correct. And there's no reason why the remapping should be called with the way I've been calling the script.

Example usage for our 30to10 case:

./make_particle_file.py -i init_file.nc -g graph_file -p 9600 -t 'surface','passive' --nvertlevels 15 --vertseedtype 'log' --spatialfilter SouthernOceanXYZ -d 1 -o particles.nc

from mpas-model.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.