Hello everyone, I am sharing my recent findings with TRAIN.
This fixes the error and warnings related to K>>
, missing lambda, and missing heading. I think it should be correct. Please correct me if I am wrong.
-
If you get K>>
. Type dbcont
and press ENTER
which will continue the analysis. If you know how, just remove the line from the code. I think this was a debug command that they forgot to remove. MATLAB page on keyboard command.
-
For missing lambda and heading parameters. see below.
Here are the commands I run:
stamps(1,6);
% Load parameters to workspace
load('parms.mat');
% Write missing lambda file
fid = fopen('lambda.1.in', 'w');
fprintf(fid, num2str(lambda));
fclose(fid);
% Write missing heading file
fid = fopen('heading.1.in', 'w');
fprintf(fid, num2str(heading));
fclose(fid);
% Run TRAIN
aps_linear;
stamps(7,7);
stamps(6,6);
setparm('subtr_tropo', 'y');
stamps(7,7);
On a side note, I’m sharing some insight with running TRAIN using ECMWF.
I’ve been able to download ECMWF data using my credentials using StaMPS. But I can only go so far as step 2.
I’ve been trying to run atmospheric correction with actual data using ECMWF with TRAIN and it’s an absolute nightmare. I needed to install Generic Mapping Tools (GMT) (undocumented requirement), fix paths, add logic to create missing DEM in .GRD format converted from SNAP elevation band. There is something wrong with my code with regards to creating a GRD/XYZ format elevation band so I’m looking into it.
Regarding the missing DEM file, the TRAIN documentation refers to construct_dem.sh
which is not in the repo. I looked it up and found it in DORIS a completely separate software to construct missing DEM files. And turns out the shell script file is deprecated because USGS doesn’t support direct linking of SRTM files. I haven’t looked into gacos yet.
Picture to show some output from the ERA model. This was a very unreasonable looking DEM.
EDIT: I fixed the issue with the today()
command requiring the Financial Toolbox. I found a way to use standard MATLAB functions.