#!/bin/perl sub return_mdates; sub return_update; #RR#$basep="/disk065/centers/nco/WWW/PMB/nwprod/analysis"; #$basep="/usr/people/nco/WWW/PMB/nwprod/analysis"; if ($ENV{BASEDIR}) {$basep=$ENV{BASEDIR}; } else { die "You must define environment variable BASEDIR.\n"; } if ($ENV{DEVELOP}) { $basep="$basep/temp"; } $modfile="index${modsuf}.shtml"; open MDF, ">$basep/$modfile" or die "Couldn't write to $modfile.\n"; @ctime=localtime(time); @ctime[4]++; if (@ctime[2] < 10) { @ctime[2]="0@ctime[2]"; } if (@ctime[1] < 10) { @ctime[1]="0@ctime[1]"; } print MDF <<"EOF"; National Centers for Environmental Prediction

National Centers for Environmental Prediction

Model Analyses and Forecasts

  • Three image resolutions are currently available:
    • coarse (640x480 image size, approximately 37 kilobytes per image),
    • medium (1024x768 image size, approximately 70 kilobytes per image),
    • fine (1280x1024 image size, approximately 100 kilobytes per image)
  • Four panel charts only display coarse resolution images.
  • The date given below for each model run cycle refers to its most recent run date.
To view model images, click on the desired image resolutions in the table below.

EOF if ($ENV{MODELDATES}) { $datefile=$ENV{MODELDATES}; } else { print "need to set MODELDATES environment variable.\n"; exit(1); } open ODATE, "<$datefile" or die "Couldn't read $datefile.\n"; $i=0; while($dline=) { chomp($dline); @line[$i++]=$dline; } close ODATE; $modnum=@line; %short_mo=("01","Jan","02","Feb","03","Mar","04","Apr","05","May","06","Jun","07","Jul","08", "Aug","09","Sep","10","Oct","11","Nov","12","Dec"); $model="nam"; print MDF <<"EOF"; EOF return_mdates; foreach $cycle ("00","06","12","18") { return_update; print MDF <<"EOF"; EOF } $model="avn"; print MDF <<"EOF"; EOF return_mdates; foreach $cycle ("00","06","12","18") { return_update; print MDF <<"EOF"; EOF } $model="mrf"; return_mdates; $cycle="00"; return_update; print MDF <<"ELF"; EOF $model="ngm"; print MDF <<"EOF"; EOF return_mdates; foreach $cycle ("00","12") { return_update; print MDF <<"EOF"; EOF } print MDF <<"EOF";
  00 UTC

06 UTC

12 UTC

18 UTC

NAM coarse
medium
fine

4-panel charts

$da-$short_mo{$mo}-$yr
GFS coarse
medium
fine

4-panel charts

$da-$short_mo{$mo}-$yr
MRF ELF print MDF <<"EOF"; coarse
medium
fine

4-panel charts

$da-$short_mo{$mo}-$yr

-

-

-

NGM coarse
medium
fine

4-panel charts

$da-$short_mo{$mo}-$yr
-

Created: 17-Jul-01, Last updated:
EOF exit 0; sub return_mdates { for ($i=0;$i<$modnum;$i++) { ($modl,$cycls)=split /:/,@line[$i],2; if ($modl =~ /$model/) { @mline=split /:/,$cycls; }; } return 0; } sub return_update { $cycn=@mline; for ($i=0;$i<$cycn;$i++) { ($cyc,$date)=split /-/,@mline[$i]; if ($cyc =~ /$cycle/) { $au=$date; } } $mo=substr($au,0,2); $da=substr($au,2,2); $yr=substr($au,4,2); return 0; }