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

no monthy or daily if ref_time is not '000000' #282

Merged
merged 5 commits into from
Aug 18, 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
64 changes: 39 additions & 25 deletions src/Applications/LDAS_App/lenkf.j.template
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,45 @@ if( ${LSMCHOICE} == 2 ) then # CatchCN Only
ln -s /discover/nobackup/projects/gmao/ssd/land/l_data/LandBCs_files_for_mkCatchParam/V001/FPAR_CDF_Params-M09.nc4
endif

#######################################################################
# Create HISTORY Collection Directories
#######################################################################

set collections = ''
foreach line ("`cat HISTORY.rc`")
set firstword = `echo $line | awk '{print $1}'`
set firstchar = `echo $firstword | cut -c1`
set secondword = `echo $line | awk '{print $2}'`

if ( $firstword == "::" ) goto done

if ( $firstchar != "#" ) then
set collection = `echo $firstword | sed -e "s/'//g"`
set collections = `echo $collections $collection`
if ( $secondword == :: ) goto done
endif

if ( $firstword == COLLECTIONS: ) then
set collections = `echo $secondword | sed -e "s/'//g"`
endif
end

done:

@ n_c = 0
if ($POSTPROC_HIST > 0) then
foreach ThisCol ($collections)
set ref_t = `cat HISTORY.rc | grep ${ThisCol}.ref_time: | cut -d':' -f2 | cut -d',' -f1`
if ( $ref_t != '000000' ) then
echo ${ThisCol}.ref_time should be '000000'
@ n_c = $n_c + 1
endif
end
endif
if ($n_c >= 1) then
exit
endif

#######################################################################
# Domain Decomposition
#######################################################################
Expand Down Expand Up @@ -368,30 +407,6 @@ while ( $counter <= ${NUM_SGMT} )
endif
end
wait
#######################################################################
# Create HISTORY Collection Directories
#######################################################################

set collections = ''
foreach line ("`cat HISTORY.rc`")
set firstword = `echo $line | awk '{print $1}'`
set firstchar = `echo $firstword | cut -c1`
set secondword = `echo $line | awk '{print $2}'`

if ( $firstword == "::" ) goto done

if ( $firstchar != "#" ) then
set collection = `echo $firstword | sed -e "s/'//g"`
set collections = `echo $collections $collection`
if ( $secondword == :: ) goto done
endif

if ( $firstword == COLLECTIONS: ) then
set collections = `echo $secondword | sed -e "s/'//g"`
endif
end

done:

#######################################################################
# Post-Process model diagnostic output
Expand Down Expand Up @@ -420,7 +435,6 @@ while ( $counter <= ${NUM_SGMT} )
cd $THISMONTH

foreach ThisCol ($collections)

# if monthly exists, move on to the next collection
if (-f $EXPID.${ThisCol}.monthly.$YYYY$MM.nc4) continue

Expand Down