link

From krc
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
For Mac
 
 
##########################################################################################
 
1: Install FORTRAN compiler.
 
 
The preferred compiler would be gfortran found here:
 
http://gcc.gnu.org/wiki/GFortranBinaries#MacOS
 
OR
 
http://hpc.sourceforge.net
 
 
But it may or may not be required to have additional library files associated with g77.
 
Ignore installing g77 on your first attempt to compile krc on a mac, but compile g77 if
 
errors associated with missing library files show up during the compilation.
 
http://www.webmo.net/support/fortran_osx.html
 
download the g77 compiler called g77-intel-bin.tar.gz (Intel Mac only)
 
Then open a terminal window, go to the place where g77-intel-bin.tar.gz is located.
 
 
Type:
 
gunzip g77-intel-bin.tar.gz
 
sudo tar -xvf g77-intel-bin.tar -C /
 
 
GOOD NEWS: No modifications of Makefile were required for version 2.3.2
 
 
(was not the cas with older versions)
 
 
##########################################################################################
 
2: Put the zipped krc file where you want it to be run from
 
 
##########################################################################################
 
3: Unzip krc
 
 
##########################################################################################
 
4: IF YOU ARE NOT USING KRC WITH DAVINCI, IGNORE THIS STEP
 
IF YOU ARE USING KRC WITH THE DAVINCI INTERFACE:
 
Some default krc variables must be modified.
 
open /krc/src/krccom.inc
 
OR/AND        krcc8m.f
 
 
Find the lines where MAXN1,MAXN2,MAXN3,MAXN4,MAXN5,MAXNH,KOMMON are defined
 
and replace with:
 
 
PARAMETER (MAXN1 =1000)   ! dimension of layers
 
PARAMETER (MAXN2 =86400)  ! dimension of times of day: 384=24*16
 
PARAMETER (MAXN3 =16)   ! dimension of iteration days
 
PARAMETER (MAXN4 =37)   ! dimension of latitudes
 
PARAMETER (MAXN5 =2161)   ! dimension of saved seasons    #Uncomment it if necessary
 
PARAMETER (MAXNH =9600)   ! dimension of saved times of day
 
PARAMETER (KOMMON=512000000) ! 4-byte words
 
 
Save and quit
 
 
##########################################################################################
 
5: Now go to /krc/src/cfiles and type:
 
make
 
Usually there are some minor-looking warnings; ignore them for now
 
 
##########################################################################################
 
6: Now go to /krc/src/ and type:
 
make
 
Sometimes, there are some minor-looking warnings; ignore them for now
 
 
##########################################################################################
 
7: Go back to /krc/src/cfiles and type:
 
make
 
There should be no warnings this time
 
 
##########################################################################################
 
8: Go back to /krc/src/ and type:
 
make
 
There should be no warnings this time.
 
Screen should indicate " 'krc' is up to date "
 
 
##########################################################################################
 
 
 
 
 
C_Titl  krcc8m.f = KRCCOM common for input and transfer variables
 
C_Limitations
 
      IMPLICIT NONE            ! none-the-less, try to code with usage
 
      INTEGER*4 MAXN1,MAXN2,MAXN3,MAXN4,MAXN5,MAXN6,MAXNH,MAXBOT
 
    &,MAXN1P,NUMFD,NUMID,NUMLD,N4KRC,NWKRC,KOMMON,MAXN4E
 
C Here are all the dimension-defining parameters for items in any common
 
      PARAMETER (MAXN1 =1000)    ! dimension of layers
 
      PARAMETER (MAXN2 =384*4*256)  ! dimension of times of day: 384=24*16
 
      PARAMETER (MAXN3 =16)    ! dimension of iteration days
 
      PARAMETER (MAXN4 =37)    ! dimension of latitudes
 
      PARAMETER (MAXN4E =38)    ! " "  Even needed for LATCOM NDJ4
 
      PARAMETER (MAXN5 =2161)    ! dimension of saved seasons
 
      PARAMETER (MAXN6 =6)      ! dimension of saved years
 
      PARAMETER (MAXNH =9600)    ! dimension of saved times of day, multiple of 24
 
      PARAMETER (MAXBOT=14)      ! dimension of time doublings  MUST BE EVEN
 
      PARAMETER (MAXN1P=MAXN1+1) ! dimension layer temperature points
 
      PARAMETER (NUMFD=96, NUMID=40, NUMLD=20) ! number of each type
 
      PARAMETER (N4KRC=NUMFD*2+NUMID+NUMLD+2*MAXN4*2+104/4) ! # of 4-byte words
 
              ! above is size of common in 32-bit words. it MUST be even
 
      PARAMETER (NWKRC=N4KRC/2) ! number of Real words in krccom. Used by tdisk
 
      PARAMETER (KOMMON=512000000) ! Storage used by tdisk
 
 
 
 
 
cd src/cfiles/
 
make
 
 
cd ..
 
make
 
 
cd ./cfiles
 
make
 
 
cd ..
 
make
 
 
cd ../run
 
rm krc
 
rm porbmn
 
 
ln -s ../src/krc
 
ln -s ../src/porbmn
 
 
mkdir out/
 
 
 
 
  
  

Revision as of 20:53, 8 January 2019


KRC allows homogeneous physical properties or two zones, each of which may have temperature-dependent thermal conductivity and specific heat, or a large table define material properties versus depth.

KRC uses a one-layer atmosphere that is gray in both the solar and infra-red regions. Radiative transfer and net atmosphere heating are based on a Two-stream Delta-Eddington [2] model for insolation; direct onto sloped surface and diffuse, with possible twilight extension. Dust scattering uses a Henyey-Greenstein phase function [red link: https://en.wikipedia.org/wiki/Louis_G._Henyey}.

The atmosphere may contain a condensing gas, specified by its molecular weight [3] , latent heat of condensation [4] , and a Clausius-Clapeyron saturation relation [5].

Orbits are specified by Keplerian elements [6], pre-converted into a set of geometry terms and rotation matrices for rapid use ; seasons are at uniform increments of time. Mean orbital elements are pre-calculated for any epoch (all planets and several comets and asteroids).

The above capabilities are described in : H.H. Kieffer, Thermal model for analysis of Mars infrared mapping, J. Geophys. Res.: Planets, v.118, 451-570 (2013) Both solar and lunar-like eclipses are supported, with KRC automatically going into a thin-layer, fine-time mode during an eclipse. Both solar and thermal radiative flux from a planet onto its satellite may be included to first-order.

For sloped surfaces, the radiation from the far ground can be based on the surface and atmosphere temperatures of prior KRC runs, such as the upwind side of a dune viewing the temperatures of the down-wind side of a similar dune, with the atmosphere for a regional flat surface. (( The default is for far ground to be at the same temperature as the local slope and the atmosphere radiation exchange to be with the sloped surface; this is reasonable only for low slopes.

The KRC web-site [7] allows several ways to access KRC: - Quick run of examples for Diurnal and seasonal temperatures - Submission of a formatted input file that allows access to all KRC features - An interactive interface which accesses most KRC features - Download of source code to build and run at your own site.


Diurnal CO2 condensation and defrosting often leads to rather small instabilities. Most often, these instabilities yield surface temperature oscillations of a fraction of a K.

But near the local time of first frost deposition and last frost removal, oscillations can reach 20+K, without clear consequences for temperatures calculated at other times.

dv> out=krc(lat=-30.,INERTIA=30.)
dv> plot(out.tsurf[,,],"I=30 SI")
dv>


Frosting Defrosting.png

Bottom Line:

- Stay away from frosted surfaces if you can;
- Reduce the seasonal and/or diurnal sampling resolution (doesn't solve the issue, but dissolves it);
- Identify the times (LT, Ls) when this issue is apparent and filter out these model results
Personal tools