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

Interpolating input data from WACCM to CAM-chem

James King

James King
Member
Hi all,

I would like to interpolate some initial conditions from WACCM (70 vertical levels) to use in a CAM-chem run (32 vertical levels) using the interpic tool. I can see that a 32-level case is non-standard in the script 'create_template.ncl' which is required to run interpic. Sure enough, create_template.ncl fails when I try to run it with the settings I need:

nlat = 192; ; Number of latitudes
nlon = 288; ; Number of longitudes
nlev = 32; ; Number of vertical levels

How would I go about editing create_template.ncl to work for this instance? I see lots of NCL code, but I don't know the language and don't want to break other parts of the script through incompetent spannering.
Both the input file I have and the file I am trying to produce are on the same FV lon/lat grid so I have assumed that I don't need to use the truncation options and that the grid type is 'staggered'. I've attached my model version info and the version of create_template.ncl I'm trying to use. Any advice would be greatly appreciated.

Best,

James
 

Attachments

  • create_template.txt
    9.6 KB · Views: 5
  • version_info.txt
    6.2 KB · Views: 5

nusbaume

Jesse Nusbaumer
CSEG and Liaisons
Staff member
Hi James,

Have you tried using interpic_new instead? It is located in the same tools directory as interpic, and is built the same way, but the advantage is that you don't need to use NCL to create a template file. Instead I think you just need to pass in a netcdf file that contains the associated grid variables, most of which I believe exist in CAM/WACCM output files already. The README file for the "new" tool should contain a more complete description and instructions.

Of course if that tool doesn't work either then please let me know.

Thanks, and have a great day!

Jesse
 

James King

James King
Member
Hi Jesse,

Thanks, I'll give this a go! From the README file, the syntax for interpic_new is:

interpic -t template.nc inputfile.nc outputfile.nc

with the implication that 'template.nc' can be any file with the same x/y/z coordinates as the required output.

Best,

James
 

ohmpawat

ohmpawat chen
Member
Hi Jesse,

Thanks, I'll give this a go! From the README file, the syntax for interpic_new is:

interpic -t template.nc inputfile.nc outputfile.nc

with the implication that 'template.nc' can be any file with the same x/y/z coordinates as the required output.

Best,

James
Hi, have you solve the problem? I recently encounter the same question but I don't know how to use the tool "interpic". Could you give me some tips about it? Thanks in advance!

Best,

ohmpawat
 

ohmpawat

ohmpawat chen
Member
Hi, James,

I use CESM2.1.3, I think the problem is that I don't know how to compile it. Because I don't understand the Makefile. I would appreciate it if you could help me to understand! Thanks a lot!

Best,
ohmpawat
 

ohmpawat

ohmpawat chen
Member
Hi Ohmpawat,

Which version of CESM are you using?

James
Besides, I have change the LIB_NETCDF and INC_NETCDF, and I think I should change the FC, FFLAGS and LDFLAGS. But I don't know how to change them. Attach my Makefile and make_log file.

Best,
ohmpawat
 

Attachments

  • Makefile.txt
    3.7 KB · Views: 4
  • make_log.txt
    5.8 KB · Views: 3

James King

James King
Member
Hi Ohmpawat,

In CESM2.1.3/components/cam/tools there is a directory called 'interpic_new'. Running gmake in this directory should install the interpic executable which you then use following the syntax:

interpic -t template.nc inputfile.nc outputfile.nc

If you're working on Cheyenne, you can load the 'ncarcompilers' module which includes it.

I'm not sure why you would need to change those environment variables for this. Are you working on an NCAR system?

James
 

ohmpawat

ohmpawat chen
Member
Hi James,

I'm not a Cheyenne user so I need to change the file to compile. Now I seem to install the interpic. However, when I use the syntax: interpic -t template.nc inputfile.nc outputfile.nc, there is a error: bash: interpic: command not found... .I don't know what's wrong. Do you have any tips? Thanks!

Best,

ohmpawat
 

Ceil

Member
Besides, I have change the LIB_NETCDF and INC_NETCDF, and I think I should change the FC, FFLAGS and LDFLAGS. But I don't know how to change them. Attach my Makefile and make_log file.

Best,
ohmpawat
Hi Ohmpawat,

I have the same error as your make_log.txt shows. Could you tell me how did you solve the problem and successfully install the interpic? I have struggled for this problem for a long time. Many thanks!
 
Top