Issues with int2nc.exe

alexjt

New member
I am trying to create my own intermediate files in Python using CESM2 Large Ensemble output and have run into some issues with the generated intermediate files. For example, I am writing surface U-winds as 10-m U winds (UU @ xlvl=200100) and then proceeding to write each isobaric level for UU (100000 Pa to 1000 Pa). The intermediate file appears to be produced without error.

However, when I try to convert the intermediate file into a netCDF file for ease of viewing using int2nc.exe, I come across this error:

OPENING FILE: CESM2LE_1191.010:2036-09-24_06
Reading Field, Level: LANDSEA, 200100
Reading Field, Level: SOILHGT, 200100
Reading Field, Level: SKINTEMP, 200100
Reading Field, Level: TAVGSFC, 200100
Reading Field, Level: ST000010, 200100
Reading Field, Level: ST010040, 200100
Reading Field, Level: ST040100, 200100
Reading Field, Level: ST100200, 200100
Reading Field, Level: SM000010, 200100
Reading Field, Level: SM010040, 200100
Reading Field, Level: SM040100, 200100
Reading Field, Level: SM100200, 200100
Reading Field, Level: PMSL, 201300
Reading Field, Level: PSFC, 200100
Reading Field, Level: UU, 200100
Reading Field, Level: UU, ******
Reading Field, Level: UU, ******
NetCDF: String match to name in use
Stopped

It appears that there is a problem with the way that UU is being handled with the surface values (xlvl=200100) and the other values at vertical levels. Any insight into why this issue is occurring and what I can do to fix it would be greatly appreciated.

I attached my Python script for converting processed CESM2 output into intermediate files (convert_pl_2036_py.txt) and an example intermediate file that this script produces (CESM2LE_1191.010/2036-09-24_12, uploaded on the NextCloud storage site).
 

Attachments

This issue has been SOLVED. The problem was an incorrect scaling factor applied to vertical levels when creating the intermediate files. For example, instead of the surface level being 200100., the value instead was inadvertently 20010000. This threw off the program when converting the intermediate file.
 
@alexjt
Many thanks for the update and the python script, which will be helpful for many users who want to drive WRF using CESM outputs.
Thanks again !
 
Back
Top