NOAA-GFDL / MDTF-diagnostics

Analysis framework and collection of process-oriented diagnostics for weather and climate simulations
https://mdtf-diagnostics.readthedocs.io/en/main/
Other
59 stars 98 forks source link

test albedofb with ESM4 output failed #404

Closed Wen-hao-Dong closed 2 years ago

Wen-hao-Dong commented 2 years ago

Bug Severity

Describe the bug When testing this POD with ESM4 output, data request for <#Ohgu:albedofb.areacella> failed since area info is stored in atmos_cmip.static.nc with the name called area. This is different from areacella set in fieldlist_CMIP.jsonc.

While data request for <#OhjX:albedofb.tas> <#Ohss:albedofb.rsdt> <#Ohzr:albedofb.rsds> <#OhFU:albedofb.rsut> <#OhP8:albedofb.rsus> failed due to "Too many iterations in select_data() for <#NBkk:ESM4_historical_D1>."

Steps To Reproduce I am using the updated version and have submitted the job using the following command: sbatch ./mdtf_slurm -f sites/NOAA_GFDL/default_gfdl.jsonc --site NOAA_GFDL -v

Environment Describe the system environment:

Log information and/or terminal output /archive/wnd/MDTF-GFDL/STDO/slurm_MDTF_diags.24885969_4294967294.out

wrongkindofdoctor commented 2 years ago

There is probably an issue with the standard_name or similar in the area data file you are using. If you provide the path to your test repo, I can try replicating the issue and testing the fix on my end--probably requires another cell_area entry to the CMIP fieldlist, and possibly another modifier.

Note that the variable area does not appear in the variable list when I search the llnl cmip6 database, and that it seems like it is best practice to use areacello or areacella when defining grid cell area for ocean and atmospheric grids, respectively (I know this is not in your control, but is something to pass on the people in charge of defining the output data).

Wen-hao-Dong commented 2 years ago

Here is the path to my test repo: /archive/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics The branch name and link are: test0716, https://github.com/Wen-hao-Dong/MDTF-diagnostics/tree/test0716

Yes, the name area in not in the CMIP variable list. It is always saved in the static file for the GFDL model output. I will take your suggestion for the subsequent frepp test.

wrongkindofdoctor commented 2 years ago

@Wen-hao-Dong I have a workaround on my fork in a test branch where I've added pod_env_vars to set a cell area file and variable name that will be subbed for the areacella variable (now optional) if it is not present. This requires the user to copy the desired static file to a directory with read access from PPAN before running the package.

However, there are issues with the input data types in the ESM4 dataset being xrarray DataArrays, and the coord operations on rsus and rsds fail in the albedo_calcs.py module. I have some test lines in albedofb_calcs.py to try and debug the problem, but am going to set this aside since this is a POD/data-related issue, not a framework problem.

Someone familiar with using xarray to process climate model data might be able to help resolve this problem faster. If you are able to find a fix before I do, please create a branch with the new code, and submit a PR to the NOAA_GFDL main branch for review.

wrongkindofdoctor commented 2 years ago

@Wen-hao-Dong This issue has been resolved. Please pull updates from the main branch into your test branch, and follow the updated instructions in the albedofb documentation for incorporating non-CMIP-standard cell area files (e.g., atmos.static.nc) into the POD via the new pod_env_vars in the settings file.