<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi Lydia,</p>
<p>The problem might be how you are creating the original file with
your GrADS script. Note the file should be exactly 4 times the
(x,y,z,t) ranges times the number of variables. It sounds like
you have one less in either x- or y-direction. In your script you
have:</p>
<blockquote type="cite">
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span>'set
gxout fwrite'</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span>'set
fwrite -ap /Volumes/WebData/NLDAS2/DailyNLDAS/daily.bin'</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span></span><br>
</p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span>'set
t 1'</span></p>
</blockquote>
So the file daily.bin should be 4 times 464*224 times 4 variables
times number of time-steps. If not, you may want to add<br>
<br>
'set x 1 496'<br>
'set y 1 224'<br>
after 'set t 1' and before you define your new variables.<br>
<br>
Similarly, your output file should be exactly 163840 (32*32*10*4*4).<br>
<br>
Jim<br>
<br>
<div class="moz-cite-prefix">On 7/5/16 7:41 AM, Lydia Rill wrote:<br>
</div>
<blockquote
cite="mid:CAHDX1TniDmm_p7T9p-PYj7CerJqj90n5NmV5KZi6KAGmTG-aUg@mail.gmail.com"
type="cite">
<div dir="ltr"><span style="font-size:12.8px">Thanks Chuck! I
double checked the record length and it is indeed 4. </span>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">Thank you Jim! Sorry my code was a
little messy, I have tried many different methods.<br>
</div>
<div style="font-size:12.8px">Good point about the lower left
hand corner, that was one of the issues here.</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">When I use 32 x steps, 32 y steps,
and 10 time steps I use a record length of 4096 for the output
file and I get a file size of 160K, which roughly matches
32*32*10*4*4 = 16385</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">I am now getting realistic numbers
for my output! However, when I display the data in GrADS for
one time I get only parts of the 4x4 degree box, by latitude,
for each variable, instead of getting the data for each
variable for the whole box. For example in the middle of the
box I get tmax for 43.5-44N, tmin for 43-43.5N, prcp around
43N, and srad around 42.5N. Any ideas on why this is
happening? </div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">Here is the updated code:</div>
<div>
<p style="margin:0px;font-family:Menlo"><span
style="color:rgb(52,189,38)">integer</span> irec,i,j,t,days</p>
<p style="margin:0px;font-family:Menlo"><span
style="color:rgb(52,189,38)">character</span>(<span
style="color:rgb(52,189,38)">len</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">100</span>) infile,outfile</p>
<p style="margin:0px;font-family:Menlo"><span
style="color:rgb(52,189,38)">real</span> tmin(<span
style="color:rgb(195,55,32)">464</span>,<span
style="color:rgb(195,55,32)">224</span>),tmax(<span
style="color:rgb(195,55,32)">464</span>,<span
style="color:rgb(195,55,32)">224</span>),prcp(<span
style="color:rgb(195,55,32)">464</span>,<span
style="color:rgb(195,55,32)">224</span>),srad(<span
style="color:rgb(195,55,32)">464</span>,<span
style="color:rgb(195,55,32)">224</span>)</p>
<p style="margin:0px;font-family:Menlo;color:rgb(195,55,32)"><span
style="color:rgb(0,0,0)">infile</span><span
style="color:rgb(206,121,36)">=</span>'/Volumes/WebData/NLDAS2/DailyNLDAS/daily.bin'</p>
<p style="margin:0px;font-family:Menlo;color:rgb(195,55,32)"><span
style="color:rgb(0,0,0)">outfile</span><span
style="color:rgb(206,121,36)">=</span>'/Volumes/WebData/NLDAS2/Fortran/testdaily.bin'</p>
<p style="margin:0px;font-family:Menlo;color:rgb(206,121,36)">open<span
style="color:rgb(0,0,0)">(</span><span
style="color:rgb(195,55,32)">17</span><span
style="color:rgb(0,0,0)">,</span>file=<span
style="color:rgb(0,0,0)">infile,</span>form=<span
style="color:rgb(195,55,32)">"unformatted"</span><span
style="color:rgb(0,0,0)">,</span>access=<span
style="color:rgb(195,55,32)">"direct"</span><span
style="color:rgb(0,0,0)">,</span>recl=<span
style="color:rgb(195,55,32)">32</span>*<span
style="color:rgb(195,55,32)">32</span>*<span
style="color:rgb(195,55,32)">4</span><span
style="color:rgb(0,0,0)">,</span>status=<span
style="color:rgb(195,55,32)">"old"</span><span
style="color:rgb(0,0,0)">)</span></p>
<p style="margin:0px;font-family:Menlo;color:rgb(195,55,32)"><span
style="color:rgb(206,121,36)">open</span><span
style="color:rgb(0,0,0)">(</span>18<span
style="color:rgb(0,0,0)">,</span><span
style="color:rgb(206,121,36)">file=</span><span
style="color:rgb(0,0,0)">outfile,</span><span
style="color:rgb(206,121,36)">form=</span>"unformatted"<span
style="color:rgb(0,0,0)">,</span><span
style="color:rgb(206,121,36)">access=</span>"direct"<span
style="color:rgb(0,0,0)">,</span><span
style="color:rgb(206,121,36)">recl=</span>32<span
style="color:rgb(206,121,36)">*</span>32<span
style="color:rgb(206,121,36)">*</span>4<span
style="color:rgb(0,0,0)">,</span><span
style="color:rgb(206,121,36)">status=</span>"unknown"<span
style="color:rgb(0,0,0)">)</span></p>
<p style="margin:0px;font-family:Menlo;min-height:13px"><br>
</p>
<p style="margin:0px;font-family:Menlo;color:rgb(83,48,225)"><span
style="color:rgb(0,0,0)">days</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">10</span><span
style="color:rgb(0,0,0)"> </span></p>
<p style="margin:0px;font-family:Menlo">irec<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span></p>
<p style="margin:0px;font-family:Menlo"><span
style="color:rgb(206,121,36)">do</span> t<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span>,days</p>
<p style="margin:0px;font-family:Menlo"> <span
style="color:rgb(206,121,36)">read</span>(<span
style="color:rgb(195,55,32)">17</span>,<span
style="color:rgb(206,121,36)">REC=</span>irec)
((tmax(i,j),i<span style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">129</span>,<span
style="color:rgb(195,55,32)">160</span>),j<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">129</span>,<span
style="color:rgb(195,55,32)">160</span>)</p>
<p style="margin:0px;font-family:Menlo"> <span
style="color:rgb(206,121,36)">read</span>(<span
style="color:rgb(195,55,32)">17</span>,<span
style="color:rgb(206,121,36)">REC=</span>irec<span
style="color:rgb(206,121,36)">+</span><span
style="color:rgb(195,55,32)">1</span>) ((tmin(i,j),i<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">129</span>,<span
style="color:rgb(195,55,32)">160</span>),j<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">129</span>,<span
style="color:rgb(195,55,32)">160</span>)</p>
<p style="margin:0px;font-family:Menlo"> <span
style="color:rgb(206,121,36)">read</span>(<span
style="color:rgb(195,55,32)">17</span>,<span
style="color:rgb(206,121,36)">REC=</span>irec<span
style="color:rgb(206,121,36)">+</span><span
style="color:rgb(195,55,32)">2</span>) ((prcp(i,j),i<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">129</span>,<span
style="color:rgb(195,55,32)">160</span>),j<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">129</span>,<span
style="color:rgb(195,55,32)">160</span>)</p>
<p style="margin:0px;font-family:Menlo"> <span
style="color:rgb(206,121,36)">read</span>(<span
style="color:rgb(195,55,32)">17</span>,<span
style="color:rgb(206,121,36)">REC=</span>irec<span
style="color:rgb(206,121,36)">+</span><span
style="color:rgb(195,55,32)">3</span>) ((srad(i,j),i<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">129</span>,<span
style="color:rgb(195,55,32)">160</span>),j<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">129</span>,<span
style="color:rgb(195,55,32)">160</span>)</p>
<p style="margin:0px;font-family:Menlo"> <span
style="color:rgb(206,121,36)">write</span>(<span
style="color:rgb(195,55,32)">18</span>,<span
style="color:rgb(206,121,36)">REC=</span>irec)
((tmax(i,j),i<span style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">129</span>,<span
style="color:rgb(195,55,32)">160</span>),j<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">129</span>,<span
style="color:rgb(195,55,32)">160</span>)</p>
<p style="margin:0px;font-family:Menlo"> <span
style="color:rgb(206,121,36)">write</span>(<span
style="color:rgb(195,55,32)">18</span>,<span
style="color:rgb(206,121,36)">REC=</span>irec<span
style="color:rgb(206,121,36)">+</span><span
style="color:rgb(195,55,32)">1</span>) ((tmin(i,j),i<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">129</span>,<span
style="color:rgb(195,55,32)">160</span>),j<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">129</span>,<span
style="color:rgb(195,55,32)">160</span>)</p>
<p style="margin:0px;font-family:Menlo"> <span
style="color:rgb(206,121,36)">write</span>(<span
style="color:rgb(195,55,32)">18</span>,<span
style="color:rgb(206,121,36)">REC=</span>irec<span
style="color:rgb(206,121,36)">+</span><span
style="color:rgb(195,55,32)">2</span>) ((prcp(i,j),i<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">129</span>,<span
style="color:rgb(195,55,32)">160</span>),j<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">129</span>,<span
style="color:rgb(195,55,32)">160</span>)</p>
<p style="margin:0px;font-family:Menlo"> <span
style="color:rgb(206,121,36)">write</span>(<span
style="color:rgb(195,55,32)">18</span>,<span
style="color:rgb(206,121,36)">REC=</span>irec<span
style="color:rgb(206,121,36)">+</span><span
style="color:rgb(195,55,32)">3</span>) ((srad(i,j),i<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">129</span>,<span
style="color:rgb(195,55,32)">160</span>),j<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">129</span>,<span
style="color:rgb(195,55,32)">160</span>)</p>
<p style="margin:0px;font-family:Menlo"> irec<span
style="color:rgb(206,121,36)">=</span>irec<span
style="color:rgb(206,121,36)">+</span><span
style="color:rgb(195,55,32)">4</span></p>
<p style="margin:0px;font-family:Menlo;color:rgb(206,121,36)">enddo</p>
</div>
<div><br>
</div>
<div>Here is the updated control file:</div>
<div>
<p style="margin:0px;font-family:Menlo">dset ^testdaily<span
style="color:rgb(206,121,36)">.</span>bin</p>
<p style="margin:0px;font-family:Menlo;color:rgb(195,55,32)"><span
style="color:rgb(0,0,0)">undef </span>9.999E+20</p>
<p style="margin:0px;font-family:Menlo">title Daily NLDAS2
Data <span style="color:rgb(206,121,36)">for</span> 04Z
through 03Z</p>
<p style="margin:0px;font-family:Menlo;color:rgb(195,55,32)"><span
style="color:rgb(0,0,0)">xdef </span>32<span
style="color:rgb(0,0,0)"> linear </span>-108.9375<span
style="color:rgb(0,0,0)"> </span>0.125</p>
<p style="margin:0px;font-family:Menlo">ydef <span
style="color:rgb(195,55,32)">32</span> linear <span
style="color:rgb(195,55,32)">41.0625</span> <span
style="color:rgb(195,55,32)">0.125</span></p>
<span class="im">
<p style="margin:0px;font-family:Menlo">tdef <span
style="color:rgb(195,55,32)">10</span> linear
00Z02Jan1979 1dy</p>
<p style="margin:0px;font-family:Menlo">zdef <span
style="color:rgb(195,55,32)">1</span> linear <span
style="color:rgb(195,55,32)">1</span> <span
style="color:rgb(195,55,32)">1</span></p>
<p style="margin:0px;font-family:Menlo">vars <span
style="color:rgb(195,55,32)">4</span></p>
<p style="margin:0px;font-family:Menlo">TMAX <span
style="color:rgb(195,55,32)">0</span> <span
style="color:rgb(195,55,32)">12</span><span
style="color:rgb(206,121,36)">,</span><span
style="color:rgb(195,55,32)">105</span><span
style="color:rgb(206,121,36)">,</span><span
style="color:rgb(195,55,32)">2</span> <span
style="color:rgb(206,121,36)">**</span> maximum
temperature at 2m above surface [C]</p>
<p style="margin:0px;font-family:Menlo">TMIN <span
style="color:rgb(195,55,32)">0</span> <span
style="color:rgb(195,55,32)">11</span><span
style="color:rgb(206,121,36)">,</span><span
style="color:rgb(195,55,32)">105</span><span
style="color:rgb(206,121,36)">,</span><span
style="color:rgb(195,55,32)">2</span> <span
style="color:rgb(206,121,36)">**</span> minimum
temperature at 2m above surface [C]</p>
<p style="margin:0px;font-family:Menlo">PRCP <span
style="color:rgb(195,55,32)">0</span> <span
style="color:rgb(195,55,32)">61</span><span
style="color:rgb(206,121,36)">,</span><span
style="color:rgb(195,55,32)">1</span><span
style="color:rgb(206,121,36)">,</span><span
style="color:rgb(195,55,32)">0</span> <span
style="color:rgb(206,121,36)">**</span> total
precipitation backward accumulated [kg<span
style="color:rgb(206,121,36)">/</span>m^<span
style="color:rgb(195,55,32)">2</span> <span
style="color:rgb(206,121,36)">or</span> mm]</p>
<p style="margin:0px;font-family:Menlo">SRAD <span
style="color:rgb(195,55,32)">0</span> <span
style="color:rgb(195,55,32)">204</span><span
style="color:rgb(206,121,36)">,</span><span
style="color:rgb(195,55,32)">1</span><span
style="color:rgb(206,121,36)">,</span><span
style="color:rgb(195,55,32)">0</span> <span
style="color:rgb(206,121,36)">**</span> total surface
downward shortwave radiation flux [mJ<span
style="color:rgb(206,121,36)">/</span>m^<span
style="color:rgb(195,55,32)">2</span>]</p>
<p style="margin:0px;font-family:Menlo">ENDVARS</p>
</span></div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">Thank you both so much for your
help,<br>
</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">Lydia</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jul 5, 2016 at 12:44 PM, James
T. Potemra <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:jimp@hawaii.edu" target="_blank">jimp@hawaii.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<p>Hi Lydia,</p>
<p>You have a couple problems. First, you are reading in
tmax, tmin, prcp then srad, but then you write out tmin,
tmin prcp and srad (tmin twice). Second, your program
is reading and writing to the same variables, and then
only the first 8x8 (lower left "corner" of the data
sets). Perhaps these are all missing ? <br>
</p>
<p>Finally, the record length is defined to be 464 by 224,
then you only define (via read) and write the first 8 by
8, which should work ok, but recognize that the rest of
the 464x224 array has not been defined. So, if you want
to use your control file with "xdef 8" and "ydef 8"
you'll need to change your "open" statement for the
output file to be 8*8*4 and not 464*224*4. Alternately
you could change the xdef/ydef lines.</p>
<p>Note as a quick check, your output file should be
8*8*10*4*4 (x*y*t*4) bytes large for that control file.<br>
</p>
<p>Jim<br>
</p>
<div>
<div class="h5">
<div>On 7/5/16 3:57 AM, Lydia Rill wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">Hi all,
<div><br>
</div>
<div>I am a new grads user and I have never worked
with binary files before. I have a large binary
file I created in grads (code shown below). I
want to split up the binary file by latitude and
longitude degree into smaller binary files.
While this is possible in GrADS, it is too slow
for my needs, so I am trying to do it in Fortran
90. </div>
<div><br>
</div>
<div>However, I am having problems reading the
GrADS binary file in Fortran. It gives me the
missing value for each of my variables at every
time step and every location.</div>
<div><br>
</div>
<div>The binary file contains NLDAS 2 forcing
data, with 464 x steps, 224 y steps, and 13688
daily time steps for 4 variables (only 1 Z
level). It is a large file at 22GB, and I can
successfully display the variables in GrADS from
this binary file. This binary file was created
from data in Grib files.</div>
<div><br>
</div>
<div>I have tried many various ways of reading in
the binary data, using x and y loops, or time
loops, or looping through the 4 variables, but
nothing has been successful. </div>
<div><br>
</div>
<div>I am working on a Mac (El Capitan).</div>
<div><br>
</div>
<div>Here is the GrADS script I used to create the
binary file:</div>
<div>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(52,187,199)"><span
style="color:rgb(206,121,36)">function</span><span
style="color:rgb(0,0,0)"> </span><span>main</span><span
style="color:rgb(0,0,0)">(</span><span>args</span><span
style="color:rgb(0,0,0)">) </span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(52,187,199)"><span>counthr</span><span
style="color:rgb(0,0,0)">=</span><span
style="color:rgb(206,121,36)">subwrd</span><span
style="color:rgb(0,0,0)">(</span><span>args</span><span
style="color:rgb(0,0,0)">,</span><span
style="color:rgb(195,55,32)">1</span><span
style="color:rgb(0,0,0)">)</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span>'reinit'</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span>'open
/Volumes/WebData/NLDAS2/ProcessingFiles/24hours.ctl'</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span>'set
undef 9.999e20'</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span>'set
gxout fwrite'</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span>'set
fwrite -ap
/Volumes/WebData/NLDAS2/DailyNLDAS/daily.bin'</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span></span><br>
</p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span>'set
t 1'</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span
style="color:rgb(52,187,199)">t1</span><span
style="color:rgb(0,0,0)">=</span><span>1+4</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(52,187,199)"><span>t1p</span><span
style="color:rgb(0,0,0)">=</span><span
style="color:rgb(195,55,32)">1+5</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(52,187,199)"><span
style="color:rgb(206,121,36)">while</span><span
style="color:rgb(0,0,0)">(</span><span>t1</span><span
style="color:rgb(0,0,0)"><=</span><span>counthr</span><span
style="color:rgb(195,55,32)">+5-23</span><span
style="color:rgb(0,0,0)">) </span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(52,187,199)"><span>t2</span><span
style="color:rgb(0,0,0)">=</span><span>t1</span><span
style="color:rgb(195,55,32)">+23</span><span
style="color:rgb(0,0,0)"> </span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(52,187,199)"><span>t2p</span><span
style="color:rgb(0,0,0)">=</span><span>t1p</span><span
style="color:rgb(195,55,32)">+23</span><span
style="color:rgb(0,0,0)"> </span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span>'d
(max(TMP2m,t='</span><span
style="color:rgb(52,187,199)">t1</span><span>',t='</span><span
style="color:rgb(52,187,199)">t2</span><span>')-273.15)'</span><span
style="color:rgb(0,0,0)"> </span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span>'d
(min(TMP2m,t='</span><span
style="color:rgb(52,187,199)">t1</span><span>',t='</span><span
style="color:rgb(52,187,199)">t2</span><span>')-273.15)'</span><span
style="color:rgb(0,0,0)"> </span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span>'d
sum(APCPsfc,t='</span><span
style="color:rgb(52,187,199)">t1p</span><span>',t='</span><span
style="color:rgb(52,187,199)">t2p</span><span>')'</span><span
style="color:rgb(0,0,0)"> </span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span>'d
(ave(DSWRFsfc,t='</span><span
style="color:rgb(52,187,199)">t1</span><span>',t='</span><span
style="color:rgb(52,187,199)">t2</span><span>')*24*3600/1000000)'</span><span
style="color:rgb(0,0,0)"> </span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(52,187,199)"><span>t1</span><span
style="color:rgb(0,0,0)">=</span><span>t1</span><span
style="color:rgb(195,55,32)">+24</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(52,187,199)"><span>t1p</span><span
style="color:rgb(0,0,0)">=</span><span>t1p</span><span
style="color:rgb(195,55,32)">+24</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(206,121,36)"><span>endwhile</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span>'quit'</span></p>
</div>
<div><br>
</div>
<div>Here is the Fortran script to read the binary
file</div>
<div>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
style="color:rgb(213,59,211)">Program</span><span>
Readbin</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(52,189,38)"><span>implicit</span><span
style="color:rgb(0,0,0)"> </span><span>none</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span
style="color:rgb(52,189,38)">integer</span> irec,i,j,t,days<br>
<span></span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
style="color:rgb(52,189,38)">real</span>
tmin(<span style="color:rgb(195,55,32)">464</span>,<span
style="color:rgb(195,55,32)">224</span>),tmax(<span
style="color:rgb(195,55,32)">464</span>,<span
style="color:rgb(195,55,32)">224</span>),prcp(<span
style="color:rgb(195,55,32)">464</span>,<span
style="color:rgb(195,55,32)">224</span>),srad(<span
style="color:rgb(195,55,32)">464</span>,<span
style="color:rgb(195,55,32)">224</span>)<br>
</p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)"><span
style="color:rgb(206,121,36)">OPEN</span><span
style="color:rgb(0,0,0)">(</span><span
style="color:rgb(195,55,32)">17</span><span
style="color:rgb(0,0,0)">,</span><span
style="color:rgb(206,121,36)">file=</span><span
style="color:rgb(195,55,32)">'/</span><span
style="color:rgb(195,55,32)">Volumes/WebData/NLDAS2/DailyNLDAS</span><span
style="color:rgb(195,55,32)">/daily.bin'</span><span
style="color:rgb(0,0,0)">,</span><span
style="color:rgb(206,121,36)">&</span><br>
</p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span
style="color:rgb(206,121,36)">&STATUS=</span><span>'Old'</span><span
style="color:rgb(0,0,0)">,</span><span
style="color:rgb(206,121,36)">FORM=</span><span>'UNFORMATTED'</span><span
style="color:rgb(0,0,0)">,</span><span
style="color:rgb(206,121,36)">ACCESS=</span><span>'DIRECT'</span><span
style="color:rgb(0,0,0)">,</span><span
style="color:rgb(206,121,36)">RECL=</span><span>464</span><span
style="color:rgb(206,121,36)">*</span><span>224</span><span
style="color:rgb(206,121,36)">*</span><span>4</span><span
style="color:rgb(0,0,0)">)</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span></span><br>
</p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span
style="color:rgb(206,121,36)">OPEN</span><span
style="color:rgb(0,0,0)">(</span><span>18</span><span
style="color:rgb(0,0,0)">,</span><span
style="color:rgb(206,121,36)">file=</span><span>'</span>/Volumes/WebData/NLDAS2/DailyNLDAS/<span>testdaily.bin'</span><span
style="color:rgb(0,0,0)">,</span><span
style="color:rgb(206,121,36)">&</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span
style="color:rgb(206,121,36)">&STATUS=</span><span>'UNKNOWN'</span><span
style="color:rgb(0,0,0)">,</span><span
style="color:rgb(206,121,36)">FORM=</span><span>'UNFORMATTED'</span><span
style="color:rgb(0,0,0)">,</span><span
style="color:rgb(206,121,36)">ACCESS=</span><span>'DIRECT'</span><span
style="color:rgb(0,0,0)">,</span><span
style="color:rgb(206,121,36)">RECL=</span><span>464</span><span
style="color:rgb(206,121,36)">*</span><span>224</span><span
style="color:rgb(206,121,36)">*</span><span>4</span><span
style="color:rgb(0,0,0)">)</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>days</span><span
style="color:rgb(206,121,36)">=1</span><span
style="color:rgb(195,55,32)">0</span><span> </span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>irec</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
style="color:rgb(206,121,36)">do </span><span>t</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span><span>,days</span><br>
</p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
<span style="color:rgb(206,121,36)">read</span>(<span
style="color:rgb(195,55,32)">17</span>,<span
style="color:rgb(206,121,36)">REC=</span>irec)
((tmax(i,j),i<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span>,<span
style="color:rgb(195,55,32)">8</span>),j<span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span>,<span
style="color:rgb(195,55,32)">8</span>)<br>
</p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>
</span><span
style="color:rgb(206,121,36)">read</span><span>(</span><span
style="color:rgb(195,55,32)">17</span><span>,</span><span
style="color:rgb(206,121,36)">REC=</span><span>irec</span><span
style="color:rgb(206,121,36)">+</span><span
style="color:rgb(195,55,32)">1</span><span>)
((tmin(i,j),i</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span><span>,</span><span
style="color:rgb(195,55,32)">8</span><span>),j</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span><span>,</span><span
style="color:rgb(195,55,32)">8</span><span>)</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>
</span><span
style="color:rgb(206,121,36)">read</span><span>(</span><span
style="color:rgb(195,55,32)">17</span><span>,</span><span
style="color:rgb(206,121,36)">REC=</span><span>irec</span><span
style="color:rgb(206,121,36)">+</span><span
style="color:rgb(195,55,32)">2</span><span>)
((prcp(i,j),i</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span><span>,</span><span
style="color:rgb(195,55,32)">8</span><span>),j</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span><span>,</span><span
style="color:rgb(195,55,32)">8</span><span>)</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>
</span><span
style="color:rgb(206,121,36)">read</span><span>(</span><span
style="color:rgb(195,55,32)">17</span><span>,</span><span
style="color:rgb(206,121,36)">REC=</span><span>irec</span><span
style="color:rgb(206,121,36)">+</span><span
style="color:rgb(195,55,32)">3</span><span>)
((srad(i,j),i</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span><span>,</span><span
style="color:rgb(195,55,32)">8</span><span>),j</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span><span>,</span><span
style="color:rgb(195,55,32)">8</span><span>)</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>
</span><span
style="color:rgb(206,121,36)">write</span><span>(</span><span
style="color:rgb(195,55,32)">18</span><span>,</span><span
style="color:rgb(206,121,36)">REC=</span><span>irec)
((tmin(i,j),i</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span><span>,</span><span
style="color:rgb(195,55,32)">8</span><span>),j</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span><span>,</span><span
style="color:rgb(195,55,32)">8</span><span>)</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>
</span><span
style="color:rgb(206,121,36)">write</span><span>(</span><span
style="color:rgb(195,55,32)">18</span><span>,</span><span
style="color:rgb(206,121,36)">REC=</span><span>irec</span><span
style="color:rgb(206,121,36)">+</span><span
style="color:rgb(195,55,32)">1</span><span>)
((tmin(i,j),i</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span><span>,</span><span
style="color:rgb(195,55,32)">8</span><span>),j</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span><span>,</span><span
style="color:rgb(195,55,32)">8</span><span>)</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>
</span><span
style="color:rgb(206,121,36)">write</span><span>(</span><span
style="color:rgb(195,55,32)">18</span><span>,</span><span
style="color:rgb(206,121,36)">REC=</span><span>irec</span><span
style="color:rgb(206,121,36)">+</span><span
style="color:rgb(195,55,32)">2</span><span>)
((prcp(i,j),i</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span><span>,</span><span
style="color:rgb(195,55,32)">8</span><span>),j</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span><span>,</span><span
style="color:rgb(195,55,32)">8</span><span>)</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>
</span><span
style="color:rgb(206,121,36)">write</span><span>(</span><span
style="color:rgb(195,55,32)">18</span><span>,</span><span
style="color:rgb(206,121,36)">REC=</span><span>irec</span><span
style="color:rgb(206,121,36)">+</span><span
style="color:rgb(195,55,32)">3</span><span>)
((srad(i,j),i</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span><span>,</span><span
style="color:rgb(195,55,32)">8</span><span>),j</span><span
style="color:rgb(206,121,36)">=</span><span
style="color:rgb(195,55,32)">1</span><span>,</span><span
style="color:rgb(195,55,32)">8</span><span>)</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>
irec</span><span
style="color:rgb(206,121,36)">=</span><span>irec</span><span
style="color:rgb(206,121,36)">+</span><span
style="color:rgb(195,55,32)">4</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(206,121,36)"><span>enddo</span></p>
</div>
<div>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(213,59,211)"><span>end
program</span></p>
</div>
<div><br>
</div>
<div>The corresponding control file is:</div>
<div>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>set
^testdaily</span><span
style="color:rgb(206,121,36)">.</span><span>bin</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span
style="color:rgb(0,0,0)">undef </span><span>9.999E+20</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>title
Daily NLDAS2 Data </span><span
style="color:rgb(206,121,36)">for</span><span>
00Z through 23Z</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(195,55,32)"><span
style="color:rgb(0,0,0)">xdef </span><span>8</span><span
style="color:rgb(0,0,0)"> linear </span><span>-124.9375</span><span
style="color:rgb(0,0,0)"> </span><span>0.125</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>ydef
</span><span style="color:rgb(195,55,32)">8</span><span>
linear </span><span
style="color:rgb(195,55,32)">25.0625</span><span>
</span><span style="color:rgb(195,55,32)">0.125</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>tdef
</span><span style="color:rgb(195,55,32)">10</span><span>
linear 00Z02Jan1979 1dy</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>zdef
</span><span style="color:rgb(195,55,32)">1</span><span>
linear </span><span
style="color:rgb(195,55,32)">1</span><span>
</span><span style="color:rgb(195,55,32)">1</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>vars
</span><span style="color:rgb(195,55,32)">4</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>TMAX
</span><span style="color:rgb(195,55,32)">0</span><span>
</span><span style="color:rgb(195,55,32)">12</span><span
style="color:rgb(206,121,36)">,</span><span
style="color:rgb(195,55,32)">105</span><span
style="color:rgb(206,121,36)">,</span><span
style="color:rgb(195,55,32)">2</span><span>
</span><span style="color:rgb(206,121,36)">**</span><span>
maximum temperature at 2m above surface [C]</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>TMIN
</span><span style="color:rgb(195,55,32)">0</span><span>
</span><span style="color:rgb(195,55,32)">11</span><span
style="color:rgb(206,121,36)">,</span><span
style="color:rgb(195,55,32)">105</span><span
style="color:rgb(206,121,36)">,</span><span
style="color:rgb(195,55,32)">2</span><span>
</span><span style="color:rgb(206,121,36)">**</span><span>
minimum temperature at 2m above surface [C]</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>PRCP
</span><span style="color:rgb(195,55,32)">0</span><span>
</span><span style="color:rgb(195,55,32)">61</span><span
style="color:rgb(206,121,36)">,</span><span
style="color:rgb(195,55,32)">1</span><span
style="color:rgb(206,121,36)">,</span><span
style="color:rgb(195,55,32)">0</span><span>
</span><span style="color:rgb(206,121,36)">**</span><span>
total precipitation backward accumulated [kg</span><span
style="color:rgb(206,121,36)">/</span><span>m^</span><span
style="color:rgb(195,55,32)">2</span><span>
</span><span style="color:rgb(206,121,36)">or</span><span>
mm]</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>SRAD
</span><span style="color:rgb(195,55,32)">0</span><span>
</span><span style="color:rgb(195,55,32)">204</span><span
style="color:rgb(206,121,36)">,</span><span
style="color:rgb(195,55,32)">1</span><span
style="color:rgb(206,121,36)">,</span><span
style="color:rgb(195,55,32)">0</span><span>
</span><span style="color:rgb(206,121,36)">**</span><span>
total surface downward shortwave radiation
flux [mJ</span><span
style="color:rgb(206,121,36)">/</span><span>m^</span><span
style="color:rgb(195,55,32)">2</span><span>]</span></p>
<p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>ENDVARS</span></p>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Lydia</div>
<div>
<div><br>
</div>
-- <br>
<div data-smartmail="gmail_signature">
<div dir="ltr">
<div dir="ltr"
style="font-size:12.8000001907349px"><font
color="#999999">Lydia D. Rill</font></div>
<div style="font-size:12.8000001907349px"><font
color="#999999">M.S., Michigan State
University 2016 </font></div>
<div dir="ltr"
style="font-size:12.8000001907349px"><font
color="#999999">B.S., Valparaiso
University 2014</font><br
style="color:rgb(136,136,136)">
<span title="Call with Google Voice"
style="color:rgb(136,136,136)"><font
color="#999999"><a
moz-do-not-send="true"
value="+12244065130"
style="color:rgb(17,85,204)">(224)
406-5130</a></font></span><br
style="color:rgb(136,136,136)">
<font color="#000000"><a
moz-do-not-send="true"
href="mailto:Lydia.D.Rill@gmail.com"
style="color:rgb(17,85,204)"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:Lydia.D.Rill@gmail.com">Lydia.D.Rill@gmail.com</a></a></font></div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<span class="">
<pre>_______________________________________________
gradsusr mailing list
<a moz-do-not-send="true" href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>
<a moz-do-not-send="true" href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
</span></blockquote>
<br>
</div>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a moz-do-not-send="true"
href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a moz-do-not-send="true"
href="http://gradsusr.org/mailman/listinfo/gradsusr"
rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div dir="ltr" style="font-size:12.8000001907349px"><font
color="#999999">Lydia D. Rill</font></div>
<div style="font-size:12.8000001907349px"><font
color="#999999">M.S., Michigan State University 2016 </font></div>
<div dir="ltr" style="font-size:12.8000001907349px"><font
color="#999999">B.S., Valparaiso University 2014</font><br
style="color:rgb(136,136,136)">
<span title="Call with Google Voice"
style="color:rgb(136,136,136)"><font color="#999999"><a
moz-do-not-send="true" value="+12244065130"
style="color:rgb(17,85,204)">(224) 406-5130</a></font></span><br
style="color:rgb(136,136,136)">
<font color="#000000"><a moz-do-not-send="true"
href="mailto:Lydia.D.Rill@gmail.com"
style="color:rgb(17,85,204)" target="_blank">Lydia.D.Rill@gmail.com</a></font></div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gradsusr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>
<a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
</blockquote>
<br>
</body>
</html>