Slide 1 NEMOVAR data structure Slide 1 NEMOVAR data structure for observation profiles Kristian Mogensen
Slide 2 NEMOVAR data structure Slide 2 obs_prof derived date type The obs_prof derived type is defined in the obs_profiles_def.F90 file. It contains several sections: -A bookkeeping section to store information about number of profiles, number of temperature and salinity observations and information about where the temperature and salinity data starts and ends for each profile. -A section with data (like time, horizontal position etc) related to each profile. -A section with data for each individual temperature measurement. -A section with data for each individual salinity measurement. -A section storing information about number of profiles etc for each time step. -A section storing daily mean temperature and salinity accumulation arrays. -A section for arrays needed to compress/decompress data structures.
Slide 3 NEMOVAR data structure Slide 3 obs_prof utility routines The obs_profiles_def.F90 file file also contains a series of utility routines to manipulate the obs_prof type. List of obs_type utility routines: -obs_prof_alloc: Allocates arrays in a obs_prof type -obs_prof_dealloc: Deallocates arrays in a obs_prof type -obs_prof_compress: Extract sub-information from a obs_prof type to a new obs_prof type -obs_prof_decompress: Reinsert sub-information from a obs_prof type into the original obs_prof type
Slide 4 NEMOVAR data structure Slide 4 Accessing data in a obs_type variable A obs_type variable can be declared as TYPE(obs_type) :: profdata Once the type has been defined it is up to the user/developer to define how many profiles, number of T,S observations, number of time steps etc is needed. This information can be used to call obs_prof_alloc with to allocate all the pointer arrays within the type. To access each profile data the following construction can be used: DO jprof = 1, profdatqc%nprof IF ( profdatqc%nhou(jprof) = 0 ) THEN > ENDIF ENDDO
Slide 5 NEMOVAR data structure Slide 5 Accessing data in a obs_type variable 2 To access each temperature profile data in the type the following construction can be used: DO jprof = 1, profdata%nprof DO jobs = profdata%nptsta(jprof), profdata%nptend(jprof) IF ( profdata%ntqc(jobs) /= 0 ) THEN > ENDIF ENDDO It is possible to define as many obs_type variables as memory permits.
Slide 6 NEMOVAR data structure Slide 6 Accessing data in a obs_type variable 3 The subroutine obs_prof_compress takes one obs_type variable and either copies it to a new obs_type variable or optionally sub-samples the data into a reduced new data obs_type variable via logical switches. It is possible to make modifications to the new obs_type variable and copy the modifications back to the original data by using the obs_prof_decompress subroutine.
Slide 7 NEMOVAR data structure Slide 7 Outer loop data structure (implementated) In the initial version of the code I have defined the following data flow in the outer loop of NEMOVAR. -The ENACT data files are read into the profdata obs_type variable in obs_read_enact.F90. The obs_prep.F90 performs the same check as earlier but rather than reordering the data, it calls the obs_prof_compress to create another obs_type variable (prodatqc) which contains only the valid observations. -The prodatqc variable is then used by obs_oper.F90 to compute the model values at observation point. This will update the tmod and smod variables in the prodatqc derived type. -To get everything in the same file the obs_prof_decompress is called which copies the data from prodatqc into profdata and deallocates prodatqc. -Finally the obs_write.F90 is called to write the content of profdata into the ENACT feedback files. The format of these files is unchanged.
Slide 8 NEMOVAR data structure Slide 8 Outer loop data structure (implemented)
Slide 9 NEMOVAR data structure Slide 9 Inner loop data structure (proposal)