Skip to content

Commit

Permalink
Updates for more stretched grids
Browse files Browse the repository at this point in the history
  • Loading branch information
mathomp4 committed Apr 25, 2023
1 parent 3f1fd53 commit 72bfed1
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions pre/regrid.pl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
$imo{"f"} = "2880"; $jmo{"f"} = "1440"; # OSTIA
$imo{"CS"} = 1; # OSTIA cubed-sphere

foreach (qw/ 90 180 270 360 540 720 1080 1440 2160 2880 5760 /) {
foreach (qw/ 90 180 270 360 540 720 1080 1440 1536 2160 2880 5760 /) {
$CSo{"C$_"} = $_;
$imo{"C$_"} = $_;
$jmo{"C$_"} = 6*$_;
Expand All @@ -109,7 +109,7 @@

# atmosphere cubed-sphere grids
#------------------------------
foreach (qw/ 12 24 48 90 180 270 360 540 720 1080 1440 2160 2880 5760 /) {
foreach (qw/ 12 24 48 90 180 270 360 540 720 1080 1440 1536 2160 2880 5760 /) {
$CS{"C$_"} = $_;
$im{"C$_"} = $_;
$jm{"C$_"} = 6*$_;
Expand Down Expand Up @@ -139,6 +139,7 @@
"C720" => "e",
"C1080" => "e",
"C1440" => "e",
"C1536" => "e",
"C2160" => "e",
"C2880" => "e",
"C5760" => "e" );
Expand Down Expand Up @@ -701,8 +702,8 @@ sub check_inputs {
. "a = 4 deg C12 C180 C1000 C270 - 13km to 100km \n"
. "b = 2 deg C24 C360 C1440 C540 - 7km to 50km \n"
. "c = 1 deg C48 C500 C2880 C1080 - 3km to 25km \n"
. "d = 1/2 deg C90 C720 C5760 C2160 - 1km to 12km \n"
. "e = 1/4 deg\n\n");
. "d = 1/2 deg C90 C720 C5760 C1536 - 2km to 18km \n"
. "e = 1/4 deg C2160 - 1km to 12km \n\n");

print "FVCORE: $fvrst\n"
. "Getting atmosphere grid resolution from INPUT fvcore file ... ";
Expand Down Expand Up @@ -2135,6 +2136,18 @@ sub set_IN_OUT {
elsif ($atmosID2 eq "270x1620") {
$bcsdir = "/discover/nobackup/projects/gmao/osse2/stage/BCS_FILES/CF0270x6C_CF0270x6C";
}
elsif ($atmosID2 eq "540x3240") {
$bcsdir = "/discover/nobackup/projects/gmao/osse2/stage/BCS_FILES/CF0540x6C_CF0540x6C";
}
elsif ($atmosID2 eq "1080x6480") {
$bcsdir = "/discover/nobackup/projects/gmao/osse2/stage/BCS_FILES/CF1080x6C_CF1080x6C";
}
elsif ($atmosID2 eq "1536x7680") {
$bcsdir = "/discover/nobackup/projects/gmao/osse2/stage/BCS_FILES/CF1536x6C_CF1536x6C";
}
elsif ($atmosID2 eq "2160x12960") {
$bcsdir = "/discover/nobackup/projects/gmao/osse2/stage/BCS_FILES/CF2160x6C_CF2160x6C";
}
elsif ($rank{$bcsTAG} >= $rank{"Icarus-NLv3_Reynolds"}) {
$bcsdir = "$bcsHEAD/Icarus-NLv3/$bcsTAG/$gridID";
}
Expand Down Expand Up @@ -2421,6 +2434,7 @@ sub regrid_upperair_rsts_CS {
elsif ($im eq "720") { $NPE = 192; $nwrit = 2 }
elsif ($im eq "1080") { $NPE = 384; $nwrit = 2 }
elsif ($im eq "1440") { $NPE = 576; $nwrit = 2 }
elsif ($im eq "1536") { $NPE = 576; $nwrit = 2 }
elsif ($im eq "2160") { $NPE = 768; $nwrit = 2 }
elsif ($im eq "2880") { $NPE = 5400; $nwrit = 6 }
elsif ($im eq "5760") { $NPE = 5400; $nwrit = 6 }
Expand Down Expand Up @@ -2543,7 +2557,7 @@ sub regrid_upperair_rsts_CS {
$target_lat = 39.5;
$target_lon = -98.35;
$stretch_fac = 2.5;
} elsif ( ($im eq 1536)) {
} elsif ( ($im eq "1536") ) {
$stretched_grid = 1;
$target_lat = 39.5;
$target_lon = -98.35;
Expand Down

0 comments on commit 72bfed1

Please sign in to comment.