ecmwf2roms
-
- Posts: 79
- Joined: Sun Dec 30, 2012 2:58 pm
- Location: inio:Iranian National Institute for Oceanography
ecmwf2roms
Dear all user
for using d_ecmwf2roms.m file all needed files exist in ECMWF_ERA Interim except shflux, swflux, sustr, svstr, and photosynthetically active radiation at surface. i have 2 question:
1- for computing swflux, evaporation is necessary while it have not defined in that m file? Why?
2- sustr and svstri are exactly just same Eastward turbulent surface stress and Eastward turbulent surface stress, respectivly whish are in ECMWF2ROMS?
Many thanks to receive guidance from someone who has experiment to use that routin.
Cheers
fereshte
for using d_ecmwf2roms.m file all needed files exist in ECMWF_ERA Interim except shflux, swflux, sustr, svstr, and photosynthetically active radiation at surface. i have 2 question:
1- for computing swflux, evaporation is necessary while it have not defined in that m file? Why?
2- sustr and svstri are exactly just same Eastward turbulent surface stress and Eastward turbulent surface stress, respectivly whish are in ECMWF2ROMS?
Many thanks to receive guidance from someone who has experiment to use that routin.
Cheers
fereshte
-
- Posts: 79
- Joined: Sun Dec 30, 2012 2:58 pm
- Location: inio:Iranian National Institute for Oceanography
Re: ecmwf2roms
sorry i can find them
but about evaporation i belive that it should be added to that m file,is not it?
thanks
but about evaporation i belive that it should be added to that m file,is not it?
thanks
Re: ecmwf2roms
Dear fereshteh,
if you check the lines from 465 to 468 of d_ecmwf2roms.m you will see
that evaporation is used on case "swflux".
Have a pleasant evening
Giannis
if you check the lines from 465 to 468 of d_ecmwf2roms.m you will see
that evaporation is used on case "swflux".
Have a pleasant evening
Giannis
-
- Posts: 79
- Joined: Sun Dec 30, 2012 2:58 pm
- Location: inio:Iranian National Institute for Oceanography
Re: ecmwf2roms
Dear ymamoutos
many thanks for your answer
i have got what is my problem
sincerely yours
fereshte
many thanks for your answer
i have got what is my problem
sincerely yours
fereshte
Re: ecmwf2roms
hello , in the file 'd_ecmwf2roms.m',there have the lines as follow to change the 'previous accumulation'.fereshteh wrote:Dear ymamoutos
many thanks for your answer
i have got what is my problem
sincerely yours
fereshte
but I find that the variable 'field_previous' used without in initial value. How to correct it?
Code: Select all
step = rem(frc_time,0.5)*24;
if step == 3
fieldfinal = field;
else
fieldfinal = field - field_previous; % At other steps subtract
end % the previous accumulation
frc_time = frc_time - 1.5/24; % Center forcing time on the
% accumulation interval
field_previous = field; % Save this accumulation
% to on the next step
Re: ecmwf2roms
I wrote the script assuming that 3-hour interval data were downloaded for processing. Hence the step==3 condition is true on the first pass through and field_previous gets initialized with the hour 3 data.
The comments at the start note that ...
The comments at the start note that ...
% The following parameters are used to extract ERA-Interim fields:
%
% Select time: 00:00:00 12:00:00
%
% Select step: 0 3 6 9 12
%
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
Re: ecmwf2roms
Code: Select all
if (F(n).scale < 0),
step = rem(frc_time,0.5)*24;
if step == 3
fieldfinal = field;
elseif step == 0
fieldfinal = field - field_previous; % At other steps subtract
end % the previous accumulation
frc_time = frc_time - 1.5/24; % Center forcing time on the
% accumulation interval
field_previous = field; % Save this accumulation
% to on the next step
end
** Processing: sustr for 01-Jan-2015 **
Undefined function or variable 'field_previous'.
Error in d_ecmwf2roms (line 509)
fieldfinal = field - field_previous; % At other steps subtract
i want to know how to correct it .
thank you in advance.
Re: ecmwf2roms
Did you download 3 hour interval data as discussed previously in this thread?
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
Re: ecmwf2roms
I added another judgement to it, that is:Caffery wrote:i met this question. when i run this script ,it showed thatCode: Select all
if (F(n).scale < 0), step = rem(frc_time,0.5)*24; if step == 3 fieldfinal = field; elseif step == 0 fieldfinal = field - field_previous; % At other steps subtract end % the previous accumulation frc_time = frc_time - 1.5/24; % Center forcing time on the % accumulation interval field_previous = field; % Save this accumulation % to on the next step end
** Processing: sustr for 01-Jan-2015 **
Undefined function or variable 'field_previous'.
Error in d_ecmwf2roms (line 509)
fieldfinal = field - field_previous; % At other steps subtract
i want to know how to correct it .
thank you in advance.
Code: Select all
if ( F(n).scale < 0 )
step = rem(frc_time,0.5)*24; % remainder after division
if step == 3
fieldfinal = field;
frc_time = frc_time - 1.5/24; % Center forcing time on the
% accumulation interval
% we don't know what the 1st time record is (maybe 6, 9 ...)
% then admit it as appropriate data despite some mistakes
% introduced
elseif MyRec(n) == 1
fieldfinal = field;
frc_time = frc_time - step/48; % at center: step/2 hours
% step/48 days
else
fieldfinal = field - field_previous; % Other steps subtract
% the previous accumulation
frc_time = mean([time( indx(MyRec(n) - 1)), frc_time]); % average
end
field_previous = field; % Save this accumulation
% to on the next step
end
Re: ecmwf2roms
That code modification is going to give you the wrong values.
For data that are integrated over time during the analysis interval, like precipitation, you must unravel the time accumulation. The only way to do this it to start the input data from the 3-hour step in ERA files. In this case, the loop never throws an error because the else case is never processed first.
For data that are integrated over time during the analysis interval, like precipitation, you must unravel the time accumulation. The only way to do this it to start the input data from the 3-hour step in ERA files. In this case, the loop never throws an error because the else case is never processed first.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
Re: ecmwf2roms
Thanks for your correction!
In my opinion, if the added judgement works, the 1st record is the only bad one and should be discarded, is that right?
In my opinion, if the added judgement works, the 1st record is the only bad one and should be discarded, is that right?