Category:KRC Tutorial

From krc
(Difference between revisions)
Jump to: navigation, search
(Simple Runs for Mars)
(Simple Runs for Mars)
Line 115: Line 115:
 
  dv>  
 
  dv>  
  
Any scalar listed in an input file can be used as an input:
+
Frequently, you will want to work with a specific Ls
  dv> out_1=krc(lat=-4.5,lon=137.5,ALBEDO=0.22,ELEV=-4.5,INERTIA=120.,SLOPE=12.,SLOAZI=5.,N24=36,SPEC_HEAT=600.,PTOTAL=610.)
+
  dv> out=krc(lat=-4.5,lon=137.5,ls=122.45)
  dv> out_2=krc(lat=-4.5,lon=137.5,ALBEDO=0.22,ELEV=-4.5,INERTIA=240.,SLOPE=22.,SLOAZI=345.,N24=36,SPEC_HEAT=600.,PTOTAL=610.)
+
  dv>
  dv> out_3=krc(lat=-4.5,lon=137.5,ALBEDO=0.22,ELEV=-4.5,INERTIA=480.,SLOPE=00.,SLOAZI=45.,N24=36,SPEC_HEAT=600.,PTOTAL=610.)
+
 
dv> plot(out_1.tsurf[,1,1],out_2.tsurf[,1,1],out_3.tsurf[,1,1],Xaxis=out_1.time)
+
More generally, any scalar listed in an input file can be used as an input:
 +
dv> out_1=krc(lat=-4.5,lon=137.5,ALBEDO=0.22,ELEV=-4.5,INERTIA=120.,SLOPE=12.,SLOAZI=45.,N24=36,SPEC_HEAT=600.,PTOTAL=610.)
 +
  dv> out_2=krc(lat=-4.5,DUSTA=0.91,ARC2=0.6,TAURAT=0.201)
  
 
Make sure to read the helplist to familiarize yourself with the definition and range of inputs.
 
Make sure to read the helplist to familiarize yourself with the definition and range of inputs.

Revision as of 11:42, 7 November 2016

Starting the KRC function

To start the KRC function in davinci, simply run the krc() function:

% davinci
dv> krc()

When started in this manner, the krc function will provide some context and definitions for some of the most common inputs

Simple Runs for Mars

Now let's run KRC for a simple case on Mars to determine the surface temperature in Gale Crater (latitude = -4.5; longitude = 137.4)

dv> out=krc(lat=-4.5,lon=137.5)
Read TEXT file: 61 lines
Found Default File: $DV_SCRIPT_FILES/krc_support/porb_defaults/Mars_Mars.porb.hdf
./Applications/davinci.app/Contents/Resources/library/script_files/krc_support/ti_map2ppd_v4.vicar: VICAR bsq image: 720x360x1, 32 bits
./Applications/davinci.app/Contents/Resources/library/script_files/krc_support/albedo_2ppd.vicar: VICAR bsq image: 720x360x1, 32 bits
./Applications/davinci.app/Contents/Resources/library/script_files/krc_support/mola_2ppd.vicar: VICAR bsq image: 720x360x1, 32 bits

Running KRC model with:

Output:
	Every ~1.000 Ls (1.9083 JD) for 360 seasons starting at 0.10 Ls
	For 96 times per day, every 15 local minutes
	Running model WITH NO temperature prediction
	because DELJUL < 3.0779

For a Surface With:
	29 Layers with uniform material properties and 384 daily model time steps
	and T-dependant material properties
	and an insulating bottom edge condition

With Observation Parameters:
	LATITUDE:  -4.50	LONGITUDE: 137.50
	ELEVATION: -3.606km^	SLOPE/AZIMUTH: 0.00/0.00deg
	ALBEDO: 0.228^		OPACITY: 0.300
	HOUR: All		LS: All

Upper Material:
	INERTIA: 230.00
	CONDUCTIVITY: 0.0502*
	DENSITY: 1770.00*
	SPECIFIC HEAT: 595.55
	POROSITY: 0.40

