[gradsusr] Some issue with .ctl File to read a Binary file
Mubashar Ahmad
mubashardogar at gmail.com
Sat Nov 5 13:55:58 EDT 2016
Dear Jaykrishnan,
Thanks for your email. Actually this ctl works when I put xdef 12 linear
1. 1. and years TDEF 163 linear 00Z01JAN1850 12mo. But in reality this data
is zonally averaged and is in monthly format and I want to display monthly
time series from 1850 till 2012. For doing so I need to modify xdef and
TDEF as xdef 1 linear 1 1 and TDEF 1956 linear 00Z01JAN1850 1mo. When I
open this modified ctl file then data doesn't reflect to correct values and
it seems GrADS is not reading monthly format correctly. Is it issue of
sequentional and direct access option while writing binary using FORTRAN or
we need to add something additional in ctl? Modified ctl and commands I am
using to display are given below:
Commands I am using are as follows:
'open tau_v1.ctl
set time jan1985 dec2012
set z 1
*************average over selected latitude 4S till 45N etc.
define AOD=ave(tau,lat=-4,lat=45)
set lat 1
set lon 1
d tau
**************************Following is the modified tau_v1.ctl file is as
follows*******
dset ^tau_v1.bin
title TAU DATA
undef -9999.00
options yrev
xdef 1 linear 1. 1.
ydef 24 LEVELS -90. -82.2 -74.3 -66.5 -58.7 -50.9 -43.0 -35.2 -27.4 -19.6
-11.7 -3.9 3.9 11.7 19.6 27.4 35.2 43.0 50.9 58.7 66.5 74.3 82.2 90
zdef 1 linear 1 1
TDEF 1956 linear 00Z01JAN1850 1mo
Vars 1
tau 1 0 the tau value
endVars
Regards,
Mubashar
On Fri, Nov 4, 2016 at 11:14 AM, Jayakrishnan P.R <prjayakrishnan at gmail.com>
wrote:
> I tried with your ctl and binary data. It is able to plot the values
> correctly I assume. Could u tell what is the exact problem in displaying
> the figure. I herewith attach the figure obtained. If I am not mistaken,
> the problem is that you are not able to plot the exact value for eg: u r
> getting 0.0034 instead of 0.0038 ?. Pls clarify.
>
> On Thu, Nov 3, 2016 at 12:43 PM, Mubashar Ahmad <mubashardogar at gmail.com>
> wrote:
>
>> Dear GrADS users,
>>
>> I have zonally averaged aerosol optical depth data in ascii file format
>> (tau_v1.txt is attached). It is taken from the following website
>> http://data.giss.nasa.gov/modelforce/strataer/tau.map_2012.12.txt. I
>> just write the data in the same structure in a binary file using FORTRAN 90
>> code (tau_v1.f90). Now when I tried to open it in GrADS using ctl, it
>> doesn't seem to give correct values because months are stored in columns
>> and GrADS is not understanding it (I assume). What should I specify in ctl
>> to read it correctly. My binary file, FORTRAN code, original ASCII data and
>> FORTRAN created binary file are attached. Please advise what is missing in
>> the GrADS ctl?
>>
>> Thanks,
>>
>> Mubahsar
>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>
>
> --
> Sincerely
>
> **************************************************
> Dr. Jayakrishnan P.R
> Post Doctoral Research Fellow
> C308, Institute of Ocean and Earth Sciences (IOES)
> University of Malaya
> 50603, Kuala Lumpur
> Tel: (+603) 7967 4640 / 6995
> Mobile: 012-3526094
>
> ****************************************************
>
>
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
--
Muhammad Mubashar Ahmad Dogar
Scientific Officer (Climatology Section),
Global Change Impact Studies Centre (GCISC),
NCP complex, Quaid-e-Azam University Campus,
Shahdra road, Islamabad, Pakistan.
email: muhammad.dogar at kaust.edu.sa
mubashardogar at gmail.com
mubashardogar at yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20161105/fd9cc9e2/attachment.html
More information about the gradsusr
mailing list