[gradsusr] gradsusr Digest, Vol 102, Issue 14

E Mobarak mobarak_e at yahoo.com
Sat Aug 18 02:32:26 EDT 2018


 Dear Charles Langton Vanya Thanks,Your answer is very helpful but it is the othder question about input file for location latitude and longitude, how i write lat andlon value for two different location?
for example:
point 1
lat1=32
lon1=42

pont 2
lat2=34
lon2=42
is it right?
Best regards
    On Tuesday, August 14, 2018, 8:32:32 PM GMT+4:30, gradsusr-request at gradsusr.org <gradsusr-request at gradsusr.org> wrote:  
 
 Send gradsusr mailing list submissions to
    gradsusr at gradsusr.org

To subscribe or unsubscribe via the World Wide Web, visit
    http://gradsusr.org/mailman/listinfo/gradsusr
or, via email, send a message with subject or body 'help' to
    gradsusr-request at gradsusr.org

You can reach the person managing the list at
    gradsusr-owner at gradsusr.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gradsusr digest..."


Today's Topics:

  1. Re: extract station data (Charles Langton Vanya)
  2. Re: extract station data (Walter Arnoldo Bardales Espinoza)
  3. Frequency count (ISHIAKU IBRAHIM)


----------------------------------------------------------------------

Message: 1
Date: Mon, 13 Aug 2018 20:22:10 +0200
From: Charles Langton Vanya <dolesibeni at gmail.com>
To: GrADS Users Forum <gradsusr at gradsusr.org>
Subject: Re: [gradsusr] extract station data
Message-ID:
    <CA+Y8gxYhSyY+wG5is8UPXA-kkar+pG5iyXzgaLfZ4_3+HL9fGQ at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Dear,
I believe you are meaning extracting data from netcdf file.
The best way I do is to average data from a grid box of the area.
 The reason for doing this is to make sure that your data is a
representation of the area you are interested inother than just
 a single a single point.
This can be in so many ways. But the simolest I can remember is like this:

*****THIS SCRIPT EXTRACT SEA SURFACE TEMPERATURES FOR GRID BOX
**LONG 129E to 131E and LAT 20.0N to 24.0N

'reinit'
'sdfopen C:\fortran\sst\2018sst.nc'
'set x 1'
'set y 1'
** set your area1 here..If your data has high resoultion you can set your
area too closer
lon1 =129.0
lon2 =131.0
lat1 =20.0
lat2 =24.0

** Keep time fixed as below.. Here time is taken as starting from value 1
to 703
** you can also set your time by exactly setting 'set t hhddmmyy'

'set t 1 703'
** Here we are finding areal average of the grid.

'define ssst = aave(sst,lon = 'lon1',lon = 'lon2', lat = 'lat1',lat='lat2')'

** set file name to pring oout... Here we are saving data as 12 month data
table
'fprintf ssst C:\fortran\SST_EXTRACT\DJF\REG2\REG2\R2DJF_SJPAN.txt %g 12 1'

The data is save as a text file and in a single column. If you you want
the data to be extracted as monthly then you use 1 12 instead of 1 1
meaning
that you will have 12 columns representing months of the year.
Hope this helps.
Thank
Regards,
Charles Vanya

On Mon, 13 Aug 2018 at 15:12, Davide Sacchetti <
davide.sacchetti at arpal.gov.it> wrote:

> is file in station data format? if yes use gxout print
>
>
> * From: * E Mobarak <mobarak_e at yahoo.com>
> * To: * <gradsusr at gradsusr.org>
> * Sent: * 8/11/2018 6:09 PM
> * Subject: * [gradsusr] extract station data
>
> Hi
> how i can extract data for some station with different latitude and
> longitude, by loop or function in scripts
> thanks
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>


-- 
Meteorological Services
P.O.Box 1808,
Blantyre,
Malawi
Cell:+265-888-980 545
 00265111939610
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20180813/15e74e2a/attachment-0001.html>

------------------------------

Message: 2
Date: Mon, 13 Aug 2018 12:58:50 -0600
From: Walter Arnoldo Bardales Espinoza <bardaleswa at gmail.com>
To: GrADS Users Forum <gradsusr at gradsusr.org>
Subject: Re: [gradsusr] extract station data
Message-ID:
    <CAKHz5yJqS96-_-tAJMTO_wgy2jBHaqe1CQPnRNwTT_2qr6EOoQ at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I share this example, I hope it serves you, I use it to extract the
forecast data of rain and temperatures.


'open wrf_00z.ctl'

* imports a file with the location data of the stations
input='/home/meteorology/Documents/scripts/stations_pptmaxmin.txt'

'set t 2'
'query time'
say result
cdate=subwrd(result,3)
date=substr(cdate,4,12)

