From 879f81a464c7794d343c61971000463ac784015d Mon Sep 17 00:00:00 2001 From: Alexander Barth Date: Thu, 18 Apr 2024 09:02:06 +0200 Subject: [PATCH] more information about the mask --- src/data.jl | 2 ++ src/model.jl | 10 +++++----- test/test_DINCAE_SST.jl | 4 ++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/data.jl b/src/data.jl index ef80607..45c1895 100644 --- a/src/data.jl +++ b/src/data.jl @@ -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); diff --git a/src/model.jl b/src/model.jl index 6c93971..cee7690 100644 --- a/src/model.jl +++ b/src/model.jl @@ -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]` @@ -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, diff --git a/test/test_DINCAE_SST.jl b/test/test_DINCAE_SST.jl index 8917940..9758552 100644 --- a/test/test_DINCAE_SST.jl +++ b/test/test_DINCAE_SST.jl @@ -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.,)),