Problems creating bioseason file


I am attempting to run a spring and fall simulation, so I need to create a bioseason file for my domain. As opposed to running the whole year, I want to run only an october & april month (with spinup in the month previous, but I created dummy files to make metcro* files for sept & march as well). I have been attempting to use m3scan to create this bioseason file, but it is not working.

I used ncrcat METCRO2D* to create the 1 file, all timesteps required for m3scan. The m3scan utility still says it does not recognize the time:

     Value for PROMPTFLAG:  N returning FALSE
     Returning default value TRUE for query:
     "Continue with program?"
     Value for TMPR_VAR:  'TEMP2'
     Value for TMPR_VAR:  'TEMP2'
     Value for N_S_HEMI:  'NORTH'
     Value for N_S_HEMI:  'NORTH'
     Value for PROMPTFLAG:  N returning FALSE
     Value for IOAPI_CHECK_HEADERS not defined;returning default:   FALSE
     "MET_CRO_3D" opened as OLD:READ-ONLY   
     File name "/projects/b1045/wrf-cmaq/output/Chicago_LADCO/wrf_pure_201810/mcip/d03/METCRO2D_2018_ChicagoLADCO_d03"
     File type GRDDED3 
     Execution ID "????????????????"
     Grid name "METCRO_ChicagoLA"
     Dimensions: 288 rows, 315 cols, 1 lays, 34 vbles
     NetCDF ID:     65536  opened as READONLY            
     Starting date and time  2018244:000000 (0:00:00   Sept. 1, 2018)
     Timestep                          010000 (1:00:00 hh:mm:ss)
     Maximum current record number      1575
     >>--->> WARNING in subroutine RDTFLAG
     Time step not available in file MET_CRO_3D       for variable TEMP2
     M3WARN:  DTBUF 1:00:00   Sept. 2, 2018 (2018245:010000)
     *** ERROR ABORT in subroutine METSCAN
     ERROR: Could not read variable "TEMP2" from file  "MET_CRO_3D

I have the 2016 beta and alpha platform of smoke, using v4.5. Is my issue that I need to use m3xtract to create the megafile? When I try to make the single file only contain temp2, the error is that the program cannot open the tile.

So I guess in brief, my question is: 1) Do I need to create a bioseason file for an entire year? 2) Do I need to use m3xtract to create the large file? 3) Can only 1 variable exist in the file for m3scan?

This is my script to create the bioseason file:

setenv INSTALL_DIR /projects/b1045/SMOKE.EMF/2016_beta

setenv GRID ChicagoLADCO_d03 # should match GRIDDESC
setenv MET_ROOT /projects/b1045/wrf-cmaq/output/Chicago_LADCO/wrf_pure_201810/mcip/d03
setenv OUT_PATH $INSTALL_DIR/bioseason
setenv YEAR 2018
setenv LABEL 2018g # for filenames
setenv LEAP N  # Is the year a leap year
setenv SPINUP_DURATION 0 #10 # assumes December of previous year
setenv RUN_LENGTH 41 # not including spinup
set temp2 = 12 # variable number of TEMP2 in METCRO2Ds
setenv SMOKE_LOCATION $INSTALL_DIR/smoke4.6/Linux2_x86_64ifort
setenv IOAPI_LOCATION $INSTALL_DIR/ioapi/Linux2_x86_64ifort

# Run Metscan to create the full year bioseasons file
setenv binpath $SMOKE_LOCATION
setenv BIOSEASON $OUT_PATH/bioseason.cmaq.${LABEL}_${GRID}.ncf
#setenv LOGFILE $OUT_PATH/logs/bioseason.cmaq.${LABEL}.${GRID}.log


Any guidance on how to create this file would be great, thank you.

I think this issue is attributed to the wrong file used. This script requires MET_CRO_3D file while you are using METCRO2D at this time.
As you posted ——setenv MET_CRO_3D…/METCRO2D_…
This is inconsistent with the setenv MET_CRO_3D which needs CRO_3D file.
This is just my thought.

Hello, the user guide says you can use metcro3d first layer or just the metcro2d files and you set the environment name as metcro3d 5.3.10. Metscan

I think I actually found the error – it wants 1 file with all the times, but only 1 value per day. So I’ll create daily averages and then retry.

I don’t know the answer to your first question, i.e. whether metscan can work off of a partial year or whether a full year is required. I always used it with a full year of data, but I see based on a quick look at the code that the scanning for the last/first frost date is done backward and forward from July 1, so not having the beginning and end of the year might work if the spring through fall period is present.

For your second question, the error message you encountered is because you used ncrat to create your concatenated file. The file created by this tool is not I/O API compliant and thus will not work with metscan. Using m3xtract or other fortran code compiled with the I/O API library would solve that problem.

For your third question, it does not matter if your file contains extra variables besides the one expected by metscan.

1 Like

Thank you, this helps clarify things. I think also according to the documentation it wants 1 value per day, which I have all hourly values.

The output is certainly one value per day, but I think I remember the input was just regularly hourly MCIP-type data. It’s been a long time though since I used it, so I don’t know for sure.

Thank you all for your help – as an update, using m3extract helped with the format for m3scan, and the output is 1 day per file. I could create this file it for the 61 days in March and April, I did not have to create an annual file. It looks alright --next step is to integrate into the actual run.