ESCOMP / CAM

Community Atmosphere Model
75 stars 140 forks source link

ne30pg2 & ne30pg3 FHIST compset emission error #161

Closed adamrher closed 4 years ago

adamrher commented 4 years ago

I just checked out the latest tag cam6_2_033 and tried to run ne30pg2 & ne30pg3 but am getting an error:

Screen Shot 2020-06-25 at 6 42 22 PM

I suspect the problem is that the new emissions files in this tag are explicitly set for hgrid = "ne30np4" and omits any modifiers telling the model not to use these for pg2 and pg3.

Feel free to peruse my case here: /glade/scratch/aherring/cam6_2_033_FHIST_ne30pg3_ne30pg3_mg17_1800pes_200625_glandmapping-test

cacraigucar commented 4 years ago

@fvitt is this something for the Chemists to solve?

adamrher commented 4 years ago

I think to make the emission files only set for ne30np4, and not ne30pg3 or ne30pg2, the namelist_defaults.xml for each emission file should have the modifiers hgrid="ne30np4" npg="0"

brian-eaton commented 4 years ago

Are there files specifically for pg2 and pg3? If those files had attributes npg="2" and npg="3" then they'd be selected over the files that just have the hgrid="ne30np4" without the npg attribute by virtue of having a higher number of attribute matches. Generally I wouldn't expect to need to specify npg="0" to get things right.

adamrher commented 4 years ago

Looking through namelist_defaults.xml I think that the latest tag added emissions files for ne30np4 and CONUS only. I don't see any for ne30pg3 or pg2. The entries for ne30np4 looks this:

<dms_ot_srf_file hgrid="ne30np4" ver="cam6">atm/cam/chem/emis/historical_ne30np4/emissions-cmip6_DMS_other_surface_1750_2015_ne30np4_c20200605.nc</dms_ot_srf_file>

Wouldn't that entry match ne30 grids for all npg?

adamrher commented 4 years ago

From @PeterHjortLauritzen:

"Correct unless one specifically sets npg explicitly ..."

brian-eaton commented 4 years ago

Yes, and that's my point. If that is the wrong file for ne30pg3 then the right file should have the npg="3" attribute and it will be chosen instead.

adamrher commented 4 years ago

I think we need clarification from the Chemists whether their intention was to introduce explicit emissions files for ne30np4, ne30pg3 or both. In all cases, they will need to fix their namelist entries as described in this thread.

tilmes commented 4 years ago

We need to add the ne30pg3 emissions to the input dataset. The compset using ne30pg3 needs to point to those ne30pg3 historical emissions, this needs to be also done for the FCHIST compset runing with ne30pg3. Those are here: /glade/p/acom/acom-climate/cmip6inputs/historical_ne30pg3 I also added SOAG1.5 biogenic emissions to this now, which are missing for CAM, Simone

fvitt commented 4 years ago

The modifier npg="0" needs to be added to the ne30np4 emissions datasets in namelist_defaults_cam.xml.

We can add ne30pg3 historical emissions to namelist_defaults as well if that is desired. Otherwise, HIST cases on the ne30pg3 grid would use the 1-degree FV grid emissions, which get interpolated to the model grid.

Will we need to add emissions on the ne30pg2 grid as well?

brian-eaton commented 4 years ago

Are you saying that the npg="0" attribute is needed to prevent an ne30pg3 config from accidentally using an ne30np4 dataset and just silently interpolating when that's not what you want?

fvitt commented 4 years ago

Are you saying that the npg="0" attribute is needed to prevent an ne30pg3 config from accidentally using an ne30np4 dataset and just silently interpolating when that's not what you want?

Mostly correct. The npg=0 attribute will prevent build-namelist from using ne30np4 emissions datasets when the model is configured with the ne30pg3 grid. We are not able to interpolate the ne30np4 emissions to the ne30pg3 grid. We are able to interpolate emissions from a regular lat/lon grid to an unstructured SE grid.

brian-eaton commented 4 years ago

OK. I was hoping to prevent the case where a user thinks that npg="0" is required for configurations that don't use the physics grid. That's not true. For example the ncdata files for runs without cslam don't need npg=0 since the initial data is always on the GLL grid whether running with the physics grid or not, so it's possible to use one file for both configurations. But this seems like a reasonable use of npg="0" since it catches the error at build time rather than waiting for an runtime endrun call when the code finds it can't to the required interpolation.

adamrher commented 4 years ago

If we did define ne30pg2 emission files in addition to ne30pg3, then we wouldn't need the npg=0 attribute for the ne30np4.

tilmes commented 4 years ago

I can create emission files for ne30pg2 as well if that solves the problem?

adamrher commented 4 years ago

@fvitt and @tilmes my preference is to have ne30pg2 emission files as well so that all ne30 grids using the FHIST compset are consistent, and one can then do apples-to-apples comparisons between these grids.

fvitt commented 4 years ago

@fvitt and @tilmes my preference is to have ne30pg2 emission files as well so that all ne30 grids using the FHIST compset are consistent, and one can then do apples-to-apples comparisons between these grids.

This sounds like you prefer to have FHIST cases on all ne30 grids interpolate emissions from the same set of 0.9x1.25 emissions files. Correct?

adamrher commented 4 years ago

Either (1) all ne30 grids interpolate from the same f09 emissions files at initialization, or (2) all ne30 grids have their own emissions files on their own grids in namelist_defaults. For the latter, my understanding is that the target emissions files are interpolated from the same emissions file via Simone's regridding script. Is that right? If so, I think both (1) or (2) would be an apples-to-apples comparison in a historical run.

tilmes commented 4 years ago

My emission scripts use the original half degree CMIP6 emissions and interpolate those conversely to the different grid (option 2), while for option 1 we use the f90 emissions and interpolate (not conversely) to the specific grid. Option 1 may therefore not be an apples to apples comparison.

adamrher commented 4 years ago

@tilmes by conversely / not-conversely do you mean conservative remapping / not-conservative remapping?

tilmes commented 4 years ago

yes

adamrher commented 4 years ago

I think it would still be apples-to-apples even for non-conservative mapping since the errors would be consistently large for all 3 ne30 grids. But this is kind of a digression at this point .... my apologies. Backing up, It sounds to me like there are two concerns:

(1) That the conventional method of interpolating from f09 at initialization results in interpolation errors that are not ideal to the Chemists.

(2) I would prefer that the emissions files are generated using the same workflow for all 3 ne30 grids.

The solution is to generate emissions files using Simone's script for all 3 ne30 grids, and have explicit entries for all 3 grids in namelists_defaults. The drawback is that this is a ton of namelists entries. Can everyone live with that?

brian-eaton commented 4 years ago

A lot of entries in the namelist defaults file is OK. While it may be possible to have build-namelist autogenerate a big list of files that have a consistent naming convention, there's always the case where someone will want to replace a default file with an experiment. Having long explicit lists is most flexible.

adamrher commented 4 years ago

@brian-eaton francis has set explicit emission files for ne30np4, ne30pg2 & ne30pg3 in his branch. Would you prefer the ne30np4 entry has npg=0, or should we omit it the npg attribute? This is what @fvitt entries look like for the 3 grids right now:

hgrid="ne30np4" npg="0" hgrid="ne30np4" npg="2" hgrid="ne30np4" npg="3"

brian-eaton commented 4 years ago

I think this use of npg="0" is OK, as per my comment above.

fvitt commented 4 years ago

The historical_ne30np4 emissions only work for the ne30np4 (npg=0) grid. So I feel the npg="0" modifier is needed on the default emission files.