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

"file name specification error" when reading in new namelist file within COSP.

jshaw35

Jonah Shaw
New Member
Hi all,

I am coupling a new version of the COSP satellite simulator package into CAM/CESM2. Within the new COSP code, I read in namelists for different instruments to simulate. The paths to these namelists are passed through the standard "cospsimulator_nl" namelist using modifications to the user_cam_nl file. The code used to read in the namelists works fine in the offline COSP driver, but I am getting errors when that code is now called within CESM.

Specifically, when I attempt to read in a namelist file (/glade/scratch/jonahshaw/20230718_test_atmonlyfast/run/instrument_nls/cosp2_rttov_inst1.txt), I get the following error:

'file name specification error, unit 10, file "Unknown" '

The code used to read in the namelist is below. I have also attached a copy of the namelist file. The "namelist_filepath" variable is set to "/glade/scratch/jonahshaw/20230718_test_atmonlyfast/run/instrument_nls/cosp2_rttov_inst1.txt". If this path does not exist I get an appropriate error ("file not found, unit 10, file"), so I know the code is looking at the correct file.

Any suggestions and advice are appreciated. Thank you!
-- Jonah

The run fails at the read step: read(10,nml=trim(RTTOV_INPUT))


! Read RTTOV namelist fields
namelist/RTTOV_INPUT/Lrttov_bt,Lrttov_rad,Lrttov_refl,Lrttov_cld, & ! Logicals for RTTOV configuration
Lrttov_aer,Lrttov_cldparam,Lrttov_aerparam, & !
Lrttov_pc,nchannels_rec,Lchannel_filepath, &
channel_filepath,rttov_srcDir,rttov_coefDir, &
OD_coef_filepath,aer_coef_filepath,cld_coef_filepath, &
PC_coef_filepath, &
CO2_data,CH4_data,CO_data,N2O_data,SO2_data,ozone_data, & ! User-supplied trace gas concentrations
clw_data, & ! MW option
CO2_mr,CH4_mr,CO_mr,N2O_mr,SO2_mr, & ! Mixing ratios
ipcbnd,ipcreg,npcscores, & ! PC-RTTOV config values
rttov_nthreads,rttov_ZenAng


! Read in namelists
open(10,file=namelist_filepath,status='unknown')
read(10,nml=RTTOV_INPUT)
close(10)
 

Attachments

  • cosp2_rttov_inst1.txt
    4 KB · Views: 0

jedwards

CSEG and Liaisons
Staff member
You didn't point me to the read code, are all of your variables declared and
of the type expected? Also you didn't tell what error you are getting.
 

jshaw35

Jonah Shaw
New Member
Hi Jim,

I pasted the read code at the bottom of the original post. Is there something else that I should provide?

And yes, all of the variables are declared and of the type expected. This code runs without errors using the offline COSP driver.

The error I am getting is: 'file name specification error, unit 10, file "Unknown" '

Best,
Jonah
 

jedwards

CSEG and Liaisons
Staff member
Hi Jonah,

I can try to take a look at this - can you tell me how to reproduce the problem on cheyenne?
 
Top