Closed travissluka closed 3 years ago
... things that I know will need to be added to the code
dirac.cc
and staticBInit.cc
add saber::instantiateCovarFactory<umdsst::Traits>();
and the required .h
file to use that functionsaber
to the list of LIBS
for those executables in src/mains/CMakeLists.txt
atlas::FieldSet * atlasFieldSet() const;
to Geometry
Fields
void setAtlas(atlas::FieldSet *) const {}
void toAtlas(atlas::FieldSet *) const {}
void fromAtlas(atlas::FieldSet *) {}
@travissluka When I run test for staticbinit.x, it gives the following error. 9: Create BUMP 9: Exception: FieldSet: cannot find field "sea_surface_temperature"
I am not so sure about this staticbinit.x and the background error covariance. Below are my questions.
I've updated the code to feature/staticbinit.x branch.
try this in your staticbinit.yaml
background error:
covariance model: BUMP
bump:
verbosity: main
datadir: Data
forced_radii: 1
method: cor
new_nicas: 1
ntry: 3
prefix: Chen
resol: 6.0
mpicom: 2
rh:
sea_surface_temperature: [3000.0e3]
rv:
sea_surface_temperature: [1]
strategy: specific_univariate
a couple of notes there:
_cmat.nc
, the correlation lengths (i think as a fraction of earth's radius for rh
) on the 360x180 grid, so filled with (3000e3/6378e3) in our case_nicas_.nc
files, which are the weights needed for performing the convolution, these are on the reduced grid, so not a 64800x64800 grid. One file per PE is generated, so if you ever want to run with a different number of PEs you'll have to delete the files and rerun the staticbinit programYou'll have to implement those stubs you added in Fields
and Geometry
, as that is where BUMP is pulling its information from.
In order to quickly get the code to run without crashing, I added:
atlas::FieldSet * Geometry::atlasFieldSet() const {
atlas::FieldSet * fs = new atlas::FieldSet();
fs->add(atlasFunctionSpace_->lonlat());
return fs;
}
and
void Field:s:setAtlas(atlas::FieldSet *f) const {
f->add((*atlasFieldSet_)[0]);
}
clearly not the correct way to it (dangling pointer!).
also, correct, I don't think the background file is read in and used for anything here
implement the
staticbinit.x
application. This will use BUMP to calculate the files needed for a basic horizontal correlation. operatorumdsstCovar
as the listed covariance in the yaml file, useBUMP
covariance model: BUMP
)at this point, the above dirac ctest should produce output fields with increments that are spread out horizontally