ecmwf2roms

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
fereshteh
Posts: 79
Joined: Sun Dec 30, 2012 2:58 pm
Location: inio:Iranian National Institute for Oceanography

ecmwf2roms

#1 Unread post by fereshteh »

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

fereshteh
Posts: 79
Joined: Sun Dec 30, 2012 2:58 pm
Location: inio:Iranian National Institute for Oceanography

Re: ecmwf2roms

#2 Unread post by fereshteh »

sorry i can find them
but about evaporation i belive that it should be added to that m file,is not it?
thanks

ymamoutos
Posts: 71
Joined: Fri Nov 19, 2010 2:33 pm
Location: University of Aegean

Re: ecmwf2roms

#3 Unread post by ymamoutos »

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

fereshteh
Posts: 79
Joined: Sun Dec 30, 2012 2:58 pm
Location: inio:Iranian National Institute for Oceanography

Re: ecmwf2roms

#4 Unread post by fereshteh »

Dear ymamoutos
many thanks for your answer
i have got what is my problem :wink:
sincerely yours
fereshte

lindandan
Posts: 17
Joined: Tue Nov 03, 2015 12:52 am
Location: School of Space Science of USTC

Re: ecmwf2roms

#5 Unread post by lindandan »

fereshteh wrote:Dear ymamoutos
many thanks for your answer
i have got what is my problem :wink:
sincerely yours
fereshte
hello , in the file 'd_ecmwf2roms.m',there have the lines as follow to change the 'previous accumulation'.
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

User avatar
wilkin
Posts: 875
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: ecmwf2roms

#6 Unread post by wilkin »

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 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

Caffery

Re: ecmwf2roms

#7 Unread post by Caffery »

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
i met this question. when i run this script ,it showed that
** 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.

User avatar
wilkin
Posts: 875
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: ecmwf2roms

#8 Unread post by wilkin »

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

mjfconan
Posts: 20
Joined: Mon Mar 03, 2014 1:57 pm
Location: SKLEC, ECNU, China

Re: ecmwf2roms

#9 Unread post by mjfconan »

Caffery wrote:

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
i met this question. when i run this script ,it showed that
** 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.
I added another judgement to it, that is:

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

User avatar
wilkin
Posts: 875
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: ecmwf2roms

#10 Unread post by wilkin »

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.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

mjfconan
Posts: 20
Joined: Mon Mar 03, 2014 1:57 pm
Location: SKLEC, ECNU, China

Re: ecmwf2roms

#11 Unread post by mjfconan »

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?

Post Reply