Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trajectory sampler: support splitfield in HISTORY.rc #3329

Merged
merged 13 commits into from
Jan 16, 2025

Conversation

metdyn
Copy link
Contributor

@metdyn metdyn commented Jan 15, 2025

Types of change(s)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Trivial change (affects only documentation or cleanup)
  • Refactor (no functional changes, no api changes)

Checklist

  • Tested this change with a run of GEOSgcm
  • Ran the Unit Tests (make tests)

Description

It was not until @vbuchard requested sampling AOD output to IODA location files (time dependent) that I realized trajectory sampler cannot handle the keyword splitField: 1.
@vbuchard is testing with GCM runs.

input:

  COLLECTIONS:
  tau
::


  tau.sampler_spec:       trajectory
  tau.ObsPlatforms:       aeroso_ioda
  tau.template:           '%y4%m2%d2_%h2%n2z.nc4',
  tau.format:             'CFIO',
  tau.obs_file_begin:       2019-06-01T00:00:00
  tau.obs_file_interval:   '000000 030000'    #  fixed string format:  yymmdd hhmmss
  tau.obs_file_end:         2019-11-01T00:00:00
  tau.Epoch:                030000            #   fixed integer format:  hhmmss
  tau.regrid_method:       'BILINEAR' ,
#  tau.use_NWP_1_file:       .true.
  tau.splitField:          1,
::


#
#----  This must be put at the end of the HISTORY.rc file  -----
#

DEFINE_OBS_PLATFORM::

PLATFORM.aeroso_ioda::
  IODA_SCHEMA::
    index_name_x:     Location
    var_name_lon:     MetaData/longitude
    var_name_lat:     MetaData/latitude
    var_name_time:    MetaData/dateTime
    file_name_template: IODA_nnr_042.MOD04_L2a.land.%y4%m2%d2_%h2%n2z.nc4
  ::
  GEOVALS_SCHEMA::
    geovals_fields::
                               'LWI'         , 'SURFACE'   ,
                               'TOTEXTTAU'   , 'GOCART2G'     ,  'TOTEXTTAU470;TOTEXTTAU550;TOTEXTTAU870',
                               'TOTSCATAU'   , 'GOCART2G'     ,  'TOTSCATAU470;TOTSCATAU550;TOTSCATAU870',
                               'TOTANGSTR'   , 'GOCART2G'  ,
    ::
  ::
::

Output:

netcdf IODA_nnr_042.MOD04_L2a.land.c12_test_ioda_index.tau.20190601_0300z {
dimensions:
	Location = 10068 ;
variables:
	double dateTime(Location) ;
		dateTime:long_name = "dateTime" ;
		dateTime:units = "seconds since 1970-01-01 00:00:00" ;
	int location_index_in_iodafile(Location) ;
		location_index_in_iodafile:long_name = "Location index in corresponding IODA file" ;
		location_index_in_iodafile:units = "1" ;
	double longitude(Location) ;
		longitude:long_name = "longitude" ;
		longitude:units = "degrees_east" ;
	double latitude(Location) ;
		latitude:long_name = "latitude" ;
		latitude:units = "degrees_north" ;
	float LWI(Location) ;
		LWI:_FillValue = 1.e+15f ;
		LWI:long_name = "land(1)_water(0)_ice(2)_flag" ;
		LWI:missing_value = 1.e+15f ;
		LWI:units = "1" ;
		LWI:valid_range = -1.e+15f, 1.e+15f ;
	float TOTANGSTR(Location) ;
		TOTANGSTR:_FillValue = 1.e+15f ;
		TOTANGSTR:long_name = "Total Aerosol Angstrom parameter [470-870 nm]" ;
		TOTANGSTR:missing_value = 1.e+15f ;
		TOTANGSTR:units = "1" ;
		TOTANGSTR:valid_range = -1.e+15f, 1.e+15f ;
	float TOTEXTTAU470(Location) ;
		TOTEXTTAU470:_FillValue = 1.e+15f ;
		TOTEXTTAU470:long_name = "Total Aerosol Extinction AOT [550 nm]" ;
		TOTEXTTAU470:missing_value = 1.e+15f ;
		TOTEXTTAU470:units = "1" ;
		TOTEXTTAU470:valid_range = -1.e+15f, 1.e+15f ;
	float TOTEXTTAU550(Location) ;
		TOTEXTTAU550:_FillValue = 1.e+15f ;
		TOTEXTTAU550:long_name = "Total Aerosol Extinction AOT [550 nm]" ;
		TOTEXTTAU550:missing_value = 1.e+15f ;
		TOTEXTTAU550:units = "1" ;
		TOTEXTTAU550:valid_range = -1.e+15f, 1.e+15f ;
	float TOTEXTTAU870(Location) ;
		TOTEXTTAU870:_FillValue = 1.e+15f ;
		TOTEXTTAU870:long_name = "Total Aerosol Extinction AOT [550 nm]" ;
		TOTEXTTAU870:missing_value = 1.e+15f ;
		TOTEXTTAU870:units = "1" ;
		TOTEXTTAU870:valid_range = -1.e+15f, 1.e+15f ;
	float TOTSCATAU470(Location) ;
		TOTSCATAU470:_FillValue = 1.e+15f ;
		TOTSCATAU470:long_name = "Total Aerosol Scattering AOT [550 nm]" ;
		TOTSCATAU470:missing_value = 1.e+15f ;
		TOTSCATAU470:units = "1" ;
		TOTSCATAU470:valid_range = -1.e+15f, 1.e+15f ;
	float TOTSCATAU550(Location) ;
		TOTSCATAU550:_FillValue = 1.e+15f ;
		TOTSCATAU550:long_name = "Total Aerosol Scattering AOT [550 nm]" ;
		TOTSCATAU550:missing_value = 1.e+15f ;
		TOTSCATAU550:units = "1" ;
		TOTSCATAU550:valid_range = -1.e+15f, 1.e+15f ;
	float TOTSCATAU870(Location) ;
		TOTSCATAU870:_FillValue = 1.e+15f ;
		TOTSCATAU870:long_name = "Total Aerosol Scattering AOT [550 nm]" ;
		TOTSCATAU870:missing_value = 1.e+15f ;
		TOTSCATAU870:units = "1" ;
		TOTSCATAU870:valid_range = -1.e+15f, 1.e+15f ;
}

Related Issue

This PR is to be merged to

metdyn and others added 13 commits December 2, 2024 11:21
  this%item*xname
  vs
  obs(k)%ngeoval  % name
Next,
  inquire people how to make 'U;V' vector interpolation consistent with geoval names in Aerosol AOD:
  'TOTEXTTAU'   , 'GOCART2G'    ,'TOTEXTTAU470;TOTEXTTAU550;TOTEXTTAU870',
…70,'

I did not modify jedi.rcx in trajectory sampler,
instead I split this term into traj%obs(k)%geoval_xname(j)
This assumes setting `jedi.splitField: 1` will trigger list(n)%items being regenerated in HISTORY.
@metdyn metdyn added the 0 Diff Trivial The changes in this pull request are trivially zero-diff (documentation, build failure, &c.) label Jan 15, 2025
@metdyn metdyn requested review from tclune and vbuchard January 15, 2025 19:53
@metdyn metdyn requested a review from a team as a code owner January 15, 2025 19:53
@mathomp4 mathomp4 merged commit 3972d46 into feature/ygyu/NWP_1_file Jan 16, 2025
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 Diff Trivial The changes in this pull request are trivially zero-diff (documentation, build failure, &c.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants