Skip to content

Commit

Permalink
more information about the mask
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Apr 18, 2024
1 parent c761469 commit 879f81a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ attributes:
SST:_FillValue = -9999.f ;
}
The the netCDF mask is 0 for invalid (e.g. land for an ocean application) and 1 for pixels (e.g. ocean).
"""
function load_gridded_nc(fname::AbstractString,varname::AbstractString; minfrac = 0.05)
ds = Dataset(fname);
Expand Down
10 changes: 5 additions & 5 deletions src/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,7 @@ satellite data).
## Mandatory parameters
* `Atype`: array type to use
* `data_all`: list of named tuples. Every tuple should have `filename` and `varname`.
`data_all[1]` will be used for training (and perturbed to prevent overfitting).
All others entries `data_all[2:end]` will be reconstructed using the training network
* `data_all`: list of named tuples. Every tuple should have `filename` and `varname`. `data_all[1]` will be used for training (and perturbed to prevent overfitting). All others entries `data_all[2:end]` will be reconstructed using the training network
at the epochs defined by `save_epochs`.
* `fnames_rec`: vector of filenames corresponding to the entries `data_all[2:end]`
Expand All @@ -322,13 +320,15 @@ at the epochs defined by `save_epochs`.
* `learning_rate`: initial learning rate of the ADAM optimizer (default `0.001`)
* `learning_rate_decay_epoch`: the exponential decay rate of the learning rate. After `learning_rate_decay_epoch` the learning rate is halved. The learning rate is computed as `learning_rate * 0.5^(epoch / learning_rate_decay_epoch)`. `learning_rate_decay_epoch` can be `Inf` for a constant learning rate (default)
* `min_std_err`: minimum error standard deviation preventing a division close to zero (default `exp(-5) = 0.006737946999085467`)
* `loss_weights_refine`: the weigh of the individual refinement layers using in the cost function.
If `loss_weights_refine` has a single element, then there is no refinement. (default `(1.,)`)
* `loss_weights_refine`: the weigh of the individual refinement layers using in the cost function. If `loss_weights_refine` has a single element, then there is no refinement. (default `(1.,)`)
!!! note
Note that also the optional parameters should be to tuned for a particular
application.
See `DINCAE.load_gridded_nc` for more information about the netCDF file.
"""
function reconstruct(Atype,data_all,fnames_rec;
epochs = 1000,
Expand Down
4 changes: 4 additions & 0 deletions test/test_DINCAE_SST.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ save_epochs = [epochs]
is3D = false
ntime_win = 3

#=
(upsampling_method,is3D,truth_uncertain,loss_weights_refine) = (:nearest, false,false, (1.,))
=#

for (upsampling_method,is3D,truth_uncertain,loss_weights_refine) = (
(:nearest, false,false, (1.,)),
(:bilinear,false,false, (1.,)),
Expand Down

0 comments on commit 879f81a

Please sign in to comment.