Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Interpolate Cubed Sphere Grid (FV3) to Latitude-Longitude grid

Jeremy_CESM2

Jeremy Garcia
New Member
Hi everyone,

I am using CESM 2.2 model.

I did a experiment with:

./create_newcase --case ~/cases/FHIST.month.1.0 --res f09_g17 --compset FHIST --run-unsupported

RUN_STARTDATE=1997-08-01

It was runned for 8 months . I got an output every month . I was easy to plot in python because I got the output of files of following way using Python: lat:192 lon:288 time:8 lev:32 ilev:33 nbnd:2

But, my problem is the following :

When , I did the following experiments:

./create_newcase --case ~/cases/ERP_D_Ln9.C48_mg17.QPC6.test --compset QPC6 --res C48_C48_mg17
./create_newcase --case ~/cases/ERP_D_Ln9.C96_mg17.QPC6.test --compset QPC6 --res C96_C96_mg17

These cases use Cubed Sphere Grid (FV3) : (C48 = 2degree resolution, C96=1degree)

Using python with the ouput of files I got the following :

  • Dimensions:
    • time: 8
    • ncol: 13824
    • lev: 32
    • ilev: 33
    • nbnd: 2
I got a new dimension called ncol. I don't have experience working with this kind of format. Can someone to help me how to interpolate this kind of unstructured mesh to a mesh of latitude-longitude , maybe using Python, NCO or CDO? . Thanks
 

strandwg

Moderator
Staff member
I moved this to the CAM forum.

The NCO application "ncremap" can be used to interpolate from the C48 and C96 grids to other grids, however, I don't see there's a mapfile that goes from C48 to finite volume one degree.

Someone from AMP may have this mapfile.
 

jet

Member
Hi Jeremy,

This is the procedure I use which creates a map file using the ESMF regridweightgen utility and 2 scrip grid files. Once you have a map you can use the nco utility ncremap to regrid your file. I will remap to f09 which is a 1 degree rectilinear (lat/lon) grid.

Scrip grid files representing the source and destination grids used by the ESMF utility file can be found at:

If you have access to Cheyenne you can load the following modules for ESMF and nco.

module load esmf_libs
module load esmf-8.2.0-ncdfio-mpiuni-O
module load nco/4.7.9

set srcgrid=C96
set dstgrid=f09
set srcgridfile=/glade/p/cesmdata/inputdata/share/scripgrids/C96_SCRIP_desc.181018.nc
set dstgridfile=/glade/p/cesmdata/inputdata/share/scripgrids/fv0.9x1.25_141008.nc
set srcinitfile=***existing fv3 file with fullpath that you want to regrid
set dstinitfile= name of regridded file, I use srcinitfile with .regrid.f09.nc appended

#create the map file
ESMF_RegridWeightGen --ignore_unmapped -m conserve -w map_${srcgrid}_to_${dstgrid}_aave.nc -s ${srcgridfile} -d ${dstgridfile}

#use the mapfile to remap srcinitfile to dstinitfile
ncremap -m ./map_${srcgrid}_to_${dstgrid}_aave.nc -i ${srcinitfile} -o ${dstinitfile}
 

Jeremy_CESM2

Jeremy Garcia
New Member
Hi John,

Thanks for sharing the details to interpolate FV3 to lat-lon.

Yes, I have access to Cheyenne.


I did all the steps that you mentioned. It works well. I got the output of file converted in lat-lon. When I did the vizualiation using the software ncview, the results were not good. There is exist some fail with the interpolation.


I did two interpolation for the case of C96(1 degree resolution) and C48(2 degree resolution)


1) First Case: C48

module load esmf_libs
module load esmf-8.2.0-ncdfio-mpiuni-O
module load nco/4.7.9

set srcgrid=C48
set dstgrid=f19
set srcgridfile=/glade/p/cesmdata/inputdata/share/scripgrids/C48_SCRIP_desc.181018.nc
set dstgridfile=/glade/p/cesmdata/inputdata/share/scripgrids/fv1.9x2.5_141008.nc
set srcinitfile=***existing fv3 file with fullpath that you want to regrid
set dstinitfile= name of regridded file, I use srcinitfile with .regrid.f19.nc appended

#create the map file
ESMF_RegridWeightGen --ignore_unmapped -m conserve -w map_${srcgrid}_to_${dstgrid}_aave.nc -s ${srcgridfile} -d ${dstgridfile}

#use the mapfile to remap srcinitfile to dstinitfile
ncremap -m ./map_${srcgrid}_to_${dstgrid}_aave.nc -i ${srcinitfile} -o ${dstinitfile}


I plot the variable PRECC (convective precipitation rate) using ncview. I got the following

1661517988857.png

It is rare the results. I think.


1) Second Case: C96

module load esmf_libs
module load esmf-8.2.0-ncdfio-mpiuni-O
module load nco/4.7.9

set srcgrid=C96
set dstgrid=f09
set srcgridfile=/glade/p/cesmdata/inputdata/share/scripgrids/C96_SCRIP_desc.181018.nc
set dstgridfile=/glade/p/cesmdata/inputdata/share/scripgrids/fv0.9x1.25_141008.nc
set srcinitfile=***existing fv3 file with fullpath that you want to regrid
set dstinitfile= name of regridded file, I use srcinitfile with .regrid.f09.nc appended

#create the map file
ESMF_RegridWeightGen --ignore_unmapped -m conserve -w map_${srcgrid}_to_${dstgrid}_aave.nc -s ${srcgridfile} -d ${dstgridfile}

#use the mapfile to remap srcinitfile to dstinitfile
ncremap -m ./map_${srcgrid}_to_${dstgrid}_aave.nc -i ${srcinitfile} -o ${dstinitfile}


I plot the variable PRECC (convective precipitation rate) using ncview. I got the following



1661518314270.png

This results is not good also.


Can you advise me why my interpolations is failing or that should I modify to get better results. Thanks
 

jet

Member
Hi Jeremy:

I don't think there is an issue with interpolation. When I see a problem with interpolation the model fields are not smooth and are obviously noisy. If you are comparing the results from the FV and FV3 runs and seeing a big difference, then the issue is that you are running 2 different compsets for your tests. The first test using FV was an FHIST run which is a historical forced atmosphere run which will give a precip field that is pre-industrial but should be similar to what you would see in present day from a GCM. The FV3 runs are QPC6 which are aquaplanet (no land) and have different forcing presets which generally will show precip along the equator. The aquaplanet results will look very different from the FHIST. I'm not that familar with aquaplanet results but can get someone else to look at those if you feel the aquaplanet results look to be in error.

jt
 
Top