; --------------------------------------------------------------------------- ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Program Name: combine_nc.ncl ; ; ; ; National Water Model (NWM) WRF-hydro forcing engine is developed by ; ; National Center for Atmospheric Research (NCAR), under the sponsorship ; ; of National Water Center (NWC). ; ; ; ; Team Members: ; ; NCAR Staff: Linlin Pan, Wei Yu, and David Gochis ; ; NWC/OWP Staff: Brian Cosgrove, Zhengtao Cui, Cham Pham, and James Taft ; ; ; ; This is a ncl program to perform regridding for the long range forcing. ; ; ; ; Input: source file, ; ; ; ; Output: combined file ; ; ; ; For non-fatal errors output is witten to $DATA/logs ; ; ; ; Author(s)/Contact(s): Linlin Pan, lpan@ucar.edu ; ; Origination Sept., 2015 ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; begin uFile = getenv("uFile") ; u wind data vFile = getenv("vFile") ; v wind data swFile = getenv("swFile") ; sw data lwFile = getenv("lwFile") ; lw data prFile = getenv("prFile") ; prate data presFile = getenv("presFile") ; pres data qFile = getenv("qFile") ; q data tFile = getenv("tFile") ; t data outFile = getenv("outFile") ; out data fu = addfile(uFile,"r") fv = addfile(vFile,"r") fsw = addfile(swFile,"r") flw = addfile(lwFile,"r") fpr = addfile(prFile,"r") fpres = addfile(presFile,"r") fq = addfile(qFile,"r") ft = addfile(tFile,"r") system("rm -f "+outFile) fout = addfile(outFile,"c") fout->forecast_time = fu->forecast_time fout->initial_time = fu->initial_time fout->latitude = fu->latitude fout->longitude = fu->longitude fout->ugrd = fu->ugrd fout->vgrd = fv->vgrd fout->dlwsfc = flw->dlwsfc fout->dswsfc = fsw->dswsfc fout->q2m = fq->q2m fout->tmp2m = ft->tmp2m fout->pressfc = fpres->pressfc fout->prate = fpr->prate end