; --------------------------------------------------------------------------- ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Program Name: combine_noIndex.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: hrrr file, gfs/rap file, output 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 hrrrFile = getenv("hrrrFile") ; HRRR data gfsFile = getenv("gfsFile") ; GFS data outFile = getenv("outFile") ; outFile data f1 = addfile(hrrrFile,"r") f2 = addfile(gfsFile,"r") system("rm -f "+outFile) fout = addfile(outFile,"c") dd = dimsizes(f1->T2D) print("dd="+dd) dimlat = dd(0) dimlon = dd(1) v1d = ndtooned(f1->T2D) T2D = onedtond(v1d,(/dimlat,dimlon/)) fout->T2D = T2D ; Downward long wave radiation using GFS. v1d = ndtooned(f2->LWDOWN) LWDOWN = onedtond(v1d,(/dimlat,dimlon/)) fout->LWDOWN = LWDOWN v1d = ndtooned(f1->Q2D) Q2D = onedtond(v1d,(/dimlat,dimlon/)) fout->Q2D = Q2D v1d = ndtooned(f1->U2D) U2D = onedtond(v1d,(/dimlat,dimlon/)) fout->U2D = U2D v1d = ndtooned(f1->V2D) V2D = onedtond(v1d,(/dimlat,dimlon/)) fout->V2D = V2D v1d = ndtooned(f1->PSFC) PSFC = onedtond(v1d,(/dimlat,dimlon/)) fout->PSFC = PSFC v1d = ndtooned(f1->RAINRATE) RAINRATE = onedtond(v1d,(/dimlat,dimlon/)) fout->RAINRATE = RAINRATE v1d = ndtooned(f1->SWDOWN) SWDOWN = onedtond(v1d,(/dimlat,dimlon/)) fout->SWDOWN = SWDOWN v1d = ndtooned(f1->WEASD) WEASD = onedtond(v1d,(/dimlat,dimlon/)) fout->WEASD = WEASD end