################################################################################ # # # Unless further variables or options for existing variables are introduced, # # DO NOT MODIFY this file! This is only a helper file! # # # ################################################################################ # # # This file does the actual work of selecting and reading in the RAW # # wind data for Jupiter as specified by the user. For user specification use, # # e.g., DemoJupiterAtmo3D.arts (or its 1D equivalent) as template. The # # template also contains the detailed information on which indices are linked # # to which specific value/selection for each of the variables. The full # # arrays, which the indices refer to and from which the actual values are # # extracted, are defined in atmo_mars.arts (hence, atmo_mars.arts needs to be # # included before the file at hand). # # # # This file expects the following input parameters: # # atmo (Index) The atmospheric scenario. # # windcase (ArrayOfIndex) Wind setup selected # # (off/Galileo/thermal). # # # # Files to be included before this file: # # includes/jupiter/atmo_jupiter.arts # # includes/common/createvars.arts # # # # It provides following output: # # wind_u_raw (GriddedField3) raw version of wind_u_field # # # ################################################################################ Arts2 { # We will need to dummy-store some data in files to be able to export data from # forloops. So we create some dummy names. #StringSet( tmpformat, "ascii" ) StringSet( tmpformat, "binary" ) StringSet( Btmp, "tmp1.xml" ) # Create a dummy file with empty wind data (because regardless of whether there # actually IS data, we are going to read the storage dummy at least once. so we # need to create an empty version first.) Touch( gf3tmp ) #this in case gf3tmp hasn't been used before Delete( gf3tmp ) #this to throw away possible data in gf3tmp (if it was used before) Touch( gf3tmp ) #this to initialize it again after deleting # this to have a properly formated file to read after the forloops WriteXML( output_file_format=tmpformat, in=gf3tmp, filename=Btmp ) # Get data for one wind component AgendaCreate( windloop_agenda ) AgendaSet( windloop_agenda ){ Extract( strtmp, casearray, forloop_index ) Append( specfilename, strtmp ) # Print( specfilename, 0 ) ReadXML( gf3tmp, specfilename ) WriteXML( output_file_format=tmpformat, in=gf3tmp, filename=Btmp ) } # Read the wind raw data # --- # first, create the casename string down to the common filename part in the # scenario folder. Data is located in: # Jupiter.atmo/ (for wind atmo is fixed to 'mean') Copy( atmostr, atmobase ) #Extract( subatmo, atmoarray, atmo ) Extract( subatmo, atmoarray, 0 ) Append( atmostr, subatmo ) StringSet( strtmp, "/" ) Append( atmostr, strtmp ) Append( atmostr, subatmo ) StringSet( strtmp, "." ) Append( atmostr, strtmp ) # now we obtain the wind components one-by-one # (1) E-W Wind Copy( specfilename, atmostr ) Select( casearray, windarray, windcase ) nelemGet( ncases, casearray ) IndexStepDown( ncases, ncases ) Copy( forloop_agenda, windloop_agenda ) ForLoop( forloop_agenda, 0, ncases, 1 ) ReadXML( out=wind_u_raw, filename=Btmp ) # and we clean up the dummy files (not completely, though. but we write an empty # variable into them.) Delete( strtmp ) Touch( strtmp ) WriteXML( output_file_format=tmpformat, in=strtmp, filename=Btmp ) }