19 #ifndef READ_MOSAIC_H_ 20 #define READ_MOSAIC_H_ 54 float *
area,
float *di,
float *dj );
65 double *
area,
double *di,
double *dj );
77 void read_mosaic_contact(
const char *mosaic_file,
int *tile1,
int *tile2,
int *istart1,
int *iend1,
78 int *jstart1,
int *jend1,
int *istart2,
int *iend2,
int *jstart2,
int *jend2);
83 double *data,
unsigned int level,
int ioff,
int joff);
88 void read_mosaic_contact_(
const char *mosaic_file,
int *tile1,
int *tile2,
int *istart1,
int *iend1,
89 int *jstart1,
int *jend1,
int *istart2,
int *iend2,
int *jstart2,
int *jend2);
void get_file_dir(const char *file, char *dir)
int read_mosaic_ntiles(const char *mosaic_file)
void read_mosaic_xgrid_order1_(const char *xgrid_file, int *i1, int *j1, int *i2, int *j2, double *area)
void get_var_text_att(const char *file, const char *name, const char *attname, char *att)
void handle_netcdf_error(const char *msg, int status)
void read_mosaic_grid_data(const char *mosaic_file, const char *name, int nx, int ny, double *data, unsigned int level, int ioff, int joff)
integer, save, private iec
int get_dimlen(const char *file, const char *name)
void read_mosaic_xgrid_order1(const char *xgrid_file, int *i1, int *j1, int *i2, int *j2, double *area)
void read_mosaic_contact(const char *mosaic_file, int *tile1, int *tile2, int *istart1, int *iend1, int *jstart1, int *jend1, int *istart2, int *iend2, int *jstart2, int *jend2)
void get_string_data_level(const char *file, const char *name, char *data, const unsigned int *level)
void read_mosaic_xgrid_order1_region(const char *xgrid_file, int *i1, int *j1, int *i2, int *j2, double *area, int *isc, int *iec)
void get_string_data(const char *file, const char *name, char *data)
void read_mosaic_xgrid_order2(const char *xgrid_file, int *i1, int *j1, int *i2, int *j2, double *area, double *di, double *dj)
void read_mosaic_xgrid_order1_region_(const char *xgrid_file, int *i1, int *j1, int *i2, int *j2, double *area, int *isc, int *iec)
void get_var_data(const char *file, const char *name, void *data)
int read_mosaic_ncontacts(const char *mosaic_file)
real, dimension(:,:), allocatable area
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************subroutine READ_RECORD_CORE_(unit, field, nwords, data, start, axsiz) integer, intent(in) ::unit type(fieldtype), intent(in) ::field integer, intent(in) ::nwords MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in) ::start(:), axsiz(:) integer(SHORT_KIND) ::i2vals(nwords)!rab used in conjunction with transfer intrinsic to determine size of a variable integer(KIND=1) ::one_byte(8) integer ::word_sz!#ifdef __sgi integer(INT_KIND) ::ivals(nwords) real(FLOAT_KIND) ::rvals(nwords)!#else! integer ::ivals(nwords)! real ::rvals(nwords)!#endif real(DOUBLE_KIND) ::r8vals(nwords) pointer(ptr1, i2vals) pointer(ptr2, ivals) pointer(ptr3, rvals) pointer(ptr4, r8vals) if(mpp_io_stack_size< nwords) call mpp_io_set_stack_size(nwords) call mpp_error(FATAL, 'MPP_READ currently requires use_netCDF option') end subroutine READ_RECORD_CORE_ subroutine READ_RECORD_(unit, field, nwords, data, time_level, domain, position, tile_count, start_in, axsiz_in)!routine that is finally called by all mpp_read routines to perform the read!a non-netCDF record contains:! field ID! a set of 4 coordinates(is:ie, js:je) giving the data subdomain! a timelevel and a timestamp(=NULLTIME if field is static)! 3D real data(stored as 1D)!if you are using direct access I/O, the RECL argument to OPEN must be large enough for the above!in a global direct access file, record position on PE is given by %record.!Treatment of timestamp:! We assume that static fields have been passed without a timestamp.! Here that is converted into a timestamp of NULLTIME.! For non-netCDF fields, field is treated no differently, but is written! with a timestamp of NULLTIME. There is no check in the code to prevent! the user from repeatedly writing a static field. integer, intent(in) ::unit, nwords type(fieldtype), intent(in) ::field MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in), optional ::time_level type(domain2D), intent(in), optional ::domain integer, intent(in), optional ::position, tile_count integer, intent(in), optional ::start_in(:), axsiz_in(:) integer, dimension(size(field%axes(:))) ::start, axsiz integer ::tlevel !, subdomain(4) integer ::i, error, is, ie, js, je, isg, ieg, jsg, jeg type(domain2d), pointer ::io_domain=> tlevel if(PRESENT(start_in) .AND. PRESENT(axsiz_in)) then if(size(start(! the data domain and compute domain must refer to the subdomain being passed ! In this ! since that attempts to gather all data on PE start
int read_mosaic_xgrid_size_(const char *xgrid_file)
int read_mosaic_xgrid_size(const char *xgrid_file)
void get_var_data_region(const char *file, const char *name, const size_t *start, const size_t *nread, void *data)
double get_global_area_(void)
int read_mosaic_ncontacts_(const char *mosaic_file)
void read_mosaic_contact_(const char *mosaic_file, int *tile1, int *tile2, int *istart1, int *iend1, int *jstart1, int *jend1, int *istart2, int *iend2, int *jstart2, int *jend2)
void read_mosaic_grid_sizes(const char *mosaic_file, int *nx, int *ny)
int read_mosaic_ntiles_(const char *mosaic_file)
integer, save, private isc
void read_mosaic_xgrid_order2_(const char *xgrid_file, int *i1, int *j1, int *i2, int *j2, double *area, double *di, double *dj)
int transfer_to_model_index(int istart_in, int iend_in, int *istart_out, int *iend_out, int refine_ratio)
double get_global_area(void)
void read_mosaic_grid_sizes_(const char *mosaic_file, int *nx, int *ny)
int field_exist(const char *file, const char *name)