Skip to content

Commit

Permalink
fix bugs in mwRTM_param matlab scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
gmao-qliu committed May 20, 2024
1 parent 82b8ee7 commit 75a68ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
% round date_time to nearest 3 hourly UTC
utc_t2k = round(double(L2_utc_seconds)/L2_dtstep)*L2_dtstep;

[yr, doy, mm, dd, hr, mn] = J2000_to_DateTime( utc_t2k );
[yr, mm, dd, hr, mn, ss, doy, pen] = J2000_to_DateTime( utc_t2k );

% use points for current UTC day only
idx = find(yr == date_time.year & mm == date_time.month & ...
Expand Down
5 changes: 3 additions & 2 deletions GEOSldas_App/util/shared/matlab/J2000_to_DateTime.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@
% Loop through elements of J2000_seconds for now. In future, should vectorize
% augment_date_time.m, is_leap_year.m, days_in_month.m, get_dofyr_pentad.m

date_time_base = augment_date_time( round(J2000_seconds(1)), date_time_epoch );

for ii = 1:N

% add (rounded) J2000_seconds to date_time_epoch

date_time = augment_date_time( round(J2000_seconds), date_time_epoch );
date_time = augment_date_time( round(J2000_seconds(ii)-J2000_seconds(1)), date_time_base );

yr( ii) = date_time.year ;
mm( ii) = date_time.month ;
Expand Down

0 comments on commit 75a68ba

Please sign in to comment.