ECC-428: Added C and F90 API calls

This commit is contained in:
Shahram Najm 2019-08-09 13:06:58 +01:00
parent 888c88ab90
commit 9ae92f8aaa
7 changed files with 79 additions and 0 deletions

View File

@ -2836,4 +2836,30 @@ subroutine codes_copy_key( msgid_src, key, msgid_dest, status )
endif
end subroutine codes_copy_key
subroutine codes_bufr_multi_element_constant_arrays_on (status )
integer(kind=kindOfInt),optional, intent(out) :: status
integer(kind=kindOfInt) :: iret
iret=codes_f_bufr_multi_element_constant_arrays_on()
if (present(status)) then
status = iret
else
call grib_check(iret,'codes_bufr_multi_element_constant_arrays_on','')
endif
end subroutine codes_bufr_multi_element_constant_arrays_on
subroutine codes_bufr_multi_element_constant_arrays_off (status )
integer(kind=kindOfInt),optional, intent(out) :: status
integer(kind=kindOfInt) :: iret
iret=codes_f_bufr_multi_element_constant_arrays_off()
if (present(status)) then
status = iret
else
call grib_check(iret,'codes_bufr_multi_element_constant_arrays_off','')
endif
end subroutine codes_bufr_multi_element_constant_arrays_off
end module eccodes

View File

@ -73,6 +73,7 @@ integer, external :: grib_f_set_int, grib_f_set_int_array, &
grib_f_set_force_real4_array, grib_f_set_force_real8_array, &
grib_f_set_string, grib_f_set_string_array, grib_f_set_missing, &
grib_f_gribex_mode_on,grib_f_gribex_mode_off, &
codes_f_bufr_multi_element_constant_arrays_on,codes_f_bufr_multi_element_constant_arrays_off, &
grib_f_find_nearest_single,grib_f_find_nearest_four_single,grib_f_find_nearest_multiple
integer, external :: grib_f_get_message_size, grib_f_copy_message, grib_f_count_in_file
integer, external :: grib_f_write, grib_f_multi_write, grib_f_multi_append

View File

@ -3472,6 +3472,31 @@ int grib_f_multi_append__(int* ingid, int* sec,int* mgid) {
return grib_f_multi_append_(ingid, sec, mgid);
}
/*****************************************************************************/
int codes_f_bufr_multi_element_constant_arrays_on_() {
codes_bufr_multi_element_constant_arrays_on(NULL);
return GRIB_SUCCESS;
}
int codes_f_bufr_multi_element_constant_arrays_on__() {
return codes_f_bufr_multi_element_constant_arrays_on_();
}
int codes_f_bufr_multi_element_constant_arrays_on() {
return codes_f_bufr_multi_element_constant_arrays_on_();
}
int codes_f_bufr_multi_element_constant_arrays_off_() {
codes_bufr_multi_element_constant_arrays_off(NULL);
return GRIB_SUCCESS;
}
int codes_f_bufr_multi_element_constant_arrays_off__() {
return codes_f_bufr_multi_element_constant_arrays_off_();
}
int codes_f_bufr_multi_element_constant_arrays_off() {
return codes_f_bufr_multi_element_constant_arrays_off_();
}
/*****************************************************************************/
int grib_f_set_definitions_path_(char* path, int len){
grib_context* c = grib_context_get_default();

View File

@ -374,6 +374,13 @@ int codes_f_bufr_copy_data(int* gid1,int* gid2);
int codes_f_bufr_copy_data_(int* gid1,int* gid2);
int codes_f_bufr_copy_data__(int* gid1,int* gid2);
int codes_f_bufr_multi_element_constant_arrays_on_(void);
int codes_f_bufr_multi_element_constant_arrays_on__(void);
int codes_f_bufr_multi_element_constant_arrays_on(void);
int codes_f_bufr_multi_element_constant_arrays_off_(void);
int codes_f_bufr_multi_element_constant_arrays_off__(void);
int codes_f_bufr_multi_element_constant_arrays_off(void);
int grib_f_set_definitions_path_(char *path, int len);
int grib_f_set_definitions_path__(char *path, int len);
int grib_f_set_definitions_path(char *path, int len);

View File

@ -1041,6 +1041,11 @@ int codes_get_gribex_mode(codes_context* c);
*/
void codes_gribex_mode_off(codes_context* c);
void codes_bufr_multi_element_constant_arrays_on(codes_context* c);
void codes_bufr_multi_element_constant_arrays_off(codes_context* c);
/*int codes_get_bufr_multi_element_constant_arrays(codes_context* c);*/
/**
* Sets the search path for definition files.
*

View File

@ -979,6 +979,8 @@ void grib_context_free(const grib_context *c, void *p);
void grib_context_free_persistent(const grib_context *c, void *p);
void grib_context_reset(grib_context *c);
void grib_context_delete(grib_context *c);
void codes_bufr_multi_element_constant_arrays_on(grib_context* c);
void codes_bufr_multi_element_constant_arrays_off(grib_context* c);
void grib_context_set_definitions_path(grib_context *c, const char *path);
void grib_context_set_samples_path(grib_context *c, const char *path);
void *grib_context_malloc_persistent(const grib_context *c, size_t size);

View File

@ -742,6 +742,19 @@ void grib_context_delete( grib_context* c)
grib_context_free_persistent(&default_grib_context,c);
}
void codes_bufr_multi_element_constant_arrays_on(grib_context* c)
{
if ( !c ) c=grib_context_get_default();
c->bufr_multi_element_constant_arrays = 1;
}
void codes_bufr_multi_element_constant_arrays_off(grib_context* c)
{
if ( !c ) c=grib_context_get_default();
c->bufr_multi_element_constant_arrays = 0;
}
/*int codes_get_bufr_multi_element_constant_arrays(grib_context* c);*/
void grib_context_set_definitions_path(grib_context* c, const char* path)
{
if (!c) c=grib_context_get_default();