Page tree
Skip to end of metadata
Go to start of metadata
  • No labels

2 Comments

  1. ----- Original Message -----
    From: "Mariano Alvarez" <alvarez@cima.fcen.uba.ar>
    To: "s2s support" <s2s.support@lists.ecmwf.int>
    Sent: Friday, 27 January, 2017 20:49:26
    Subject: [s2s.support] S2S database: retrieving a particular domain with script

    Hello,

    My name is Mariano Alvarez, and I've assisted to the ICTP school on S2S
    prediction back in late 2015, where Frederic Vitart introduced us to the
    ECMWF Data Portal.

    I am now trying to download using a python retrieval script some data to
    advance in the analysis of the database. What I wanted to do was to set a
    smaller domain to download the data (for example, only for South America)
    which I thought I could do by the* "area"* line in the *server.retrieve*
    function:


            from ecmwfapi import ECMWFDataServer
            server = ECMWFDataServer()
            server.retrieve({
                    "class": "s2",
                    "dataset": "s2s",
                    "hdate":  string.join(date_range),
                    "date": "2014-01-01",
                    "origin": "ammc",
                                "expver": "prod",
                                "levtype": level_type,
                        "level":level,
                    "param": variable,
                    "step": "0/to/1488/by/24",
                    "stream": "enfh",
                    "target": string.join(file_name),
                  *  "area": region_limits,*
                    "time": "00",
                        "number":"1/to/32",
                    "type": "pf",
                })

    where

    *region_limits="20/-90/-60/-30"  # area:  N/W/S/E*

    However, when I check the downloaded file, I get that it downloaded the
    world domain, that no restriction was made.

    Is it possible to perform a restriction before the downloading? I didn't
    find that option in the MARS request so as to copy the line.

    In this case I'm using BoM as an example and only copied the lines of the
    retrieval part of the script. Please if you need any other detail do let me
    know.

    Thanks in advance for your help,
    Best regards,
    --
    Dr. Mariano S. Alvarez

  2. ----- Original Message -----
    From: "Frederic Vitart" <frederic.vitart@ecmwf.int>
    To: "Mariano Alvarez" <alvarez@cima.fcen.uba.ar>
    Cc: "s2s support" <s2s.support@lists.ecmwf.int>, "Matthew Manoussakis" <makis@ecmwf.int>
    Sent: Monday, 30 January, 2017 13:41:43
    Subject: Re: [s2s.support] S2S database: retrieving a particular domain with script

    Mariano,

    I was able to reproduce your problem. I think the reason your script ignored the command AREA is because you are retrieving fields from the BoM model, which is the only S2S model with
    a  resolution (T63) coarser than the 1.5x1.5 S2S grid. Therefore, unlike the other models, the BoM data has been archived in its original grid, and since it is not a Lon/LAt grid, the AREA command does not work. So your script would work for all the other models. To make it work for BoM you need to add the following instructions to retrieve the force the data to be interpolated in the 1.5/1.5 grid (or any other grid size would work):

       "grid": "1.5/1.5",
       "repres" : "LL",

    I tested it and it worked (see example attached).

    Best regards,

    Frederic