diff --git a/python/global_data_process.py b/python/global_data_process.py index f1b78060..97167c36 100644 --- a/python/global_data_process.py +++ b/python/global_data_process.py @@ -10,18 +10,17 @@ import os import sys from datetime import datetime, timedelta, timezone + import numpy as np from netCDF4 import Dataset from pysolar.solar import get_altitude from scipy.interpolate import griddata - """User Arguments""" # Time: yyyymmddhhfff timelist = sys.argv[1] timelist = np.array(timelist.split(",")).astype(str) - """User Options""" path = "/groups/ESS/whung/canopy_wind/gfsv16_test_data" # work directory ref_lev = 10 # reference height (m, a.g.l.) @@ -194,7 +193,6 @@ def read_frp_local(filename, lat, lon, fill_value): HH = inputtime[8:10] # hour in UTC FH = inputtime[10:] # forecast hour, for met file only - # input/output files f_met = ( path + "/gfs.t" + HH + "z." + YY + MM + DD + ".sfcf" + FH + ".nc" @@ -271,7 +269,7 @@ def read_frp_local(filename, lat, lon, fill_value): print("-----------!!!WARNING!!!-------------") print("---!!!Climatological FRP is used!!!--") - os.system("cp " + f_met + " " + f_output) # copy gfs met file for appending + os.system("cp " + f_met + " " + f_output) # copy gfs met file for appending """Reading dimensions""" print("------------------------------------") @@ -296,7 +294,6 @@ def read_frp_local(filename, lat, lon, fill_value): print("lat", lat.shape) print("lon", lon.shape) - """Adding canvar""" print("------------------------------------") print("---- Generating canopy variables...") @@ -347,7 +344,7 @@ def read_frp_local(filename, lat, lon, fill_value): DATA = (-1 * den * Cp * t2m * (fricv**3)) / (K * g * shtfl) DATA[DATA > 500] = 500 DATA[DATA < -500] = -500 - + del [readin, t2m, fricv, shtfl] elif varname == "csz":