cont=1
while(cont<=3)
rec=read(input)
plat=subwrd(rec,3)
plon=subwrd(rec,2)
name_est=subwrd(rec,4)

'set lat 'plat
'set lon 'plon

'd apcpsfc(t=37)-apcpsfc(t=13)'
respuesta=result
lluvias=sublin(respuesta,1)
dpp1=subwrd(lluvias,4)

'd max(tmax2m-273.15,t=14,t=37)'
respuesta=result
tmaxs=sublin(respuesta,2)
tmax1=subwrd(tmaxs,4)

'd min(tmin2m-273.15,t=14,t=37)'
respuesta=result
tmins=sublin(respuesta,2)
tmin1=subwrd(tmins,4)

* Write a file
res=write('/home/meteorology/Documents/data/data_'date'.txt', plon-360'
'plat' 'name_est' 'dpp1' 'tmax1' 'tmin1)

cont=cont+1
endwhile



format of file stations



2018-08-13 12:22 GMT-06:00 Charles Langton Vanya <dolesibeni at gmail.com>:

> Dear,
> I believe you are meaning extracting data from netcdf file.
> The best way I do is to average data from a grid box of the area.
>  The reason for doing this is to make sure that your data is a
> representation of the area you are interested inother than just
>  a single a single point.
> This can be in so many ways. But the simolest I can remember is like this:
>
> *****THIS SCRIPT EXTRACT SEA SURFACE TEMPERATURES FOR GRID BOX
> **LONG 129E to 131E and LAT 20.0N to 24.0N
>
> 'reinit'
> 'sdfopen C:\fortran\sst\2018sst.nc'
> 'set x 1'
> 'set y 1'
> ** set your area1 here..If your data has high resoultion you can set your
> area too closer
> lon1 =129.0
> lon2 =131.0
> lat1 =20.0
> lat2 =24.0
>
> ** Keep time fixed as below.. Here time is taken as starting from value 1
> to 703
> ** you can also set your time by exactly setting 'set t hhddmmyy'
>
> 'set t 1 703'
> ** Here we are finding areal average of the grid.
>
> 'define ssst = aave(sst,lon = 'lon1',lon = 'lon2', lat =
> 'lat1',lat='lat2')'
>
> ** set file name to pring oout... Here we are saving data as 12 month data
> table
> 'fprintf ssst C:\fortran\SST_EXTRACT\DJF\REG2\REG2\R2DJF_SJPAN.txt %g 12
> 1'
>
> The data is save as a text file and in a single column. If you you want
> the data to be extracted as monthly then you use 1 12 instead of 1 1
> meaning
> that you will have 12 columns representing months of the year.
> Hope this helps.
> Thank
> Regards,
> Charles Vanya
>
> On Mon, 13 Aug 2018 at 15:12, Davide Sacchetti <
> davide.sacchetti at arpal.gov.it> wrote:
>
>> is file in station data format? if yes use gxout print
>>
>>
>> * From: * E Mobarak <mobarak_e at yahoo.com>
>> * To: * <gradsusr at gradsusr.org>
>> * Sent: * 8/11/2018 6:09 PM
>> * Subject: * [gradsusr] extract station data
>>
>> Hi
>> how i can extract data for some station with different latitude and
>> longitude, by loop or function in scripts
>> thanks
>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>
>
> --
> Meteorological Services
> P.O.Box 1808,
> Blantyre,
> Malawi
> Cell:+265-888-980 545
>  00265111939610
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Atte.
Walter Arnoldo Bardales Espinoza
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20180813/7a325c04/attachment-0001.html>
-------------- next part --------------
270.1336111    16.91472222    Flores_aeropuerto__Flores__Pet?n
269.5611111    16.06666667    San_Agust?n_Chixoy__Chisec__Alta_Verapaz
269.1955556    16.80111111    Bethel__La_Libertdad__Pet?n

------------------------------

Message: 3
Date: Mon, 13 Aug 2018 22:04:00 +0100
From: ISHIAKU IBRAHIM <ishiaku.ibrahim at fubk.edu.ng>
To: gradsusr at gradsusr.org
Subject: [gradsusr] Frequency count
Message-ID:
    <CAKK-+TSG9z7hsryqd9rd=fvnB+coj9vwmQUcq0CbfT6thkmg4w at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Dear GrADS user,
I have netcdf file with daily precipitation data. I intend to find
frequency of days with precipitation value <1 in JUNE, JULY and August
(JJA)  months. Can anyone be of help with a script to enable me do this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20180813/03caffeb/attachment-0001.html>

------------------------------

Subject: Digest Footer

_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr


------------------------------

End of gradsusr Digest, Vol 102, Issue 14
*****************************************
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20180818/f0954475/attachment-0001.html>


More information about the gradsusr mailing list