Open liqy233 opened 1 year ago
Hi Qingyang,
I'm currently using the shortwave and longwave radiation from WRF myself, but I haven't got time to update this in WRF4PALM since this would require a lot of time on testing and I don't have enough time to do this at the moment.
Since WRF4PALM is open source, I have the code I'm using here and hopefully someone will pick this up and contribute to WRF4PALM. I used SWDOWN
and GLW
from WRF as follows
sw_in_wrf = ds_wrf["SWDOWN"].isel(west_east=slice(lon_idx[1]-3,lon_idx[1]+3), south_north=slice(lat_idx[0]-3, lat_idx[0]+3)).sel(time=slice(start, "2023-02-06-01")).mean(dim=["west_east","south_north"])
lw_in_wrf = ds_wrf["GLW"].isel(west_east=slice(lon_idx[1]-3,lon_idx[1]+3), south_north=slice(lat_idx[0]-3, lat_idx[0]+3)).sel(time=slice(start, "2023-02-06-01")).mean(dim=["west_east","south_north"])
and to save the radiation variables in the static driver:
## radiation
nc_output["rad_sw_in"] = xr.DataArray(sw_in_wrf.data, dims=['time_rad'],
attrs={'units':'W/m^2','lod':np.int32(1)})
nc_output["rad_lw_in"] = xr.DataArray(lw_in_wrf.data, dims=['time_rad'],
attrs={'units':'W/m^2','lod':np.int32(1)})
Hope this helps.
Regarding setting up PALM, please get in touch with the PALM team, and if you have any enquiries, they are usually very helpful in their ticket system.
Cheers, Dongqi
Hi Qingyang,
I'm currently using the shortwave and longwave radiation from WRF myself, but I haven't got time to update this in WRF4PALM since this would require a lot of time on testing and I don't have enough time to do this at the moment.
Since WRF4PALM is open source, I have the code I'm using here and hopefully someone will pick this up and contribute to WRF4PALM. I used
SWDOWN
andGLW
from WRF as followssw_in_wrf = ds_wrf["SWDOWN"].isel(west_east=slice(lon_idx[1]-3,lon_idx[1]+3), south_north=slice(lat_idx[0]-3, lat_idx[0]+3)).sel(time=slice(start, "2023-02-06-01")).mean(dim=["west_east","south_north"]) lw_in_wrf = ds_wrf["GLW"].isel(west_east=slice(lon_idx[1]-3,lon_idx[1]+3), south_north=slice(lat_idx[0]-3, lat_idx[0]+3)).sel(time=slice(start, "2023-02-06-01")).mean(dim=["west_east","south_north"])
and to save the radiation variables in the static driver:
## radiation nc_output["rad_sw_in"] = xr.DataArray(sw_in_wrf.data, dims=['time_rad'], attrs={'units':'W/m^2','lod':np.int32(1)}) nc_output["rad_lw_in"] = xr.DataArray(lw_in_wrf.data, dims=['time_rad'], attrs={'units':'W/m^2','lod':np.int32(1)})
Hope this helps.
Regarding setting up PALM, please get in touch with the PALM team, and if you have any enquiries, they are usually very helpful in their ticket system.
Cheers, Dongqi
Dear Prof. Dr. Dong Qi, I am confused now about the lon_idx and lat_idx in this hint code. So which parameters are they refer to? Are the radiation parameters only the mean of radiation power in a small area?
Thanks for your help! Besti, Qian
Dear Prof. Dr. Dong Qi, I am confused now about the lon_idx and lat_idx in this hint code. So which parameters are they refer to? Are the radiation parameters only the mean of radiation power in a small area?
Thanks for your help! Besti, Qian
Hi there,
Here the lon_idx and lat_idx point to the location of the PALM domain centre inside the WRF grid. In this case, we have a WRF domain with 1 km grid spacing and our PALM domain is approximately 6 km by 6 km (hence the indices have -3 and +3 in each direction). Because WRF land use information doesn't always match the land use info in PALM, I took the spatially averaged SW and LW for the radiation forcing.
So the code here only gives a spatial averaged time series of SW and LW, which has been sufficient for our simulations. If you want to have a 3D (time, y, x) radiation forcing, there's more to be done in the code and please also refer to PALM's data input standard to modify the variables in the dynamic driver.
Hope that helps.
Hello my dear Dongqi Lin, I want to add the radiation scheme in simulation.When I use WRF4PALM version1.0, I find that you set clear-sky radiation scheme in p3d in your artical. And I want to figure out whether using clear-sky scheme can accurately simulation temperature and other elements. So I view on radiation parameters in the website of PLAM, I notice that "The external radiation input using shortwave and longwave downflow radiation can be obtained from observations or mesoscale models. Note that in the case of nested runs, each submodel will read radiation input from its own dynamic input file".However, I browse the WRF4PALM version 1.1.2, it still can't output shortwave and longwave downflow radiation from the WRF.So,I would like to ask you, will you consider processing and outputting these two variables in the future. by the way, I am an Chinese graduate student, I have lots of questions about the setting of PALM. I read in your article that Jiawei Zhang mentioned in the acknowledgment that he helped you with setting up PALM.Can I add his contact information?If not, please forgive me for taking the liberty.I am looking forward to your reply. Thanks, Qingyang Li