! ! Field types (will be components of history type, see below): ! integer,parameter :: mxflds=200,longname_len=80,shortname_len=16, | units_len=16 ! type field_3d character(len=longname_len) :: long_name character(len=shortname_len) :: short_name character(len=units_len) :: units real :: missing_value real,pointer :: data(:,:,:) integer :: id1,id2,id3 ! usually nlon,nlat,nlev logical :: mag,geo ! magnetic or geographic grid character(len=8) :: levdimname ! lev, ilev, mlev, or imlev character(len=8) :: type ! "DENSITY" or blank end type field_3d ! type field_2d character(len=longname_len) :: long_name character(len=shortname_len) :: short_name character(len=units_len) :: units real :: missing_value real,pointer :: data(:,:) integer :: id1,id2 ! usually nlon,nlat logical :: mag,geo end type field_2d ! type field_1d character(len=longname_len) :: long_name character(len=shortname_len) :: short_name character(len=units_len) :: units real :: missing_value real,pointer :: data(:) integer :: id1 end type field_1d ! ! History structure type: ! integer,parameter :: mxlen=120 type history character(len=mxlen) :: | history_file ! Name of file containing this history character(len=mxlen) :: ! text global attributes | Conventions, | label, | create_date, | logname, | host, | system, | model_name, | model_version, | output_file, | history_type, | run_type, | source_file, | initial_file, | lev_to_hPa_method1, | lev_to_hPa_method2, | potential_model, | contents, | contents_desc integer :: ! integer global attributes | tuv_lbc_intop, | delhist_mins, | initial_mtime(3), | source_mtime(3) real :: ! double global attributes | missing_value character(len=mxlen) :: | write_date, ! date each history was written | ncep_ncfile, ! ncep lbc data file | gpi_ncfile, ! gpi lbc data file | gswm_mi_di_ncfile, ! gswm migrating diurnal data file | gswm_mi_sdi_ncfile,! gswm migrating semi-diurnal data file | gswm_nm_di_ncfile, ! gswm non-migrating diurnal data file | gswm_nm_sdi_ncfile,! gswm non-migrating semi-diurnal data file | see_ncfile, ! SEE data file | imf_ncfile, ! IMF data file | ecmwf_ncfile ! ECMWF boundary data file integer :: | gswmdi,gswmsdi,gswmnmdi,gswmnmsdi integer :: | nlat, ! number of latitude grid points | nlon, ! number of longitude grid points | nlev, ! number of vertical levels | nilev, ! number of interface levels (nlev == nilev) | nhist, ! number of histories on the file (s.a.,nhist) | mlon,mlat,mlev, ! magnetic grid dimensions | imlev, ! number of mag interface levels | ihist, ! ihist = nth history on current file | delhmins, ! delta minutes between histories | modeltime(4), ! model time (day,hour,minute,seconds) | iter, ! iteration (# steps from 0,0,0) | year, ! 4-digit year | day, ! calendar day (1-367) | calendar_advance, ! calendar advance (0 or 1) | step, ! time step (seconds) | ncep, ! nmc/ncep flag (0 or 1) | gpi, ! gpi flag (0 or 1) | datelen, | filelen real :: | ut, ! ut (decimal hours, from modeltime) | time, ! model time ("minutes since yyyy-m-d") | p0, ! reference pressure | p0_model, ! reference pressure used in model | hpower, ! hemispheric power | ctpoten, ! cross-cap potential | bximf, ! bx imf | byimf, ! by imf | bzimf, ! bz imf | f107d, ! daily f10.7 cm flux | f107a, ! 81-day average f10.7 cm flux | mag(2,2), ! magnetic pole coordinates | dtide(2), ! diurnal tide (tide2(2) from input) | sdtide(10), ! semi-diurnal tide (tide(10) from input) | colfac, ! collision factor | alfa30,e30,alfad2,ed2, ! auroral parameters ("old" hist) | al,e1,e2,h1,h2,alfac,ec,alfad,ed, ! auroral parameters ("new" hist) | swvel,swden, ! solar wind velocity, density | grav, ! gravity constant | lbc ! lower interface boundary logical dynamo ! if true, is dynamo history logical coupled_ccm ! if true, run was coupled with ccm logical old,new character(len=16),pointer :: | fnames3d_geo(:), ! pointer to 3d geo field names | fnames3d_mag(:), ! pointer to 3d mag field names | fnames2d_geo(:), ! pointer to 2d geo field names | fnames2d_mag(:) ! pointer to 2d mag field names ! ! Coordinate variables: real,pointer :: glat(:),glon(:) ! geographic lat lon grid real,pointer :: gmlat(:),gmlon(:) ! geomagnetic lat lon grid real,pointer :: lev(:),ilev(:) ! midpoint and interface geo levels real,pointer :: gmlev(:),gimlev(:) ! midpoint and interface mag levels ! ! All model times on the file (not just current history): integer,pointer :: mtimes(:,:) ! (3,nhist) ! ! Number of fields 2d,3d, geo,mag: integer :: | nf3d_geo, ! number of 3d geo fields (nlon,nlat,nlev) | nf3d_mag, ! number of 3d mag fields (mlon,mlat,mlev) | nf2d_geo, ! number of 2d geo fields (lon,lat) | nf2d_mag ! number of 2d mag fields (mlon,mlat) ! ! Field structures (see typedefs above): type(field_3d) :: f3d_geo(mxflds), f3d_mag(mxflds) type(field_2d) :: f2d_geo(mxflds), f2d_mag(mxflds) end type history