Add ERA5 regional hindcast example#233
Conversation
| using NumericalEarth.DataWrangling: BoundingBox, Metadatum, download_dataset | ||
| using NumericalEarth.DataWrangling.ERA5 |
There was a problem hiding this comment.
can we add the appropriate exports so that these additional outputs are not needed?
also for the example, I recommend avoiding manual calls to download_dataset. I don't want to codify this workflow (we should instead develop the utility on #141). The issue is that people will adopt this style and not realize that it isn't recommended anymore once we have the utility
There was a problem hiding this comment.
When the new utility lands, we can revise this example as well as ERA5_hourly_data.jl
There was a problem hiding this comment.
Until then, let's avoid anything special (it will download automatically under the hood) so we don't have to revert it or change the documentation
| using Oceananigans | ||
| using Oceananigans.Fields: CenterField, XFaceField, YFaceField | ||
| using Breeze | ||
| using Breeze.Thermodynamics |
There was a problem hiding this comment.
vapor_gas_constant isn't exported from Breeze.Thermodynamics
There was a problem hiding this comment.
| set!(T, Metadatum(:temperature; dataset=ds_pl, date=start_date, meta_common...)) | ||
| set!(qᵛ, Metadatum(:specific_humidity; dataset=ds_pl, date=start_date, meta_common...)) | ||
| set!(qᶜ, Metadatum(:specific_cloud_liquid_water_content; dataset=ds_pl, date=start_date, meta_common...)) | ||
| set!(qⁱ, Metadatum(:specific_cloud_ice_water_content; dataset=ds_pl, date=start_date, meta_common...)) |
There was a problem hiding this comment.
do we need a MetadataSet object? I can open an issue about this
There was a problem hiding this comment.
This is something we've discussed before. That would clean things up here
9d673f4 to
5463396
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This reverts commit 5463396.
|
Okay, the model state should be ready for dynamic initialization. A couple of important notes:
|
|
@ewquon should we add terrain? Terrain following should work for the fully compressible formulation (just not substepping) |
Hallelujah! I'm happy to add that in. Anything that gets us closer to reality sooner rather than later is a win in my book. |
| Example("Breeze over two oceans", "breeze_over_two_oceans", false), | ||
| Example("ERA5 hourly data", "ERA5_hourly_data", true), | ||
| Example("ERA5 hourly data retrieval", "ERA5_hourly_data", true), | ||
| Example("ERA5 hindcast simulation", "era5_breeze", true), |
There was a problem hiding this comment.
| Example("ERA5 hindcast simulation", "era5_breeze", true), | |
| Example("Atmosphere hindcast nested in ERA5", "era5_breeze", false), |
There was a problem hiding this comment.
This will be a heavy case so we shoudln't run every commit (change true to false). Also we should clarify, this is an atmosphere case (eventually atmosphere-land), and probably should also indicate it uses Breeze
|
@ewquon I added the "build all examples" label so that it will build even if the "build always" tag is false. |
|
@giordano do you know what the GPU error is? |
|
I believe simply happens when the runner was reused from a previous run from somewhere else in the organisation, but the new build uses a new Docker image than the previous run, and then it fails to pull the second one because the combination of the two images fills the partition. In summary, it's an offensive, albeit annoying, issue, restarting the job should succeed (unless you rerun in the same situation 😄) |

Summary
@glwagner @kaiyuan-cheng
Adds
examples/era5_breeze.jl— a building block for a regional modeling example that will eventually couple Breeze (compressible solver, in development) to forthcoming SlabLand and SlabOcean components.Current scope is data ingest only: download ERA5 reanalysis over an SGP-centered LAM bounding box (HI-SCALE 2016-09-10 case day) and interpolate onto a
LatitudeLongitudeGridsized for ~3 km horizontal cells at the domain center latitude.Tᵥis computed as a derived field usingBreeze.ThermodynamicConstantsfor theRᵥ/Rd − 1coefficient.Out of scope, to be added as the underlying capabilities come online:
Notes
Nz=1rather than a 2-D(Bounded, Bounded, Flat)grid, sidesteppingCliMA/Oceananigans.jl#5473(Flat↔non-Flatinterpolate!errors with a crypticBoundsError; #5474 will convert that to a clearArgumentErrorbut does not lift the restriction). Mirrors the pattern inexamples/ERA5_hourly_data.jl.LatitudeLongitudeGrid. A future variant on a projected Cartesian grid would benefit from theset!projection support proposed in Add map projection support toset!forRectilinearGridtargets #232.Test plan
~/.cdsapircconfigured.