-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathREADME
4772 lines (3721 loc) · 227 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
This LAPS README file is viewable on the WWW via the LAPS home
page at http://laps.noaa.gov/
TABLE OF CONTENTS
-----------------
1.0 ............ General LAPS info
1.1 .............. LAPS Software Disclaimer
2.0 ............ Installing and running the LAPS Ingest/Analysis code
2.1 .............. UNIX System Requirements
2.1.1 .................. NetCDF library
2.1.2 .................. Perl
2.1.3 .................. make
2.1.4 .................. C Compiler
2.1.5 .................. FORTRAN Compiler
2.1.6 .................. Disk Space
2.1.7 .................. Memory Etc. (ulimit)
2.1.8 .................. Plotting / NCAR graphics library (optional)
2.1.8.1 ................ Web Display
2.1.9 .................. GRIB2 external libraries
2.1.10 ................. GNUPLOT / ImageMagick for verification (optional)
2.2 .............. Installation Procedure Summary
2.2.1 .................. Untarring the Source Code
2.2.2 .................. Running Configure
2.2.2.1 ..................... Modifying Compiler Flags
2.2.3 .................. Ingest Software changes
2.2.4 .................. Running make
2.2.5 .................. Geography databases
2.2.5.1 ..................... High Resolution Terrain (sub-kilometer)
2.2.6 .................. Localizing for single or multiple data domains
2.2.6.1 ..................... Localization Method 1
2.2.6.2 ..................... Localization Method 2
2.2.6.3 ..................... Localization with LAPS GUI
2.2.7 .................. WRF Domain Wizard LAPS Support
2.2.8 .................. MPI support for LAPS wind analysis
2.3 .............. Raw data ingest
2.3.1 .................. Model Background (lga/lgb)
2.3.1.1 ..................... Acquiring Model Background Data
2.3.2 .................. Radar ingest
2.3.3 .................. Surface Data
2.3.4 .................. Wind Profiler / RASS
2.3.5 .................. PIREPS & ACARS from aircraft
2.3.6 .................. RAOB / Dropsonde / Radiometer
2.3.7 .................. Satellite
2.3.8 .................. GPS
2.3.9 .................. Other Data Sources
2.4 .............. Running LAPS Analyses
2.4.1 .................. Cron timing considerations
2.4.2 .................. Purging Output Files
2.4.3 .................. STMAS and other configurations
2.5 .............. Test data case
2.5.1 .................. Analysis Only Test
2.5.2 .................. Ingest + Analysis Test
2.6 .............. I/O of LAPS gridded files
2.7 .............. CHANGING THE HORIZONTAL DOMAIN
2.7.1 .................. Number of Grid Points
2.7.2 .................. Location of Analysis Domain (Map projections)
2.7.2.1 ..................... MAP PROJECTION FUNCTIONALITY/LIMITATIONS
2.7.3 .................. Domain Resolution
2.7.4 .................. Terrain Smoothing/Filtering
2.8 .............. CHANGING THE VERTICAL DOMAIN
2.8.1 .................. Sigma Height Grid
2.8.2 .................. Sigma Pressure Grid
2.9 .............. CHANGING THE CYCLE TIME
2.10 ............. LQ3 (HUMIDITY ANALYSIS) CHANGES
2.11 ............. OTHER RUNTIME PARAMETERS
2.12 ............. Detecting and Reporting Installation Errors
2.12.1 .................. Runtime Monitoring
3.0 ............ Description of LAPS Processes
3.1 .............. Localization Processes
3.1.1 .................. Gridgen_model (static.nest7grid generation)
3.1.2 .................. Surface Lookup Tables (gensfclut.exe)
3.1.3 .................. Satellite Lookup Tables (genlvdlut.exe)
3.2 .............. Ingest Processes
3.2.1 .................. LGA Model Background
3.2.2 .................. Surface Data Ingest
3.2.2.1 ..................... obs_driver.x
3.2.2.2 ..................... How to Blacklist stations
3.2.3 .................. Polar Radar Data (e.g. WSR 88D Level II, Level III)
3.2.4 .................. WSI / NOWRAD RADAR PREPROCESSING (VRC)
3.2.5 .................. Radar Mosaic
3.2.6 .................. PROFILER/VAD/SODAR (PRO) Ingest
3.2.7 .................. RASSs (LRS) Ingest
3.2.8 .................. PIREPS/ACARS Ingest
3.2.9 .................. Sounding (RAOB/Dropsonde/Sat/Radiometer) (SND) Ingest
3.2.10 .................. LVD (Satellite Image + Cloud Top Pressure)
3.2.11 ................. Cloud Drift Wind (CDW) Ingest
3.3 .............. ANALYSIS PROCESSES
3.3.1 .................. WIND
3.3.2 .................. SFC (LSX)
3.3.2.1 ..................... SURFACE ANALYSIS RUNTIME PARAMETERS
3.3.2.2 ..................... SURFACE ANALYSIS QUALITY CONTROL
3.3.2.3 ..................... SURFACE ANALYSIS VERIFICATION
3.3.2.4 ..................... STMAS-2D
3.3.3 .................. TEMP
3.3.4 .................. CLOUD
3.3.5 .................. WATER VAPOR (HUMIDITY PROCESSING)
3.3.6 .................. DERIV
3.3.7 .................. ACCUM
3.3.8 .................. SOIL MOISTURE
3.3.9 .................. BALANCE
3.3.10 ................. STMAS3D
3.4 .............. Model Initialization & Postprocessing
3.4.1 .................. LAPSPREP
3.4.2 .................. LAPS2GRIB
3.4.3 .................. WFOPREP
3.4.4 .................. LFMPOST
3.4.5 .................. FORECAST GRAPHICS
3.4.6 .................. VERIFICATION
4.0 ............ Porting code mods from LAPS users back to GSD
5.0 ............ LAPS Output Variables and netCDF File Organization
----------------- 1.0 General LAPS info --------------------------------------
Below is a description of the tar file containing the LAPS data ingest and
analysis code. The predictive component of LAPS (MM5, RAMS/SFM, ETA) is
set up separately (see Section 3.4).
Please note that GSD provides support for LAPS software only if a prior
agreement is made to that effect. Additionally, questions concerning LAPS
must be asked in reference to the latest released tar file; we cannot
support older versions of LAPS code. It is also recommended that LAPS
users try to take advantage of the latest LAPS updates by periodically
importing a fresh tar file every few months or so. Please check the
LAPS Software Page at 'http://laps.noaa.gov/cgi/LAPS_SOFTWARE.cgi'
for information about recent releases.
A flow chart for the LAPS software can be found at:
http://laps.noaa.gov/doc/Slide1.png
---------------- 1.1 LAPS Software Disclaimer ----------------
Open Source License/Disclaimer, Forecast Systems Laboratory
NOAA/OAR/GSD, 325 Broadway Boulder, CO 80305
This software is distributed under the Open Source Definition,
which may be found at http://www.opensource.org/.
In particular, redistribution and use in source and binary forms,
with or without modification, are permitted provided that the
following conditions are met:
- Redistributions of source code must retain this notice, this
list of conditions and the following disclaimer.
- Redistributions in binary form must provide access to this
notice, this list of conditions and the following disclaimer, and
the underlying source code.
- All modifications to this software must be clearly documented,
and are solely the responsibility of the agent making the
modifications.
- If significant modifications or enhancements are made to this
software, the GSD Software Policy Manager
([email protected]) should be notified.
THIS SOFTWARE AND ITS DOCUMENTATION ARE IN THE PUBLIC DOMAIN
AND ARE FURNISHED "AS IS." THE AUTHORS, THE UNITED STATES
GOVERNMENT, ITS INSTRUMENTALITIES, OFFICERS, EMPLOYEES, AND
AGENTS MAKE NO WARRANTY, EXPRESS OR IMPLIED, AS TO THE USEFULNESS
OF THE SOFTWARE AND DOCUMENTATION FOR ANY PURPOSE. THEY ASSUME
NO RESPONSIBILITY (1) FOR THE USE OF THE SOFTWARE AND
DOCUMENTATION; OR (2) TO PROVIDE TECHNICAL SUPPORT TO USERS.
---------- 2.0 Installing and running the LAPS Ingest/Analysis code -----------
---------------- 2.1 UNIX System Requirements ----------------
Supported UNIX platforms include...
<pre>
IBM rs6000 AIX4.3 NFS mounted disks should be mounted with
NFS version 2 instead of 3.
HP HPUX 10.20 Requires f90
SunOS (Solaris) 5.6 Requires f90
IRIX64 6.5 Requires f90
DEC (Alpha)
LINUX (i386,i686,x86_64) pgf90 is suggested
ifort (version 12.0.4 or later)
gfortran being tested
LINUX (MacOS-X) pgf90 is being tested
LINUX (Alpha) fort is suggested
</pre>
We are working on adding more supported platforms. We welcome suggestions
on how to modify LAPS for other platforms/versions. Note that we cannot
guarantee the portability of LAPS to all of these
other platforms (e.g. Windows NT).
--- 2.1.1 NetCDF library ---
The netCDF package is required for laps, we suggest using version 3.6.0
available here:
http://www.unidata.ucar.edu/downloads/netcdf/netcdf-3_6_0/index.jsp
Once netCDF is properly installed, check that the 'ncdump' and 'ncgen'
programs are in your path (e.g. 'which ncdump'), so that 'configure' will
find them and provide the laps package with the proper path. The path
setting will also help LAPS programs to run properly. Note that this path
specficiation will override anything supplied with the '--netcdf' command
line argument.
NetCDF is a general format structure. The detailed format of each data
file is self-describing (via 'ncdump'), and is mirrored in a separate
static file called the CDL. This CDL can be GSD's version or someone elses.
If possible, check that your netCDF library is built to be compatible
with the same FORTRAN compiler that you are using.
The netCDF library contains C routines that are to be linked with the
LAPS FORTRAN routines. Please see the discussion in section 2.2.2.1 for
details on troubleshooting this.
--- 2.1.2 Perl ---
The perl package is also required for laps, it is available via internet
at any perl site such as http://www.perl.com. Perl 5.003 or higher is
required. Check that 'perl' is in your path (e.g. 'which perl').
--- 2.1.3 make ---
Laps Makefiles work best by using gnu make (version 3.75 or higher).
This is downloadable from gnu sites such as the following URL:
'http://www.gnu.org/software/make/make.html'. You can check your version
of gnu make by typing 'make -v'. Some vendor provided make utilities may
also work, however if you find you are having problems in this area please
try obtaining and using gnu make. Check that 'make' is in your path.
If you are running AIX, 'make' should be used from the AIX toolbox:
http://www-03.ibm.com/systems/power/software/aix/linux/index.html
--- 2.1.4 C Compiler ---
In general, an ANSI compliant C compiler should be used. On some hardware
ANSI compliance requires a compiler flag, if you're not sure check the
documentation for your compiler. Some platforms such as Solaris and HPUX
do not come with an ANSI compliant C compiler by default. If you have
not purchased that additional product from the vendor, we recommend GNU C
(gcc) available at 'http://www.gnu.org/software/gcc/gcc.html'. Check that
the C compiler is in your path.
With the 'pgf90' FORTRAN compiler, 'pgcc' is recommended.
With the Intel 'ifort' FORTRAN compiler, 'icc' is recommended.
For AIX, Solaris, HP_UX platforms, 'cc' is recommended.
--- 2.1.5 FORTRAN Compiler ---
Please note that LAPS uses dynamic memory within the FORTRAN code in
the form of automatic and allocatable arrays, as well as other FORTRAN 90
constructs. This implies that you will need an 'f90' compiler or the
equivalent. LAPS will no longer work on most 'f77' compilers. Check that
the FORTRAN compiler is in your path.
For IBM/AIX platforms 'xlf' is recommended.
For Solaris & HP-UX platforms, 'f90' works well.
For Linux platforms (i386,i686,x86_64), 'pgf90' is suggested
'ifort' (version 12.0.4 or later) is being tested
'gfortran' is being tested
For Linux platforms (Alpha chip), 'fort' is suggested (normal serial use).
--- 2.1.6 Disk Space ---
The disk space requirements for LAPS vary depending on factors such as
domain size and purge parameters. As a general guide, 10MB would be needed
for source code. About 30MB are needed for executable binaries.
500MB to 1GB are typically needed for 12-24 hours worth of output data.
A similar amount of space is needed for the raw input data.
--- 2.1.7 Memory Etc. (ulimit) ---
'ulimit' settings should be placed at 'unlimited' if possible. Memory
requirements vary for LAPS. As a general guide, 128MB is needed and
256MB is preferred. More is needed for large domains. For very large
domains, a rough guide to the memory needed would be 100 x NX x NY x NZ
bytes.
--- 2.1.8 Plotting / NCAR graphics library (optional) ---
Lapsplot is an optional plotting program, thus NCAR graphics is optional.
If you wish to build the lapsplot process, access to NCAR graphics
libraries is needed so you will be able to run the 'ncargf77' command in
the LAPS Makefiles. You can download the free NCAR graphics (NCL) software
at the URL shown below. Note that NCAR graphics libraries should be built
against the same FORTRAN compiler being used in LAPS.
http://ngwww.ucar.edu
The 'lapsplot.exe' executable is an interactive program that reads in
the netCDF LAPS files and produces a 'gmeta' file as output. The 'gmeta'
file can be displayed using other NCAR graphics utilities like 'ctrans'
and 'idt'.
'Lapsplot' is designed to work with version 3.2 (or higher) of NCAR
graphics. The environment variable $NCARG_ROOT should be set when
configuring, compiling, or running 'lapsplot.exe'.
Before running 'configure', check that 'ncargf77' and/or 'ncargf90' is in
your path. If you are using a compiler other than 'f77', check after
running 'configure' to see that the right thing was done by inspecting
'NCARGFC' and 'FC' within 'src/include/makefile.inc'. 'NCARGFC' should
point to either the 'ncargf90' or 'ncargf77' script. If configure wants
to use 'ncargf90' and you don't yet have one, then consider making a soft
link called 'ncargf90' that points to the 'ncargf77' script, or copying
'ncargf77' to a new location and calling it 'ncargf90'.
If you only have an 'ncarg90' script (i.e. no 'ncargf77'), you may want
to also make a script called 'ncargf77' that lists the 'f77' compiler.
This can help 'configure' do its test for making the switch over from
'ncargf77' to 'ncargf90'.
Lapsplot is built as a special option to 'make', simply type
'make lapsplot' or 'make install_lapsplot'. It is not built with a plain
run of 'make'.
In order to get 'lapsplot' to compile and link properly it may be
necessary to edit your own version of 'ncargf90' or even the original
'ncargf77' script. Check that the proper FORTRAN compiler, load flags,
and load libraries are set in the script.
A possible alternative to fixing 'ncargf77/ncargf90' is to edit
'src/include/makefile.inc' with the full path for 'NCARGFC', and
appropriate compiler for 'FC' (and possibly compiler flags) for your
system (after running configure).
At times the linking of 'lapsplot' may show undefined references to
library routines. This often represets a mismatch between NCAR graphics
and various system libraries. Possible solutions for this include editing
the library list within the 'ncargf77/ncargf90' script or switching the
-Bstatic flag on or off.
'Lapsplot' can be modified to show political boundaries outside of the
U.S. The following data files are relevant from the 'static/ncarg'
directory: 'continent_minus_us.dat', 'state_from_counties.dat', and
'uscounty.dat'. These political boundary files are stored in big_endian
format. These would need to be converted manually prior to using
'lapsplot', if your machine is expecting little_endian. We will consider
automating this in the future.
To run lapsplot manually you can do the following...
1. setenv LAPS_DATA_ROOT to the correct path
2. run $LAPSINSTALLROOT/bin/lapsplot.exe (answer the questions it asks
interactively)
3. idt gmeta
Please note that 'lapsplot' is provided to help you check out how your
LAPS implementation is working. Aside from the pre-generated and
"on-the-fly" web products, we do not have any other plotting or
visualization packages available for distribution with LAPS at this time.
Many users have interfaced LAPS with their own display software (e.g.
IDV, VIS5D, AVS, IDL, NCL, NCVIEW, GEMPAK).
IDV is handy as it can read Grib-2 LAPS analysis output that can be
generated via the 'laps2grib' program. Feel free to post questions about
the various plotting packages to the online LAPS forum.
Another note of interest is that LAPS is visualized as an integral part of
the AWIPS & ALPS systems. If you have AWIPS (including either AWIPS-I or
AWIPS-II), then LAPS should be running on it and you can view its output
on the workstation.
---- 2.1.8.1 Web Display ---
The 'gmeta' file can be converted into a GIF/JPEG file for web display by
using 'ctrans' in conjunction with the 'netpbm' package of image
conversion programs that can be downloaded at the link just below. Within
this package our web display scripts use the 'rastopnm' and 'ppmtogif'
programs.
http://netpbm.sourceforge.net/
We have the option of making pre-generated GIF images that can be displayed
on the web by invoking the 'sched.pl -f dummy' command line argument.
Please see section 2.4 for more info on 'sched.pl'. The web images appear
as '.gif' files in the 'lapsprd/www/anal2d' directory. It will be necessary
to set the relevant NCARG environment variables (e.g. $NCARG_ROOT) in your
.cshrc file since several of the scripts called by 'sched.pl' are CSH
scripts.
The associated web related scripts (for analyses) such as
'etc/www/followup_ncarg.sh' are in the repository. These "wrapper" scripts
run 'lapsplot.exe' and output the GIF images suitable for web display.
The set of web image products are defined with configuration files in
'static/www/lapsplot.*'. Color tables are specified in 'static/www/*.lut'.
Other user definable plotting parameters are located in
'static/lapsplot.nl'.
A separate web related script is our "on-the-fly" page that is contained
in 'etc/www/nph-laps.cgi'. This CGI/PERL script can be run via a web
server. This also calls a set of scripts that wrap around 'lapsplot.exe'.
The file system(s) running LAPS should be made visible on your web server.
After running 'configure' the following steps will help in setting up
this web page.
1) edit 'etc/www/nph-laps.cgi' and set $web_root to be the root directory
of the web server (document root)
2) edit 'etc/www/laps.cgi' and set $web_root to be the root directory
of the web server
3) edit 'etc/www/nph-laps.cgi' and set $ncarg_root to be the root directory
of the NCL/NCAR Graphics installation
4) mkdir -p $web_root/request
5) cd $web_root/request; ln -s $LAPSINSTALLROOT/etc/www/nph-laps.cgi .
6) cd $web_root/request; ln -s $LAPSINSTALLROOT/etc/www/laps.cgi .
7) For each DOMAIN NAME (foo):
a) mkdir -p $web_root/domains/foo
b) cd $web_root/domains/foo; ln -s $LAPS_DATA_ROOT private_data
8) edit 'etc/www/nph-laps.cgi' and set $default_domain to be your
favorite domain 'foo' within the domain list established in
step (7)
At this point you should hopefully be able to use a web browser and
run the "on-the-fly" page with something like this URL:
http://yourdomain.something/request/nph-laps.cgi
--- 2.1.9 GRIB2 external libraries ---
The background models read by the model first guess ingest program (LGA)
include GRIB1 and GRIB2-formatted files. If you are reading model first
guess data in GRIB2 format, then you will want to install these libraries.
The external compression libraries required for processing GRIB2-formatted
files are libjasper.a, libpng.a, and libz.a. They are usually found in
/usr/lib or /usr/lib64. It is recommended to have a system administrator
install these external libraries if they are not already on your system.
(JPEG2000 and other image compression algorithms are built into GRIB2.
Library support for JPEG2000 is provided via the JasPer library. The
implementation of JPEG2000 compression reduces file sizes up to 80%.)
The 'configure' script will determine if these libraries are present.
If all are found, 'configure' prepares the file 'src/include/makefile.inc'
with DEGRIBLIBS, DEGRIBFLAGS and CDEGRIBFLAGS values allowing the lga
software to build to read both GRIB1 and GRIB2-formatted files. Without
these three specific compression libraries available, lga is built to
read only GRIB1-formatted files in addition to netCDF-formatted files.
There may be some occasions where the Jasper library isn't detected
automatically by 'configure'. For example, if the Jasper library is
placed in a location other than the system area (/usr/lib) then one can
set an environment variable CPP_INCLUDE_PATH for lga to build like this:
setenv CPP_INCLUDE_PATH /opt/jasper/1.900.1/include
After running 'configure', the DEGRIBLIBS value in 'makefile.inc' can
be manually edited to include the path information for the Jasper
library. Similarly the flags -DUSE_JPEG2000 and -DUSE_PNG can be added
to the value of DEGRIBFLAGS.
The unix/linux system command 'ldd' command prints the shared library
dependancies on an executable; running 'ldd lga.exe' is a helpful
command in the situation when you download the LAPS precompiled binaries
and need more information about shared libraries required by lga.exe.
See source directory: $LAPS_SRC_ROOT/src/lib/degrib/README_LIBS file
for additional information.
--- 2.1.10 GNUPLOT / ImageMagick for verification (optional) ---
LAPS has a built in verification package and this needs installation
of GNUPLOT and ImageMagick to run fully.
------------- 2.2 Installation Procedure Summary ------------------
To introduce this section, here is a hierarchical listing of some primary
directories and files in the laps tree. The default LAPS structure is
shown in the first tree below. These directories are created/addressed in
various portions of section 2.2 and beyond.
Various "root" directories are mentioned in the form of environment
variables. These can optionally be set to make it easier to follow the
instructions below more literally. The installation scripts can be run
without setting these variables if you'd like to enter the associated
paths directly as command line input.
$LAPS_SRC_ROOT - The full path that was created when the LAPS tar file
was untarred. This contains the source code and other supporting software.
$LAPS_SRC_ROOT is needed for building LAPS but is not needed at runtime.
$LAPSINSTALLROOT - The full path of installed binaries and scripts
(bin and etc). This is where you build the executables, configure the
scripts (converted the *.pl.in to *.pl), and configure
$LAPS_SRC_ROOT/src/include/makefile.inc. Note: $LAPS_SRC_ROOT and
$LAPSINSTALLROOT are in many cases the same but don't have to be.
$LAPSINSTALLROOT is needed at runtime.
$LAPS_DATA_ROOT - The full path to the output data and namelists. This
includes lapsprd subdirectories containing both LAPS output grids and
intermediate data files. $LAPS_DATA_ROOT is needed at runtime and it
contains all the files configured to run an analysis domain localized to
a location on earth. The $LAPSINSTALLROOT tree can drive several
$LAPS_DATA_ROOTs. Input data in its "raw" form is stored outside the
$LAPS_DATA_ROOT tree.
Note: $LAPS_DATA_ROOT is usually (and recommended to be) different than
$LAPS_SRC_ROOT/data and $LAPSINSTALLROOT/data but they don't need to be.
Also, $LAPS_SRC_ROOT/data/cdl and $LAPS_SRC_ROOT/data/static are
the repository versions and should be kept pristine.
Note: the namelists you get from the tar are configured for our Colorado
domain. More on localizing a domain for your own area later on.
To summarize, these three environment variables can either be part of one
directory tree or split out into separate trees as further discussed at
various times below.
<pre>
/home_disk/
raw_data/ (optional raw test data)
geog/
world_topo_30s
albedo_ncep
landuse_30s
soiltype_bot_30s
soiltype_top_30s
laps-m-n-o.tar
laps-m-n-o/ ($LAPS_SRC_ROOT=$LAPSINSTALLROOT)
Makefile
src/
ingest/
etc/ (laps scripts)
bin/ (executables)
data/ (original data tree that comes with tar file,
replicated and merged with templates during localization)
lapsprd/
product_list/ (laps output)
log/
static/
nest7grid.parms (namelist parameters)
*.nl (namelist parameters)
static.nest7grid (gridded topography)
time/
testdata/ (optional, can be relocated)
lapsprd/
product_list/
</pre>
In many UNIX environments, large data files are stored on a "data" disk
and the source code is stored on a smaller "home" disk. Below is a
typical laps directory structure for that setup. We recommend using
something like this setup for most LAPS users. This type of separation
makes it easier to update the LAPS source code while maintaining your
data intact.
<pre>
/home_disk/
builds/
laps-m-n-o.tar
laps-m-n-o/ ($LAPS_SRC_ROOT = $LAPSINSTALLROOT)
Makefile
src/ (source code)
ingest/
etc/ (laps scripts)
bin/ (executables)
template ($TEMPLATE parameters)
/data_disk/
geog/
world_topo_30s
albedo_ncep
landuse_30s
soiltype_bot_30s
soiltype_top_30s
raw_data/ (optional raw test data)
laps/
data*/ ($LAPS_DATA_ROOT, set up during localization)
lapsprd/
product_list/ (laps output)
log/
static/
nest7grid.parms (namelist parameters)
*.nl (namelist parameters)
static.nest7grid (gridded topography)
time/
testdata/ (optional, can be relocated)
lapsprd/
product_list/
</pre>
---- 2.2.1 Untarring the Source Code ---
Place the tar file in the directory '/home_disk' or '/home_disk/builds'.
Untar the laps source code using a command like...
prompt> gzcat laps-m-n-o.tgz | tar xf -
OR...
prompt> gunzip laps-m-n-o.tgz
prompt> tar -xf laps-m-n-o.tar
The $LAPS_SRC_ROOT directory will be set up one level below the tar file.
If you are having trouble running 'gunzip', the problem could be that
the 'laps-m-n-o.tgz' file was corrupted during the download. In that
case simply try downloading again.
---- 2.2.2 Running Configure ---
Go to the $LAPS_SRC_ROOT directory and run...
prompt> ./configure
'configure' supports many options, the most important is the
--prefix option which tells make where to install the laps system
(FORTRAN executables, Perl Scripts, etc.). The default (if you did
not use --prefix) is to install whereever the source is. The use of
the --prefix option is highly recommended to make it easier to update
your source code (e.g. importing a new LAPS tar file), without
disturbing the binaries, data, and runtime parameters that you are
working with on-site. This goes along with the second directory tree
diagram shown above in Section 2.0.
For example, to install laps in directory '/usr/local/laps' (i.e.
$LAPSINSTALLROOT) use...
prompt> ./configure --prefix=/usr/local/laps
One or more data directories for running laps can be specified
at runtime, if desired. A single set of binaries can thus support several
data directories as described below.
Another configure option is --arch. Configure tries to get the
architecture from a 'uname' command, but this can be overridden by having
an $ARCH environment variable or by using --arch. The allowed values for
'arch' include 'aix', 'hpux', etc.
For more information on passing in command line flags to 'configure' run...
prompt> ./configure --help
--- 2.2.2.1 Modifying Compiler Flags ---
The 'configure' script automatically modifies the compiler and compilation
flags by modifying 'src/include/makefile.inc' according to what type of
platform you are on. Hopefully the flags will work OK on your particular
platform. If you want to change the flags from the default set, you
can provide command line arguments to the 'configure' script.
Some examples based on our experience are as follows:
Solaris...
prompt> ./configure --cc=cc
For IBM/AIX platforms, you will want to override the default FORTRAN
compiler with 'xlf' using the command line option --fc=xlf as follows...
prompt>./configure --fc=xlf
For SGI platforms, certain flags may be needed. '-mips3' seems to help
on IRIX64 v6.2.
A second method of modifying the compiler flags is to edit
'src/include/makefile.inc', after running configure. If you find that the
default compiler flags don't work for your platform or that your platform
has no default, you'll need to experiment to find the right set of flags.
Changes in 'src/include/makefile.inc' will automatically modify the
flags used throughout laps. If you find flags that work for your platform
and would like us to add them to the defaults in 'configure' please let
us know via e-mail.
On Solaris for example, you may want to remove "-C" from the DBFLAGS with
an edit of 'src/include/makefile.inc' to allow compiling FORTRAN debug
versions of the software.
On some platforms (e.g. Linux) the linking of FORTRAN programs to netCDF
and other C library routines may need adjustment. This relates to the
existence and number of underscores in the C routine names when called by
FORTRAN routines. Fixes for this may include a combination of changing
the number of underscores in the C routines, changing the CPPFLAGS for
LAPS, or changing the FFLAGS for LAPS.
As an example, with errors linking to netCDF "nf" routines, you might
rebuild the netCDF C library with a different number of underscores and/or
adjust the FFLAGS according to the man page in your FORTRAN compiler.
On a Linux-Intel machine the netCDF library can be rebuilt with the
following flags...
<pre>
FC=pgf90
CC=gcc
CPPFLAGS=-DpgiFortran
FFLAGS=-O
</pre>
Errors linking to other LAPS C routines can be addressed with other
adjustments to the CPPFLAGS (among FORTRANUNDERSCORE and
FORTRANDOUBLEUNDERSCORE) or the FFLAGS.
--- 2.2.3 Ingest Software changes ---
In this file (mainly Sec 2.3), a number of potential manual changes to
ingest code are outlined prior to running 'make' and
'$LAPSINSTALLROOT/etc/localize_domain.pl', especially if one is using
ingest data formats other than "standard" ones used at GSD. After becoming
familiar with the changes needed for your implementation, it is
recommended that you develop a method to save the hand edited files in a
"safe" place outside of the laps directory structure, or by using a
revision control system such as CVS. This strategy would make it easier
to update your implementation of LAPS with the latest 'laps-m-n-o.tgz'
file from GSD, while minimizing the hassle involved with software
modifications for your local implementation.
---- 2.2.4 Running make ---
The next step is to build and install the executables, this can be done
by running the following (note the syntax might vary if the shell you
are using is different from Bourne shell)...
prompt> cd $LAPS_SRC_ROOT
prompt> make 1> make.out 2>&1
prompt> make install 1> make_install.out 2>&1
prompt> make install_lapsplot 1> make_install_lapsplot.out 2>&1
Check that the executables have been placed into the '$LAPSINSTALLROOT/bin'
directory. The total number should be the number of EXEDIRS in
'$LAPS_SRC_ROOT/Makefile' plus 2; this includes 'lapsplot.exe'.
Lapsplot can be installed only if you have NCAR graphics.
We recommend using Gnu Make Version 3.75 or later available via ftp from
any GNU site.
There are many other targets within the Makefile that can be used for
specialized purposes, such as cleaning things up to get a fresh start.
In particular, note that a 'make distclean' is recommended before running
'configure' a second time so that things will run smoothly.
---- 2.2.5 Geography databases ---
Currently there are three mandatory geography databases required to
localize a LAPS domain (with a fourth optional one). These are:
1) terrain elevation (required)
2) landuse category (required)
3) albedo climatology (required)
4) soil type [bottom/top] (optional)
The other geography data paths listed in 'static/nest7grid.parms' represent
data that can be processed by the localization though are unneeded by
the analyses. Hence it is unnecessary to download these and they aren't
available on our software download web page.
The 30" terrain elevation data is found in the tar files for 'topo_30s'.
The landuse data is global 30" data and required to compute a
land/water mask. The mask is used during localization to force consistency
between the other geography data at land-water boundaries. Land fraction
is derived from the landuse data using the water category, with valid
values ranging continuously between 0.0 and 1.0.
The global albedo climatology database has less resolution than either
the terrain or landuse data. The albedo is approximately 8.6 minutes
(0.144 degs) and was obtained from the National Center for Environmental
Prediction (NCEP). This data is used in the LAPS cloud analysis with
visible imagery data.
The geography data come in compressed tar files separate
from the rest of the LAPS distribution. The data are used in
process 'gridgen_model' which is the fortran code to process all
the geography data as specified by the user (see section 2.7.4 for more
information about gridgen_model). Only one copy of the geography
data is required no matter how many LAPS 'dataroot' installations you
are supporting. The paths to the geography data directories
(topo_30s, landuse_30s, and albedo_ncep) are defined as
runtime parameters within the 'nest7grid.parms' file (Sec 2.2.6).
The geography data is available on the LAPS Home Web page (software link).
You will find the following global data sets at this web/ftp site. Some of
the data have been subdivided into "quartershperes" for easier downloading.
Select the files needed for your application or get all of them if you
intend to generate localizations around the entire globe.
.
132446109 Aug 24 2001 topo_30s/topo_30s_NE.tar.gz
63435504 Aug 24 2001 topo_30s/topo_30s_NW.tar.gz
37194099 Aug 24 2001 topo_30s/topo_30s_SE.tar.gz
29204244 Aug 24 2001 topo_30s/topo_30s_SW.tar.gz
12324069 Aug 24 2001 landuse_30s/landuse_30s_NE.tar.gz
6118611 Aug 24 2001 landuse_30s/landuse_30s_NW.tar.gz
3355822 Aug 24 2001 landuse_30s/landuse_30s_SE.tar.gz
2808861 Aug 24 2001 landuse_30s/landuse_30s_SW.tar.gz
albedo_ncep/A90S000E
albedo_ncep/A90S000W
albedo_ncep/AHEADER
We are currently working on a procedure to access higher resolution
terrain and land use data from the USGS (at least to 1 arcsec).
Soil Type and Other Optional Databases:
The laps process 'gridgen_model' described below in section
3.0 can also process soil type, mean annual soil temperature,
and greeness fraction but these are not mandatory data required
in LAPS and therefore we do no describe them here. Soil Type
can however be used in the soil moisture analysis. You'll see
some reference to these data bases below and we have added
paths to this data in our namelist file (nest7grid.parms) but
you should enter dummy paths for these data in the event you
do not have them available. The gridgen_model
process will warn that these data are not available but you
should still see the localization run to completion (ie.,
static.nest7grid is generated).
--- 2.2.5.1 High Resolution Terrain (sub-kilometer) ---
Recently the localization was augmented to accept 30 meter terrain data.
The procedure involves setting up 1 degree tile data from the USGS in
an ArcGIS context, converted from 'adf' format to 'asc'. These tiles are
placed into a path containing the string 'topo_1s' and this path is given
to the 'path_to_topo_30s' variable in 'nest7grid.parms'. This allows the
30m (1s) data to supercede the 900m (30s) data.
High resolution terrain has also been imported (experimentally) into LAPS
via two methods, the WRF Wizard (see section 2.2.7), and Topograbber - see
http://laps.noaa.gov/topograbber/
The WRF Wizard can be used to generate a GEOGRID file on the same grid as
the LAPS analysis. The terrain from this file can be imported during the
LAPS localization by setting the 'nest7grid.parms' namelist path parameter
'path_to_topt30s' to contain the string 'wps' in the directory name.
Also, Topograbber is under development and this might be used with some
further work. The tiles produced may need some modifications to the
'gridgen_model.exe' program so they can be read in. A second way to use
Topograbber with LAPS is to generate a WPS GEOGRID terrain file, and
then read that in during the LAPS/STMAS localization process (see above
paragraph).
--- 2.2.6 Localizing for single or multiple data domains ---
Runtime parameter changes may be needed to tailor LAPS for your
domain(s); this includes ingest and geography data path names,
grid dimensions, grid location, and potentially other aspects of the
data processing. The parameter files are 'data/static/nest7grid.parms',
'data/static/*.nl', and 'data/static/*/*.parms'.
The localization involves several operations. The parameter files are
merged/updated with the repository versions if needed. The dimensions
in the 'cdl' files are also adjusted. Then several executable programs are
run including 'gridgen_model.exe' and 'gensfclut.exe' as per section 3.1.
Below are two mainly equivalent procedures for localizing LAPS to set
up one or more domains. The first is a newer, more efficient (and highly
recommended) method using domain "template" directories. The second is our
original method for localization. You'll want to use either Method 1 or
Method 2 but not both.
--- 2.2.6.1 Localization Method 1 ---
The first method is especially useful if you are using a separated
data tree and/or multiple domains. It is also recommended if you are
doing repeated software updates. Once you learn this method it can save
a lot of time and errors that may occur in the course of using Method 2.
SETTING RUNTIME PARAMETERS
If you are working in a separated data directory (e.g. using the
second tree shown above), you can set up a copy of the runtime
parameter files (for each window) in a new directory (called $TEMPLATE)
with a reduced parameter subset. The $TEMPLATE directory namelist files
should contain only those parameters that need to be changed for each of
the domain(s) from the settings in the repository,
$LAPS_SRC_ROOT/data/static. The remaining unchanged parameters should be
omitted from the $TEMPLATE versions. Otherwise the template namelist
looks exactly like the originally supplied namelist, except that the
comment section should be omitted. The modified $TEMPLATE parameters
generally include map projection settings, data paths, etc. The remaining
fixed parameters will later be automatically merged in from the
'$LAPS_SRC_ROOT/data/static' directory tree by the localization scripts
(next step).
Templates should be maintained in a location separate from the LAPS
distribution and LAPS_DATA_ROOT (e.g. see the template directory in the
tree diagrams above). This avoids them being erased during software
updates and relocalizations. Thus templates can be thought of as more
permanent, since they contain parameters dependent on the local
implementation and relatively independent of software updates. Once you
set up the template directory you'll be ready to run the
'window_domain_rt.pl' script. Here is an idealized example illustrating the
namelist merging process that is done during the localization...
<pre>
template repository tar file localized result
________ ___________________ ________________
$TEMPLATE/vad.nl $LAPS_SRC_ROOT/data/static/vad.nl $LAPS_DATA_ROOT/static/vad.nl
................ ................................. .............................
a=1 a=1
b=5 b=2 b=5
c=3 c=3
d=6 d=4 d=6
</pre>
And here is an example of an actual template for the 'nest7grid.parms'
file...
<pre>
&lapsparms_nl
C80_DESCRIPTION = 'NOAA/GSD LAPS running for Taiwan CWB'
C6_MAPROJ = 'lambrt',
STANDARD_LATITUDE = 10.0,
STANDARD_LATITUDE2 = 40.0,
STANDARD_LONGITUDE = +120.0,
GRID_CEN_LAT = +23.578,
GRID_CEN_LON = +120.91,
GRID_SPACING_M = 9000.,
NX_L = 153,
NY_L = 141,
path_to_topt30s='/home/data_disk/geog/world_topo_30s',
path_to_landuse30s='/home/data_disk/geog/landuse_30s',
path_to_albedo = '/home/data_disk/geog/albedo_ncep',
path_to_raw_profiler='/pj/fsldat/point/profiler/netcdf/',
path_to_qc_acars='/home/data_disk/dat/acars/',
c8_project_common='CWB',
/
</pre>
LOCALIZING with 'window_domain_rt.pl'
Generating new localizations, reconfiguring existing localizations, and
reconfiguring existing localizations without removing lapsprd or log
information is made easier with the perl script
'$LAPSINSTALLROOT/etc/window_domain_rt.pl' ("window" hereafter). The window
script makes use of namelist domain templates that specifically define a
user's localizations. The window script uses environment variables
$LAPS_SRC_ROOT, $LAPSINSTALLROOT, and $LAPS_DATA_ROOT, however, -s, -i,
and -d command-line inputs override those environment variables as
necessary depending on user needs. The -t command-line input specifies the
domain (input) template directory and the script saves the log/lapsprd
history if command line switch '-c' is not used; or, completely removes
$LAPS_DATA_ROOT, then does a 'mkdir $LAPS_DATAROOT' if '-c' is supplied.
The '-w laps' is always required. The window script can be run manually
when configuring or reconfiguring localizations. Window copies the domain
template namelists (partial nest7grid.parms or *.nl's) into a new "static"
subdirectory which, in turn, are merged with the full namelists by script
localize_domain.pl. Recall that $LAPSINSTALLROOT contains bin/ and etc/
while $LAPS_SRC_ROOT contains the untarred full namelists from the
repository. In summary the template parameters are an input of the
localization while the output appears in $LAPS_DATA_ROOT.
In the event that $LAPS_SRC_ROOT does not exist, a data/ subdirectory
containing static/ and cdl/ must be available for use by
'localize_domain.pl' (i.e. $LAPS_SRC_ROOT = $LAPSINSTALLROOT). Even
though it is possible to have $LAPS_SRC_ROOT/data = $LAPSINSTALLROOT/data
= $LAPS_DATA_ROOT, this is not recommended since it does not allow multiple
localizations. Templates will ensure that specific namelist modifications
are merged with the untarred full namelists. Templates also ensure that
specifics to a localization are merged into new software ports and new
namelist variables (available with new software) are merged into existing
localizations.
Examples:
<pre>
setenv LAPS_SRC_ROOT /usr/nfs/common/lapb/operational/laps
setenv LAPSINSTALLROOT /usr/nfs/lapb/operational/laps
setenv LAPS_DATA_ROOT "any new or existing LAPS_DATA_ROOT"
cd $LAPSINSTALLROOT/etc
a) perl window_domain_rt.pl -s $LAPS_SRC_ROOT -i $LAPSINSTALLROOT
-d $LAPS_DATA_ROOT -t "full path to template directory" -w laps -c
result: all required information is provided on the command line.
Window will use the command line info instead of getting
The paths from the environment.
b) perl window_domain_rt.pl -w laps:
result: lapsprd and log saved; operational namelists and cdl's are copied
into $LAPS_DATA_ROOT/static; $LAPSINSTALLROOT/bin/gridgen_model.exe
runs to regenerate static.nest7grid. "Saved" lapsprd and log are
restored into $LAPS_DATA_ROOT.
c) perl window_domain_rt.pl -c -w laps:
result: same as b) although lapsprd and log are removed and regenerated by