Hi all,
I am working on a WRF simulation where I modify ERA5 SST boundary conditions and trying to replace the original, time-varying ones with SSTs that linearly dampen over time to a particular state that are then held constant over the rest of the simulation. I am using the pre-compiled WRF model on Cheyenne.
The issue I am running into is that after I make the modification from the original GRIB file, I use the cfgrib package in Python to write the modified dataset to a GRIB file, but it is a GRIB2 file, while the original was GRIB1. I can’t find a way to write it to GRIB1 directly from that package. Then I tried just converting the GRIB2 file to GRIB1 format, but that was giving me issues as well. I also tried doing ungrib.exe separately for the SSTs but it could not find the times for some reason?
Lastly, I was trying to look into a way to just avoid using ungrib.exe by writing a netCDF of the modified SSTs to an intermediate file (see https://www2.mmm.ucar.edu/wrf/src/netcdf-to-intermediate.f) but I’m not super familiar with fortran code. That seems like a more complicated route versus just using a GRIB file and using ungrib.exe, but it sounds like doing it from nc to intermediate files has worked for some in the past.
I know some previous posts have been made about both using ungrib.exe on different GRIB file types ((RESOLVED) ungrib treats grib2 data as grib1) as well as using netCDF to intermediate files as the boundary conditions (NetCDF as input and Error to compile netcdf-to-intermediate.f program).
Would there be an easier/better way to go about this? Thank you for any insight you have!
Sincerely,
Evan
I am working on a WRF simulation where I modify ERA5 SST boundary conditions and trying to replace the original, time-varying ones with SSTs that linearly dampen over time to a particular state that are then held constant over the rest of the simulation. I am using the pre-compiled WRF model on Cheyenne.
The issue I am running into is that after I make the modification from the original GRIB file, I use the cfgrib package in Python to write the modified dataset to a GRIB file, but it is a GRIB2 file, while the original was GRIB1. I can’t find a way to write it to GRIB1 directly from that package. Then I tried just converting the GRIB2 file to GRIB1 format, but that was giving me issues as well. I also tried doing ungrib.exe separately for the SSTs but it could not find the times for some reason?
Lastly, I was trying to look into a way to just avoid using ungrib.exe by writing a netCDF of the modified SSTs to an intermediate file (see https://www2.mmm.ucar.edu/wrf/src/netcdf-to-intermediate.f) but I’m not super familiar with fortran code. That seems like a more complicated route versus just using a GRIB file and using ungrib.exe, but it sounds like doing it from nc to intermediate files has worked for some in the past.
I know some previous posts have been made about both using ungrib.exe on different GRIB file types ((RESOLVED) ungrib treats grib2 data as grib1) as well as using netCDF to intermediate files as the boundary conditions (NetCDF as input and Error to compile netcdf-to-intermediate.f program).
Would there be an easier/better way to go about this? Thank you for any insight you have!
Sincerely,
Evan