Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix for subdaily2daily nc4 file concatenation (post-proc) #200

Merged
merged 1 commit into from
Apr 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions src/Applications/LDAS_App/lenkf.j.template
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ while ( $counter <= ${NUM_SGMT} )
# create daily and remove the sub-daily
# ------------------------------------------------------------------
set day=1
while ($day <= $NDAYS && $LEN_SUB > 1)
while ($day <= $NDAYS)
if ( $day < 10 ) set DD=0${day}
if ( $day >= 10 ) set DD=${day}
@ day++
Expand Down Expand Up @@ -450,19 +450,9 @@ EOF

# not enough days? move on to the next collection
if($NAVAIL != $NDAYS) continue

set time_steps = `ls -1 $EXPID.$ThisCol.${YYYY}${MM}01* | rev | cut -d'.' -f2 | rev`
set LEN_SUB = `echo $#time_steps`
@ LEN_AVAIL = $LEN_SUB * $NDAYS

# not enough sub-daylies? move on to the next collection
if ($LEN != $LEN_AVAIL) continue


# create the monly average
#ncrcat -h $EXPID.$ThisCol.${YYYY}${MM}* ${EXPID}.${ThisCol}.$YYYY$MM.nc4
#ncra -h $EXPID.${ThisCol}.$YYYY$MM.nc4 $EXPID.${ThisCol}.monthly.$YYYY$MM.nc4

#/bin/rm $EXPID.${ThisCol}.$YYYY$MM.nc4

ncra -h $EXPID.$ThisCol.${YYYY}${MM}??.nc4 ${EXPID}.${ThisCol}.monthly.$YYYY$MM.nc4

# don't want a daily? delete the daily and sub-dailies and continue
Expand Down