Ignore:
Timestamp:
Aug 9, 2023, 11:56:36 AM (16 months ago)
Author:
jbclement
Message:

Mars PCM/PEM 1D:
Small fixes to be able to run the Mars PCM 1D without "water" + Improvements/addition of scripts in deftank/pem to run the PEM 1D model according to Laskar orbital parameters.
JBC

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/deftank/pem/modify_startfi_orbit.sh

    r3025 r3026  
    44name_file="startfi.nc"
    55
    6 new_obl=30.
    7 new_exc=0.
    8 new_Lsp=250.
    9 
    10 year_day=669.
    11 halfaxe=227.94
     6new_obl=30.0286
     7new_exc=0.08212066
     8new_Lsp=347.443947402
    129
    1310
    1411# Calculate modified values
     12year_day=669.
     13halfaxe=227.94
    1514pi=$(echo "4*a(1)" | bc -l)
    16 arg=$(echo "0.5*2.*$pi*$new_Lsp/360." | bc -l)
    17 zx0=$(echo "-2.*-2.0*a(s($arg)/c($arg)*sqrt((1. - $new_exc)/(1. + $new_exc)))" | bc -l)
    18 if [ $(echo "$zx0 < 0" | bc -l) -eq 1 ]; then
     15degrad=$(echo "360./(2.*$pi)" | bc -l)
     16tan=$(echo "s(0.5*$new_Lsp/$degrad)/c(0.5*$new_Lsp/$degrad)" | bc -l)
     17zx0=$(echo "-2.*a($tan*sqrt((1.-$new_exc)/(1.+$new_exc)))" | bc -l)
     18if [ $(echo "$zx0 <= 0" | bc -l) -eq 1 ]; then
    1919  zx0=$(echo "$zx0 + 2.*$pi" | bc -l)
    2020fi
     
    2424# controle(15) = periheli ! min. Sun-Mars distance (Mkm)  ̃206.66
    2525# controle(16) = aphelie  ! max. SUn-Mars distance (Mkm)  ̃249.22
    26 # controle(16) = peri_day ! date of perihelion (sols since N. spring)
     26# controle(17) = peri_day ! date of perihelion (sols since N. spring)
    2727# controle(18) = obliquit ! Obliquity of the planet (deg)  ̃23.98
    2828ncap2 -O -s "controle(17)=$new_obl" \
     
    3434# Rename the temporary file back to the original filename
    3535mv $name_file.temp $name_file
     36
     37echo New obliquit = $new_obl
     38echo New periheli = $(echo "$halfaxe*(1-$new_exc)" | bc -l)
     39echo New aphelie = $(echo "$halfaxe*(1+$new_exc)" | bc -l)
     40echo New peri_day = $solp
Note: See TracChangeset for help on using the changeset viewer.