Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Undefined fields / stream_list variable "not in input file"

kalassak

New member
Hello, it has been a while since I've posted here. I haven't really done much testing with MPAS in the intervening time, but I am experimenting with it again.

I've been trying to add new variables listed in the User's Guide to stream_list.atmosphere.output, but this doesn't seem to work. In particular I was interested in generating the output of olrtoa, rainncv, snowncv, graupelncv, and cldfrac. However, when I add these variables to the stream_list, they do not get output to the history files. Instead, I get an error in the log:

Code:
WARNING: Variable olrtoa not in input file.
ERROR: MPAS IO Error: Undefined field
WARNING: Variable rainncv not in input file.
ERROR: MPAS IO Error: Undefined field
WARNING: Variable snowncv not in input file.
ERROR: MPAS IO Error: Undefined field
WARNING: Variable graupelncv not in input file.
ERROR: MPAS IO Error: Undefined field
WARNING: Variable cldfrac not in input file.
ERROR: MPAS IO Error: Undefined field

I double checked to make sure this error wasn't itself erroneous, but indeed none of the desired variables appear in the history files.

Then, I thought perhaps that if the variable is "not in [the] input file" that I would need to "initialize" those variables from the GFS model data into init.nc by rerunning init_atmosphere_model, but I did that and it didn't change any behavior. Ultimately, I didn't really expect it to as the tutorial doesn't copy over the stream_list data until it's needed for the model run step.

Interestingly, I notice that olrtoa was already in stream_list.atmosphere.diagnostics and the variable does get written to the diag files... So I tried to plot it from a diagnostic file, but they don't have the requisite variables defining the cell properties or something (I'm not sure, I didn't look into it too hard - it could be some other format difference that I did not account for, I just tried feeding the diag file as input instead of the normal history file) so I wasn't able to look into it any further.

Any insight as to why MPAS can't seem to "find" the variables to output to the history files or if I've done something very simple wrong here? It seems like they should already be computed by default.
 

Attachments

  • namelist.atmosphere.txt
    1.7 KB · Views: 2
  • streams.atmosphere.txt
    1.6 KB · Views: 2
  • stream_list.atmosphere.output.txt
    969 bytes · Views: 1
  • log.atmosphere.0000.out.txt
    62.9 KB · Views: 1
Last edited:
My guess is that the issue is related to the overwriting of existing history files that do not have, e.g., olrtoa, with new history output that does contain olrtoa etc.

In the streams.atmosphere file, the "overwrite" option for clobber_mode might not be exactly what you want: that option attempts to keep existing NetCDF files intact while just replacing the contents of fields; however, if new fields need to be defined in the NetCDF file, errors may occur because the MPAS stream manager doesn't place the NetCDF files back into define mode. Instead, I think the "truncate" (or "replace_files") option for clobber_mode may be a better choice.

Apologies for the misleading error messages
WARNING: Variable olrtoa not in input file.
ERROR: MPAS IO Error: Undefined field
WARNING: Variable rainncv not in input file.
ERROR: MPAS IO Error: Undefined field
WARNING: Variable snowncv not in input file.
ERROR: MPAS IO Error: Undefined field
WARNING: Variable graupelncv not in input file.
ERROR: MPAS IO Error: Undefined field
WARNING: Variable cldfrac not in input file.
ERROR: MPAS IO Error: Undefined field
though. I suppose in this case the messages should say something to the effect that the variable isn't already in the file being written. I'll make a point to see if we can correct these messages in the next model release, which will appear before the WRF/MPAS Users's Workshop in June.
 
Oh, indeed, thank you! I was also able to fix it by just deleting the history files. I will switch over to "truncate" then, as I would just like the files to be overwritten if the sim is rerun.
 
Top