#!/bin/bash

i=`ncdump -h $1 | head | grep 'currently'`
n=`echo $i | sed 's/.*(//; s/ cur.*//'`
m=`echo $1 | sed 's/.*-//; s/.nc//'`


if [[ $m == "02" ]]; then
    if [[ $n == 672 ]] || [[ $n == 696 ]]; then
	b="PASS"
    else
	b="FAIL"
    fi
    
elif [[ $m == "04" ]] || [[ $m == "06" ]] || [[ $m == "09" ]] || [[ $m == "11" ]]; then
    if [[ $n == 720 ]]; then
	b="PASS"
    else
	b="FAIL"
    fi    
else
    if [[ $n == 744 ]]; then
	b="PASS"
    else
	b="FAIL"
    fi
fi

echo "$1 - $n : $b"

#ncdump -h $1 | head