* = derived value unless overwritten by user
^ = from TES 2ppd map unless overwritten by user
& = ajusted for max authorized value 

 
struct, 14 elements
   tsurf: 96x1x360 array of double, bsq format [276,480 bytes]
   tbol: 96x1x360 array of double, bsq format [276,480 bytes]
   tatm: 96x1x360 array of double, bsq format [276,480 bytes]
   down_ir: 96x1x360 array of double, bsq format [276,480 bytes]
   down_vis: 96x1x360 array of double, bsq format [276,480 bytes]
   time: 96x1x1 array of float, bsq format [384 bytes]
   ls: 1x1x360 array of double, bsq format [2,880 bytes]
   lat: -4.50000	
   elev: -3.60558	
   layer: struct, 8 elements
       thickness: 28x2x1 array of double, bsq format [448 bytes]
       center: 28x2x1 array of double, bsq format [448 bytes]
       top: 28x2x1 array of double, bsq format [448 bytes]
       center_mass: 28x1x1 array of double, bsq format [224 bytes]
       mass_burden: 28x1x1 array of double, bsq format [224 bytes]
       thermal_scales: 28x1x1 array of double, bsq format [224 bytes]
       tmax: 28x1x360 array of double, bsq format [80,640 bytes]
       tmin: 28x1x360 array of double, bsq format [80,640 bytes]
   anc: struct, 11 elements
       krccom: struct, 5 elements...
       JDate: 1x1x360 array of double, bsq format [2,880 bytes]
       ref_pressure: 1x1x360 array of double, bsq format [2,880 bytes]
       taud: 1x1x360 array of double, bsq format [2,880 bytes]
       total_frost: 1x1x360 array of double, bsq format [2,880 bytes]
       avg_heat_flow: 1x1x360 array of double, bsq format [2,880 bytes]
       frost_alb: 1x1x360 array of double, bsq format [2,880 bytes]
       frost: 1x1x360 array of double, bsq format [2,880 bytes]
       tatm_predict: 1x1x360 array of double, bsq format [2,880 bytes]
       delta_t_rms: 1x1x360 array of double, bsq format [2,880 bytes]
       converge_days: 1x1x360 array of double, bsq format [2,880 bytes]
   version: "v3.2.1"
   alb: 0.228235	
   body: "Mars"

The output is a structure containing various model parameters, as well a calculated quantities.

Surface temperatures are stored in .tsurf, local times in .time, and Ls in .ls Local times are stored in the x axis, depth in the y axis (not used yet), and season in the z axis.

So let's plot a diurnal temperature curve at Ls = 0.1 (first ls index):

dv> plot(out.tsurf[,1,1],xaxis=out.time)
dv>  

Figure 01.png

Let's plot a seasonal temperature curve at 0:25 (first time index):

dv> plot(out.tsurf[1,1,],xaxis=out.ls)
dv>

Figure 02.png

When provided with the coordinates of a specific location on Mars, the krc() function reads some contextual information from external maps:

- the elevation: ELEVATION: -3.606km

- the albedo: ALBEDO : 0.228

Of course, these parameters can be set by the user:

dv> out=krc(lat=-4.5,lon=137.5,ALBEDO=0.22,ELEV=-4.5)
dv> 

Frequently, you will want to work with a specific Ls

dv> out=krc(lat=-4.5,lon=137.5,ls=122.45)
dv>

More generally, any scalar listed in an input file can be used as an input:

dv> out_1=krc(lat=-4.5,lon=137.5,ALBEDO=0.22,ELEV=-4.5,INERTIA=120.,SLOPE=12.,SLOAZI=45.,N24=36,SPEC_HEAT=600.,PTOTAL=610.)
dv> out_2=krc(lat=-4.5,DUSTA=0.91,ARC2=0.6,TAURAT=0.201)

Make sure to read the helplist to familiarize yourself with the definition and range of inputs.

More Advanced Functionalities

In this section, a few more advanced functionality will be presented.

  • Time-Dependent Albedo
  • Time-Dependent Opacity
  • Temperature-dependent Specific heat
  • Temperature-dependent Conductivity
  • Two layer Regolith

This category currently contains no pages or media.

Personal tools