# # Tests extraction of (computational) atmospheric grids from data grids. Also # crops this grids to a user-defined region and tests functionality by # interpolating the considered atmospheric fields on the extracted grids. # # Note: Cropping does not (yet?) take into account cyclicity of longitudinal # grid (i.e. we can only crop within the data grid, which here is 0-360deg. That # is, a cropped region, e.g., of -30..30 actually covering 330..360=0..30 is not # possible (yet?), but -30..30 setting will result in 0..30deg grid. # # Jana Mendrok 2013-10-04 Arts2 { INCLUDE "general/general.arts" # create the bunch of local variables we are going to use later on NumericCreate( pmin ) NumericCreate( pmax ) NumericCreate( latmin ) NumericCreate( latmax ) NumericCreate( lonmin ) NumericCreate( lonmax ) StringCreate( caseext ) StringCreate( casename ) StringCreate( atmcase ) StringCreate( Bname ) GriddedField3Create( grid_field ) NumericSet( pmin, 1e1 ) NumericSet( pmax, 2e5 ) NumericSet( latmin, -90 ) NumericSet( latmax, -63 ) NumericSet( lonmin, -17 ) NumericSet( lonmax, 177 ) AtmosphereSet3D # set basic case folder StringCreate( basename ) StringSet( basename, "planets/Jupiter/MPS/" ) # atmcase name StringSet( atmcase, "Jupiter.mean" ) abs_speciesSet( species=["CH4", "H2", "H2-CIA-H2-0", "CH4-CIA-CH4-0"] ) # construct atmcase name Append( basename, atmcase ) StringSet( caseext, "/" ) Append( basename, caseext ) Append( basename, atmcase ) AtmRawRead( basename=basename ) StringSet( Bname, "planets/Jupiter/Khurana/Khurana.B_w.xml.gz" ) ReadXML( grid_field, Bname ) # now derive p_grid from given raw z_field and regrid atm fields to this p_gridFromZRaw( no_negZ=0 ) lat_gridFromRawField( field_raw=grid_field ) lon_gridFromRawField( field_raw=grid_field ) VectorCrop( out=p_grid, in=p_grid, min_value=pmin, max_value=pmax ) VectorCrop( out=lat_grid, in=lat_grid, min_value=latmin, max_value=latmax ) VectorCrop( out=lon_grid, in=lon_grid, min_value=lonmin, max_value=lonmax ) #Print( p_grid ) #Print( lat_grid ) #Print( lon_grid ) AtmFieldsCalcExpand1D( vmr_zeropadding=1 ) }