geoschem / geos-chem

GEOS-Chem "Science Codebase" repository. Contains GEOS-Chem science routines, run directory generation scripts, and interface code. This repository is used as a submodule within the GCClassic and GCHP wrappers, as well as in other modeling contexts (external ESMs).
http://geos-chem.org
Other
162 stars 155 forks source link

Discussion: Fixing ObsPack diagnostics in GEOS-Chem and/or standardizing ObsPack file inputs #2328

Open yantosca opened 4 weeks ago

yantosca commented 4 weeks ago

Your name

Bob Yantosca

Your affiliation

Harvard + GCST

Please provide a clear and concise description of your question or discussion topic.

The ObsPack diagnostic relies on input files from NOAA that often have inconsistent dimensions, depending on which sites they come from. This issue can be a central point of discussion for efforts related to fix outstanding issues in the ObsPack diagnostic in GEOS-Chem.

There are also few python packages for prepping ObsPack inputs that we could try to add to the community folder of GCPy. We can also keep track of these development efforts here.

Tagging @eastjames @jhaskinsPhD @alli-moon

jhaskinsPhD commented 2 weeks ago

Hi Folks,

I last had Obspack working for me in v13.3.4, but have gotten errors using it in GCClassic v14.0.0, v14.2.3 and v14.3.0. The error I get looks like this:

********************************************
* B e g i n   T i m e   S t e p p i n g !! *
********************************************

---> DATE: 2013/06/01  UTC: 00:00
 HEMCO already called for this timestep. Returning.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

In Ncrd_1d_Char #2:  NetCDF: Start+count exceeds dimension bound
     65536         6

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Code stopped from DO_ERR_OUT (in module NcdfUtil/m_do_err_out.F90) 

This is an error that was encountered in one of the netCDF I/O modules,
which indicates an error in writing to or reading from a netCDF file!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

real 51.28
user 441.31
sys 5.71
srun: error: notch201: task 0: Exited with exit code 231

I think this is coming from a call to m_do_err_out.F90 that I added when we made the update to include the Obspack Wildcard where it will throw an error if it can't find/read the obspack input files when the diagnostic is turned on, since before that it would actually complete the run and just not save any Obspack output without an error & it seems to be an issue with the expected dimensions of the inputs.

@eastjames has code to convert the default Obspack files into a format readable by GEOS-Chem here and I have code to make your own Obspack files for GEOS-Chem sampling here.

Between the two repos, I think we have a consistent way to build Obspack files for GEOS-Chem input that are consistent with the documentation on the Obspack inputs needed on ReadtheDocs, but I haven't done enough digging to figure out what exactly the newer versions are throwing this error.

I know that at some point between v13.0.0 and v13.3.4, the required Obspack Input files changed from requiring a "time components" input in [YYYY, MM, DD, HH, mm, SS] list to a 'time' input in units of seconds since 1970-01-01 00:00:00 and the code got a bit more picky about the types of the required inputs (e.g. having the Obspack ID required as a S200 bytes string) . The default Obspack files seem to have both of these inputs (in some of the files), but as someone pointed out at IGC11, the default variables in the different types of Obspack files varies a bit. I think there must be something in the GEOS-Chem code that reads in the files that is expecting one of these time components in a different format than we're giving it now... So, some info on what exactly it's expecting would be valuable.

In my repo, I've uploaded an example Obspack input file here I created using my obspack_io.py script for sampling at the SOAS site on June 1st, 2013 that did work in previous versions, but is now throwing the error above when I turn the diagnostic on. When I compared it to a file I generated from @eastjames's repo on more classic Obspack files, it seemed entirely consistent in the required inputs listed on ReadTheDocs & I thought it was just an error with my code until IGC11.

yantosca commented 2 weeks ago

Thanks @jhaskinsPhD for this. I think complicating matters is that we had to switch from the netCDF-F77 to the netCDF-F90 interface (which was required by CESM). This shouldn't matter, but who knows. I will try to replicate your error with the sample ObsPack file.

For your reference, here is some info about netCDF strings.